From 8a734293f04106705e9aa2590273f2bc17b1f43f Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 4 Sep 2025 10:22:51 +0530 Subject: [PATCH 01/11] feat: add requestBody param examples in specs --- app/controllers/api/account.php | 2 +- composer.json | 2 +- composer.lock | 250 +++++++++--------- .../Collections/Documents/Create.php | 2 +- .../SDK/Specification/Format/OpenAPI3.php | 5 +- .../SDK/Specification/Format/Swagger2.php | 5 +- 6 files changed, 142 insertions(+), 124 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 24cc116aed..7f76e39cd9 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -3168,7 +3168,7 @@ App::patch('/v1/account/prefs') ], contentType: ContentType::JSON )) - ->param('prefs', [], new Assoc(), 'Prefs key-value JSON object.') + ->param('prefs', [], new Assoc(), 'Prefs key-value JSON object.', example: '{"language":"en","timezone":"UTC","darkTheme":true}') ->inject('requestTimestamp') ->inject('response') ->inject('user') diff --git a/composer.json b/composer.json index 0c662c775f..c4e5e72305 100644 --- a/composer.json +++ b/composer.json @@ -68,7 +68,7 @@ "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", "utopia-php/preloader": "0.2.*", - "utopia-php/queue": "0.11.0", + "utopia-php/queue": "0.12.0", "utopia-php/registry": "0.5.*", "utopia-php/storage": "0.18.*", "utopia-php/swoole": "0.8.*", diff --git a/composer.lock b/composer.lock index c22b7f4b05..2df83b171c 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": "0da713ee5642eba1d30bc51c1a04a723", + "content-hash": "afc8b2b314887779f507fd6a101ef6af", "packages": [ { "name": "adhocore/jwt", @@ -67,6 +67,99 @@ ], "time": "2025-02-18T01:00:50+00:00" }, + { + "name": "appwrite-labs/php-amqplib", + "version": "0.1.2", + "source": { + "type": "git", + "url": "https://github.com/appwrite-labs/php-amqplib.git", + "reference": "c8e043045388ddad5ddab5f48df2b9046ca6873f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/appwrite-labs/php-amqplib/zipball/c8e043045388ddad5ddab5f48df2b9046ca6873f", + "reference": "c8e043045388ddad5ddab5f48df2b9046ca6873f", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-sockets": "*", + "php": "^7.2||^8.0", + "phpseclib/phpseclib": "^2.0|^3.0" + }, + "conflict": { + "php": "7.4.0 - 7.4.1" + }, + "replace": { + "php-amqplib/php-amqplib": "self.version", + "videlalvaro/php-amqplib": "self.version" + }, + "require-dev": { + "ext-curl": "*", + "nategood/httpful": "^0.2.20", + "phpunit/phpunit": "^7.5|^9.5", + "squizlabs/php_codesniffer": "^3.6", + "swoole/ide-helper": "^5.0" + }, + "suggest": { + "ext-swoole": "For Swoole coroutine support" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpAmqpLib\\": "PhpAmqpLib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Appwrite Labs", + "email": "team@appwrite.io", + "role": "Fork Maintainer" + }, + { + "name": "Alvaro Videla", + "role": "Original Maintainer" + }, + { + "name": "Raúl Araya", + "email": "nubeiro@gmail.com", + "role": "Maintainer" + }, + { + "name": "Luke Bakken", + "email": "luke@bakken.io", + "role": "Maintainer" + }, + { + "name": "Ramūnas Dronga", + "email": "github@ramuno.lt", + "role": "Maintainer" + } + ], + "description": "Fork of php-amqplib with Swoole coroutine support. A pure PHP implementation of the AMQP protocol tested against RabbitMQ.", + "homepage": "https://github.com/appwrite-labs/php-amqplib/", + "keywords": [ + "async", + "coroutine", + "message", + "queue", + "rabbitmq", + "swoole" + ], + "support": { + "source": "https://github.com/appwrite-labs/php-amqplib/tree/0.1.2" + }, + "time": "2025-07-04T20:54:22+00:00" + }, { "name": "appwrite/appwrite", "version": "15.1.0", @@ -1515,16 +1608,16 @@ }, { "name": "open-telemetry/sem-conv", - "version": "1.36.0", + "version": "1.37.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sem-conv.git", - "reference": "60dd18fd21d45e6f4234ecab89c14021b6e3de9a" + "reference": "8da7ec497c881e39afa6657d72586e27efbd29a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/60dd18fd21d45e6f4234ecab89c14021b6e3de9a", - "reference": "60dd18fd21d45e6f4234ecab89c14021b6e3de9a", + "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/8da7ec497c881e39afa6657d72586e27efbd29a1", + "reference": "8da7ec497c881e39afa6657d72586e27efbd29a1", "shasum": "" }, "require": { @@ -1568,7 +1661,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-08-04T03:22:08+00:00" + "time": "2025-09-03T12:08:10+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -1687,87 +1780,6 @@ }, "time": "2020-10-15T08:29:30+00:00" }, - { - "name": "php-amqplib/php-amqplib", - "version": "v3.7.3", - "source": { - "type": "git", - "url": "https://github.com/php-amqplib/php-amqplib.git", - "reference": "9f50fe69a9f1a19e2cb25596a354d705de36fe59" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/9f50fe69a9f1a19e2cb25596a354d705de36fe59", - "reference": "9f50fe69a9f1a19e2cb25596a354d705de36fe59", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-sockets": "*", - "php": "^7.2||^8.0", - "phpseclib/phpseclib": "^2.0|^3.0" - }, - "conflict": { - "php": "7.4.0 - 7.4.1" - }, - "replace": { - "videlalvaro/php-amqplib": "self.version" - }, - "require-dev": { - "ext-curl": "*", - "nategood/httpful": "^0.2.20", - "phpunit/phpunit": "^7.5|^9.5", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpAmqpLib\\": "PhpAmqpLib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-or-later" - ], - "authors": [ - { - "name": "Alvaro Videla", - "role": "Original Maintainer" - }, - { - "name": "Raúl Araya", - "email": "nubeiro@gmail.com", - "role": "Maintainer" - }, - { - "name": "Luke Bakken", - "email": "luke@bakken.io", - "role": "Maintainer" - }, - { - "name": "Ramūnas Dronga", - "email": "github@ramuno.lt", - "role": "Maintainer" - } - ], - "description": "Formerly videlalvaro/php-amqplib. This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.", - "homepage": "https://github.com/php-amqplib/php-amqplib/", - "keywords": [ - "message", - "queue", - "rabbitmq" - ], - "support": { - "issues": "https://github.com/php-amqplib/php-amqplib/issues", - "source": "https://github.com/php-amqplib/php-amqplib/tree/v3.7.3" - }, - "time": "2025-02-18T20:11:13+00:00" - }, { "name": "php-http/discovery", "version": "1.20.0", @@ -3638,16 +3650,16 @@ }, { "name": "utopia-php/database", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "06ffa2b1c977f5451200a1ee82a500be1390a789" + "reference": "fcd166b715a14cfea11f7a9c47d4c0076bedcecd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/06ffa2b1c977f5451200a1ee82a500be1390a789", - "reference": "06ffa2b1c977f5451200a1ee82a500be1390a789", + "url": "https://api.github.com/repos/utopia-php/database/zipball/fcd166b715a14cfea11f7a9c47d4c0076bedcecd", + "reference": "fcd166b715a14cfea11f7a9c47d4c0076bedcecd", "shasum": "" }, "require": { @@ -3688,9 +3700,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/1.3.0" + "source": "https://github.com/utopia-php/database/tree/1.3.1" }, - "time": "2025-09-02T16:20:02+00:00" + "time": "2025-09-03T15:50:41+00:00" }, { "name": "utopia-php/detector", @@ -3942,16 +3954,16 @@ }, { "name": "utopia-php/framework", - "version": "0.33.22", + "version": "0.33.24", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "c01a815cb976c9255e045fc3bcc3f5fcf477e0bc" + "reference": "5112b1023342163e3fbedec99f38fc32c8700aa0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/c01a815cb976c9255e045fc3bcc3f5fcf477e0bc", - "reference": "c01a815cb976c9255e045fc3bcc3f5fcf477e0bc", + "url": "https://api.github.com/repos/utopia-php/http/zipball/5112b1023342163e3fbedec99f38fc32c8700aa0", + "reference": "5112b1023342163e3fbedec99f38fc32c8700aa0", "shasum": "" }, "require": { @@ -3983,9 +3995,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.22" + "source": "https://github.com/utopia-php/http/tree/0.33.24" }, - "time": "2025-08-26T10:29:50+00:00" + "time": "2025-09-04T04:18:39+00:00" }, { "name": "utopia-php/image", @@ -4296,16 +4308,16 @@ }, { "name": "utopia-php/platform", - "version": "0.7.8", + "version": "0.7.11", "source": { "type": "git", "url": "https://github.com/utopia-php/platform.git", - "reference": "e3a4536c46f10988b1a446ec6b8dd8a9914be854" + "reference": "f3341d1ef82e0b0f9d5f2c61829c947d86f8c850" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/e3a4536c46f10988b1a446ec6b8dd8a9914be854", - "reference": "e3a4536c46f10988b1a446ec6b8dd8a9914be854", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/f3341d1ef82e0b0f9d5f2c61829c947d86f8c850", + "reference": "f3341d1ef82e0b0f9d5f2c61829c947d86f8c850", "shasum": "" }, "require": { @@ -4314,7 +4326,7 @@ "php": ">=8.0", "utopia-php/cli": "0.15.*", "utopia-php/framework": "0.33.*", - "utopia-php/queue": "0.11.*" + "utopia-php/queue": "^0.12.0" }, "require-dev": { "laravel/pint": "1.*", @@ -4340,9 +4352,9 @@ ], "support": { "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.7.8" + "source": "https://github.com/utopia-php/platform/tree/0.7.11" }, - "time": "2025-05-30T10:05:43+00:00" + "time": "2025-09-04T04:38:38+00:00" }, { "name": "utopia-php/pools", @@ -4451,21 +4463,21 @@ }, { "name": "utopia-php/queue", - "version": "0.11.0", + "version": "0.12.0", "source": { "type": "git", "url": "https://github.com/utopia-php/queue.git", - "reference": "06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5" + "reference": "3a7603ee712c592bfc54af4a76f0426c428b5574" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/queue/zipball/06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5", - "reference": "06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5", + "url": "https://api.github.com/repos/utopia-php/queue/zipball/3a7603ee712c592bfc54af4a76f0426c428b5574", + "reference": "3a7603ee712c592bfc54af4a76f0426c428b5574", "shasum": "" }, "require": { + "appwrite-labs/php-amqplib": "^0.1", "php": ">=8.3", - "php-amqplib/php-amqplib": "^3.7", "utopia-php/cli": "0.15.*", "utopia-php/fetch": "0.4.*", "utopia-php/framework": "0.33.*", @@ -4511,9 +4523,9 @@ ], "support": { "issues": "https://github.com/utopia-php/queue/issues", - "source": "https://github.com/utopia-php/queue/tree/0.11.0" + "source": "https://github.com/utopia-php/queue/tree/0.12.0" }, - "time": "2025-05-30T09:52:38+00:00" + "time": "2025-06-24T18:58:38+00:00" }, { "name": "utopia-php/registry", @@ -5007,16 +5019,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.1.15", + "version": "1.1.16", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "8e8e39634ba7558704522959d88f3542563a5444" + "reference": "f8fbc4b1ba0e918825338f50cbdea4d887389c41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/8e8e39634ba7558704522959d88f3542563a5444", - "reference": "8e8e39634ba7558704522959d88f3542563a5444", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/f8fbc4b1ba0e918825338f50cbdea4d887389c41", + "reference": "f8fbc4b1ba0e918825338f50cbdea4d887389c41", "shasum": "" }, "require": { @@ -5052,9 +5064,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/1.1.15" + "source": "https://github.com/appwrite/sdk-generator/tree/1.1.16" }, - "time": "2025-08-27T04:59:35+00:00" + "time": "2025-09-03T06:50:04+00:00" }, { "name": "doctrine/annotations", 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 d274e1f128..fe101c6eef 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 @@ -116,7 +116,7 @@ class Create extends Action ->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) ->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.', true) + ->param('data', [], new JSON(), 'Document data as JSON object.', true, example: '{"username":"john.doe","email":"john.doe@example.com","fullName":"John Doe","age":30,"isAdmin":false}') ->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') diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 4a492e4c00..6271ae7006 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -433,7 +433,10 @@ class OpenAPI3 extends Format case 'Utopia\Validator\Assoc': $param['default'] = (empty($param['default'])) ? new \stdClass() : $param['default']; $node['schema']['type'] = 'object'; - $node['schema']['x-example'] = '{}'; + + $example = $param['example'] ?? '{}'; + $decodedExample = json_decode($example, true); + $node['schema']['x-example'] = json_last_error() === JSON_ERROR_NONE ? $decodedExample : $example; break; case 'Utopia\Storage\Validator\File': $consumes = ['multipart/form-data']; diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 313d46be8f..63b9f763f8 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -467,7 +467,10 @@ class Swagger2 extends Format case 'Utopia\Validator\Assoc': $node['type'] = 'object'; $node['default'] = (empty($param['default'])) ? new \stdClass() : $param['default']; - $node['x-example'] = '{}'; + + $example = $param['example'] ?? '{}'; + $decodedExample = json_decode($example, true); + $node['schema']['x-example'] = json_last_error() === JSON_ERROR_NONE ? $decodedExample : $example; break; case 'Utopia\Storage\Validator\File': $consumes = ['multipart/form-data']; From 27e2ec04eebe39a44d88895c07122a8fc3da3c46 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 4 Sep 2025 16:59:18 +0530 Subject: [PATCH 02/11] chore: keep it as a json string --- src/Appwrite/SDK/Specification/Format/OpenAPI3.php | 5 +---- src/Appwrite/SDK/Specification/Format/Swagger2.php | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 6271ae7006..39b03030fb 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -433,10 +433,7 @@ class OpenAPI3 extends Format case 'Utopia\Validator\Assoc': $param['default'] = (empty($param['default'])) ? new \stdClass() : $param['default']; $node['schema']['type'] = 'object'; - - $example = $param['example'] ?? '{}'; - $decodedExample = json_decode($example, true); - $node['schema']['x-example'] = json_last_error() === JSON_ERROR_NONE ? $decodedExample : $example; + $node['schema']['x-example'] = $param['example'] ?? '{}'; break; case 'Utopia\Storage\Validator\File': $consumes = ['multipart/form-data']; diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 63b9f763f8..96271ef89c 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -467,10 +467,7 @@ class Swagger2 extends Format case 'Utopia\Validator\Assoc': $node['type'] = 'object'; $node['default'] = (empty($param['default'])) ? new \stdClass() : $param['default']; - - $example = $param['example'] ?? '{}'; - $decodedExample = json_decode($example, true); - $node['schema']['x-example'] = json_last_error() === JSON_ERROR_NONE ? $decodedExample : $example; + $node['schema']['x-example'] = $param['example'] ?? '{}'; break; case 'Utopia\Storage\Validator\File': $consumes = ['multipart/form-data']; From a47d581eea67972a837f3ff722c987a47eebcce2 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 4 Sep 2025 22:45:46 +0530 Subject: [PATCH 03/11] fix: specs --- app/config/specs/open-api3-1.8.x-client.json | 4 ++-- app/config/specs/open-api3-1.8.x-console.json | 6 +++--- app/config/specs/open-api3-1.8.x-server.json | 6 +++--- app/config/specs/swagger2-1.8.x-client.json | 4 ++-- app/config/specs/swagger2-1.8.x-console.json | 6 +++--- app/config/specs/swagger2-1.8.x-server.json | 6 +++--- src/Appwrite/SDK/Specification/Format/OpenAPI3.php | 2 +- src/Appwrite/SDK/Specification/Format/Swagger2.php | 2 +- 8 files changed, 18 insertions(+), 18 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 c72300e004..003b53df5d 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -1891,7 +1891,7 @@ "prefs": { "type": "object", "description": "Prefs key-value JSON object.", - "x-example": "{}" + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" } }, "required": [ @@ -5020,7 +5020,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", 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 b39181e025..b55e2c0c58 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -1911,7 +1911,7 @@ "prefs": { "type": "object", "description": "Prefs key-value JSON object.", - "x-example": "{}" + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" } }, "required": [ @@ -9575,7 +9575,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -15150,7 +15150,7 @@ }, "\/health\/queue\/stats-resources": { "get": { - "summary": "Get stats resources queue", + "summary": "Get stats resources queue", "operationId": "healthGetQueueStatsResources", "tags": [ "health" 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 22f0affafa..ef8b8cf39f 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -1926,7 +1926,7 @@ "prefs": { "type": "object", "description": "Prefs key-value JSON object.", - "x-example": "{}" + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" } }, "required": [ @@ -9057,7 +9057,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -13887,7 +13887,7 @@ }, "\/health\/queue\/stats-resources": { "get": { - "summary": "Get stats resources queue", + "summary": "Get stats resources queue", "operationId": "healthGetQueueStatsResources", "tags": [ "health" diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index ea98bd764b..a4b548805a 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -1979,7 +1979,7 @@ "type": "object", "description": "Prefs key-value JSON object.", "default": {}, - "x-example": "{}" + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" } }, "required": [ @@ -5154,7 +5154,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 03435662b0..edf229b565 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -2009,7 +2009,7 @@ "type": "object", "description": "Prefs key-value JSON object.", "default": {}, - "x-example": "{}" + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" } }, "required": [ @@ -9680,7 +9680,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -15186,7 +15186,7 @@ }, "\/health\/queue\/stats-resources": { "get": { - "summary": "Get stats resources queue", + "summary": "Get stats resources queue", "operationId": "healthGetQueueStatsResources", "consumes": [], "produces": [ diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 5fb2c27cb9..f75d25238f 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -2023,7 +2023,7 @@ "type": "object", "description": "Prefs key-value JSON object.", "default": {}, - "x-example": "{}" + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" } }, "required": [ @@ -9152,7 +9152,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -13952,7 +13952,7 @@ }, "\/health\/queue\/stats-resources": { "get": { - "summary": "Get stats resources queue", + "summary": "Get stats resources queue", "operationId": "healthGetQueueStatsResources", "consumes": [], "produces": [ diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 39b03030fb..db95f984c8 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -433,7 +433,7 @@ class OpenAPI3 extends Format case 'Utopia\Validator\Assoc': $param['default'] = (empty($param['default'])) ? new \stdClass() : $param['default']; $node['schema']['type'] = 'object'; - $node['schema']['x-example'] = $param['example'] ?? '{}'; + $node['schema']['x-example'] = ($param['example'] ?? '') ?: '{}'; break; case 'Utopia\Storage\Validator\File': $consumes = ['multipart/form-data']; diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 96271ef89c..c734d37f0e 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -467,7 +467,7 @@ class Swagger2 extends Format case 'Utopia\Validator\Assoc': $node['type'] = 'object'; $node['default'] = (empty($param['default'])) ? new \stdClass() : $param['default']; - $node['schema']['x-example'] = $param['example'] ?? '{}'; + $node['x-example'] = ($param['example'] ?? '') ?: '{}'; break; case 'Utopia\Storage\Validator\File': $consumes = ['multipart/form-data']; From 586f4dff6fbdfb22746e9bc12f2f8cc494144482 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 5 Sep 2025 09:34:34 +0530 Subject: [PATCH 04/11] chore: update createRow as well --- app/config/specs/open-api3-1.8.x-client.json | 2 +- app/config/specs/open-api3-1.8.x-console.json | 2 +- app/config/specs/open-api3-1.8.x-server.json | 2 +- app/config/specs/open-api3-latest-client.json | 6 +++--- app/config/specs/open-api3-latest-console.json | 8 ++++---- app/config/specs/open-api3-latest-server.json | 8 ++++---- app/config/specs/swagger2-1.8.x-client.json | 2 +- app/config/specs/swagger2-1.8.x-console.json | 2 +- app/config/specs/swagger2-1.8.x-server.json | 2 +- app/config/specs/swagger2-latest-client.json | 6 +++--- app/config/specs/swagger2-latest-console.json | 8 ++++---- app/config/specs/swagger2-latest-server.json | 8 ++++---- .../Databases/Http/TablesDB/Tables/Rows/Create.php | 2 +- 13 files changed, 29 insertions(+), 29 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 003b53df5d..d782408679 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -7675,7 +7675,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", 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 b55e2c0c58..67eda14f0c 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -37474,7 +37474,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", 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 ef8b8cf39f..6028487515 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -27845,7 +27845,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index c72300e004..d782408679 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -1891,7 +1891,7 @@ "prefs": { "type": "object", "description": "Prefs key-value JSON object.", - "x-example": "{}" + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" } }, "required": [ @@ -5020,7 +5020,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -7675,7 +7675,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index b39181e025..67eda14f0c 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -1911,7 +1911,7 @@ "prefs": { "type": "object", "description": "Prefs key-value JSON object.", - "x-example": "{}" + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" } }, "required": [ @@ -9575,7 +9575,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -15150,7 +15150,7 @@ }, "\/health\/queue\/stats-resources": { "get": { - "summary": "Get stats resources queue", + "summary": "Get stats resources queue", "operationId": "healthGetQueueStatsResources", "tags": [ "health" @@ -37474,7 +37474,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 22f0affafa..6028487515 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -1926,7 +1926,7 @@ "prefs": { "type": "object", "description": "Prefs key-value JSON object.", - "x-example": "{}" + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" } }, "required": [ @@ -9057,7 +9057,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -13887,7 +13887,7 @@ }, "\/health\/queue\/stats-resources": { "get": { - "summary": "Get stats resources queue", + "summary": "Get stats resources queue", "operationId": "healthGetQueueStatsResources", "tags": [ "health" @@ -27845,7 +27845,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index a4b548805a..59c07f8985 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -7749,7 +7749,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index edf229b565..8ea3fb49b0 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -37572,7 +37572,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index f75d25238f..8fbc824421 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -28003,7 +28003,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index ea98bd764b..59c07f8985 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -1979,7 +1979,7 @@ "type": "object", "description": "Prefs key-value JSON object.", "default": {}, - "x-example": "{}" + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" } }, "required": [ @@ -5154,7 +5154,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -7749,7 +7749,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 03435662b0..8ea3fb49b0 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -2009,7 +2009,7 @@ "type": "object", "description": "Prefs key-value JSON object.", "default": {}, - "x-example": "{}" + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" } }, "required": [ @@ -9680,7 +9680,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -15186,7 +15186,7 @@ }, "\/health\/queue\/stats-resources": { "get": { - "summary": "Get stats resources queue", + "summary": "Get stats resources queue", "operationId": "healthGetQueueStatsResources", "consumes": [], "produces": [ @@ -37572,7 +37572,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 5fb2c27cb9..8fbc824421 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -2023,7 +2023,7 @@ "type": "object", "description": "Prefs key-value JSON object.", "default": {}, - "x-example": "{}" + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" } }, "required": [ @@ -9152,7 +9152,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -13952,7 +13952,7 @@ }, "\/health\/queue\/stats-resources": { "get": { - "summary": "Get stats resources queue", + "summary": "Get stats resources queue", "operationId": "healthGetQueueStatsResources", "consumes": [], "produces": [ @@ -28003,7 +28003,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{}" + "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php index 5290131dd1..11e2596b99 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php @@ -95,7 +95,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/tablesdb#tablesDBCreate). Make sure to define columns before creating rows.') - ->param('data', [], new JSON(), 'Row data as JSON object.', true) + ->param('data', [], new JSON(), 'Row data as JSON object.', true, example: '{"username":"john.doe","email":"john.doe@example.com","fullName":"John Doe","age":30,"isAdmin":false}') ->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 4cf3d0b87bb40624314defca5ba2050460e97b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 5 Sep 2025 09:12:35 +0200 Subject: [PATCH 05/11] move projects.list() to module --- app/controllers/api/projects.php | 74 ------------ docs/references/projects/list.md | 1 - .../Projects/Http/DevKeys/Projects/XList.php | 110 ++++++++++++++++++ .../Modules/Projects/Services/Http.php | 3 + 4 files changed, 113 insertions(+), 75 deletions(-) delete mode 100644 docs/references/projects/list.md create mode 100644 src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 4f34156115..ea3a00dcb6 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -30,14 +30,11 @@ use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Exception\Duplicate; -use Utopia\Database\Exception\Order as OrderException; -use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Query; use Utopia\Database\Validator\Datetime as DatetimeValidator; -use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\UID; use Utopia\Domains\Validator\PublicDomain; use Utopia\DSN\DSN; @@ -304,77 +301,6 @@ App::post('/v1/projects') ->dynamic($project, Response::MODEL_PROJECT); }); -App::get('/v1/projects') - ->desc('List projects') - ->groups(['api', 'projects']) - ->label('scope', 'projects.read') - ->label('sdk', new Method( - namespace: 'projects', - group: 'projects', - name: 'list', - description: '/docs/references/projects/list.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_PROJECT_LIST, - ) - ] - )) - ->param('queries', [], new Projects(), '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(', ', Projects::ALLOWED_ATTRIBUTES), true) - ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) - ->inject('response') - ->inject('dbForPlatform') - ->action(function (array $queries, string $search, Response $response, Database $dbForPlatform) { - - 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); - } - - /** - * 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()); - } - - $projectId = $cursor->getValue(); - $cursorDocument = $dbForPlatform->getDocument('projects', $projectId); - - if ($cursorDocument->isEmpty()) { - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Project '{$projectId}' for the 'cursor' value not found."); - } - - $cursor->setValue($cursorDocument); - } - - $filterQueries = Query::groupByType($queries)['filters']; - try { - $projects = $dbForPlatform->find('projects', $queries); - $total = $dbForPlatform->count('projects', $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([ - 'projects' => $projects, - 'total' => $total, - ]), Response::MODEL_PROJECT_LIST); - }); - App::get('/v1/projects/:projectId') ->desc('Get project') ->groups(['api', 'projects']) diff --git a/docs/references/projects/list.md b/docs/references/projects/list.md deleted file mode 100644 index 576a4b79ae..0000000000 --- a/docs/references/projects/list.md +++ /dev/null @@ -1 +0,0 @@ -Get a list of all projects. You can use the query params to filter your results. \ No newline at end of file diff --git a/src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php b/src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php new file mode 100644 index 0000000000..c42b847a19 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php @@ -0,0 +1,110 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/projects') + ->desc('List projects') + ->groups(['api', 'projects']) + ->label('scope', 'projects.read') + ->label('sdk', new Method( + namespace: 'projects', + group: 'projects', + name: 'list', + description: <<param('queries', [], new Projects(), '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(', ', Projects::ALLOWED_ATTRIBUTES), true) + ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) + ->inject('response') + ->inject('dbForPlatform') + ->callback($this->action(...)); + } + + public function action(array $queries, string $search, Response $response, Database $dbForPlatform) + { + 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); + } + + /** + * 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()); + } + + $projectId = $cursor->getValue(); + $cursorDocument = $dbForPlatform->getDocument('projects', $projectId); + + if ($cursorDocument->isEmpty()) { + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Project '{$projectId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument); + } + + $filterQueries = Query::groupByType($queries)['filters']; + try { + $projects = $dbForPlatform->find('projects', $queries); + $total = $dbForPlatform->count('projects', $filterQueries, APP_LIMIT_COUNT); + } catch (Order $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([ + 'projects' => $projects, + 'total' => $total, + ]), Response::MODEL_PROJECT_LIST); + } +} diff --git a/src/Appwrite/Platform/Modules/Projects/Services/Http.php b/src/Appwrite/Platform/Modules/Projects/Services/Http.php index cec8ed6d16..2a0dd0aa60 100644 --- a/src/Appwrite/Platform/Modules/Projects/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Projects/Services/Http.php @@ -7,6 +7,7 @@ use Appwrite\Platform\Modules\Projects\Http\DevKeys\Delete as DeleteDevKey; use Appwrite\Platform\Modules\Projects\Http\DevKeys\Get as GetDevKey; use Appwrite\Platform\Modules\Projects\Http\DevKeys\Update as UpdateDevKey; use Appwrite\Platform\Modules\Projects\Http\DevKeys\XList as ListDevKeys; +use Appwrite\Platform\Modules\Projects\Http\Projects\XList as ListProjects; use Utopia\Platform\Service; class Http extends Service @@ -19,5 +20,7 @@ class Http extends Service $this->addAction(GetDevKey::getName(), new GetDevKey()); $this->addAction(ListDevKeys::getName(), new ListDevKeys()); $this->addAction(DeleteDevKey::getName(), new DeleteDevKey()); + + $this->addAction(ListProjects::getName(), new ListProjects()); } } From c894b0ab6a12fa6162626cf177ab68aa00cb1f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 5 Sep 2025 09:25:13 +0200 Subject: [PATCH 06/11] Simplify validator override --- .../Modules/Projects/Http/DevKeys/Projects/XList.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php b/src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php index c42b847a19..9a140cbdf8 100644 --- a/src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php +++ b/src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php @@ -17,6 +17,7 @@ use Utopia\Database\Query; use Utopia\Database\Validator\Query\Cursor; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; +use Utopia\Validator; use Utopia\Validator\Text; class XList extends Action @@ -26,9 +27,14 @@ class XList extends Action { return 'listProjects'; } + + // Stored as property intentionally for extensibility + protected Validator $queriesValidator; public function __construct() { + $this->queriesValidator = new Projects(); + $this ->setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/projects') @@ -51,7 +57,7 @@ class XList extends Action ], contentType: ContentType::JSON )) - ->param('queries', [], new Projects(), '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(', ', Projects::ALLOWED_ATTRIBUTES), true) + ->param('queries', [], $this->queriesValidator, '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(', ', Projects::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('dbForPlatform') From cc50302530226c8c586873278320c3ac22dc25f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 5 Sep 2025 09:25:45 +0200 Subject: [PATCH 07/11] Formatting fix --- .../Platform/Modules/Projects/Http/DevKeys/Projects/XList.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php b/src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php index 9a140cbdf8..f190990e00 100644 --- a/src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php +++ b/src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php @@ -27,14 +27,14 @@ class XList extends Action { return 'listProjects'; } - + // Stored as property intentionally for extensibility protected Validator $queriesValidator; public function __construct() { $this->queriesValidator = new Projects(); - + $this ->setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/projects') From bf59f1ba7d777bc1ccbc49c09a563186c4264b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 5 Sep 2025 09:30:07 +0200 Subject: [PATCH 08/11] Fix path structure --- .../Modules/Projects/Http/{DevKeys => }/Projects/XList.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/Appwrite/Platform/Modules/Projects/Http/{DevKeys => }/Projects/XList.php (100%) diff --git a/src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php b/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php similarity index 100% rename from src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Projects/XList.php rename to src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php From ca6cf01773b49b9ca16659ccc8b92b5b6de0a849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 5 Sep 2025 10:12:07 +0200 Subject: [PATCH 09/11] Improve customization of queries validator --- .../Platform/Modules/Projects/Http/Projects/XList.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php b/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php index f190990e00..3d06103e75 100644 --- a/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php +++ b/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php @@ -28,13 +28,13 @@ class XList extends Action return 'listProjects'; } - // Stored as property intentionally for extensibility - protected Validator $queriesValidator; + protected function getQueriesValidator(): Validator + { + return new Projects(); + } public function __construct() { - $this->queriesValidator = new Projects(); - $this ->setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/projects') @@ -57,7 +57,7 @@ class XList extends Action ], contentType: ContentType::JSON )) - ->param('queries', [], $this->queriesValidator, '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(', ', Projects::ALLOWED_ATTRIBUTES), true) + ->param('queries', [], $this->getQueriesValidator(), '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(', ', Projects::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('dbForPlatform') From b1ffdb1c229d40f5cff43585d23e076e35b6dc60 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 5 Sep 2025 14:29:17 +0530 Subject: [PATCH 10/11] chore: update cli to 9.1.0 --- app/config/platforms.php | 2 +- composer.lock | 66 +++++++++---------- .../databases/create-line-attribute.md | 5 ++ .../databases/create-point-attribute.md | 5 ++ .../databases/create-polygon-attribute.md | 5 ++ .../databases/update-line-attribute.md | 5 ++ .../databases/update-point-attribute.md | 5 ++ .../databases/update-polygon-attribute.md | 5 ++ .../examples/tablesdb/create-line-column.md | 5 ++ .../examples/tablesdb/create-point-column.md | 5 ++ .../tablesdb/create-polygon-column.md | 5 ++ .../examples/tablesdb/update-line-column.md | 5 ++ .../examples/tablesdb/update-point-column.md | 5 ++ .../tablesdb/update-polygon-column.md | 5 ++ 14 files changed, 94 insertions(+), 34 deletions(-) create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-line-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-point-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-polygon-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-line-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-point-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-polygon-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tablesdb/create-line-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tablesdb/create-point-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tablesdb/create-polygon-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tablesdb/update-line-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tablesdb/update-point-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tablesdb/update-polygon-column.md diff --git a/app/config/platforms.php b/app/config/platforms.php index a67381b596..beed6c0b54 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -226,7 +226,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '9.0.2', + 'version' => '9.1.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, diff --git a/composer.lock b/composer.lock index bd1e62dac2..683bb58e93 100644 --- a/composer.lock +++ b/composer.lock @@ -283,25 +283,25 @@ }, { "name": "brick/math", - "version": "0.13.1", + "version": "0.14.0", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "fc7ed316430118cc7836bf45faff18d5dfc8de04" + "reference": "113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/fc7ed316430118cc7836bf45faff18d5dfc8de04", - "reference": "fc7ed316430118cc7836bf45faff18d5dfc8de04", + "url": "https://api.github.com/repos/brick/math/zipball/113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2", + "reference": "113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2", "shasum": "" }, "require": { - "php": "^8.1" + "php": "^8.2" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^10.1", - "vimeo/psalm": "6.8.8" + "phpstan/phpstan": "2.1.22", + "phpunit/phpunit": "^11.5" }, "type": "library", "autoload": { @@ -331,7 +331,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.13.1" + "source": "https://github.com/brick/math/tree/0.14.0" }, "funding": [ { @@ -339,7 +339,7 @@ "type": "github" } ], - "time": "2025-03-29T13:50:30+00:00" + "time": "2025-08-29T12:40:03+00:00" }, { "name": "chillerlan/php-qrcode", @@ -1162,16 +1162,16 @@ }, { "name": "open-telemetry/api", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/api.git", - "reference": "b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7" + "reference": "7692075f486c14d8cfd37fba98a08a5667f089e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7", - "reference": "b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7", + "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/7692075f486c14d8cfd37fba98a08a5667f089e5", + "reference": "7692075f486c14d8cfd37fba98a08a5667f089e5", "shasum": "" }, "require": { @@ -1228,7 +1228,7 @@ "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-07T23:07:38+00:00" }, { "name": "open-telemetry/context", @@ -1418,22 +1418,22 @@ }, { "name": "open-telemetry/sdk", - "version": "1.7.0", + "version": "1.7.1", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sdk.git", - "reference": "86287cf30fd6549444d7b8f7d8758d92e24086ac" + "reference": "52690d4b37ae4f091af773eef3c238ed2bc0aa06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/86287cf30fd6549444d7b8f7d8758d92e24086ac", - "reference": "86287cf30fd6549444d7b8f7d8758d92e24086ac", + "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/52690d4b37ae4f091af773eef3c238ed2bc0aa06", + "reference": "52690d4b37ae4f091af773eef3c238ed2bc0aa06", "shasum": "" }, "require": { "ext-json": "*", "nyholm/psr7-server": "^1.1", - "open-telemetry/api": "~1.4.0", + "open-telemetry/api": "^1.4", "open-telemetry/context": "^1.0", "open-telemetry/sem-conv": "^1.0", "php": "^8.1", @@ -1511,7 +1511,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-08-06T03:07:06+00:00" + "time": "2025-09-05T07:17:06+00:00" }, { "name": "open-telemetry/sem-conv", @@ -2379,20 +2379,20 @@ }, { "name": "ramsey/uuid", - "version": "4.9.0", + "version": "4.9.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "4e0e23cc785f0724a0e838279a9eb03f28b092a0" + "reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/4e0e23cc785f0724a0e838279a9eb03f28b092a0", - "reference": "4e0e23cc785f0724a0e838279a9eb03f28b092a0", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/81f941f6f729b1e3ceea61d9d014f8b6c6800440", + "reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440", "shasum": "" }, "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" }, @@ -2451,9 +2451,9 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.9.0" + "source": "https://github.com/ramsey/uuid/tree/4.9.1" }, - "time": "2025-06-25T14:20:11+00:00" + "time": "2025-09-04T20:59:21+00:00" }, { "name": "spomky-labs/otphp", @@ -5007,16 +5007,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.1.16", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "f8fbc4b1ba0e918825338f50cbdea4d887389c41" + "reference": "db229faf442a64094ebdea7d4b66f48184a7106f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/f8fbc4b1ba0e918825338f50cbdea4d887389c41", - "reference": "f8fbc4b1ba0e918825338f50cbdea4d887389c41", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/db229faf442a64094ebdea7d4b66f48184a7106f", + "reference": "db229faf442a64094ebdea7d4b66f48184a7106f", "shasum": "" }, "require": { @@ -5052,9 +5052,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/1.1.16" + "source": "https://github.com/appwrite/sdk-generator/tree/1.2.2" }, - "time": "2025-09-03T06:50:04+00:00" + "time": "2025-09-05T08:28:53+00:00" }, { "name": "doctrine/annotations", diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-line-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-line-attribute.md new file mode 100644 index 0000000000..f0d81ede67 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-line-attribute.md @@ -0,0 +1,5 @@ +appwrite databases create-line-attribute \ + --database-id \ + --collection-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-point-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-point-attribute.md new file mode 100644 index 0000000000..926c7318e0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-point-attribute.md @@ -0,0 +1,5 @@ +appwrite databases create-point-attribute \ + --database-id \ + --collection-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-polygon-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-polygon-attribute.md new file mode 100644 index 0000000000..f0a00c744f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-polygon-attribute.md @@ -0,0 +1,5 @@ +appwrite databases create-polygon-attribute \ + --database-id \ + --collection-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-line-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-line-attribute.md new file mode 100644 index 0000000000..37059ecef1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-line-attribute.md @@ -0,0 +1,5 @@ +appwrite databases update-line-attribute \ + --database-id \ + --collection-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-point-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-point-attribute.md new file mode 100644 index 0000000000..bcc983a432 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-point-attribute.md @@ -0,0 +1,5 @@ +appwrite databases update-point-attribute \ + --database-id \ + --collection-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-polygon-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-polygon-attribute.md new file mode 100644 index 0000000000..6e1e1001da --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-polygon-attribute.md @@ -0,0 +1,5 @@ +appwrite databases update-polygon-attribute \ + --database-id \ + --collection-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-line-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-line-column.md new file mode 100644 index 0000000000..cd6db93ea9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-line-column.md @@ -0,0 +1,5 @@ +appwrite tables-db create-line-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-point-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-point-column.md new file mode 100644 index 0000000000..0e7d2320d1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-point-column.md @@ -0,0 +1,5 @@ +appwrite tables-db create-point-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-polygon-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-polygon-column.md new file mode 100644 index 0000000000..060323b152 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,5 @@ +appwrite tables-db create-polygon-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-line-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-line-column.md new file mode 100644 index 0000000000..203ebd64db --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-line-column.md @@ -0,0 +1,5 @@ +appwrite tables-db update-line-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-point-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-point-column.md new file mode 100644 index 0000000000..676a37ef49 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-point-column.md @@ -0,0 +1,5 @@ +appwrite tables-db update-point-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-polygon-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-polygon-column.md new file mode 100644 index 0000000000..24e1f01f91 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,5 @@ +appwrite tables-db update-polygon-column \ + --database-id \ + --table-id \ + --key '' \ + --required false From 18445945d60a8acee9deccdee1c04fee7448e9a1 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 5 Sep 2025 15:01:05 +0530 Subject: [PATCH 11/11] switch to walter o brien --- app/config/specs/open-api3-1.8.x-client.json | 4 ++-- app/config/specs/open-api3-1.8.x-console.json | 4 ++-- app/config/specs/open-api3-1.8.x-server.json | 4 ++-- app/config/specs/open-api3-latest-client.json | 4 ++-- app/config/specs/open-api3-latest-console.json | 4 ++-- app/config/specs/open-api3-latest-server.json | 4 ++-- app/config/specs/swagger2-1.8.x-client.json | 4 ++-- app/config/specs/swagger2-1.8.x-console.json | 4 ++-- app/config/specs/swagger2-1.8.x-server.json | 4 ++-- app/config/specs/swagger2-latest-client.json | 4 ++-- app/config/specs/swagger2-latest-console.json | 4 ++-- app/config/specs/swagger2-latest-server.json | 4 ++-- .../Databases/Http/Databases/Collections/Documents/Create.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Rows/Create.php | 2 +- 14 files changed, 26 insertions(+), 26 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 d782408679..61543c2853 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -5020,7 +5020,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -7675,7 +7675,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", 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 67eda14f0c..3f0dcc0e2d 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -9575,7 +9575,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -37474,7 +37474,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", 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 6028487515..fd039be84a 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -9057,7 +9057,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -27845,7 +27845,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index d782408679..61543c2853 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -5020,7 +5020,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -7675,7 +7675,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 67eda14f0c..3f0dcc0e2d 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -9575,7 +9575,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -37474,7 +37474,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 6028487515..fd039be84a 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -9057,7 +9057,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -27845,7 +27845,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 59c07f8985..7982031e95 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -5154,7 +5154,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -7749,7 +7749,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 8ea3fb49b0..53edc8c93e 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -9680,7 +9680,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -37572,7 +37572,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 8fbc824421..abb141ae66 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -9152,7 +9152,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -28003,7 +28003,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 59c07f8985..7982031e95 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -5154,7 +5154,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -7749,7 +7749,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 8ea3fb49b0..53edc8c93e 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -9680,7 +9680,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -37572,7 +37572,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 8fbc824421..abb141ae66 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -9152,7 +9152,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -28003,7 +28003,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", 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 fe101c6eef..c03daabd4f 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 @@ -116,7 +116,7 @@ class Create extends Action ->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) ->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.', true, example: '{"username":"john.doe","email":"john.doe@example.com","fullName":"John Doe","age":30,"isAdmin":false}') + ->param('data', [], new JSON(), 'Document data as JSON object.', true, example: '{"username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O\'Brien","age":30,"isAdmin":false}') ->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') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php index 11e2596b99..a7aa2607e5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php @@ -95,7 +95,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/tablesdb#tablesDBCreate). Make sure to define columns before creating rows.') - ->param('data', [], new JSON(), 'Row data as JSON object.', true, example: '{"username":"john.doe","email":"john.doe@example.com","fullName":"John Doe","age":30,"isAdmin":false}') + ->param('data', [], new JSON(), 'Row data as JSON object.', true, example: '{"username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O\'Brien","age":30,"isAdmin":false}') ->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')