diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3403973b0d..cebdc02163 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,15 @@ env: IMAGE: appwrite-dev CACHE_KEY: appwrite-dev-${{ github.event.pull_request.head.sha }} -on: [ pull_request ] +on: + pull_request: + workflow_dispatch: + inputs: + response_format: + description: 'Response format version to test (e.g., 1.5.0, 1.4.0)' + required: false + type: string + default: '' jobs: check_database_changes: @@ -100,7 +108,10 @@ jobs: run: docker compose exec -T appwrite vars - name: Run Unit Tests - run: docker compose exec appwrite test /usr/src/code/tests/unit + run: | + docker compose exec \ + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ + appwrite test /usr/src/code/tests/unit e2e_general_test: name: E2E General Test @@ -132,7 +143,18 @@ jobs: done - name: Run General Tests - run: docker compose exec -T appwrite test /usr/src/code/tests/e2e/General --debug + run: | + docker compose exec -T \ + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ + appwrite test /usr/src/code/tests/e2e/General --debug + + - name: Failure Logs + if: failure() + run: | + echo "=== Appwrite Worker Builds Logs ===" + docker compose logs appwrite-worker-builds + echo "=== OpenRuntimes Executor Logs ===" + docker compose logs openruntimes-executor e2e_service_test: name: E2E Service Test @@ -146,7 +168,7 @@ jobs: Avatars, Console, Databases/Legacy, - Databases/Grids, + Databases/TablesDB, Functions, FunctionsSchedule, GraphQL, @@ -200,8 +222,17 @@ jobs: docker compose exec -T \ -e _APP_DATABASE_SHARED_TABLES \ -e _APP_DATABASE_SHARED_TABLES_V1 \ + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ appwrite test /usr/src/code/tests/e2e/Services/${{ matrix.service }} --debug --exclude-group devKeys,screenshots + - name: Failure Logs + if: failure() + run: | + echo "=== Appwrite Worker Builds Logs ===" + docker compose logs appwrite-worker-builds + echo "=== OpenRuntimes Executor Logs ===" + docker compose logs openruntimes-executor + e2e_shared_mode_test: name: E2E Shared Mode Service Test runs-on: ubuntu-latest @@ -216,7 +247,7 @@ jobs: Avatars, Console, Databases/Legacy, - Databases/Grids, + Databases/TablesDB, Functions, FunctionsSchedule, GraphQL, @@ -280,8 +311,17 @@ jobs: docker compose exec -T \ -e _APP_DATABASE_SHARED_TABLES \ -e _APP_DATABASE_SHARED_TABLES_V1 \ + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ appwrite test /usr/src/code/tests/e2e/Services/${{ matrix.service }} --debug --exclude-group devKeys,screenshots + - name: Failure Logs + if: failure() + run: | + echo "=== Appwrite Worker Builds Logs ===" + docker compose logs appwrite-worker-builds + echo "=== OpenRuntimes Executor Logs ===" + docker compose logs openruntimes-executor + e2e_dev_keys: name: E2E Service Test (Dev Keys) runs-on: ubuntu-latest @@ -313,8 +353,17 @@ jobs: docker compose exec -T \ -e _APP_DATABASE_SHARED_TABLES \ -e _APP_DATABASE_SHARED_TABLES_V1 \ + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ appwrite test /usr/src/code/tests/e2e/Services/Projects --debug --group=devKeys + - name: Failure Logs + if: failure() + run: | + echo "=== Appwrite Worker Builds Logs ===" + docker compose logs appwrite-worker-builds + echo "=== OpenRuntimes Executor Logs ===" + docker compose logs openruntimes-executor + e2e_dev_keys_shared_mode: name: E2E Shared Mode Service Test (Dev Keys) runs-on: ubuntu-latest @@ -360,8 +409,17 @@ jobs: docker compose exec -T \ -e _APP_DATABASE_SHARED_TABLES \ -e _APP_DATABASE_SHARED_TABLES_V1 \ + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ appwrite test /usr/src/code/tests/e2e/Services/Projects --debug --group=devKeys + - name: Failure Logs + if: failure() + run: | + echo "=== Appwrite Worker Builds Logs ===" + docker compose logs appwrite-worker-builds + echo "=== OpenRuntimes Executor Logs ===" + docker compose logs openruntimes-executor + e2e_screenshots_keys: name: E2E Service Test (Site Screenshots) runs-on: ubuntu-latest @@ -394,8 +452,17 @@ jobs: docker compose exec -T \ -e _APP_DATABASE_SHARED_TABLES \ -e _APP_DATABASE_SHARED_TABLES_V1 \ + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ appwrite test /usr/src/code/tests/e2e/Services/Sites --debug --group=screenshots + - name: Failure Logs + if: failure() + run: | + echo "=== Appwrite Worker Builds Logs ===" + docker compose logs appwrite-worker-builds + echo "=== OpenRuntimes Executor Logs ===" + docker compose logs openruntimes-executor + e2e_screenshots_shared_mode: name: E2E Shared Mode Service Test (Site Screenshots) runs-on: ubuntu-latest @@ -442,4 +509,13 @@ jobs: docker compose exec -T \ -e _APP_DATABASE_SHARED_TABLES \ -e _APP_DATABASE_SHARED_TABLES_V1 \ + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ appwrite test /usr/src/code/tests/e2e/Services/Sites --debug --group=screenshots + + - name: Failure Logs + if: failure() + run: | + echo "=== Appwrite Worker Builds Logs ===" + docker compose logs appwrite-worker-builds + echo "=== OpenRuntimes Executor Logs ===" + docker compose logs openruntimes-executor \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 845c5f6c1d..2a3e176838 100755 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN composer install --ignore-platform-reqs --optimize-autoloader \ --no-plugins --no-scripts --prefer-dist \ `if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi` -FROM appwrite/base:0.10.3 AS final +FROM appwrite/base:0.10.4 AS final LABEL maintainer="team@appwrite.io" diff --git a/README.md b/README.md index 7768d73015..9cd5808e33 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ +> We just announced Timestamp Overrides for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-timestamp-overrides) -> We just announced Auto-increment support for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-auto-increment-support) +> Appwrite Cloud is now Generally Available - [Learn more](https://appwrite.io/cloud-ga) > [Get started with Appwrite](https://apwr.dev/appcloud) diff --git a/app/cli.php b/app/cli.php index 504e4fb5e6..0f98cf3458 100644 --- a/app/cli.php +++ b/app/cli.php @@ -194,12 +194,18 @@ CLI::setResource('publisher', function (Group $pools) { CLI::setResource('publisherDatabases', function (BrokerPool $publisher) { return $publisher; }, ['publisher']); +CLI::setResource('publisherFunctions', function (BrokerPool $publisher) { + return $publisher; +}, ['publisher']); CLI::setResource('publisherMigrations', function (BrokerPool $publisher) { return $publisher; }, ['publisher']); CLI::setResource('publisherStatsUsage', function (BrokerPool $publisher) { return $publisher; }, ['publisher']); +CLI::setResource('publisherMessaging', function (BrokerPool $publisher) { + return $publisher; +}, ['publisher']); CLI::setResource('queueForStatsUsage', function (Publisher $publisher) { return new StatsUsage($publisher); }, ['publisher']); diff --git a/app/config/avatars/credit-cards.php b/app/config/avatars/credit-cards.php index 52760bf9dc..b693e99fb2 100644 --- a/app/config/avatars/credit-cards.php +++ b/app/config/avatars/credit-cards.php @@ -13,7 +13,7 @@ return [ 'mastercard' => ['name' => 'Mastercard', 'path' => __DIR__ . '/credit-cards/mastercard.png'], 'naranja' => ['name' => 'Naranja', 'path' => __DIR__ . '/credit-cards/naranja.png'], 'targeta-shopping' => ['name' => 'Tarjeta Shopping', 'path' => __DIR__ . '/credit-cards/tarjeta-shopping.png'], - 'union-china-pay' => ['name' => 'Union China Pay', 'path' => __DIR__ . '/credit-cards/union-china-pay.png'], + 'unionpay' => ['name' => 'Union Pay', 'path' => __DIR__ . '/credit-cards/unionpay.png'], 'visa' => ['name' => 'Visa', 'path' => __DIR__ . '/credit-cards/visa.png'], 'mir' => ['name' => 'MIR', 'path' => __DIR__ . '/credit-cards/mir.png'], 'maestro' => ['name' => 'Maestro', 'path' => __DIR__ . '/credit-cards/maestro.png'], diff --git a/app/config/avatars/credit-cards/union-china-pay.png b/app/config/avatars/credit-cards/unionpay.png similarity index 100% rename from app/config/avatars/credit-cards/union-china-pay.png rename to app/config/avatars/credit-cards/unionpay.png diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index c380a856d0..e48dcef451 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -56,7 +56,7 @@ return [ 'type' => Database::VAR_STRING, 'size' => 128, 'required' => false, - 'default' => 'grids', + 'default' => 'tablesdb', 'signed' => true, 'array' => false, 'filters' => [], @@ -1927,7 +1927,7 @@ return [ '$id' => ID::custom('errors'), 'type' => Database::VAR_STRING, 'format' => '', - 'size' => 1000000, + 'size' => APP_FUNCTION_ERROR_LENGTH_LIMIT, 'signed' => true, 'required' => false, 'default' => null, @@ -1938,7 +1938,7 @@ return [ '$id' => ID::custom('logs'), 'type' => Database::VAR_STRING, 'format' => '', - 'size' => 1000000, + 'size' => APP_FUNCTION_LOG_LENGTH_LIMIT, 'signed' => true, 'required' => false, 'default' => null, diff --git a/app/config/errors.php b/app/config/errors.php index d786940c07..fa45550ba9 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -435,6 +435,11 @@ return [ 'description' => 'The requested favicon could not be found.', 'code' => 404, ], + Exception::AVATAR_SVG_SANITIZATION_FAILED => [ + 'name' => Exception::AVATAR_SVG_SANITIZATION_FAILED, + 'description' => 'SVG sanitization failed.', + 'code' => 400, + ], /** Storage */ Exception::STORAGE_FILE_ALREADY_EXISTS => [ diff --git a/app/config/locale/templates/email-base-styled.tpl b/app/config/locale/templates/email-base-styled.tpl index b5aece0253..16036e792c 100644 --- a/app/config/locale/templates/email-base-styled.tpl +++ b/app/config/locale/templates/email-base-styled.tpl @@ -1,9 +1,24 @@ - - - + + - - - - - - -
diff --git a/app/config/platforms.php b/app/config/platforms.php index 1b22522a24..a67381b596 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -11,7 +11,7 @@ return [ [ 'key' => 'web', 'name' => 'Web', - 'version' => '18.2.0', + 'version' => '19.0.0', 'url' => 'https://github.com/appwrite/sdk-for-web', 'package' => 'https://www.npmjs.com/package/appwrite', 'enabled' => true, @@ -60,7 +60,7 @@ return [ [ 'key' => 'flutter', 'name' => 'Flutter', - 'version' => '17.1.0', + 'version' => '18.0.0', 'url' => 'https://github.com/appwrite/sdk-for-flutter', 'package' => 'https://pub.dev/packages/appwrite', 'enabled' => true, @@ -79,7 +79,7 @@ return [ [ 'key' => 'apple', 'name' => 'Apple', - 'version' => '10.2.0', + 'version' => '11.0.0', 'url' => 'https://github.com/appwrite/sdk-for-apple', 'package' => 'https://github.com/appwrite/sdk-for-apple', 'enabled' => true, @@ -116,7 +116,7 @@ return [ [ 'key' => 'android', 'name' => 'Android', - 'version' => '8.2.2', + 'version' => '9.0.0', 'url' => 'https://github.com/appwrite/sdk-for-android', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android', 'enabled' => true, @@ -139,7 +139,7 @@ return [ [ 'key' => 'react-native', 'name' => 'React Native', - 'version' => '0.11.0', + 'version' => '0.12.0', 'url' => 'https://github.com/appwrite/sdk-for-react-native', 'package' => 'https://npmjs.com/package/react-native-appwrite', 'enabled' => true, @@ -226,7 +226,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '8.3.0', + 'version' => '9.0.2', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, @@ -261,7 +261,7 @@ return [ [ 'key' => 'nodejs', 'name' => 'Node.js', - 'version' => '17.2.0', + 'version' => '18.0.0', 'url' => 'https://github.com/appwrite/sdk-for-node', 'package' => 'https://www.npmjs.com/package/node-appwrite', 'enabled' => true, @@ -280,7 +280,7 @@ return [ [ 'key' => 'deno', 'name' => 'Deno', - 'version' => '15.1.0', + 'version' => '16.0.0', 'url' => 'https://github.com/appwrite/sdk-for-deno', 'package' => 'https://deno.land/x/appwrite', 'enabled' => true, @@ -299,7 +299,7 @@ return [ [ 'key' => 'php', 'name' => 'PHP', - 'version' => '15.1.0', + 'version' => '16.0.0', 'url' => 'https://github.com/appwrite/sdk-for-php', 'package' => 'https://packagist.org/packages/appwrite/appwrite', 'enabled' => true, @@ -318,7 +318,7 @@ return [ [ 'key' => 'python', 'name' => 'Python', - 'version' => '11.1.0', + 'version' => '12.0.0', 'url' => 'https://github.com/appwrite/sdk-for-python', 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, @@ -337,7 +337,7 @@ return [ [ 'key' => 'ruby', 'name' => 'Ruby', - 'version' => '16.1.0', + 'version' => '17.0.0', 'url' => 'https://github.com/appwrite/sdk-for-ruby', 'package' => 'https://rubygems.org/gems/appwrite', 'enabled' => true, @@ -356,7 +356,7 @@ return [ [ 'key' => 'go', 'name' => 'Go', - 'version' => '0.9.0', + 'version' => '0.10.0', 'url' => 'https://github.com/appwrite/sdk-for-go', 'package' => 'https://github.com/appwrite/sdk-for-go', 'enabled' => true, @@ -375,7 +375,7 @@ return [ [ 'key' => 'dotnet', 'name' => '.NET', - 'version' => '0.15.0', + 'version' => '0.16.0', 'url' => 'https://github.com/appwrite/sdk-for-dotnet', 'package' => 'https://www.nuget.org/packages/Appwrite', 'enabled' => true, @@ -394,7 +394,7 @@ return [ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '16.2.0', + 'version' => '17.0.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => 'https://pub.dev/packages/dart_appwrite', 'enabled' => true, @@ -413,7 +413,7 @@ return [ [ 'key' => 'kotlin', 'name' => 'Kotlin', - 'version' => '9.1.2', + 'version' => '10.0.0', 'url' => 'https://github.com/appwrite/sdk-for-kotlin', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin', 'enabled' => true, @@ -436,7 +436,7 @@ return [ [ 'key' => 'swift', 'name' => 'Swift', - 'version' => '10.2.0', + 'version' => '11.0.0', 'url' => 'https://github.com/appwrite/sdk-for-swift', 'package' => 'https://github.com/appwrite/sdk-for-swift', 'enabled' => true, diff --git a/app/config/services.php b/app/config/services.php index 696184d0c5..f02f169b88 100644 --- a/app/config/services.php +++ b/app/config/services.php @@ -66,15 +66,15 @@ 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', + 'tablesdb' => [ + 'key' => 'tablesdb', + 'name' => 'TablesDB', + 'subtitle' => 'The TablesDB service allows you to create structured tables of columns, query and filter lists of rows', + 'description' => '/docs/services/tablesdb.md', 'controller' => '', // Uses modules 'sdk' => true, 'docs' => true, - 'docsUrl' => 'https://appwrite.io/docs/client/tables', + 'docsUrl' => 'https://appwrite.io/docs/client/tablesdb', 'tests' => false, 'optional' => true, 'icon' => '/images/services/databases.png', diff --git a/app/config/specs/open-api3-1.7.x-client.json b/app/config/specs/open-api3-1.7.x-client.json index 0bf589cb5a..c7de6a31af 100644 --- a/app/config/specs/open-api3-1.7.x-client.json +++ b/app/config/specs/open-api3-1.7.x-client.json @@ -2622,7 +2622,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2673,7 +2673,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2755,7 +2755,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2977,7 +2977,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3440,7 +3440,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3458,7 +3458,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3478,7 +3478,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -9847,6 +9847,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -9931,6 +9936,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -9951,6 +9957,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/open-api3-1.7.x-console.json b/app/config/specs/open-api3-1.7.x-console.json index 5c6880a396..2554b7282c 100644 --- a/app/config/specs/open-api3-1.7.x-console.json +++ b/app/config/specs/open-api3-1.7.x-console.json @@ -2631,7 +2631,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2682,7 +2682,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2764,7 +2764,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2986,7 +2986,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3445,7 +3445,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3463,7 +3463,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3483,7 +3483,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -41133,6 +41133,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -41217,6 +41222,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -41237,6 +41243,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/open-api3-1.7.x-server.json b/app/config/specs/open-api3-1.7.x-server.json index 35e3f14595..65eb2b29d0 100644 --- a/app/config/specs/open-api3-1.7.x-server.json +++ b/app/config/specs/open-api3-1.7.x-server.json @@ -2303,7 +2303,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2354,7 +2354,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2436,7 +2436,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2658,7 +2658,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3129,7 +3129,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3147,7 +3147,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3167,7 +3167,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -30230,6 +30230,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -30314,6 +30319,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -30334,6 +30340,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", 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 69cdf83180..0841dabbd1 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -383,7 +383,7 @@ "weight": 30, "cookies": false, "type": "", - "demo": "account\/create-j-w-t.md", + "demo": "account\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, "rate-time": 3600, @@ -498,7 +498,7 @@ "weight": 45, "cookies": false, "type": "", - "demo": "account\/update-m-f-a.md", + "demo": "account\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, "rate-time": 3600, @@ -561,7 +561,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", @@ -579,6 +579,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -627,7 +681,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", @@ -645,6 +699,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -705,7 +817,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -723,6 +835,58 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -773,7 +937,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", @@ -791,6 +955,60 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -847,7 +1065,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", @@ -865,6 +1083,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -923,7 +1199,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -941,6 +1217,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md" + } + ], "auth": { "Project": [] } @@ -974,7 +1296,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -992,6 +1314,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1023,7 +1391,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -1041,6 +1409,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1072,7 +1486,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -1090,6 +1504,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1845,7 +2305,7 @@ "weight": 27, "cookies": false, "type": "", - "demo": "account\/update-magic-u-r-l-session.md", + "demo": "account\/update-magic-url-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, "rate-time": 3600, @@ -1856,6 +2316,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -1912,7 +2376,7 @@ "weight": 20, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2session.md", + "demo": "account\/create-o-auth-2-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2065,6 +2529,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2622,7 +3090,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2673,7 +3141,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2724,7 +3192,7 @@ "weight": 25, "cookies": false, "type": "", - "demo": "account\/create-magic-u-r-l-token.md", + "demo": "account\/create-magic-url-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, "rate-time": 3600, @@ -2755,7 +3223,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2804,7 +3272,7 @@ "weight": 24, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2token.md", + "demo": "account\/create-o-auth-2-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2977,7 +3445,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3440,7 +3908,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3458,7 +3926,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3478,7 +3946,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -4266,7 +4734,7 @@ "weight": 65, "cookies": false, "type": "location", - "demo": "avatars\/get-q-r.md", + "demo": "avatars\/get-qr.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, "rate-time": 3600, @@ -4362,7 +4830,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -4379,7 +4847,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDB.listRows" }, "auth": { "Project": [] @@ -4451,7 +4919,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -4468,12 +4936,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -4497,9 +4966,10 @@ } ], "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.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" } } ], @@ -4599,7 +5069,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -4616,7 +5086,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [] @@ -4676,12 +5146,12 @@ ] }, "put": { - "summary": "Create or update a document", + "summary": "Upsert a document", "operationId": "databasesUpsertDocument", "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 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": "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": { "201": { "description": "Document", @@ -4698,7 +5168,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -4715,12 +5185,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4743,10 +5214,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": "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.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -4844,7 +5316,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -4861,7 +5333,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [] @@ -4947,7 +5419,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -4964,7 +5436,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDB.deleteRow" }, "auth": { "Project": [] @@ -5011,159 +5483,50 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", "tags": [ - "grids" + "databases" ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "description": "Decrement a specific attribute of a document by a given value.", "responses": { "200": { - "description": "Rows List", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/rowList" + "$ref": "#\/components\/schemas\/document" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 343, "cookies": false, "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "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\/tables#tablesCreate).", - "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": "gridsCreateRow", - "tags": [ - "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": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", + "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": "rows.write", + "scope": "documents.write", "platforms": [ "client", "server", + "console", "server" ], "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "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." - } - ], + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.decrementRowColumn" + }, "auth": { "Project": [] } @@ -5187,12 +5550,31 @@ "in": "path" }, { - "name": "tableId", - "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.", + "name": "collectionId", + "description": "Collection ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" }, "in": "path" } @@ -5203,31 +5585,15 @@ "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": "" + "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.", - "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" - } + "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 } } } @@ -5236,274 +5602,50 @@ } } }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "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\/tables#tablesCreate).", - "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": "gridsUpsertRow", - "tags": [ - "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": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "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", - "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" - } - } - } - } - } - } - } - }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", "tags": [ - "grids" + "databases" ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Increment a specific attribute of a document by a given value.", "responses": { "200": { - "description": "Row", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/row" + "$ref": "#\/components\/schemas\/document" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 342, "cookies": false, "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", + "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": "rows.write", + "scope": "documents.write", "platforms": [ "client", "server", + "console", "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.incrementRowColumn" + }, "auth": { "Project": [] } @@ -5527,22 +5669,31 @@ "in": "path" }, { - "name": "tableId", - "description": "Table ID.", + "name": "collectionId", + "description": "Collection ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "rowId", - "description": "Row ID.", + "name": "documentId", + "description": "Document ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" }, "in": "path" } @@ -5553,99 +5704,21 @@ "schema": { "type": "object", "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "x-example": "{}" + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "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" - } + "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 } } } } } } - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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": { @@ -5672,7 +5745,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -5747,7 +5820,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -5808,7 +5881,7 @@ }, "method": { "type": "string", - "description": "HTTP method of execution. Default value is GET.", + "description": "HTTP method of execution. Default value is POST.", "x-example": "GET", "enum": [ "GET", @@ -5816,7 +5889,8 @@ "PUT", "PATCH", "DELETE", - "OPTIONS" + "OPTIONS", + "HEAD" ], "x-enum-name": "ExecutionMethod", "x-enum-keys": [] @@ -5862,7 +5936,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -5936,7 +6010,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -5988,7 +6062,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -6251,7 +6325,7 @@ "weight": 73, "cookies": false, "type": "", - "demo": "locale\/list-countries-e-u.md", + "demo": "locale\/list-countries-eu.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, @@ -6456,7 +6530,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -6539,7 +6613,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -7393,6 +7467,901 @@ ] } }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "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 TableDB service [server integration](https:\/\/appwrite.io\/docs\/server\/tablesdbdb#tablesdbCreate).", + "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": "tablesDBCreateRow", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md" + } + ], + "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\/tablesdb#tablesDBCreate). 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" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "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\/tablesdb#tablesDBCreate).", + "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": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md" + } + ], + "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 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": "tablesDBUpdateRow", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRow", + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "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" + }, + { + "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 + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "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" + }, + { + "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 + } + } + } + } + } + } + } + }, "\/teams": { "get": { "summary": "List teams", @@ -8440,8 +9409,8 @@ "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": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -8505,7 +9474,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "error": { "description": "Error", @@ -8537,7 +9507,13 @@ "code", "type", "version" - ] + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } }, "rowList": { "description": "Rows List", @@ -8545,7 +9521,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rows rows that matched your query.", + "description": "Total number of rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8561,7 +9537,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -8569,7 +9549,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of documents rows that matched your query.", + "description": "Total number of documents that matched your query.", "x-example": 5, "format": "int32" }, @@ -8585,7 +9565,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "sessionList": { "description": "Sessions List", @@ -8593,7 +9577,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions rows that matched your query.", + "description": "Total number of sessions that matched your query.", "x-example": 5, "format": "int32" }, @@ -8609,7 +9593,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -8617,7 +9605,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities rows that matched your query.", + "description": "Total number of identities that matched your query.", "x-example": 5, "format": "int32" }, @@ -8633,7 +9621,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -8641,7 +9633,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs rows that matched your query.", + "description": "Total number of logs that matched your query.", "x-example": 5, "format": "int32" }, @@ -8657,7 +9649,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -8665,7 +9661,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files rows that matched your query.", + "description": "Total number of files that matched your query.", "x-example": 5, "format": "int32" }, @@ -8681,7 +9677,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "teamList": { "description": "Teams List", @@ -8689,7 +9689,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams rows that matched your query.", + "description": "Total number of teams that matched your query.", "x-example": 5, "format": "int32" }, @@ -8705,7 +9705,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -8713,7 +9717,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships rows that matched your query.", + "description": "Total number of memberships that matched your query.", "x-example": 5, "format": "int32" }, @@ -8729,7 +9733,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "executionList": { "description": "Executions List", @@ -8737,7 +9745,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions rows that matched your query.", + "description": "Total number of executions that matched your query.", "x-example": 5, "format": "int32" }, @@ -8753,7 +9761,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -8761,7 +9773,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries rows that matched your query.", + "description": "Total number of countries that matched your query.", "x-example": 5, "format": "int32" }, @@ -8777,7 +9789,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -8785,7 +9801,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents rows that matched your query.", + "description": "Total number of continents that matched your query.", "x-example": 5, "format": "int32" }, @@ -8801,7 +9817,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -8809,7 +9829,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages rows that matched your query.", + "description": "Total number of languages that matched your query.", "x-example": 5, "format": "int32" }, @@ -8825,7 +9845,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -8833,7 +9857,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies rows that matched your query.", + "description": "Total number of currencies that matched your query.", "x-example": 5, "format": "int32" }, @@ -8849,7 +9873,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -8857,7 +9885,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones rows that matched your query.", + "description": "Total number of phones that matched your query.", "x-example": 5, "format": "int32" }, @@ -8873,7 +9901,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -8881,7 +9913,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes rows that matched your query.", + "description": "Total number of localeCodes that matched your query.", "x-example": 5, "format": "int32" }, @@ -8897,7 +9929,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "row": { "description": "Row", @@ -8912,17 +9948,20 @@ "type": "integer", "description": "Row automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$tableId": { "type": "string", "description": "Table ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -8954,7 +9993,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -8969,17 +10019,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -9011,7 +10064,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -9145,7 +10214,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -9306,7 +10398,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -9320,7 +10438,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -9334,7 +10455,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -9348,7 +10472,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -9362,7 +10489,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -9404,7 +10534,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -9436,7 +10573,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -9471,12 +10614,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -9663,7 +10817,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -9731,7 +10918,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -9775,7 +10974,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -9789,7 +10996,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -9839,7 +11049,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -9859,7 +11078,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -9941,7 +11164,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "team": { "description": "Team", @@ -9992,7 +11230,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -10083,7 +11332,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "execution": { "description": "Execution", @@ -10101,7 +11367,7 @@ }, "$updatedAt": { "type": "string", - "description": "Execution upate date in ISO 8601 format.", + "description": "Execution update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$permissions": { @@ -10119,6 +11385,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -10203,6 +11474,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -10214,7 +11486,37 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "country": { "description": "Country", @@ -10234,7 +11536,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -10254,7 +11560,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -10280,7 +11590,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -10332,7 +11647,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -10358,7 +11682,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "headers": { "description": "Headers", @@ -10378,7 +11707,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -10410,7 +11743,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -10430,7 +11769,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -10450,7 +11795,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -10482,7 +11831,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "subscriber": { "description": "Subscriber", @@ -10556,7 +11911,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -10618,7 +11993,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "securitySchemes": { 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 4ee19cd594..31cb8e5105 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -418,7 +418,7 @@ "weight": 30, "cookies": false, "type": "", - "demo": "account\/create-j-w-t.md", + "demo": "account\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, "rate-time": 3600, @@ -532,7 +532,7 @@ "weight": 45, "cookies": false, "type": "", - "demo": "account\/update-m-f-a.md", + "demo": "account\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, "rate-time": 3600, @@ -594,7 +594,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", @@ -612,6 +612,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -659,7 +713,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", @@ -677,6 +731,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -736,7 +848,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -754,6 +866,58 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -803,7 +967,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", @@ -821,6 +985,60 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -877,7 +1095,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", @@ -895,6 +1113,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -952,7 +1228,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -970,6 +1246,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md" + } + ], "auth": { "Project": [] } @@ -1002,7 +1324,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -1020,6 +1342,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1050,7 +1418,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -1068,6 +1436,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1098,7 +1512,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -1116,6 +1530,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1861,7 +2321,7 @@ "weight": 27, "cookies": false, "type": "", - "demo": "account\/update-magic-u-r-l-session.md", + "demo": "account\/update-magic-url-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, "rate-time": 3600, @@ -1872,6 +2332,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -1928,7 +2392,7 @@ "weight": 20, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2session.md", + "demo": "account\/create-o-auth-2-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2081,6 +2545,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2631,7 +3099,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2682,7 +3150,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2733,7 +3201,7 @@ "weight": 25, "cookies": false, "type": "", - "demo": "account\/create-magic-u-r-l-token.md", + "demo": "account\/create-magic-url-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, "rate-time": 3600, @@ -2764,7 +3232,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2813,7 +3281,7 @@ "weight": 24, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2token.md", + "demo": "account\/create-o-auth-2-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2986,7 +3454,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3445,7 +3913,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3463,7 +3931,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3483,7 +3951,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -4271,7 +4739,7 @@ "weight": 65, "cookies": false, "type": "location", - "demo": "avatars\/get-q-r.md", + "demo": "avatars\/get-qr.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, "rate-time": 3600, @@ -4360,7 +4828,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -4420,7 +4888,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 480, + "weight": 488, "cookies": false, "type": "", "demo": "console\/get-resource.md", @@ -4495,7 +4963,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -4543,7 +5011,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4558,12 +5026,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4579,29 +5048,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "queries", - "search" - ], - "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." } ], "auth": { @@ -4664,7 +5115,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4679,12 +5130,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4704,33 +5156,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4782,7 +5212,7 @@ "tags": [ "databases" ], - "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, 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.", "responses": { "200": { "description": "UsageDatabases", @@ -4799,7 +5229,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 323, + "weight": 324, "cookies": false, "type": "", "demo": "databases\/list-usage.md", @@ -4814,12 +5244,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDB.listUsage" }, "methods": [ { "name": "listUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4833,29 +5264,12 @@ "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, 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.", + "demo": "databases\/list-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDB.listUsage" } - }, - { - "name": "listDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "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, 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": { @@ -4880,7 +5294,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -4917,7 +5331,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -4932,12 +5346,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4954,30 +5369,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "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." } ], "auth": { @@ -5026,7 +5422,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -5041,12 +5437,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5066,33 +5463,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -5158,7 +5533,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -5173,12 +5548,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5194,29 +5570,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -5267,7 +5625,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -5282,7 +5640,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDB.listTables" }, "auth": { "Project": [] @@ -5354,7 +5712,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -5369,7 +5727,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDB.createTable" }, "auth": { "Project": [] @@ -5462,7 +5820,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5477,7 +5835,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDB.getTable" }, "auth": { "Project": [] @@ -5535,7 +5893,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5550,7 +5908,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDB.updateTable" }, "auth": { "Project": [] @@ -5638,7 +5996,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5653,7 +6011,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDB.deleteTable" }, "auth": { "Project": [] @@ -5713,7 +6071,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5728,7 +6086,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDB.listColumns" }, "auth": { "Project": [] @@ -5801,7 +6159,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5816,7 +6174,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDB.createBooleanColumn" }, "auth": { "Project": [] @@ -5911,7 +6269,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5926,7 +6284,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDB.updateBooleanColumn" }, "auth": { "Project": [] @@ -6026,7 +6384,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -6041,7 +6399,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDB.createDatetimeColumn" }, "auth": { "Project": [] @@ -6136,7 +6494,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -6151,7 +6509,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDB.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6251,7 +6609,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -6266,7 +6624,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDB.createEmailColumn" }, "auth": { "Project": [] @@ -6361,7 +6719,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -6376,7 +6734,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDB.updateEmailColumn" }, "auth": { "Project": [] @@ -6476,7 +6834,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6491,7 +6849,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDB.createEnumColumn" }, "auth": { "Project": [] @@ -6595,7 +6953,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6610,7 +6968,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDB.updateEnumColumn" }, "auth": { "Project": [] @@ -6719,7 +7077,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6734,7 +7092,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDB.createFloatColumn" }, "auth": { "Project": [] @@ -6839,7 +7197,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6854,7 +7212,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDB.updateFloatColumn" }, "auth": { "Project": [] @@ -6964,7 +7322,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -6979,7 +7337,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDB.createIntegerColumn" }, "auth": { "Project": [] @@ -7084,7 +7442,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -7099,7 +7457,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDB.updateIntegerColumn" }, "auth": { "Project": [] @@ -7209,7 +7567,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -7224,7 +7582,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDB.createIpColumn" }, "auth": { "Project": [] @@ -7319,7 +7677,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -7334,7 +7692,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDB.updateIpColumn" }, "auth": { "Project": [] @@ -7434,7 +7792,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -7449,7 +7807,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDB.createRelationshipColumn" }, "auth": { "Project": [] @@ -7569,7 +7927,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7584,7 +7942,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDB.createStringColumn" }, "auth": { "Project": [] @@ -7690,7 +8048,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7705,7 +8063,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDB.updateStringColumn" }, "auth": { "Project": [] @@ -7810,7 +8168,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7825,7 +8183,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDB.createUrlColumn" }, "auth": { "Project": [] @@ -7920,7 +8278,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -7935,7 +8293,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDB.updateUrlColumn" }, "auth": { "Project": [] @@ -8066,7 +8424,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -8081,7 +8439,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDB.getColumn" }, "auth": { "Project": [] @@ -8141,7 +8499,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -8156,7 +8514,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDB.deleteColumn" }, "auth": { "Project": [] @@ -8225,7 +8583,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -8240,7 +8598,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDB.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8337,7 +8695,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -8354,7 +8712,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDB.listRows" }, "auth": { "Project": [] @@ -8426,7 +8784,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -8443,12 +8801,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -8472,14 +8831,16 @@ } ], "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.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [] }, @@ -8499,10 +8860,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": "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.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDB.createRows" } } ], @@ -8578,12 +8940,12 @@ } }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "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.\n", + "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": { "201": { "description": "Documents List", @@ -8600,7 +8962,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8616,12 +8978,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -8641,10 +9004,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": "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", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" } } ], @@ -8709,7 +9073,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\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.", + "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.", "responses": { "200": { "description": "Documents List", @@ -8726,7 +9090,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8742,7 +9106,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDB.updateRows" }, "auth": { "Project": [] @@ -8807,7 +9171,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\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8824,7 +9188,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8840,7 +9204,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDB.deleteRows" }, "auth": { "Project": [] @@ -8919,7 +9283,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -8936,7 +9300,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [] @@ -8996,12 +9360,12 @@ ] }, "put": { - "summary": "Create or update a document", + "summary": "Upsert a document", "operationId": "databasesUpsertDocument", "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 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": "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": { "201": { "description": "Document", @@ -9018,7 +9382,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -9035,12 +9399,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -9063,10 +9428,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": "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.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -9164,7 +9530,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -9181,7 +9547,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [] @@ -9267,7 +9633,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -9284,7 +9650,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDB.deleteRow" }, "auth": { "Project": [] @@ -9355,7 +9721,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/list-document-logs.md", @@ -9370,7 +9736,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRowLogs" + "replaceWith": "tablesDB.listRowLogs" }, "auth": { "Project": [] @@ -9452,7 +9818,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -9462,13 +9828,15 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ + "client", + "server", "console", "server" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDB.decrementRowColumn" }, "auth": { "Project": [] @@ -9477,6 +9845,7 @@ "security": [ { "Project": [], + "JWT": [], "Key": [] } ], @@ -9568,7 +9937,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -9578,13 +9947,15 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ + "client", + "server", "console", "server" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDB.incrementRowColumn" }, "auth": { "Project": [] @@ -9593,6 +9964,7 @@ "security": [ { "Project": [], + "JWT": [], "Key": [] } ], @@ -9684,7 +10056,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9699,7 +10071,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDB.listIndexes" }, "auth": { "Project": [] @@ -9770,7 +10142,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9785,7 +10157,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDB.createIndex" }, "auth": { "Project": [] @@ -9902,7 +10274,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9917,7 +10289,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDB.getIndex" }, "auth": { "Project": [] @@ -9977,7 +10349,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -9992,7 +10364,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDB.deleteIndex" }, "auth": { "Project": [] @@ -10061,7 +10433,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "demo": "databases\/list-collection-logs.md", @@ -10076,7 +10448,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTableLogs" + "replaceWith": "tablesDB.listTableLogs" }, "auth": { "Project": [] @@ -10148,7 +10520,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 330, + "weight": 331, "cookies": false, "type": "", "demo": "databases\/get-collection-usage.md", @@ -10163,7 +10535,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTableUsage" + "replaceWith": "tablesDB.getTableUsage" }, "auth": { "Project": [] @@ -10197,7 +10569,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -10220,4779 +10592,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "tags": [ - "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": { - "200": { - "description": "Tables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/tableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsCreateTable", - "tags": [ - "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": { - "201": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsUpdateTable", - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteTable", - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationshipType", - "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": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "tags": [ - "grids" - ], - "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" - } - ] - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteColumn", - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "gridsCreateIndex", - "tags": [ - "grids" - ], - "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", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "IndexType", - "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}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "gridsDeleteIndex", - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { - "get": { - "summary": "List table logs", - "operationId": "gridsListTableLogs", - "tags": [ - "grids" - ], - "description": "Get the table 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": "listTableLogs", - "group": "tables", - "weight": 375, - "cookies": false, - "type": "", - "demo": "grids\/list-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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "tags": [ - "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": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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": "gridsCreateRow", - "tags": [ - "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": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "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", - "namespace": "grids", - "auth": { - "Project": [] - }, - "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\/tables#tablesCreate). 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": "gridsUpsertRows", - "tags": [ - "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": { - "201": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "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": "gridsUpdateRows", - "tags": [ - "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": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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": "gridsDeleteRows", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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": "gridsUpsertRow", - "tags": [ - "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": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "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": "gridsUpdateRow", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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": "gridsDeleteRow", - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { - "get": { - "summary": "List row logs", - "operationId": "gridsListRowLogs", - "tags": [ - "grids" - ], - "description": "Get the row 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": "listRowLogs", - "group": "logs", - "weight": 413, - "cookies": false, - "type": "", - "demo": "grids\/list-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}", - "scope": "rows.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": "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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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}\/grids\/tables\/{tableId}\/usage": { - "get": { - "summary": "Get table usage stats", - "operationId": "gridsGetTableUsage", - "tags": [ - "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": { - "200": { - "description": "UsageTable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageTable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTableUsage", - "group": null, - "weight": 376, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "GridUsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, "\/databases\/{databaseId}\/logs": { "get": { "summary": "List database logs", @@ -15017,7 +10616,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "demo": "databases\/list-logs.md", @@ -15032,12 +10631,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDB.listDatabaseLogs" }, "methods": [ { "name": "listLogs", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -15055,31 +10655,11 @@ } ], "description": "Get the database activity logs list by its unique ID.", + "demo": "databases\/list-logs.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDB.listDatabaseLogs" } - }, - { - "name": "listDatabaseLogs", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "queries" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/logList" - } - ], - "description": "" } ], "auth": { @@ -15121,7 +10701,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetDatabaseUsage", + "operationId": "databasesGetUsage", "tags": [ "databases" ], @@ -15140,12 +10720,12 @@ }, "deprecated": true, "x-appwrite": { - "method": "getDatabaseUsage", + "method": "getUsage", "group": null, - "weight": 322, + "weight": 323, "cookies": false, "type": "", - "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, @@ -15157,12 +10737,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDB.getUsage" }, "methods": [ { - "name": "getDatabaseUsage", + "name": "getUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -15180,31 +10761,11 @@ } ], "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.", + "demo": "databases\/get-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDB.getUsage" } - }, - { - "name": "getDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabase" - } - ], - "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": { @@ -15239,7 +10800,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15276,7 +10837,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -15349,7 +10910,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -15582,7 +11143,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -15631,7 +11192,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -15681,7 +11242,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 450, + "weight": 458, "cookies": false, "type": "", "demo": "functions\/list-templates.md", @@ -15781,7 +11342,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 449, + "weight": 457, "cookies": false, "type": "", "demo": "functions\/get-template.md", @@ -15841,7 +11402,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 443, + "weight": 451, "cookies": false, "type": "", "demo": "functions\/list-usage.md", @@ -15876,7 +11437,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15913,7 +11474,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -15972,7 +11533,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -16202,7 +11763,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -16263,7 +11824,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -16343,7 +11904,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -16426,7 +11987,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -16522,7 +12083,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -16607,7 +12168,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -16710,7 +12271,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -16807,7 +12368,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -16869,7 +12430,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -16933,7 +12494,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -17023,7 +12584,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -17094,7 +12655,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -17169,7 +12730,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -17230,7 +12791,7 @@ }, "method": { "type": "string", - "description": "HTTP method of execution. Default value is GET.", + "description": "HTTP method of execution. Default value is POST.", "x-example": "GET", "enum": [ "GET", @@ -17238,7 +12799,8 @@ "PUT", "PATCH", "DELETE", - "OPTIONS" + "OPTIONS", + "HEAD" ], "x-enum-name": "ExecutionMethod", "x-enum-keys": [] @@ -17284,7 +12846,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -17349,7 +12911,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -17420,7 +12982,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 442, + "weight": 450, "cookies": false, "type": "", "demo": "functions\/get-usage.md", @@ -17465,7 +13027,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -17502,7 +13064,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -17561,7 +13123,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -17652,7 +13214,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -17721,7 +13283,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -17812,7 +13374,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -17883,7 +13445,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -17935,7 +13497,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -18197,7 +13759,7 @@ "weight": 80, "cookies": false, "type": "", - "demo": "health\/get-d-b.md", + "demo": "health\/get-db.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, "rate-time": 3600, @@ -19493,7 +15055,7 @@ "weight": 73, "cookies": false, "type": "", - "demo": "locale\/list-countries-e-u.md", + "demo": "locale\/list-countries-eu.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, @@ -19698,7 +15260,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -19774,7 +15336,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -19918,7 +15480,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -20064,7 +15626,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -20238,7 +15800,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -20412,11 +15974,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -20430,6 +15992,74 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md" + } + ], "auth": { "Project": [] } @@ -20521,11 +16151,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -20539,6 +16169,72 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md" + } + ], "auth": { "Project": [] } @@ -20637,7 +16333,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -20690,7 +16386,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -20752,7 +16448,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -20827,7 +16523,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -20902,7 +16598,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -20974,11 +16670,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -20992,6 +16688,76 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md" + } + ], "auth": { "Project": [] } @@ -21079,11 +16845,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -21097,6 +16863,74 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md" + } + ], "auth": { "Project": [] } @@ -21187,11 +17021,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -21205,6 +17039,68 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md" + } + ], "auth": { "Project": [] } @@ -21272,11 +17168,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -21290,6 +17186,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md" + } + ], "auth": { "Project": [] } @@ -21364,7 +17320,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -21479,7 +17435,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -21597,10 +17553,10 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", - "demo": "messaging\/create-msg91provider.md", + "demo": "messaging\/create-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -21692,10 +17648,10 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", - "demo": "messaging\/update-msg91provider.md", + "demo": "messaging\/update-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -21790,7 +17746,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -21895,7 +17851,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -21999,11 +17955,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -22017,6 +17973,90 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md" + } + ], "auth": { "Project": [] } @@ -22142,11 +18182,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -22160,6 +18200,86 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md" + } + ], "auth": { "Project": [] } @@ -22291,7 +18411,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -22386,7 +18506,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -22484,7 +18604,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -22579,7 +18699,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -22677,7 +18797,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -22772,7 +18892,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -22870,7 +18990,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -22965,7 +19085,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -23063,7 +19183,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -23116,7 +19236,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -23178,7 +19298,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -23253,7 +19373,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -23328,7 +19448,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -23402,7 +19522,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -23485,7 +19605,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -23545,7 +19665,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -23622,7 +19742,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -23684,7 +19804,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -23759,7 +19879,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -23843,7 +19963,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -23933,7 +20053,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -23996,7 +20116,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -24071,7 +20191,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 262, + "weight": 263, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -24145,7 +20265,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 257, + "weight": 258, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -24233,7 +20353,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 264, + "weight": 265, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -24326,7 +20446,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 261, + "weight": 262, "cookies": false, "type": "", "demo": "migrations\/create-csv-migration.md", @@ -24368,6 +20488,11 @@ "type": "string", "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", "x-example": "[ID1:ID2]" + }, + "internalFile": { + "type": "boolean", + "description": "Is the file stored in an internal bucket?", + "x-example": false } }, "required": [ @@ -24405,7 +20530,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 258, + "weight": 259, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -24481,7 +20606,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 265, + "weight": 266, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -24553,7 +20678,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 260, + "weight": 261, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -24664,7 +20789,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 267, + "weight": 268, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -24797,7 +20922,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 259, + "weight": 260, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -24902,7 +21027,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 266, + "weight": 267, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -25026,7 +21151,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 263, + "weight": 264, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -25084,7 +21209,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 268, + "weight": 269, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -25135,7 +21260,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 269, + "weight": 270, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -26040,7 +22165,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApiStatus", "group": "projects", @@ -26057,6 +22182,68 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatus" + }, + "methods": [ + { + "name": "updateApiStatus", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "api", + "status" + ], + "required": [ + "projectId", + "api", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/project" + } + ], + "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", + "demo": "projects\/update-api-status.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatus" + } + }, + { + "name": "updateAPIStatus", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "api", + "status" + ], + "required": [ + "projectId", + "api", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/project" + } + ], + "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", + "demo": "projects\/update-api-status.md" + } + ], "auth": { "Project": [] } @@ -26132,7 +22319,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", @@ -26149,6 +22336,64 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatusAll" + }, + "methods": [ + { + "name": "updateApiStatusAll", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "status" + ], + "required": [ + "projectId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/project" + } + ], + "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", + "demo": "projects\/update-api-status-all.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatusAll" + } + }, + { + "name": "updateAPIStatusAll", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "status" + ], + "required": [ + "projectId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/project" + } + ], + "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", + "demo": "projects\/update-api-status-all.md" + } + ], "auth": { "Project": [] } @@ -27120,7 +23365,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 419, + "weight": 427, "cookies": false, "type": "", "demo": "projects\/list-dev-keys.md", @@ -27188,7 +23433,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 416, + "weight": 424, "cookies": false, "type": "", "demo": "projects\/create-dev-key.md", @@ -27273,7 +23518,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 418, + "weight": 426, "cookies": false, "type": "", "demo": "projects\/get-dev-key.md", @@ -27341,7 +23586,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 417, + "weight": 425, "cookies": false, "type": "", "demo": "projects\/update-dev-key.md", @@ -27427,7 +23672,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 420, + "weight": 428, "cookies": false, "type": "", "demo": "projects\/delete-dev-key.md", @@ -27500,7 +23745,7 @@ "weight": 134, "cookies": false, "type": "", - "demo": "projects\/create-j-w-t.md", + "demo": "projects\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-jwt.md", "rate-limit": 0, "rate-time": 3600, @@ -27970,7 +24215,7 @@ "weight": 111, "cookies": false, "type": "", - "demo": "projects\/update-o-auth2.md", + "demo": "projects\/update-o-auth-2.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-oauth2.md", "rate-limit": 0, "rate-time": 3600, @@ -28563,7 +24808,7 @@ "account", "avatars", "databases", - "tables", + "tablesdb", "locale", "health", "storage", @@ -28692,7 +24937,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmtp", "group": "templates", @@ -28709,6 +24954,80 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMTP" + }, + "methods": [ + { + "name": "updateSmtp", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "enabled", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "enabled" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/project" + } + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", + "demo": "projects\/update-smtp.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMTP" + } + }, + { + "name": "updateSMTP", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "enabled", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "enabled" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/project" + } + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", + "demo": "projects\/update-smtp.md" + } + ], "auth": { "Project": [] } @@ -28810,7 +25129,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSmtpTest", "group": "templates", @@ -28827,6 +25146,84 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.createSMTPTest" + }, + "methods": [ + { + "name": "createSmtpTest", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "host" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Send a test email to verify SMTP configuration. ", + "demo": "projects\/create-smtp-test.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.createSMTPTest" + } + }, + { + "name": "createSMTPTest", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "host" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Send a test email to verify SMTP configuration. ", + "demo": "projects\/create-smtp-test.md" + } + ], "auth": { "Project": [] } @@ -29734,7 +26131,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getSmsTemplate", "group": "templates", @@ -29751,6 +26148,68 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.getSMSTemplate" + }, + "methods": [ + { + "name": "getSmsTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/smsTemplate" + } + ], + "description": "Get a custom SMS template for the specified locale and type returning it's contents.", + "demo": "projects\/get-sms-template.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.getSMSTemplate" + } + }, + { + "name": "getSMSTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/smsTemplate" + } + ], + "description": "Get a custom SMS template for the specified locale and type returning it's contents.", + "demo": "projects\/get-sms-template.md" + } + ], "auth": { "Project": [] } @@ -29955,7 +26414,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", @@ -29972,6 +26431,72 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMSTemplate" + }, + "methods": [ + { + "name": "updateSmsTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale", + "message" + ], + "required": [ + "projectId", + "type", + "locale", + "message" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/smsTemplate" + } + ], + "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", + "demo": "projects\/update-sms-template.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMSTemplate" + } + }, + { + "name": "updateSMSTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale", + "message" + ], + "required": [ + "projectId", + "type", + "locale", + "message" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/smsTemplate" + } + ], + "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", + "demo": "projects\/update-sms-template.md" + } + ], "auth": { "Project": [] } @@ -30195,7 +26720,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", @@ -30212,6 +26737,68 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.deleteSMSTemplate" + }, + "methods": [ + { + "name": "deleteSmsTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/smsTemplate" + } + ], + "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", + "demo": "projects\/delete-sms-template.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.deleteSMSTemplate" + } + }, + { + "name": "deleteSMSTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/smsTemplate" + } + ], + "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", + "demo": "projects\/delete-sms-template.md" + } + ], "auth": { "Project": [] } @@ -30993,10 +27580,10 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 481, + "weight": 489, "cookies": false, "type": "", - "demo": "proxy\/create-a-p-i-rule.md", + "demo": "proxy\/create-api-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, "rate-time": 60, @@ -31060,7 +27647,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 483, + "weight": 491, "cookies": false, "type": "", "demo": "proxy\/create-function-rule.md", @@ -31138,7 +27725,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 484, + "weight": 492, "cookies": false, "type": "", "demo": "proxy\/create-redirect-rule.md", @@ -31251,7 +27838,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 482, + "weight": 490, "cookies": false, "type": "", "demo": "proxy\/create-site-rule.md", @@ -31500,7 +28087,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -31570,7 +28157,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -31819,7 +28406,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -31868,7 +28455,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -31918,7 +28505,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 475, + "weight": 483, "cookies": false, "type": "", "demo": "sites\/list-templates.md", @@ -32018,7 +28605,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 476, + "weight": 484, "cookies": false, "type": "", "demo": "sites\/get-template.md", @@ -32078,7 +28665,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 477, + "weight": 485, "cookies": false, "type": "", "demo": "sites\/list-usage.md", @@ -32113,7 +28700,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -32150,7 +28737,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -32209,7 +28796,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -32454,7 +29041,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -32515,7 +29102,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -32595,7 +29182,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -32678,7 +29265,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -32779,7 +29366,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -32859,7 +29446,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -32962,7 +29549,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -33060,7 +29647,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -33122,7 +29709,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -33186,7 +29773,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -33276,7 +29863,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -33347,7 +29934,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -33418,7 +30005,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -33480,7 +30067,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -33551,7 +30138,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 478, + "weight": 486, "cookies": false, "type": "", "demo": "sites\/get-usage.md", @@ -33596,7 +30183,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -33633,7 +30220,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -33692,7 +30279,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -33783,7 +30370,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -33852,7 +30439,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -33943,7 +30530,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -35296,7 +31883,7 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -35378,7 +31965,5487 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tablesdb\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "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 columns: name", + "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 database", + "operationId": "tablesDBCreate", + "tags": [ + "tablesDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tablesdb\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "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": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDBListUsage", + "tags": [ + "tablesDB" + ], + "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.", + "responses": { + "200": { + "description": "UsageDatabases", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDatabases" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 377, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "listUsage", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "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, 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.", + "demo": "tablesdb\/list-usage.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDBGet", + "tags": [ + "tablesDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tablesdb\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", + "tags": [ + "tablesDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tablesdb\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", + "tags": [ + "tablesDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDBListTables", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": "tables", + "weight": 382, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: 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": "tablesDBCreateTable", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": "tables", + "weight": 378, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDBGetTable", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": "tables", + "weight": 379, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBUpdateTable", + "tags": [ + "tablesDB" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": "tables", + "weight": 380, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "tablesDBDeleteTable", + "tags": [ + "tablesDB" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": "tables", + "weight": 381, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDBListColumns", + "tags": [ + "tablesDB" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDBUpdateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", + "tags": [ + "tablesDB" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", + "tags": [ + "tablesDB" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationshipType", + "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": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "Column size for text columns, 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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", + "tags": [ + "tablesDB" + ], + "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" + } + ] + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBDeleteColumn", + "tags": [ + "tablesDB" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", + "tags": [ + "tablesDB" + ], + "description": "List indexes on the table.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "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 columns: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDBCreateIndex", + "tags": [ + "tablesDB" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "IndexType", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", + "tags": [ + "tablesDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "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": "tablesDBDeleteIndex", + "tags": [ + "tablesDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesDBListTableLogs", + "tags": [ + "tablesDB" + ], + "description": "Get the table 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": "listTableLogs", + "group": "tables", + "weight": 383, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "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 TableDB service [server integration](https:\/\/appwrite.io\/docs\/server\/tablesdbdb#tablesdbCreate).", + "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": "tablesDBCreateRow", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDB", + "desc": "Create rows", + "auth": { + "Project": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md" + } + ], + "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\/tablesdb#tablesDBCreate). 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": "Upsert rows", + "operationId": "tablesDBUpsertRows", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md" + } + ], + "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": "tablesDBUpdateRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "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" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "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\/tablesdb#tablesDBCreate).", + "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": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md" + } + ], + "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": "tablesDBUpdateRow", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRow", + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesDBListRowLogs", + "tags": [ + "tablesDB" + ], + "description": "Get the row 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": "listRowLogs", + "group": "logs", + "weight": 421, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "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": "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": "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "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 + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "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 + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesDBGetTableUsage", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 384, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDBGetUsage", + "tags": [ + "tablesDB" + ], + "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.", + "responses": { + "200": { + "description": "UsageDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 376, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-database-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "getUsage", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabase" + } + ], + "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.", + "demo": "tablesdb\/get-usage.md" + } + ], + "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": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -36517,7 +38584,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -36597,7 +38664,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -36686,7 +38753,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -36746,7 +38813,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -36816,7 +38883,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -37042,7 +39109,7 @@ "weight": 188, "cookies": false, "type": "", - "demo": "users\/create-argon2user.md", + "demo": "users\/create-argon-2-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37341,7 +39408,7 @@ "weight": 187, "cookies": false, "type": "", - "demo": "users\/create-m-d5user.md", + "demo": "users\/create-md-5-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37426,7 +39493,7 @@ "weight": 190, "cookies": false, "type": "", - "demo": "users\/create-p-h-pass-user.md", + "demo": "users\/create-ph-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37729,7 +39796,7 @@ "weight": 189, "cookies": false, "type": "", - "demo": "users\/create-s-h-a-user.md", + "demo": "users\/create-sha-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37866,7 +39933,7 @@ "30d", "90d" ], - "x-enum-name": "UserUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -38099,7 +40166,7 @@ "weight": 226, "cookies": false, "type": "", - "demo": "users\/create-j-w-t.md", + "demo": "users\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, "rate-time": 3600, @@ -38416,7 +40483,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfa", "group": "users", @@ -38433,6 +40500,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md" + } + ], "auth": { "Project": [] } @@ -38489,7 +40614,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -38506,6 +40631,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -38565,7 +40746,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -38582,6 +40763,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md" + } + ], "auth": { "Project": [] } @@ -38626,7 +40861,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -38643,6 +40878,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -38685,7 +40974,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -38702,6 +40991,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -38744,7 +41087,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -38761,6 +41104,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -40916,8 +43313,8 @@ "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": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -40981,7 +43378,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "error": { "description": "Error", @@ -41013,7 +43411,13 @@ "code", "type", "version" - ] + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } }, "rowList": { "description": "Rows List", @@ -41021,7 +43425,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rows rows that matched your query.", + "description": "Total number of rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -41037,7 +43441,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -41045,7 +43453,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of documents rows that matched your query.", + "description": "Total number of documents that matched your query.", "x-example": 5, "format": "int32" }, @@ -41061,7 +43469,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -41069,7 +43481,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tables rows that matched your query.", + "description": "Total number of tables that matched your query.", "x-example": 5, "format": "int32" }, @@ -41085,7 +43497,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -41093,7 +43509,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of collections rows that matched your query.", + "description": "Total number of collections that matched your query.", "x-example": 5, "format": "int32" }, @@ -41109,7 +43525,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -41117,7 +43537,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases rows that matched your query.", + "description": "Total number of databases that matched your query.", "x-example": 5, "format": "int32" }, @@ -41133,7 +43553,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -41141,7 +43565,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41157,7 +43581,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -41165,7 +43593,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41181,7 +43609,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -41189,7 +43621,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of users rows that matched your query.", + "description": "Total number of users that matched your query.", "x-example": 5, "format": "int32" }, @@ -41205,7 +43637,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -41213,7 +43649,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions rows that matched your query.", + "description": "Total number of sessions that matched your query.", "x-example": 5, "format": "int32" }, @@ -41229,7 +43665,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -41237,7 +43677,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities rows that matched your query.", + "description": "Total number of identities that matched your query.", "x-example": 5, "format": "int32" }, @@ -41253,7 +43693,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -41261,7 +43705,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs rows that matched your query.", + "description": "Total number of logs that matched your query.", "x-example": 5, "format": "int32" }, @@ -41277,7 +43721,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -41285,7 +43733,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files rows that matched your query.", + "description": "Total number of files that matched your query.", "x-example": 5, "format": "int32" }, @@ -41301,7 +43749,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -41309,7 +43761,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets rows that matched your query.", + "description": "Total number of buckets that matched your query.", "x-example": 5, "format": "int32" }, @@ -41325,7 +43777,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -41333,7 +43789,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens rows that matched your query.", + "description": "Total number of tokens that matched your query.", "x-example": 5, "format": "int32" }, @@ -41349,7 +43805,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -41357,7 +43817,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams rows that matched your query.", + "description": "Total number of teams that matched your query.", "x-example": 5, "format": "int32" }, @@ -41373,7 +43833,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -41381,7 +43845,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships rows that matched your query.", + "description": "Total number of memberships that matched your query.", "x-example": 5, "format": "int32" }, @@ -41397,7 +43861,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -41405,7 +43873,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites rows that matched your query.", + "description": "Total number of sites that matched your query.", "x-example": 5, "format": "int32" }, @@ -41421,7 +43889,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "templateSiteList": { "description": "Site Templates List", @@ -41429,7 +43901,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates rows that matched your query.", + "description": "Total number of templates that matched your query.", "x-example": 5, "format": "int32" }, @@ -41445,7 +43917,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "functionList": { "description": "Functions List", @@ -41453,7 +43929,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions rows that matched your query.", + "description": "Total number of functions that matched your query.", "x-example": 5, "format": "int32" }, @@ -41469,7 +43945,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "templateFunctionList": { "description": "Function Templates List", @@ -41477,7 +43957,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates rows that matched your query.", + "description": "Total number of templates that matched your query.", "x-example": 5, "format": "int32" }, @@ -41493,7 +43973,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "installationList": { "description": "Installations List", @@ -41501,7 +43985,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of installations rows that matched your query.", + "description": "Total number of installations that matched your query.", "x-example": 5, "format": "int32" }, @@ -41517,7 +44001,11 @@ "required": [ "total", "installations" - ] + ], + "example": { + "total": 5, + "installations": "" + } }, "providerRepositoryFrameworkList": { "description": "Framework Provider Repositories List", @@ -41525,7 +44013,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworkProviderRepositories rows that matched your query.", + "description": "Total number of frameworkProviderRepositories that matched your query.", "x-example": 5, "format": "int32" }, @@ -41541,7 +44029,11 @@ "required": [ "total", "frameworkProviderRepositories" - ] + ], + "example": { + "total": 5, + "frameworkProviderRepositories": "" + } }, "providerRepositoryRuntimeList": { "description": "Runtime Provider Repositories List", @@ -41549,7 +44041,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimeProviderRepositories rows that matched your query.", + "description": "Total number of runtimeProviderRepositories that matched your query.", "x-example": 5, "format": "int32" }, @@ -41565,7 +44057,11 @@ "required": [ "total", "runtimeProviderRepositories" - ] + ], + "example": { + "total": 5, + "runtimeProviderRepositories": "" + } }, "branchList": { "description": "Branches List", @@ -41573,7 +44069,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of branches rows that matched your query.", + "description": "Total number of branches that matched your query.", "x-example": 5, "format": "int32" }, @@ -41589,7 +44085,11 @@ "required": [ "total", "branches" - ] + ], + "example": { + "total": 5, + "branches": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -41597,7 +44097,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks rows that matched your query.", + "description": "Total number of frameworks that matched your query.", "x-example": 5, "format": "int32" }, @@ -41613,7 +44113,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -41621,7 +44125,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes rows that matched your query.", + "description": "Total number of runtimes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41637,7 +44141,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -41645,7 +44153,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments rows that matched your query.", + "description": "Total number of deployments that matched your query.", "x-example": 5, "format": "int32" }, @@ -41661,7 +44169,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -41669,7 +44181,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions rows that matched your query.", + "description": "Total number of executions that matched your query.", "x-example": 5, "format": "int32" }, @@ -41685,7 +44197,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "projectList": { "description": "Projects List", @@ -41693,7 +44209,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of projects rows that matched your query.", + "description": "Total number of projects that matched your query.", "x-example": 5, "format": "int32" }, @@ -41709,7 +44225,11 @@ "required": [ "total", "projects" - ] + ], + "example": { + "total": 5, + "projects": "" + } }, "webhookList": { "description": "Webhooks List", @@ -41717,7 +44237,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of webhooks rows that matched your query.", + "description": "Total number of webhooks that matched your query.", "x-example": 5, "format": "int32" }, @@ -41733,7 +44253,11 @@ "required": [ "total", "webhooks" - ] + ], + "example": { + "total": 5, + "webhooks": "" + } }, "keyList": { "description": "API Keys List", @@ -41741,7 +44265,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of keys rows that matched your query.", + "description": "Total number of keys that matched your query.", "x-example": 5, "format": "int32" }, @@ -41757,7 +44281,11 @@ "required": [ "total", "keys" - ] + ], + "example": { + "total": 5, + "keys": "" + } }, "devKeyList": { "description": "Dev Keys List", @@ -41765,7 +44293,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of devKeys rows that matched your query.", + "description": "Total number of devKeys that matched your query.", "x-example": 5, "format": "int32" }, @@ -41781,7 +44309,11 @@ "required": [ "total", "devKeys" - ] + ], + "example": { + "total": 5, + "devKeys": "" + } }, "platformList": { "description": "Platforms List", @@ -41789,7 +44321,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of platforms rows that matched your query.", + "description": "Total number of platforms that matched your query.", "x-example": 5, "format": "int32" }, @@ -41805,7 +44337,11 @@ "required": [ "total", "platforms" - ] + ], + "example": { + "total": 5, + "platforms": "" + } }, "countryList": { "description": "Countries List", @@ -41813,7 +44349,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries rows that matched your query.", + "description": "Total number of countries that matched your query.", "x-example": 5, "format": "int32" }, @@ -41829,7 +44365,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -41837,7 +44377,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents rows that matched your query.", + "description": "Total number of continents that matched your query.", "x-example": 5, "format": "int32" }, @@ -41853,7 +44393,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -41861,7 +44405,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages rows that matched your query.", + "description": "Total number of languages that matched your query.", "x-example": 5, "format": "int32" }, @@ -41877,7 +44421,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -41885,7 +44433,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies rows that matched your query.", + "description": "Total number of currencies that matched your query.", "x-example": 5, "format": "int32" }, @@ -41901,7 +44449,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -41909,7 +44461,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones rows that matched your query.", + "description": "Total number of phones that matched your query.", "x-example": 5, "format": "int32" }, @@ -41925,7 +44477,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -41933,7 +44489,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables rows that matched your query.", + "description": "Total number of variables that matched your query.", "x-example": 5, "format": "int32" }, @@ -41949,7 +44505,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "proxyRuleList": { "description": "Rule List", @@ -41957,7 +44517,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rules rows that matched your query.", + "description": "Total number of rules that matched your query.", "x-example": 5, "format": "int32" }, @@ -41973,7 +44533,11 @@ "required": [ "total", "rules" - ] + ], + "example": { + "total": 5, + "rules": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -41981,7 +44545,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes rows that matched your query.", + "description": "Total number of localeCodes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41997,7 +44561,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -42005,7 +44573,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers rows that matched your query.", + "description": "Total number of providers that matched your query.", "x-example": 5, "format": "int32" }, @@ -42021,7 +44589,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -42029,7 +44601,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages rows that matched your query.", + "description": "Total number of messages that matched your query.", "x-example": 5, "format": "int32" }, @@ -42045,7 +44617,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -42053,7 +44629,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics rows that matched your query.", + "description": "Total number of topics that matched your query.", "x-example": 5, "format": "int32" }, @@ -42069,7 +44645,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -42077,7 +44657,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers rows that matched your query.", + "description": "Total number of subscribers that matched your query.", "x-example": 5, "format": "int32" }, @@ -42093,7 +44673,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -42101,7 +44685,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets rows that matched your query.", + "description": "Total number of targets that matched your query.", "x-example": 5, "format": "int32" }, @@ -42117,7 +44701,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "migrationList": { "description": "Migrations List", @@ -42125,7 +44713,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of migrations rows that matched your query.", + "description": "Total number of migrations that matched your query.", "x-example": 5, "format": "int32" }, @@ -42141,7 +44729,11 @@ "required": [ "total", "migrations" - ] + ], + "example": { + "total": 5, + "migrations": "" + } }, "specificationList": { "description": "Specifications List", @@ -42149,7 +44741,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications rows that matched your query.", + "description": "Total number of specifications that matched your query.", "x-example": 5, "format": "int32" }, @@ -42165,7 +44757,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "vcsContentList": { "description": "VCS Content List", @@ -42173,7 +44769,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of contents rows that matched your query.", + "description": "Total number of contents that matched your query.", "x-example": 5, "format": "int32" }, @@ -42189,7 +44785,11 @@ "required": [ "total", "contents" - ] + ], + "example": { + "total": 5, + "contents": "" + } }, "database": { "description": "Database", @@ -42219,6 +44819,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -42226,8 +44831,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -42337,7 +44951,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -42392,7 +45020,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -42467,7 +45099,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -42544,7 +45189,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -42621,7 +45279,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -42683,7 +45354,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -42751,7 +45433,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -42828,7 +45522,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -42896,7 +45603,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -42964,7 +45683,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -43032,7 +45763,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -43124,7 +45867,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -43234,7 +45993,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -43289,7 +46062,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -43364,7 +46141,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -43427,7 +46217,7 @@ }, "default": { "type": "integer", - "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.", "x-example": 10, "format": "int32", "nullable": true @@ -43441,7 +46231,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -43504,7 +46307,7 @@ }, "default": { "type": "number", - "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.", "x-example": 2.5, "format": "double", "nullable": true @@ -43518,7 +46321,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -43567,7 +46383,7 @@ }, "default": { "type": "boolean", - "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.", "x-example": false, "nullable": true } @@ -43580,7 +46396,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -43634,7 +46461,7 @@ }, "default": { "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.", "x-example": "default@example.com", "nullable": true } @@ -43648,7 +46475,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -43710,7 +46549,7 @@ }, "default": { "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.", "x-example": "element", "nullable": true } @@ -43725,7 +46564,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -43779,7 +46631,7 @@ }, "default": { "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.", "x-example": "192.0.2.0", "nullable": true } @@ -43793,7 +46645,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -43861,7 +46725,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -43915,7 +46791,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", + "description": "Default value for column when not provided. Only null is optional", "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true } @@ -43929,7 +46805,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -44021,7 +46909,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -44099,7 +47003,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -44177,7 +47093,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -44192,17 +47120,20 @@ "type": "integer", "description": "Row automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$tableId": { "type": "string", "description": "Table ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -44234,7 +47165,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -44249,17 +47191,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -44291,7 +47236,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -44425,7 +47386,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -44586,7 +47570,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -44600,7 +47610,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -44614,7 +47627,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -44628,7 +47644,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -44642,7 +47661,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -44684,7 +47706,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -44716,7 +47745,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -44751,12 +47786,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -44943,7 +47989,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -45011,7 +48090,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -45055,7 +48146,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -45069,7 +48168,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -45119,7 +48221,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -45139,7 +48250,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -45221,7 +48336,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -45313,7 +48443,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -45363,7 +48512,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -45414,7 +48572,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -45505,7 +48674,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -45691,7 +48877,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "templateSite": { "description": "Template Site", @@ -45786,7 +49003,22 @@ "providerOwner", "providerVersion", "variables" - ] + ], + "example": { + "key": "starter", + "name": "Starter site", + "tagline": "Minimal web app integrating with Appwrite.", + "demoUrl": "https:\/\/nextjs-starter.appwrite.network\/", + "screenshotDark": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png", + "screenshotLight": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png", + "useCases": "Starter", + "frameworks": [], + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [] + } }, "templateFramework": { "description": "Template Framework", @@ -45848,7 +49080,18 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/build", + "providerRootDirectory": ".\/svelte-kit\/starter", + "buildRuntime": "node-22", + "adapter": "ssr", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -46037,7 +49280,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "templateFunction": { "description": "Template Function", @@ -46166,7 +49439,26 @@ "providerVersion", "variables", "scopes" - ] + ], + "example": { + "icon": "icon-lightning-bolt", + "id": "starter", + "name": "Starter function", + "tagline": "A simple function to get started.", + "permissions": "any", + "events": "account.create", + "cron": "0 0 * * *", + "timeout": 300, + "useCases": "Starter", + "runtimes": [], + "instructions": "For documentation and instructions check out .", + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [], + "scopes": "users.read" + } }, "templateRuntime": { "description": "Template Runtime", @@ -46198,7 +49490,13 @@ "commands", "entrypoint", "providerRootDirectory" - ] + ], + "example": { + "name": "node-19.0", + "commands": "npm install", + "entrypoint": "index.js", + "providerRootDirectory": "node\/starter" + } }, "templateVariable": { "description": "Template Variable", @@ -46248,7 +49546,16 @@ "placeholder", "required", "type" - ] + ], + "example": { + "name": "APPWRITE_DATABASE_ID", + "description": "The ID of the Appwrite database that contains the collection to sync.", + "value": "512", + "secret": false, + "placeholder": "64a55...7b912", + "required": false, + "type": "password" + } }, "installation": { "description": "Installation", @@ -46292,7 +49599,15 @@ "provider", "organization", "providerInstallationId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "provider": "github", + "organization": "appwrite", + "providerInstallationId": "5322" + } }, "providerRepository": { "description": "ProviderRepository", @@ -46342,7 +49657,16 @@ "private", "defaultBranch", "pushedAt" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime" + } }, "providerRepositoryFramework": { "description": "ProviderRepositoryFramework", @@ -46398,7 +49722,17 @@ "defaultBranch", "pushedAt", "framework" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "framework": "nextjs" + } }, "providerRepositoryRuntime": { "description": "ProviderRepositoryRuntime", @@ -46454,7 +49788,17 @@ "defaultBranch", "pushedAt", "runtime" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "runtime": "node-22" + } }, "detectionFramework": { "description": "DetectionFramework", @@ -46486,7 +49830,13 @@ "installCommand", "buildCommand", "outputDirectory" - ] + ], + "example": { + "framework": "nuxt", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "dist" + } }, "detectionRuntime": { "description": "DetectionRuntime", @@ -46512,7 +49862,12 @@ "runtime", "entrypoint", "commands" - ] + ], + "example": { + "runtime": "node", + "entrypoint": "index.js", + "commands": "npm install && npm run build" + } }, "vcsContent": { "description": "VcsContents", @@ -46539,7 +49894,12 @@ }, "required": [ "name" - ] + ], + "example": { + "size": 1523, + "isDirectory": true, + "name": "Main.java" + } }, "branch": { "description": "Branch", @@ -46553,7 +49913,10 @@ }, "required": [ "name" - ] + ], + "example": { + "name": "main" + } }, "runtime": { "description": "Runtime", @@ -46612,7 +49975,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -46667,7 +50040,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -46705,7 +50096,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -46879,7 +50277,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -46897,7 +50324,7 @@ }, "$updatedAt": { "type": "string", - "description": "Execution upate date in ISO 8601 format.", + "description": "Execution update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$permissions": { @@ -46915,6 +50342,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -46999,6 +50431,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -47010,7 +50443,37 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "project": { "description": "Project", @@ -47304,9 +50767,9 @@ "description": "Databases (legacy) service status", "x-example": true }, - "serviceStatusForTables": { + "serviceStatusForTablesdb": { "type": "boolean", - "description": "Tables service status", + "description": "TablesDB service status", "x-example": true }, "serviceStatusForLocale": { @@ -47408,7 +50871,7 @@ "serviceStatusForAccount", "serviceStatusForAvatars", "serviceStatusForDatabases", - "serviceStatusForTables", + "serviceStatusForTablesdb", "serviceStatusForLocale", "serviceStatusForHealth", "serviceStatusForStorage", @@ -47418,7 +50881,75 @@ "serviceStatusForFunctions", "serviceStatusForGraphql", "serviceStatusForMessaging" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authMockNumbers": [ + {} + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + {} + ], + "platforms": {}, + "webhooks": {}, + "keys": {}, + "devKeys": {}, + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyTo": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "securepassword", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForGraphql": true, + "serviceStatusForMessaging": true + } }, "webhook": { "description": "Webhook", @@ -47511,7 +51042,25 @@ "enabled", "logs", "attempts" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "security": true, + "httpUser": "username", + "httpPass": "password", + "signatureKey": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } }, "key": { "description": "Key", @@ -47579,7 +51128,18 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "devKey": { "description": "DevKey", @@ -47638,7 +51198,17 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "mockNumber": { "description": "Mock Number", @@ -47658,7 +51228,11 @@ "required": [ "phone", "otp" - ] + ], + "example": { + "phone": "+1612842323", + "otp": "123456" + } }, "authProvider": { "description": "AuthProvider", @@ -47696,7 +51270,14 @@ "appId", "secret", "enabled" - ] + ], + "example": { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ", + "enabled": "" + } }, "platform": { "description": "Platform", @@ -47764,7 +51345,19 @@ "hostname", "httpUser", "httpPass" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "key": "com.company.appname", + "store": "", + "hostname": true, + "httpUser": "username", + "httpPass": "password" + } }, "variable": { "description": "Variable", @@ -47820,7 +51413,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -47840,7 +51443,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -47860,7 +51467,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -47886,7 +51497,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -47938,7 +51554,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -47964,7 +51589,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -47984,7 +51614,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -47999,7 +51633,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -48026,7 +51663,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -48070,7 +51712,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -48099,7 +51749,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "metric": { "description": "Metric", @@ -48120,7 +51775,11 @@ "required": [ "value", "date" - ] + ], + "example": { + "value": 1, + "date": "2020-10-15T06:38:00.000+00:00" + } }, "metricBreakdown": { "description": "Metric Breakdown", @@ -48154,7 +51813,13 @@ "required": [ "name", "value" - ] + ], + "example": { + "resourceId": "5e5ea5c16897e", + "name": "Documents", + "value": 1, + "estimate": 1 + } }, "usageDatabases": { "description": "UsageDatabases", @@ -48296,7 +51961,26 @@ "storage", "databasesReads", "databasesWrites" - ] + ], + "example": { + "range": "30d", + "databasesTotal": 0, + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "databases": [], + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databasesReads": [], + "databasesWrites": [] + } }, "usageDatabase": { "description": "UsageDatabase", @@ -48422,7 +52106,24 @@ "storage", "databaseReads", "databaseWrites" - ] + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } }, "usageTable": { "description": "UsageTable", @@ -48452,7 +52153,12 @@ "range", "rowsTotal", "rows" - ] + ], + "example": { + "range": "30d", + "rowsTotal": 0, + "rows": [] + } }, "usageCollection": { "description": "UsageCollection", @@ -48482,7 +52188,12 @@ "range", "documentsTotal", "documents" - ] + ], + "example": { + "range": "30d", + "documentsTotal": 0, + "documents": [] + } }, "usageUsers": { "description": "UsageUsers", @@ -48528,7 +52239,14 @@ "sessionsTotal", "users", "sessions" - ] + ], + "example": { + "range": "30d", + "usersTotal": 0, + "sessionsTotal": 0, + "users": [], + "sessions": [] + } }, "usageStorage": { "description": "StorageUsage", @@ -48590,7 +52308,16 @@ "buckets", "files", "storage" - ] + ], + "example": { + "range": "30d", + "bucketsTotal": 0, + "filesTotal": 0, + "filesStorageTotal": 0, + "buckets": [], + "files": [], + "storage": [] + } }, "usageBuckets": { "description": "UsageBuckets", @@ -48652,7 +52379,16 @@ "storage", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "range": "30d", + "filesTotal": 0, + "filesStorageTotal": 0, + "files": [], + "storage": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "usageFunctions": { "description": "UsageFunctions", @@ -48858,7 +52594,34 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "functionsTotal": 0, + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "functions": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageFunction": { "description": "UsageFunction", @@ -49055,7 +52818,33 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageSites": { "description": "UsageSites", @@ -49309,7 +53098,40 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "sitesTotal": 0, + "sites": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageSite": { "description": "UsageSite", @@ -49554,7 +53376,39 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageProject": { "description": "UsageProject", @@ -49814,7 +53668,41 @@ "databasesWrites", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "executionsTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "databasesTotal": 0, + "databasesStorageTotal": 0, + "usersTotal": 0, + "filesStorageTotal": 0, + "functionsStorageTotal": 0, + "buildsStorageTotal": 0, + "deploymentsStorageTotal": 0, + "bucketsTotal": 0, + "executionsMbSecondsTotal": 0, + "buildsMbSecondsTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "requests": [], + "network": [], + "users": [], + "executions": [], + "executionsBreakdown": [], + "bucketsBreakdown": [], + "databasesStorageBreakdown": [], + "executionsMbSecondsBreakdown": [], + "buildsMbSecondsBreakdown": [], + "functionsStorageBreakdown": [], + "authPhoneTotal": 0, + "authPhoneEstimate": 0, + "authPhoneCountryBreakdown": [], + "databasesReads": [], + "databasesWrites": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "headers": { "description": "Headers", @@ -49834,7 +53722,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -49868,7 +53760,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "proxyRule": { "description": "Rule", @@ -49967,7 +53865,24 @@ "status", "logs", "renewAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "function", + "status": "verified", + "logs": "HTTP challegne failed.", + "renewAt": "datetime" + } }, "smsTemplate": { "description": "SmsTemplate", @@ -49993,7 +53908,12 @@ "type", "locale", "message" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account." + } }, "emailTemplate": { "description": "EmailTemplate", @@ -50043,7 +53963,16 @@ "senderEmail", "replyTo", "subject" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyTo": "emails@appwrite.io", + "subject": "Please verify your email address" + } }, "consoleVariables": { "description": "Console Variables", @@ -50064,6 +53993,11 @@ "description": "AAAA target for your Appwrite custom domains.", "x-example": "::1" }, + "_APP_DOMAIN_TARGET_CAA": { + "type": "string", + "description": "CAA target for your Appwrite custom domains.", + "x-example": "digicert.com" + }, "_APP_STORAGE_LIMIT": { "type": "integer", "description": "Maximum file size allowed for file upload in bytes.", @@ -50121,6 +54055,7 @@ "_APP_DOMAIN_TARGET_CNAME", "_APP_DOMAIN_TARGET_A", "_APP_DOMAIN_TARGET_AAAA", + "_APP_DOMAIN_TARGET_CAA", "_APP_STORAGE_LIMIT", "_APP_COMPUTE_SIZE_LIMIT", "_APP_USAGE_STATS", @@ -50131,7 +54066,23 @@ "_APP_DOMAIN_FUNCTIONS", "_APP_OPTIONS_FORCE_HTTPS", "_APP_DOMAINS_NAMESERVERS" - ] + ], + "example": { + "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", + "_APP_DOMAIN_TARGET_A": "127.0.0.1", + "_APP_DOMAIN_TARGET_AAAA": "::1", + "_APP_DOMAIN_TARGET_CAA": "digicert.com", + "_APP_STORAGE_LIMIT": "30000000", + "_APP_COMPUTE_SIZE_LIMIT": "30000000", + "_APP_USAGE_STATS": "enabled", + "_APP_VCS_ENABLED": true, + "_APP_DOMAIN_ENABLED": true, + "_APP_ASSISTANT_ENABLED": true, + "_APP_DOMAIN_SITES": "sites.localhost", + "_APP_DOMAIN_FUNCTIONS": "functions.localhost", + "_APP_OPTIONS_FORCE_HTTPS": "enabled", + "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -50163,7 +54114,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -50183,7 +54140,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -50203,7 +54166,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -50235,7 +54202,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -50301,7 +54274,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -50411,7 +54399,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -50473,7 +54487,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -50547,7 +54571,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -50609,7 +54653,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } }, "migration": { "description": "Migration", @@ -50697,7 +54752,23 @@ "statusCounters", "resourceData", "errors" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "stage": "init", + "source": "Appwrite", + "destination": "Appwrite", + "resources": [ + "user" + ], + "resourceId": "databaseId:collectionId", + "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", + "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", + "errors": [] + } }, "migrationReport": { "description": "Migration Report", @@ -50767,7 +54838,18 @@ "function", "size", "version" - ] + ], + "example": { + "user": 20, + "team": 20, + "database": 20, + "row": 20, + "file": 20, + "bucket": 20, + "function": 20, + "size": 30000, + "version": "1.4.0" + } } }, "securitySchemes": { 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 639817ac35..0fe1cf72ae 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -387,7 +387,7 @@ "weight": 30, "cookies": false, "type": "", - "demo": "account\/create-j-w-t.md", + "demo": "account\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, "rate-time": 3600, @@ -503,7 +503,7 @@ "weight": 45, "cookies": false, "type": "", - "demo": "account\/update-m-f-a.md", + "demo": "account\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, "rate-time": 3600, @@ -567,7 +567,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", @@ -585,6 +585,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Session": [] @@ -634,7 +690,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", @@ -652,6 +708,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Session": [] @@ -713,7 +829,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -731,6 +847,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Session": [] @@ -782,7 +952,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", @@ -800,6 +970,60 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -856,7 +1080,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", @@ -874,6 +1098,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md" + } + ], "auth": { "Project": [], "Session": [] @@ -933,7 +1217,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -951,6 +1235,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md" + } + ], "auth": { "Project": [], "Session": [] @@ -985,7 +1317,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -1003,6 +1335,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1035,7 +1415,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -1053,6 +1433,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1085,7 +1513,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -1103,6 +1531,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1868,7 +2344,7 @@ "weight": 27, "cookies": false, "type": "", - "demo": "account\/update-magic-u-r-l-session.md", + "demo": "account\/update-magic-url-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, "rate-time": 3600, @@ -1879,6 +2355,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -1953,6 +2433,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2303,7 +2787,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2354,7 +2838,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2405,7 +2889,7 @@ "weight": 25, "cookies": false, "type": "", - "demo": "account\/create-magic-u-r-l-token.md", + "demo": "account\/create-magic-url-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, "rate-time": 3600, @@ -2436,7 +2920,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2485,7 +2969,7 @@ "weight": 24, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2token.md", + "demo": "account\/create-o-auth-2-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2658,7 +3142,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3129,7 +3613,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3147,7 +3631,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3167,7 +3651,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -3963,7 +4447,7 @@ "weight": 65, "cookies": false, "type": "location", - "demo": "avatars\/get-q-r.md", + "demo": "avatars\/get-qr.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, "rate-time": 3600, @@ -4061,7 +4545,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4076,12 +4560,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4098,30 +4583,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "queries", - "search" - ], - "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." } ], "auth": { @@ -4185,7 +4651,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4200,12 +4666,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4226,34 +4693,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4323,7 +4767,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -4338,12 +4782,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4361,31 +4806,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "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." } ], "auth": { @@ -4435,7 +4860,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -4450,12 +4875,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4476,34 +4902,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -4570,7 +4973,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -4585,12 +4988,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4607,30 +5011,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -4682,7 +5067,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -4697,7 +5082,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDB.listTables" }, "auth": { "Project": [], @@ -4770,7 +5155,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -4785,7 +5170,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDB.createTable" }, "auth": { "Project": [], @@ -4879,7 +5264,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -4894,7 +5279,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDB.getTable" }, "auth": { "Project": [], @@ -4953,7 +5338,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -4968,7 +5353,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDB.updateTable" }, "auth": { "Project": [], @@ -5057,7 +5442,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5072,7 +5457,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDB.deleteTable" }, "auth": { "Project": [], @@ -5133,7 +5518,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5148,7 +5533,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDB.listColumns" }, "auth": { "Project": [], @@ -5222,7 +5607,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5237,7 +5622,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDB.createBooleanColumn" }, "auth": { "Project": [], @@ -5333,7 +5718,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5348,7 +5733,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDB.updateBooleanColumn" }, "auth": { "Project": [], @@ -5449,7 +5834,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -5464,7 +5849,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDB.createDatetimeColumn" }, "auth": { "Project": [], @@ -5560,7 +5945,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -5575,7 +5960,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDB.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5676,7 +6061,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -5691,7 +6076,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDB.createEmailColumn" }, "auth": { "Project": [], @@ -5787,7 +6172,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -5802,7 +6187,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDB.updateEmailColumn" }, "auth": { "Project": [], @@ -5903,7 +6288,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -5918,7 +6303,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDB.createEnumColumn" }, "auth": { "Project": [], @@ -6023,7 +6408,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6038,7 +6423,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDB.updateEnumColumn" }, "auth": { "Project": [], @@ -6148,7 +6533,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6163,7 +6548,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDB.createFloatColumn" }, "auth": { "Project": [], @@ -6269,7 +6654,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6284,7 +6669,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDB.updateFloatColumn" }, "auth": { "Project": [], @@ -6395,7 +6780,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -6410,7 +6795,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDB.createIntegerColumn" }, "auth": { "Project": [], @@ -6516,7 +6901,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -6531,7 +6916,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDB.updateIntegerColumn" }, "auth": { "Project": [], @@ -6642,7 +7027,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -6657,7 +7042,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDB.createIpColumn" }, "auth": { "Project": [], @@ -6753,7 +7138,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -6768,7 +7153,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDB.updateIpColumn" }, "auth": { "Project": [], @@ -6869,7 +7254,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -6884,7 +7269,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDB.createRelationshipColumn" }, "auth": { "Project": [], @@ -7005,7 +7390,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7020,7 +7405,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDB.createStringColumn" }, "auth": { "Project": [], @@ -7127,7 +7512,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7142,7 +7527,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDB.updateStringColumn" }, "auth": { "Project": [], @@ -7248,7 +7633,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7263,7 +7648,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDB.createUrlColumn" }, "auth": { "Project": [], @@ -7359,7 +7744,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -7374,7 +7759,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDB.updateUrlColumn" }, "auth": { "Project": [], @@ -7506,7 +7891,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -7521,7 +7906,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDB.getColumn" }, "auth": { "Project": [], @@ -7582,7 +7967,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -7597,7 +7982,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDB.deleteColumn" }, "auth": { "Project": [], @@ -7667,7 +8052,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -7682,7 +8067,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDB.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7780,7 +8165,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -7797,7 +8182,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDB.listRows" }, "auth": { "Project": [], @@ -7871,7 +8256,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -7888,12 +8273,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [], "Session": [] @@ -7918,14 +8304,16 @@ } ], "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.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [], "Key": [] @@ -7946,10 +8334,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": "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.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDB.createRows" } } ], @@ -8027,12 +8416,12 @@ } }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "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.\n", + "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": { "201": { "description": "Documents List", @@ -8049,7 +8438,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8065,12 +8454,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -8091,10 +8481,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": "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", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" } } ], @@ -8160,7 +8551,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\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.", + "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.", "responses": { "200": { "description": "Documents List", @@ -8177,7 +8568,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8193,7 +8584,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDB.updateRows" }, "auth": { "Project": [], @@ -8259,7 +8650,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\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8276,7 +8667,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8292,7 +8683,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDB.deleteRows" }, "auth": { "Project": [], @@ -8372,7 +8763,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -8389,7 +8780,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [], @@ -8451,12 +8842,12 @@ ] }, "put": { - "summary": "Create or update a document", + "summary": "Upsert a document", "operationId": "databasesUpsertDocument", "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 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": "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": { "201": { "description": "Document", @@ -8473,7 +8864,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -8490,12 +8881,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Session": [] @@ -8519,10 +8911,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": "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.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -8622,7 +9015,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -8639,7 +9032,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [], @@ -8727,7 +9120,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -8744,7 +9137,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDB.deleteRow" }, "auth": { "Project": [], @@ -8817,7 +9210,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -8827,22 +9220,26 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ + "client", + "server", "console", "server" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDB.decrementRowColumn" }, "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], @@ -8934,7 +9331,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -8944,22 +9341,26 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ + "client", + "server", "console", "server" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDB.incrementRowColumn" }, "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], @@ -9051,7 +9452,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9066,7 +9467,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDB.listIndexes" }, "auth": { "Project": [], @@ -9138,7 +9539,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9153,7 +9554,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDB.createIndex" }, "auth": { "Project": [], @@ -9271,7 +9672,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9286,7 +9687,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDB.getIndex" }, "auth": { "Project": [], @@ -9347,7 +9748,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -9362,7 +9763,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDB.deleteIndex" }, "auth": { "Project": [], @@ -9408,4564 +9809,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "tags": [ - "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": { - "200": { - "description": "Tables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/tableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsCreateTable", - "tags": [ - "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": { - "201": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsUpdateTable", - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteTable", - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationshipType", - "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": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "tags": [ - "grids" - ], - "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" - } - ] - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteColumn", - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "gridsCreateIndex", - "tags": [ - "grids" - ], - "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", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "IndexType", - "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}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "gridsDeleteIndex", - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "tags": [ - "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": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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": "gridsCreateRow", - "tags": [ - "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": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "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", - "namespace": "grids", - "auth": { - "Project": [], - "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\/tables#tablesCreate). 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": "gridsUpsertRows", - "tags": [ - "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": { - "201": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "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": "gridsUpdateRows", - "tags": [ - "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": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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": "gridsDeleteRows", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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": "gridsUpsertRow", - "tags": [ - "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": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "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": "gridsUpdateRow", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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": "gridsDeleteRow", - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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", @@ -13990,7 +9833,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -14064,7 +9907,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -14298,7 +10141,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -14348,7 +10191,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -14399,7 +10242,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -14459,7 +10302,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -14690,7 +10533,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -14752,7 +10595,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -14833,7 +10676,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -14917,7 +10760,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -15014,7 +10857,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -15100,7 +10943,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -15204,7 +11047,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -15302,7 +11145,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -15365,7 +11208,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -15430,7 +11273,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -15521,7 +11364,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -15593,7 +11436,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -15670,7 +11513,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -15733,7 +11576,7 @@ }, "method": { "type": "string", - "description": "HTTP method of execution. Default value is GET.", + "description": "HTTP method of execution. Default value is POST.", "x-example": "GET", "enum": [ "GET", @@ -15741,7 +11584,8 @@ "PUT", "PATCH", "DELETE", - "OPTIONS" + "OPTIONS", + "HEAD" ], "x-enum-name": "ExecutionMethod", "x-enum-keys": [] @@ -15787,7 +11631,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -15854,7 +11698,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -15926,7 +11770,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -15986,7 +11830,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -16078,7 +11922,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -16148,7 +11992,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -16240,7 +12084,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -16312,7 +12156,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -16366,7 +12210,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -16634,7 +12478,7 @@ "weight": 80, "cookies": false, "type": "", - "demo": "health\/get-d-b.md", + "demo": "health\/get-db.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, "rate-time": 3600, @@ -17956,7 +13800,7 @@ "weight": 73, "cookies": false, "type": "", - "demo": "locale\/list-countries-e-u.md", + "demo": "locale\/list-countries-eu.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, @@ -18169,7 +14013,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -18246,7 +14090,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -18391,7 +14235,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -18538,7 +14382,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18713,7 +14557,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18888,11 +14732,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -18906,6 +14750,76 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md" + } + ], "auth": { "Project": [], "Key": [] @@ -18998,11 +14912,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -19016,6 +14930,74 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19115,7 +15097,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -19169,7 +15151,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -19232,7 +15214,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -19308,7 +15290,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -19384,7 +15366,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -19457,11 +15439,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19475,6 +15457,78 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19563,11 +15617,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19581,6 +15635,76 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19672,11 +15796,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19690,6 +15814,70 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19758,11 +15946,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19776,6 +15964,68 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19851,7 +16101,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -19967,7 +16217,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -20086,10 +16336,10 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", - "demo": "messaging\/create-msg91provider.md", + "demo": "messaging\/create-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -20182,10 +16432,10 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", - "demo": "messaging\/update-msg91provider.md", + "demo": "messaging\/update-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -20281,7 +16531,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20387,7 +16637,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20492,11 +16742,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20510,6 +16760,92 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -20636,11 +16972,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -20654,6 +16990,88 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -20786,7 +17204,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -20882,7 +17300,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -20981,7 +17399,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21077,7 +17495,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21176,7 +17594,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21272,7 +17690,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21371,7 +17789,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21467,7 +17885,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21566,7 +17984,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21620,7 +18038,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21683,7 +18101,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -21759,7 +18177,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -21835,7 +18253,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -21910,7 +18328,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -21994,7 +18412,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22055,7 +18473,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22133,7 +18551,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22196,7 +18614,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22272,7 +18690,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22357,7 +18775,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22449,7 +18867,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22513,7 +18931,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22590,7 +19008,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -22661,7 +19079,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -22911,7 +19329,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -22961,7 +19379,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -23012,7 +19430,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -23072,7 +19490,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -23318,7 +19736,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -23380,7 +19798,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -23461,7 +19879,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -23545,7 +19963,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -23647,7 +20065,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -23728,7 +20146,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -23832,7 +20250,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -23931,7 +20349,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -23994,7 +20412,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -24059,7 +20477,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -24150,7 +20568,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -24222,7 +20640,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -24294,7 +20712,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -24357,7 +20775,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -24429,7 +20847,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -24489,7 +20907,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -24581,7 +20999,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -24651,7 +21069,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -24743,7 +21161,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -26059,6 +22477,5062 @@ ] } }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tablesdb\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "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 columns: name", + "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 database", + "operationId": "tablesDBCreate", + "tags": [ + "tablesDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tablesdb\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "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": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDBGet", + "tags": [ + "tablesDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tablesdb\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", + "tags": [ + "tablesDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tablesdb\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", + "tags": [ + "tablesDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDBListTables", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": "tables", + "weight": 382, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: 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": "tablesDBCreateTable", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": "tables", + "weight": 378, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDBGetTable", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": "tables", + "weight": 379, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBUpdateTable", + "tags": [ + "tablesDB" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": "tables", + "weight": 380, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "tablesDBDeleteTable", + "tags": [ + "tablesDB" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": "tables", + "weight": 381, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDBListColumns", + "tags": [ + "tablesDB" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDBUpdateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", + "tags": [ + "tablesDB" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", + "tags": [ + "tablesDB" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationshipType", + "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": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "Column size for text columns, 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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", + "tags": [ + "tablesDB" + ], + "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" + } + ] + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBDeleteColumn", + "tags": [ + "tablesDB" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", + "tags": [ + "tablesDB" + ], + "description": "List indexes on the table.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "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 columns: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDBCreateIndex", + "tags": [ + "tablesDB" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "IndexType", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", + "tags": [ + "tablesDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "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": "tablesDBDeleteIndex", + "tags": [ + "tablesDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "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 TableDB service [server integration](https:\/\/appwrite.io\/docs\/server\/tablesdbdb#tablesdbCreate).", + "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": "tablesDBCreateRow", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [], + "Session": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDB", + "desc": "Create rows", + "auth": { + "Project": [], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md" + } + ], + "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\/tablesdb#tablesDBCreate). 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": "Upsert rows", + "operationId": "tablesDBUpsertRows", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md" + } + ], + "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": "tablesDBUpdateRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "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" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "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\/tablesdb#tablesDBCreate).", + "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": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md" + } + ], + "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": "tablesDBUpdateRow", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRow", + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "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 + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "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 + } + } + } + } + } + } + } + }, "\/teams": { "get": { "summary": "List teams", @@ -27138,7 +28612,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -27219,7 +28693,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -27309,7 +28783,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -27370,7 +28844,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -27441,7 +28915,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -27670,7 +29144,7 @@ "weight": 188, "cookies": false, "type": "", - "demo": "users\/create-argon2user.md", + "demo": "users\/create-argon-2-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, "rate-time": 3600, @@ -27973,7 +29447,7 @@ "weight": 187, "cookies": false, "type": "", - "demo": "users\/create-m-d5user.md", + "demo": "users\/create-md-5-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28059,7 +29533,7 @@ "weight": 190, "cookies": false, "type": "", - "demo": "users\/create-p-h-pass-user.md", + "demo": "users\/create-ph-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28365,7 +29839,7 @@ "weight": 189, "cookies": false, "type": "", - "demo": "users\/create-s-h-a-user.md", + "demo": "users\/create-sha-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28667,7 +30141,7 @@ "weight": 226, "cookies": false, "type": "", - "demo": "users\/create-j-w-t.md", + "demo": "users\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, "rate-time": 3600, @@ -28988,7 +30462,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfa", "group": "users", @@ -29005,6 +30479,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29062,7 +30596,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -29079,6 +30613,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29139,7 +30731,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -29156,6 +30748,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29201,7 +30849,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -29218,6 +30866,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29261,7 +30965,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -29278,6 +30982,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29321,7 +31081,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -29338,6 +31098,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Key": [] @@ -30747,8 +32563,8 @@ "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": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -30812,7 +32628,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "error": { "description": "Error", @@ -30844,7 +32661,13 @@ "code", "type", "version" - ] + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } }, "rowList": { "description": "Rows List", @@ -30852,7 +32675,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rows rows that matched your query.", + "description": "Total number of rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -30868,7 +32691,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -30876,7 +32703,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of documents rows that matched your query.", + "description": "Total number of documents that matched your query.", "x-example": 5, "format": "int32" }, @@ -30892,7 +32719,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -30900,7 +32731,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tables rows that matched your query.", + "description": "Total number of tables that matched your query.", "x-example": 5, "format": "int32" }, @@ -30916,7 +32747,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -30924,7 +32759,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of collections rows that matched your query.", + "description": "Total number of collections that matched your query.", "x-example": 5, "format": "int32" }, @@ -30940,7 +32775,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -30948,7 +32787,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases rows that matched your query.", + "description": "Total number of databases that matched your query.", "x-example": 5, "format": "int32" }, @@ -30964,7 +32803,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -30972,7 +32815,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -30988,7 +32831,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -30996,7 +32843,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31012,7 +32859,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -31020,7 +32871,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of users rows that matched your query.", + "description": "Total number of users that matched your query.", "x-example": 5, "format": "int32" }, @@ -31036,7 +32887,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -31044,7 +32899,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions rows that matched your query.", + "description": "Total number of sessions that matched your query.", "x-example": 5, "format": "int32" }, @@ -31060,7 +32915,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -31068,7 +32927,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities rows that matched your query.", + "description": "Total number of identities that matched your query.", "x-example": 5, "format": "int32" }, @@ -31084,7 +32943,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -31092,7 +32955,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs rows that matched your query.", + "description": "Total number of logs that matched your query.", "x-example": 5, "format": "int32" }, @@ -31108,7 +32971,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -31116,7 +32983,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files rows that matched your query.", + "description": "Total number of files that matched your query.", "x-example": 5, "format": "int32" }, @@ -31132,7 +32999,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -31140,7 +33011,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets rows that matched your query.", + "description": "Total number of buckets that matched your query.", "x-example": 5, "format": "int32" }, @@ -31156,7 +33027,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -31164,7 +33039,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens rows that matched your query.", + "description": "Total number of tokens that matched your query.", "x-example": 5, "format": "int32" }, @@ -31180,7 +33055,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -31188,7 +33067,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams rows that matched your query.", + "description": "Total number of teams that matched your query.", "x-example": 5, "format": "int32" }, @@ -31204,7 +33083,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -31212,7 +33095,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships rows that matched your query.", + "description": "Total number of memberships that matched your query.", "x-example": 5, "format": "int32" }, @@ -31228,7 +33111,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -31236,7 +33123,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites rows that matched your query.", + "description": "Total number of sites that matched your query.", "x-example": 5, "format": "int32" }, @@ -31252,7 +33139,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "functionList": { "description": "Functions List", @@ -31260,7 +33151,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions rows that matched your query.", + "description": "Total number of functions that matched your query.", "x-example": 5, "format": "int32" }, @@ -31276,7 +33167,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -31284,7 +33179,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks rows that matched your query.", + "description": "Total number of frameworks that matched your query.", "x-example": 5, "format": "int32" }, @@ -31300,7 +33195,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -31308,7 +33207,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes rows that matched your query.", + "description": "Total number of runtimes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31324,7 +33223,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -31332,7 +33235,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments rows that matched your query.", + "description": "Total number of deployments that matched your query.", "x-example": 5, "format": "int32" }, @@ -31348,7 +33251,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -31356,7 +33263,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions rows that matched your query.", + "description": "Total number of executions that matched your query.", "x-example": 5, "format": "int32" }, @@ -31372,7 +33279,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -31380,7 +33291,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries rows that matched your query.", + "description": "Total number of countries that matched your query.", "x-example": 5, "format": "int32" }, @@ -31396,7 +33307,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -31404,7 +33319,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents rows that matched your query.", + "description": "Total number of continents that matched your query.", "x-example": 5, "format": "int32" }, @@ -31420,7 +33335,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -31428,7 +33347,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages rows that matched your query.", + "description": "Total number of languages that matched your query.", "x-example": 5, "format": "int32" }, @@ -31444,7 +33363,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -31452,7 +33375,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies rows that matched your query.", + "description": "Total number of currencies that matched your query.", "x-example": 5, "format": "int32" }, @@ -31468,7 +33391,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -31476,7 +33403,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones rows that matched your query.", + "description": "Total number of phones that matched your query.", "x-example": 5, "format": "int32" }, @@ -31492,7 +33419,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -31500,7 +33431,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables rows that matched your query.", + "description": "Total number of variables that matched your query.", "x-example": 5, "format": "int32" }, @@ -31516,7 +33447,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -31524,7 +33459,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes rows that matched your query.", + "description": "Total number of localeCodes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31540,7 +33475,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -31548,7 +33487,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers rows that matched your query.", + "description": "Total number of providers that matched your query.", "x-example": 5, "format": "int32" }, @@ -31564,7 +33503,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -31572,7 +33515,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages rows that matched your query.", + "description": "Total number of messages that matched your query.", "x-example": 5, "format": "int32" }, @@ -31588,7 +33531,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -31596,7 +33543,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics rows that matched your query.", + "description": "Total number of topics that matched your query.", "x-example": 5, "format": "int32" }, @@ -31612,7 +33559,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -31620,7 +33571,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers rows that matched your query.", + "description": "Total number of subscribers that matched your query.", "x-example": 5, "format": "int32" }, @@ -31636,7 +33587,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -31644,7 +33599,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets rows that matched your query.", + "description": "Total number of targets that matched your query.", "x-example": 5, "format": "int32" }, @@ -31660,7 +33615,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "specificationList": { "description": "Specifications List", @@ -31668,7 +33627,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications rows that matched your query.", + "description": "Total number of specifications that matched your query.", "x-example": 5, "format": "int32" }, @@ -31684,7 +33643,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "database": { "description": "Database", @@ -31714,6 +33677,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -31721,8 +33689,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -31832,7 +33809,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -31887,7 +33878,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -31962,7 +33957,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -32039,7 +34047,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -32116,7 +34137,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -32178,7 +34212,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -32246,7 +34291,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -32323,7 +34380,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -32391,7 +34461,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -32459,7 +34541,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -32527,7 +34621,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -32619,7 +34725,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -32729,7 +34851,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -32784,7 +34920,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -32859,7 +34999,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -32922,7 +35075,7 @@ }, "default": { "type": "integer", - "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.", "x-example": 10, "format": "int32", "nullable": true @@ -32936,7 +35089,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -32999,7 +35165,7 @@ }, "default": { "type": "number", - "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.", "x-example": 2.5, "format": "double", "nullable": true @@ -33013,7 +35179,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -33062,7 +35241,7 @@ }, "default": { "type": "boolean", - "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.", "x-example": false, "nullable": true } @@ -33075,7 +35254,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -33129,7 +35319,7 @@ }, "default": { "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.", "x-example": "default@example.com", "nullable": true } @@ -33143,7 +35333,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -33205,7 +35407,7 @@ }, "default": { "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.", "x-example": "element", "nullable": true } @@ -33220,7 +35422,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -33274,7 +35489,7 @@ }, "default": { "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.", "x-example": "192.0.2.0", "nullable": true } @@ -33288,7 +35503,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -33356,7 +35583,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -33410,7 +35649,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", + "description": "Default value for column when not provided. Only null is optional", "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true } @@ -33424,7 +35663,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -33516,7 +35767,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -33594,7 +35861,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -33672,7 +35951,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -33687,17 +35978,20 @@ "type": "integer", "description": "Row automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$tableId": { "type": "string", "description": "Table ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -33729,7 +36023,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -33744,17 +36049,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -33786,7 +36094,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -33920,7 +36244,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -34081,7 +36428,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -34095,7 +36468,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -34109,7 +36485,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -34123,7 +36502,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -34137,7 +36519,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -34179,7 +36564,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -34211,7 +36603,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -34246,12 +36644,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -34438,7 +36847,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -34506,7 +36948,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -34550,7 +37004,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -34564,7 +37026,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -34614,7 +37079,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -34634,7 +37108,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -34716,7 +37194,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -34808,7 +37301,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -34858,7 +37370,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -34909,7 +37430,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -35000,7 +37532,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -35186,7 +37735,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -35375,7 +37955,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "runtime": { "description": "Runtime", @@ -35434,7 +38044,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -35489,7 +38109,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -35527,7 +38165,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -35701,7 +38346,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -35719,7 +38393,7 @@ }, "$updatedAt": { "type": "string", - "description": "Execution upate date in ISO 8601 format.", + "description": "Execution update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$permissions": { @@ -35737,6 +38411,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -35821,6 +38500,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -35832,7 +38512,37 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "variable": { "description": "Variable", @@ -35888,7 +38598,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -35908,7 +38628,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -35928,7 +38652,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -35954,7 +38682,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -36006,7 +38739,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -36032,7 +38774,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -36052,7 +38799,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -36067,7 +38818,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -36094,7 +38848,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -36138,7 +38897,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -36167,7 +38934,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "headers": { "description": "Headers", @@ -36187,7 +38959,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -36221,7 +38997,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -36253,7 +39035,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -36273,7 +39061,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -36293,7 +39087,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -36325,7 +39123,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -36391,7 +39195,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -36501,7 +39320,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -36563,7 +39408,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -36637,7 +39492,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -36699,7 +39574,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "securitySchemes": { diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index ceb6d6ecfd..0841dabbd1 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -383,7 +383,7 @@ "weight": 30, "cookies": false, "type": "", - "demo": "account\/create-j-w-t.md", + "demo": "account\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, "rate-time": 3600, @@ -498,7 +498,7 @@ "weight": 45, "cookies": false, "type": "", - "demo": "account\/update-m-f-a.md", + "demo": "account\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, "rate-time": 3600, @@ -561,7 +561,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", @@ -579,6 +579,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -627,7 +681,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", @@ -645,6 +699,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -705,7 +817,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -723,6 +835,58 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -773,7 +937,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", @@ -791,6 +955,60 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -847,7 +1065,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", @@ -865,6 +1083,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -923,7 +1199,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -941,6 +1217,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md" + } + ], "auth": { "Project": [] } @@ -974,7 +1296,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -992,6 +1314,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1023,7 +1391,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -1041,6 +1409,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1072,7 +1486,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -1090,6 +1504,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1845,7 +2305,7 @@ "weight": 27, "cookies": false, "type": "", - "demo": "account\/update-magic-u-r-l-session.md", + "demo": "account\/update-magic-url-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, "rate-time": 3600, @@ -1856,6 +2316,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -1912,7 +2376,7 @@ "weight": 20, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2session.md", + "demo": "account\/create-o-auth-2-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2065,6 +2529,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2622,7 +3090,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2673,7 +3141,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2724,7 +3192,7 @@ "weight": 25, "cookies": false, "type": "", - "demo": "account\/create-magic-u-r-l-token.md", + "demo": "account\/create-magic-url-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, "rate-time": 3600, @@ -2755,7 +3223,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2804,7 +3272,7 @@ "weight": 24, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2token.md", + "demo": "account\/create-o-auth-2-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2977,7 +3445,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3440,7 +3908,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3458,7 +3926,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3478,7 +3946,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -4266,7 +4734,7 @@ "weight": 65, "cookies": false, "type": "location", - "demo": "avatars\/get-q-r.md", + "demo": "avatars\/get-qr.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, "rate-time": 3600, @@ -4362,7 +4830,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -4379,7 +4847,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDB.listRows" }, "auth": { "Project": [] @@ -4451,7 +4919,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -4468,12 +4936,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -4497,9 +4966,10 @@ } ], "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.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" } } ], @@ -4599,7 +5069,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -4616,7 +5086,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [] @@ -4676,12 +5146,12 @@ ] }, "put": { - "summary": "Create or update a document", + "summary": "Upsert a document", "operationId": "databasesUpsertDocument", "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 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": "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": { "201": { "description": "Document", @@ -4698,7 +5168,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -4715,12 +5185,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4743,10 +5214,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": "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.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -4844,7 +5316,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -4861,7 +5333,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [] @@ -4947,7 +5419,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -4964,7 +5436,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDB.deleteRow" }, "auth": { "Project": [] @@ -5011,159 +5483,50 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", "tags": [ - "grids" + "databases" ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "description": "Decrement a specific attribute of a document by a given value.", "responses": { "200": { - "description": "Rows List", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/rowList" + "$ref": "#\/components\/schemas\/document" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 343, "cookies": false, "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "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\/tables#tablesCreate).", - "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": "gridsCreateRow", - "tags": [ - "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": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", + "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": "rows.write", + "scope": "documents.write", "platforms": [ "client", "server", + "console", "server" ], "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "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." - } - ], + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.decrementRowColumn" + }, "auth": { "Project": [] } @@ -5187,12 +5550,31 @@ "in": "path" }, { - "name": "tableId", - "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.", + "name": "collectionId", + "description": "Collection ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" }, "in": "path" } @@ -5203,31 +5585,15 @@ "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": "" + "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.", - "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" - } + "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 } } } @@ -5236,274 +5602,50 @@ } } }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "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\/tables#tablesCreate).", - "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": "gridsUpsertRow", - "tags": [ - "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": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "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", - "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" - } - } - } - } - } - } - } - }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", "tags": [ - "grids" + "databases" ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Increment a specific attribute of a document by a given value.", "responses": { "200": { - "description": "Row", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/row" + "$ref": "#\/components\/schemas\/document" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 342, "cookies": false, "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", + "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": "rows.write", + "scope": "documents.write", "platforms": [ "client", "server", + "console", "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.incrementRowColumn" + }, "auth": { "Project": [] } @@ -5527,22 +5669,31 @@ "in": "path" }, { - "name": "tableId", - "description": "Table ID.", + "name": "collectionId", + "description": "Collection ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "rowId", - "description": "Row ID.", + "name": "documentId", + "description": "Document ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" }, "in": "path" } @@ -5553,99 +5704,21 @@ "schema": { "type": "object", "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "x-example": "{}" + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "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" - } + "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 } } } } } } - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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": { @@ -5672,7 +5745,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -5747,7 +5820,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -5808,7 +5881,7 @@ }, "method": { "type": "string", - "description": "HTTP method of execution. Default value is GET.", + "description": "HTTP method of execution. Default value is POST.", "x-example": "GET", "enum": [ "GET", @@ -5816,7 +5889,8 @@ "PUT", "PATCH", "DELETE", - "OPTIONS" + "OPTIONS", + "HEAD" ], "x-enum-name": "ExecutionMethod", "x-enum-keys": [] @@ -5862,7 +5936,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -5936,7 +6010,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -5988,7 +6062,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -6251,7 +6325,7 @@ "weight": 73, "cookies": false, "type": "", - "demo": "locale\/list-countries-e-u.md", + "demo": "locale\/list-countries-eu.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, @@ -6456,7 +6530,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -6539,7 +6613,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -7393,6 +7467,901 @@ ] } }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "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 TableDB service [server integration](https:\/\/appwrite.io\/docs\/server\/tablesdbdb#tablesdbCreate).", + "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": "tablesDBCreateRow", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md" + } + ], + "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\/tablesdb#tablesDBCreate). 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" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "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\/tablesdb#tablesDBCreate).", + "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": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md" + } + ], + "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 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": "tablesDBUpdateRow", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRow", + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "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" + }, + { + "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 + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "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" + }, + { + "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 + } + } + } + } + } + } + } + }, "\/teams": { "get": { "summary": "List teams", @@ -8440,8 +9409,8 @@ "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": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -8505,7 +9474,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "error": { "description": "Error", @@ -8537,7 +9507,13 @@ "code", "type", "version" - ] + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } }, "rowList": { "description": "Rows List", @@ -8545,7 +9521,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rows rows that matched your query.", + "description": "Total number of rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8561,7 +9537,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -8569,7 +9549,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of documents rows that matched your query.", + "description": "Total number of documents that matched your query.", "x-example": 5, "format": "int32" }, @@ -8585,7 +9565,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "sessionList": { "description": "Sessions List", @@ -8593,7 +9577,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions rows that matched your query.", + "description": "Total number of sessions that matched your query.", "x-example": 5, "format": "int32" }, @@ -8609,7 +9593,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -8617,7 +9605,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities rows that matched your query.", + "description": "Total number of identities that matched your query.", "x-example": 5, "format": "int32" }, @@ -8633,7 +9621,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -8641,7 +9633,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs rows that matched your query.", + "description": "Total number of logs that matched your query.", "x-example": 5, "format": "int32" }, @@ -8657,7 +9649,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -8665,7 +9661,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files rows that matched your query.", + "description": "Total number of files that matched your query.", "x-example": 5, "format": "int32" }, @@ -8681,7 +9677,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "teamList": { "description": "Teams List", @@ -8689,7 +9689,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams rows that matched your query.", + "description": "Total number of teams that matched your query.", "x-example": 5, "format": "int32" }, @@ -8705,7 +9705,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -8713,7 +9717,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships rows that matched your query.", + "description": "Total number of memberships that matched your query.", "x-example": 5, "format": "int32" }, @@ -8729,7 +9733,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "executionList": { "description": "Executions List", @@ -8737,7 +9745,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions rows that matched your query.", + "description": "Total number of executions that matched your query.", "x-example": 5, "format": "int32" }, @@ -8753,7 +9761,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -8761,7 +9773,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries rows that matched your query.", + "description": "Total number of countries that matched your query.", "x-example": 5, "format": "int32" }, @@ -8777,7 +9789,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -8785,7 +9801,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents rows that matched your query.", + "description": "Total number of continents that matched your query.", "x-example": 5, "format": "int32" }, @@ -8801,7 +9817,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -8809,7 +9829,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages rows that matched your query.", + "description": "Total number of languages that matched your query.", "x-example": 5, "format": "int32" }, @@ -8825,7 +9845,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -8833,7 +9857,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies rows that matched your query.", + "description": "Total number of currencies that matched your query.", "x-example": 5, "format": "int32" }, @@ -8849,7 +9873,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -8857,7 +9885,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones rows that matched your query.", + "description": "Total number of phones that matched your query.", "x-example": 5, "format": "int32" }, @@ -8873,7 +9901,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -8881,7 +9913,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes rows that matched your query.", + "description": "Total number of localeCodes that matched your query.", "x-example": 5, "format": "int32" }, @@ -8897,7 +9929,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "row": { "description": "Row", @@ -8912,17 +9948,20 @@ "type": "integer", "description": "Row automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$tableId": { "type": "string", "description": "Table ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -8954,7 +9993,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -9014,7 +10064,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -9148,7 +10214,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -9309,7 +10398,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -9323,7 +10438,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -9337,7 +10455,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -9351,7 +10472,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -9365,7 +10489,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -9407,7 +10534,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -9439,7 +10573,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -9474,12 +10614,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -9666,7 +10817,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -9734,7 +10918,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -9778,7 +10974,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -9792,7 +10996,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -9842,7 +11049,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -9862,7 +11078,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -9944,7 +11164,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "team": { "description": "Team", @@ -9995,7 +11230,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -10086,7 +11332,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "execution": { "description": "Execution", @@ -10104,7 +11367,7 @@ }, "$updatedAt": { "type": "string", - "description": "Execution upate date in ISO 8601 format.", + "description": "Execution update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$permissions": { @@ -10122,6 +11385,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -10206,6 +11474,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -10217,7 +11486,37 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "country": { "description": "Country", @@ -10237,7 +11536,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -10257,7 +11560,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -10283,7 +11590,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -10335,7 +11647,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -10361,7 +11682,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "headers": { "description": "Headers", @@ -10381,7 +11707,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -10413,7 +11743,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -10433,7 +11769,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -10453,7 +11795,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -10485,7 +11831,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "subscriber": { "description": "Subscriber", @@ -10559,7 +11911,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -10621,7 +11993,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "securitySchemes": { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 4ee19cd594..31cb8e5105 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -418,7 +418,7 @@ "weight": 30, "cookies": false, "type": "", - "demo": "account\/create-j-w-t.md", + "demo": "account\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, "rate-time": 3600, @@ -532,7 +532,7 @@ "weight": 45, "cookies": false, "type": "", - "demo": "account\/update-m-f-a.md", + "demo": "account\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, "rate-time": 3600, @@ -594,7 +594,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", @@ -612,6 +612,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -659,7 +713,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", @@ -677,6 +731,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -736,7 +848,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -754,6 +866,58 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -803,7 +967,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", @@ -821,6 +985,60 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -877,7 +1095,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", @@ -895,6 +1113,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -952,7 +1228,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -970,6 +1246,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md" + } + ], "auth": { "Project": [] } @@ -1002,7 +1324,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -1020,6 +1342,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1050,7 +1418,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -1068,6 +1436,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1098,7 +1512,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -1116,6 +1530,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1861,7 +2321,7 @@ "weight": 27, "cookies": false, "type": "", - "demo": "account\/update-magic-u-r-l-session.md", + "demo": "account\/update-magic-url-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, "rate-time": 3600, @@ -1872,6 +2332,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -1928,7 +2392,7 @@ "weight": 20, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2session.md", + "demo": "account\/create-o-auth-2-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2081,6 +2545,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2631,7 +3099,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2682,7 +3150,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2733,7 +3201,7 @@ "weight": 25, "cookies": false, "type": "", - "demo": "account\/create-magic-u-r-l-token.md", + "demo": "account\/create-magic-url-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, "rate-time": 3600, @@ -2764,7 +3232,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2813,7 +3281,7 @@ "weight": 24, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2token.md", + "demo": "account\/create-o-auth-2-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2986,7 +3454,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3445,7 +3913,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3463,7 +3931,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3483,7 +3951,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -4271,7 +4739,7 @@ "weight": 65, "cookies": false, "type": "location", - "demo": "avatars\/get-q-r.md", + "demo": "avatars\/get-qr.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, "rate-time": 3600, @@ -4360,7 +4828,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -4420,7 +4888,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 480, + "weight": 488, "cookies": false, "type": "", "demo": "console\/get-resource.md", @@ -4495,7 +4963,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -4543,7 +5011,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4558,12 +5026,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4579,29 +5048,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "queries", - "search" - ], - "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." } ], "auth": { @@ -4664,7 +5115,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4679,12 +5130,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4704,33 +5156,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4782,7 +5212,7 @@ "tags": [ "databases" ], - "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, 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.", "responses": { "200": { "description": "UsageDatabases", @@ -4799,7 +5229,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 323, + "weight": 324, "cookies": false, "type": "", "demo": "databases\/list-usage.md", @@ -4814,12 +5244,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDB.listUsage" }, "methods": [ { "name": "listUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4833,29 +5264,12 @@ "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, 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.", + "demo": "databases\/list-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDB.listUsage" } - }, - { - "name": "listDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "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, 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": { @@ -4880,7 +5294,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -4917,7 +5331,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -4932,12 +5346,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4954,30 +5369,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "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." } ], "auth": { @@ -5026,7 +5422,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -5041,12 +5437,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5066,33 +5463,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -5158,7 +5533,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -5173,12 +5548,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5194,29 +5570,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -5267,7 +5625,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -5282,7 +5640,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDB.listTables" }, "auth": { "Project": [] @@ -5354,7 +5712,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -5369,7 +5727,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDB.createTable" }, "auth": { "Project": [] @@ -5462,7 +5820,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5477,7 +5835,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDB.getTable" }, "auth": { "Project": [] @@ -5535,7 +5893,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5550,7 +5908,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDB.updateTable" }, "auth": { "Project": [] @@ -5638,7 +5996,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5653,7 +6011,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDB.deleteTable" }, "auth": { "Project": [] @@ -5713,7 +6071,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5728,7 +6086,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDB.listColumns" }, "auth": { "Project": [] @@ -5801,7 +6159,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5816,7 +6174,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDB.createBooleanColumn" }, "auth": { "Project": [] @@ -5911,7 +6269,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5926,7 +6284,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDB.updateBooleanColumn" }, "auth": { "Project": [] @@ -6026,7 +6384,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -6041,7 +6399,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDB.createDatetimeColumn" }, "auth": { "Project": [] @@ -6136,7 +6494,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -6151,7 +6509,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDB.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6251,7 +6609,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -6266,7 +6624,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDB.createEmailColumn" }, "auth": { "Project": [] @@ -6361,7 +6719,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -6376,7 +6734,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDB.updateEmailColumn" }, "auth": { "Project": [] @@ -6476,7 +6834,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6491,7 +6849,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDB.createEnumColumn" }, "auth": { "Project": [] @@ -6595,7 +6953,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6610,7 +6968,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDB.updateEnumColumn" }, "auth": { "Project": [] @@ -6719,7 +7077,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6734,7 +7092,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDB.createFloatColumn" }, "auth": { "Project": [] @@ -6839,7 +7197,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6854,7 +7212,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDB.updateFloatColumn" }, "auth": { "Project": [] @@ -6964,7 +7322,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -6979,7 +7337,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDB.createIntegerColumn" }, "auth": { "Project": [] @@ -7084,7 +7442,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -7099,7 +7457,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDB.updateIntegerColumn" }, "auth": { "Project": [] @@ -7209,7 +7567,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -7224,7 +7582,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDB.createIpColumn" }, "auth": { "Project": [] @@ -7319,7 +7677,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -7334,7 +7692,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDB.updateIpColumn" }, "auth": { "Project": [] @@ -7434,7 +7792,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -7449,7 +7807,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDB.createRelationshipColumn" }, "auth": { "Project": [] @@ -7569,7 +7927,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7584,7 +7942,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDB.createStringColumn" }, "auth": { "Project": [] @@ -7690,7 +8048,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7705,7 +8063,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDB.updateStringColumn" }, "auth": { "Project": [] @@ -7810,7 +8168,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7825,7 +8183,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDB.createUrlColumn" }, "auth": { "Project": [] @@ -7920,7 +8278,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -7935,7 +8293,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDB.updateUrlColumn" }, "auth": { "Project": [] @@ -8066,7 +8424,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -8081,7 +8439,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDB.getColumn" }, "auth": { "Project": [] @@ -8141,7 +8499,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -8156,7 +8514,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDB.deleteColumn" }, "auth": { "Project": [] @@ -8225,7 +8583,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -8240,7 +8598,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDB.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8337,7 +8695,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -8354,7 +8712,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDB.listRows" }, "auth": { "Project": [] @@ -8426,7 +8784,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -8443,12 +8801,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -8472,14 +8831,16 @@ } ], "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.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [] }, @@ -8499,10 +8860,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": "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.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDB.createRows" } } ], @@ -8578,12 +8940,12 @@ } }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "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.\n", + "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": { "201": { "description": "Documents List", @@ -8600,7 +8962,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8616,12 +8978,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -8641,10 +9004,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": "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", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" } } ], @@ -8709,7 +9073,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\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.", + "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.", "responses": { "200": { "description": "Documents List", @@ -8726,7 +9090,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8742,7 +9106,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDB.updateRows" }, "auth": { "Project": [] @@ -8807,7 +9171,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\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8824,7 +9188,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8840,7 +9204,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDB.deleteRows" }, "auth": { "Project": [] @@ -8919,7 +9283,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -8936,7 +9300,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [] @@ -8996,12 +9360,12 @@ ] }, "put": { - "summary": "Create or update a document", + "summary": "Upsert a document", "operationId": "databasesUpsertDocument", "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 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": "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": { "201": { "description": "Document", @@ -9018,7 +9382,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -9035,12 +9399,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -9063,10 +9428,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": "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.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -9164,7 +9530,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -9181,7 +9547,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [] @@ -9267,7 +9633,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -9284,7 +9650,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDB.deleteRow" }, "auth": { "Project": [] @@ -9355,7 +9721,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/list-document-logs.md", @@ -9370,7 +9736,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRowLogs" + "replaceWith": "tablesDB.listRowLogs" }, "auth": { "Project": [] @@ -9452,7 +9818,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -9462,13 +9828,15 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ + "client", + "server", "console", "server" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDB.decrementRowColumn" }, "auth": { "Project": [] @@ -9477,6 +9845,7 @@ "security": [ { "Project": [], + "JWT": [], "Key": [] } ], @@ -9568,7 +9937,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -9578,13 +9947,15 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ + "client", + "server", "console", "server" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDB.incrementRowColumn" }, "auth": { "Project": [] @@ -9593,6 +9964,7 @@ "security": [ { "Project": [], + "JWT": [], "Key": [] } ], @@ -9684,7 +10056,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9699,7 +10071,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDB.listIndexes" }, "auth": { "Project": [] @@ -9770,7 +10142,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9785,7 +10157,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDB.createIndex" }, "auth": { "Project": [] @@ -9902,7 +10274,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9917,7 +10289,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDB.getIndex" }, "auth": { "Project": [] @@ -9977,7 +10349,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -9992,7 +10364,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDB.deleteIndex" }, "auth": { "Project": [] @@ -10061,7 +10433,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "demo": "databases\/list-collection-logs.md", @@ -10076,7 +10448,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTableLogs" + "replaceWith": "tablesDB.listTableLogs" }, "auth": { "Project": [] @@ -10148,7 +10520,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 330, + "weight": 331, "cookies": false, "type": "", "demo": "databases\/get-collection-usage.md", @@ -10163,7 +10535,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTableUsage" + "replaceWith": "tablesDB.getTableUsage" }, "auth": { "Project": [] @@ -10197,7 +10569,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -10220,4779 +10592,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "tags": [ - "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": { - "200": { - "description": "Tables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/tableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsCreateTable", - "tags": [ - "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": { - "201": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsUpdateTable", - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteTable", - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationshipType", - "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": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "tags": [ - "grids" - ], - "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" - } - ] - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteColumn", - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "gridsCreateIndex", - "tags": [ - "grids" - ], - "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", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "IndexType", - "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}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "gridsDeleteIndex", - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { - "get": { - "summary": "List table logs", - "operationId": "gridsListTableLogs", - "tags": [ - "grids" - ], - "description": "Get the table 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": "listTableLogs", - "group": "tables", - "weight": 375, - "cookies": false, - "type": "", - "demo": "grids\/list-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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "tags": [ - "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": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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": "gridsCreateRow", - "tags": [ - "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": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "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", - "namespace": "grids", - "auth": { - "Project": [] - }, - "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\/tables#tablesCreate). 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": "gridsUpsertRows", - "tags": [ - "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": { - "201": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "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": "gridsUpdateRows", - "tags": [ - "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": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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": "gridsDeleteRows", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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": "gridsUpsertRow", - "tags": [ - "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": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "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": "gridsUpdateRow", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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": "gridsDeleteRow", - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { - "get": { - "summary": "List row logs", - "operationId": "gridsListRowLogs", - "tags": [ - "grids" - ], - "description": "Get the row 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": "listRowLogs", - "group": "logs", - "weight": 413, - "cookies": false, - "type": "", - "demo": "grids\/list-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}", - "scope": "rows.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": "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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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}\/grids\/tables\/{tableId}\/usage": { - "get": { - "summary": "Get table usage stats", - "operationId": "gridsGetTableUsage", - "tags": [ - "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": { - "200": { - "description": "UsageTable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageTable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTableUsage", - "group": null, - "weight": 376, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "GridUsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, "\/databases\/{databaseId}\/logs": { "get": { "summary": "List database logs", @@ -15017,7 +10616,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "demo": "databases\/list-logs.md", @@ -15032,12 +10631,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDB.listDatabaseLogs" }, "methods": [ { "name": "listLogs", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -15055,31 +10655,11 @@ } ], "description": "Get the database activity logs list by its unique ID.", + "demo": "databases\/list-logs.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDB.listDatabaseLogs" } - }, - { - "name": "listDatabaseLogs", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "queries" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/logList" - } - ], - "description": "" } ], "auth": { @@ -15121,7 +10701,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetDatabaseUsage", + "operationId": "databasesGetUsage", "tags": [ "databases" ], @@ -15140,12 +10720,12 @@ }, "deprecated": true, "x-appwrite": { - "method": "getDatabaseUsage", + "method": "getUsage", "group": null, - "weight": 322, + "weight": 323, "cookies": false, "type": "", - "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, @@ -15157,12 +10737,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDB.getUsage" }, "methods": [ { - "name": "getDatabaseUsage", + "name": "getUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -15180,31 +10761,11 @@ } ], "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.", + "demo": "databases\/get-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDB.getUsage" } - }, - { - "name": "getDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabase" - } - ], - "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": { @@ -15239,7 +10800,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15276,7 +10837,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -15349,7 +10910,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -15582,7 +11143,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -15631,7 +11192,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -15681,7 +11242,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 450, + "weight": 458, "cookies": false, "type": "", "demo": "functions\/list-templates.md", @@ -15781,7 +11342,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 449, + "weight": 457, "cookies": false, "type": "", "demo": "functions\/get-template.md", @@ -15841,7 +11402,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 443, + "weight": 451, "cookies": false, "type": "", "demo": "functions\/list-usage.md", @@ -15876,7 +11437,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15913,7 +11474,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -15972,7 +11533,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -16202,7 +11763,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -16263,7 +11824,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -16343,7 +11904,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -16426,7 +11987,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -16522,7 +12083,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -16607,7 +12168,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -16710,7 +12271,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -16807,7 +12368,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -16869,7 +12430,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -16933,7 +12494,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -17023,7 +12584,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -17094,7 +12655,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -17169,7 +12730,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -17230,7 +12791,7 @@ }, "method": { "type": "string", - "description": "HTTP method of execution. Default value is GET.", + "description": "HTTP method of execution. Default value is POST.", "x-example": "GET", "enum": [ "GET", @@ -17238,7 +12799,8 @@ "PUT", "PATCH", "DELETE", - "OPTIONS" + "OPTIONS", + "HEAD" ], "x-enum-name": "ExecutionMethod", "x-enum-keys": [] @@ -17284,7 +12846,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -17349,7 +12911,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -17420,7 +12982,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 442, + "weight": 450, "cookies": false, "type": "", "demo": "functions\/get-usage.md", @@ -17465,7 +13027,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -17502,7 +13064,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -17561,7 +13123,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -17652,7 +13214,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -17721,7 +13283,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -17812,7 +13374,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -17883,7 +13445,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -17935,7 +13497,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -18197,7 +13759,7 @@ "weight": 80, "cookies": false, "type": "", - "demo": "health\/get-d-b.md", + "demo": "health\/get-db.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, "rate-time": 3600, @@ -19493,7 +15055,7 @@ "weight": 73, "cookies": false, "type": "", - "demo": "locale\/list-countries-e-u.md", + "demo": "locale\/list-countries-eu.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, @@ -19698,7 +15260,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -19774,7 +15336,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -19918,7 +15480,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -20064,7 +15626,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -20238,7 +15800,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -20412,11 +15974,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -20430,6 +15992,74 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md" + } + ], "auth": { "Project": [] } @@ -20521,11 +16151,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -20539,6 +16169,72 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md" + } + ], "auth": { "Project": [] } @@ -20637,7 +16333,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -20690,7 +16386,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -20752,7 +16448,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -20827,7 +16523,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -20902,7 +16598,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -20974,11 +16670,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -20992,6 +16688,76 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md" + } + ], "auth": { "Project": [] } @@ -21079,11 +16845,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -21097,6 +16863,74 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md" + } + ], "auth": { "Project": [] } @@ -21187,11 +17021,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -21205,6 +17039,68 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md" + } + ], "auth": { "Project": [] } @@ -21272,11 +17168,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -21290,6 +17186,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md" + } + ], "auth": { "Project": [] } @@ -21364,7 +17320,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -21479,7 +17435,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -21597,10 +17553,10 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", - "demo": "messaging\/create-msg91provider.md", + "demo": "messaging\/create-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -21692,10 +17648,10 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", - "demo": "messaging\/update-msg91provider.md", + "demo": "messaging\/update-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -21790,7 +17746,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -21895,7 +17851,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -21999,11 +17955,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -22017,6 +17973,90 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md" + } + ], "auth": { "Project": [] } @@ -22142,11 +18182,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -22160,6 +18200,86 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md" + } + ], "auth": { "Project": [] } @@ -22291,7 +18411,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -22386,7 +18506,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -22484,7 +18604,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -22579,7 +18699,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -22677,7 +18797,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -22772,7 +18892,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -22870,7 +18990,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -22965,7 +19085,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -23063,7 +19183,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -23116,7 +19236,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -23178,7 +19298,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -23253,7 +19373,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -23328,7 +19448,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -23402,7 +19522,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -23485,7 +19605,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -23545,7 +19665,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -23622,7 +19742,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -23684,7 +19804,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -23759,7 +19879,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -23843,7 +19963,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -23933,7 +20053,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -23996,7 +20116,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -24071,7 +20191,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 262, + "weight": 263, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -24145,7 +20265,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 257, + "weight": 258, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -24233,7 +20353,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 264, + "weight": 265, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -24326,7 +20446,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 261, + "weight": 262, "cookies": false, "type": "", "demo": "migrations\/create-csv-migration.md", @@ -24368,6 +20488,11 @@ "type": "string", "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", "x-example": "[ID1:ID2]" + }, + "internalFile": { + "type": "boolean", + "description": "Is the file stored in an internal bucket?", + "x-example": false } }, "required": [ @@ -24405,7 +20530,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 258, + "weight": 259, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -24481,7 +20606,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 265, + "weight": 266, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -24553,7 +20678,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 260, + "weight": 261, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -24664,7 +20789,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 267, + "weight": 268, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -24797,7 +20922,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 259, + "weight": 260, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -24902,7 +21027,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 266, + "weight": 267, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -25026,7 +21151,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 263, + "weight": 264, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -25084,7 +21209,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 268, + "weight": 269, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -25135,7 +21260,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 269, + "weight": 270, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -26040,7 +22165,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApiStatus", "group": "projects", @@ -26057,6 +22182,68 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatus" + }, + "methods": [ + { + "name": "updateApiStatus", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "api", + "status" + ], + "required": [ + "projectId", + "api", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/project" + } + ], + "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", + "demo": "projects\/update-api-status.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatus" + } + }, + { + "name": "updateAPIStatus", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "api", + "status" + ], + "required": [ + "projectId", + "api", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/project" + } + ], + "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", + "demo": "projects\/update-api-status.md" + } + ], "auth": { "Project": [] } @@ -26132,7 +22319,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", @@ -26149,6 +22336,64 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatusAll" + }, + "methods": [ + { + "name": "updateApiStatusAll", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "status" + ], + "required": [ + "projectId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/project" + } + ], + "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", + "demo": "projects\/update-api-status-all.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatusAll" + } + }, + { + "name": "updateAPIStatusAll", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "status" + ], + "required": [ + "projectId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/project" + } + ], + "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", + "demo": "projects\/update-api-status-all.md" + } + ], "auth": { "Project": [] } @@ -27120,7 +23365,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 419, + "weight": 427, "cookies": false, "type": "", "demo": "projects\/list-dev-keys.md", @@ -27188,7 +23433,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 416, + "weight": 424, "cookies": false, "type": "", "demo": "projects\/create-dev-key.md", @@ -27273,7 +23518,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 418, + "weight": 426, "cookies": false, "type": "", "demo": "projects\/get-dev-key.md", @@ -27341,7 +23586,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 417, + "weight": 425, "cookies": false, "type": "", "demo": "projects\/update-dev-key.md", @@ -27427,7 +23672,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 420, + "weight": 428, "cookies": false, "type": "", "demo": "projects\/delete-dev-key.md", @@ -27500,7 +23745,7 @@ "weight": 134, "cookies": false, "type": "", - "demo": "projects\/create-j-w-t.md", + "demo": "projects\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-jwt.md", "rate-limit": 0, "rate-time": 3600, @@ -27970,7 +24215,7 @@ "weight": 111, "cookies": false, "type": "", - "demo": "projects\/update-o-auth2.md", + "demo": "projects\/update-o-auth-2.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-oauth2.md", "rate-limit": 0, "rate-time": 3600, @@ -28563,7 +24808,7 @@ "account", "avatars", "databases", - "tables", + "tablesdb", "locale", "health", "storage", @@ -28692,7 +24937,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmtp", "group": "templates", @@ -28709,6 +24954,80 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMTP" + }, + "methods": [ + { + "name": "updateSmtp", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "enabled", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "enabled" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/project" + } + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", + "demo": "projects\/update-smtp.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMTP" + } + }, + { + "name": "updateSMTP", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "enabled", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "enabled" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/project" + } + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", + "demo": "projects\/update-smtp.md" + } + ], "auth": { "Project": [] } @@ -28810,7 +25129,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSmtpTest", "group": "templates", @@ -28827,6 +25146,84 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.createSMTPTest" + }, + "methods": [ + { + "name": "createSmtpTest", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "host" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Send a test email to verify SMTP configuration. ", + "demo": "projects\/create-smtp-test.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.createSMTPTest" + } + }, + { + "name": "createSMTPTest", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "host" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Send a test email to verify SMTP configuration. ", + "demo": "projects\/create-smtp-test.md" + } + ], "auth": { "Project": [] } @@ -29734,7 +26131,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getSmsTemplate", "group": "templates", @@ -29751,6 +26148,68 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.getSMSTemplate" + }, + "methods": [ + { + "name": "getSmsTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/smsTemplate" + } + ], + "description": "Get a custom SMS template for the specified locale and type returning it's contents.", + "demo": "projects\/get-sms-template.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.getSMSTemplate" + } + }, + { + "name": "getSMSTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/smsTemplate" + } + ], + "description": "Get a custom SMS template for the specified locale and type returning it's contents.", + "demo": "projects\/get-sms-template.md" + } + ], "auth": { "Project": [] } @@ -29955,7 +26414,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", @@ -29972,6 +26431,72 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMSTemplate" + }, + "methods": [ + { + "name": "updateSmsTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale", + "message" + ], + "required": [ + "projectId", + "type", + "locale", + "message" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/smsTemplate" + } + ], + "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", + "demo": "projects\/update-sms-template.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMSTemplate" + } + }, + { + "name": "updateSMSTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale", + "message" + ], + "required": [ + "projectId", + "type", + "locale", + "message" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/smsTemplate" + } + ], + "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", + "demo": "projects\/update-sms-template.md" + } + ], "auth": { "Project": [] } @@ -30195,7 +26720,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", @@ -30212,6 +26737,68 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.deleteSMSTemplate" + }, + "methods": [ + { + "name": "deleteSmsTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/smsTemplate" + } + ], + "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", + "demo": "projects\/delete-sms-template.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.deleteSMSTemplate" + } + }, + { + "name": "deleteSMSTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/smsTemplate" + } + ], + "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", + "demo": "projects\/delete-sms-template.md" + } + ], "auth": { "Project": [] } @@ -30993,10 +27580,10 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 481, + "weight": 489, "cookies": false, "type": "", - "demo": "proxy\/create-a-p-i-rule.md", + "demo": "proxy\/create-api-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, "rate-time": 60, @@ -31060,7 +27647,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 483, + "weight": 491, "cookies": false, "type": "", "demo": "proxy\/create-function-rule.md", @@ -31138,7 +27725,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 484, + "weight": 492, "cookies": false, "type": "", "demo": "proxy\/create-redirect-rule.md", @@ -31251,7 +27838,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 482, + "weight": 490, "cookies": false, "type": "", "demo": "proxy\/create-site-rule.md", @@ -31500,7 +28087,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -31570,7 +28157,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -31819,7 +28406,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -31868,7 +28455,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -31918,7 +28505,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 475, + "weight": 483, "cookies": false, "type": "", "demo": "sites\/list-templates.md", @@ -32018,7 +28605,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 476, + "weight": 484, "cookies": false, "type": "", "demo": "sites\/get-template.md", @@ -32078,7 +28665,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 477, + "weight": 485, "cookies": false, "type": "", "demo": "sites\/list-usage.md", @@ -32113,7 +28700,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -32150,7 +28737,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -32209,7 +28796,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -32454,7 +29041,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -32515,7 +29102,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -32595,7 +29182,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -32678,7 +29265,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -32779,7 +29366,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -32859,7 +29446,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -32962,7 +29549,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -33060,7 +29647,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -33122,7 +29709,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -33186,7 +29773,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -33276,7 +29863,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -33347,7 +29934,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -33418,7 +30005,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -33480,7 +30067,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -33551,7 +30138,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 478, + "weight": 486, "cookies": false, "type": "", "demo": "sites\/get-usage.md", @@ -33596,7 +30183,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -33633,7 +30220,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -33692,7 +30279,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -33783,7 +30370,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -33852,7 +30439,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -33943,7 +30530,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -35296,7 +31883,7 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -35378,7 +31965,5487 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tablesdb\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "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 columns: name", + "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 database", + "operationId": "tablesDBCreate", + "tags": [ + "tablesDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tablesdb\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "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": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDBListUsage", + "tags": [ + "tablesDB" + ], + "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.", + "responses": { + "200": { + "description": "UsageDatabases", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDatabases" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 377, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "listUsage", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "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, 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.", + "demo": "tablesdb\/list-usage.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDBGet", + "tags": [ + "tablesDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tablesdb\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", + "tags": [ + "tablesDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tablesdb\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", + "tags": [ + "tablesDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDBListTables", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": "tables", + "weight": 382, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: 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": "tablesDBCreateTable", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": "tables", + "weight": 378, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDBGetTable", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": "tables", + "weight": 379, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBUpdateTable", + "tags": [ + "tablesDB" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": "tables", + "weight": 380, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "tablesDBDeleteTable", + "tags": [ + "tablesDB" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": "tables", + "weight": 381, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDBListColumns", + "tags": [ + "tablesDB" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDBUpdateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", + "tags": [ + "tablesDB" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", + "tags": [ + "tablesDB" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationshipType", + "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": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "Column size for text columns, 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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", + "tags": [ + "tablesDB" + ], + "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" + } + ] + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBDeleteColumn", + "tags": [ + "tablesDB" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", + "tags": [ + "tablesDB" + ], + "description": "List indexes on the table.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "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 columns: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDBCreateIndex", + "tags": [ + "tablesDB" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "IndexType", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", + "tags": [ + "tablesDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "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": "tablesDBDeleteIndex", + "tags": [ + "tablesDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesDBListTableLogs", + "tags": [ + "tablesDB" + ], + "description": "Get the table 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": "listTableLogs", + "group": "tables", + "weight": 383, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "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 TableDB service [server integration](https:\/\/appwrite.io\/docs\/server\/tablesdbdb#tablesdbCreate).", + "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": "tablesDBCreateRow", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDB", + "desc": "Create rows", + "auth": { + "Project": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md" + } + ], + "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\/tablesdb#tablesDBCreate). 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": "Upsert rows", + "operationId": "tablesDBUpsertRows", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md" + } + ], + "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": "tablesDBUpdateRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "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" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "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\/tablesdb#tablesDBCreate).", + "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": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md" + } + ], + "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": "tablesDBUpdateRow", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRow", + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesDBListRowLogs", + "tags": [ + "tablesDB" + ], + "description": "Get the row 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": "listRowLogs", + "group": "logs", + "weight": 421, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "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": "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": "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "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 + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "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 + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesDBGetTableUsage", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 384, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDBGetUsage", + "tags": [ + "tablesDB" + ], + "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.", + "responses": { + "200": { + "description": "UsageDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 376, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-database-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "getUsage", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabase" + } + ], + "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.", + "demo": "tablesdb\/get-usage.md" + } + ], + "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": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -36517,7 +38584,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -36597,7 +38664,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -36686,7 +38753,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -36746,7 +38813,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -36816,7 +38883,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -37042,7 +39109,7 @@ "weight": 188, "cookies": false, "type": "", - "demo": "users\/create-argon2user.md", + "demo": "users\/create-argon-2-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37341,7 +39408,7 @@ "weight": 187, "cookies": false, "type": "", - "demo": "users\/create-m-d5user.md", + "demo": "users\/create-md-5-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37426,7 +39493,7 @@ "weight": 190, "cookies": false, "type": "", - "demo": "users\/create-p-h-pass-user.md", + "demo": "users\/create-ph-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37729,7 +39796,7 @@ "weight": 189, "cookies": false, "type": "", - "demo": "users\/create-s-h-a-user.md", + "demo": "users\/create-sha-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37866,7 +39933,7 @@ "30d", "90d" ], - "x-enum-name": "UserUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -38099,7 +40166,7 @@ "weight": 226, "cookies": false, "type": "", - "demo": "users\/create-j-w-t.md", + "demo": "users\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, "rate-time": 3600, @@ -38416,7 +40483,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfa", "group": "users", @@ -38433,6 +40500,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md" + } + ], "auth": { "Project": [] } @@ -38489,7 +40614,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -38506,6 +40631,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -38565,7 +40746,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -38582,6 +40763,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md" + } + ], "auth": { "Project": [] } @@ -38626,7 +40861,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -38643,6 +40878,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -38685,7 +40974,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -38702,6 +40991,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -38744,7 +41087,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -38761,6 +41104,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -40916,8 +43313,8 @@ "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": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -40981,7 +43378,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "error": { "description": "Error", @@ -41013,7 +43411,13 @@ "code", "type", "version" - ] + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } }, "rowList": { "description": "Rows List", @@ -41021,7 +43425,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rows rows that matched your query.", + "description": "Total number of rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -41037,7 +43441,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -41045,7 +43453,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of documents rows that matched your query.", + "description": "Total number of documents that matched your query.", "x-example": 5, "format": "int32" }, @@ -41061,7 +43469,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -41069,7 +43481,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tables rows that matched your query.", + "description": "Total number of tables that matched your query.", "x-example": 5, "format": "int32" }, @@ -41085,7 +43497,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -41093,7 +43509,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of collections rows that matched your query.", + "description": "Total number of collections that matched your query.", "x-example": 5, "format": "int32" }, @@ -41109,7 +43525,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -41117,7 +43537,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases rows that matched your query.", + "description": "Total number of databases that matched your query.", "x-example": 5, "format": "int32" }, @@ -41133,7 +43553,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -41141,7 +43565,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41157,7 +43581,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -41165,7 +43593,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41181,7 +43609,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -41189,7 +43621,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of users rows that matched your query.", + "description": "Total number of users that matched your query.", "x-example": 5, "format": "int32" }, @@ -41205,7 +43637,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -41213,7 +43649,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions rows that matched your query.", + "description": "Total number of sessions that matched your query.", "x-example": 5, "format": "int32" }, @@ -41229,7 +43665,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -41237,7 +43677,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities rows that matched your query.", + "description": "Total number of identities that matched your query.", "x-example": 5, "format": "int32" }, @@ -41253,7 +43693,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -41261,7 +43705,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs rows that matched your query.", + "description": "Total number of logs that matched your query.", "x-example": 5, "format": "int32" }, @@ -41277,7 +43721,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -41285,7 +43733,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files rows that matched your query.", + "description": "Total number of files that matched your query.", "x-example": 5, "format": "int32" }, @@ -41301,7 +43749,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -41309,7 +43761,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets rows that matched your query.", + "description": "Total number of buckets that matched your query.", "x-example": 5, "format": "int32" }, @@ -41325,7 +43777,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -41333,7 +43789,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens rows that matched your query.", + "description": "Total number of tokens that matched your query.", "x-example": 5, "format": "int32" }, @@ -41349,7 +43805,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -41357,7 +43817,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams rows that matched your query.", + "description": "Total number of teams that matched your query.", "x-example": 5, "format": "int32" }, @@ -41373,7 +43833,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -41381,7 +43845,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships rows that matched your query.", + "description": "Total number of memberships that matched your query.", "x-example": 5, "format": "int32" }, @@ -41397,7 +43861,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -41405,7 +43873,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites rows that matched your query.", + "description": "Total number of sites that matched your query.", "x-example": 5, "format": "int32" }, @@ -41421,7 +43889,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "templateSiteList": { "description": "Site Templates List", @@ -41429,7 +43901,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates rows that matched your query.", + "description": "Total number of templates that matched your query.", "x-example": 5, "format": "int32" }, @@ -41445,7 +43917,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "functionList": { "description": "Functions List", @@ -41453,7 +43929,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions rows that matched your query.", + "description": "Total number of functions that matched your query.", "x-example": 5, "format": "int32" }, @@ -41469,7 +43945,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "templateFunctionList": { "description": "Function Templates List", @@ -41477,7 +43957,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates rows that matched your query.", + "description": "Total number of templates that matched your query.", "x-example": 5, "format": "int32" }, @@ -41493,7 +43973,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "installationList": { "description": "Installations List", @@ -41501,7 +43985,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of installations rows that matched your query.", + "description": "Total number of installations that matched your query.", "x-example": 5, "format": "int32" }, @@ -41517,7 +44001,11 @@ "required": [ "total", "installations" - ] + ], + "example": { + "total": 5, + "installations": "" + } }, "providerRepositoryFrameworkList": { "description": "Framework Provider Repositories List", @@ -41525,7 +44013,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworkProviderRepositories rows that matched your query.", + "description": "Total number of frameworkProviderRepositories that matched your query.", "x-example": 5, "format": "int32" }, @@ -41541,7 +44029,11 @@ "required": [ "total", "frameworkProviderRepositories" - ] + ], + "example": { + "total": 5, + "frameworkProviderRepositories": "" + } }, "providerRepositoryRuntimeList": { "description": "Runtime Provider Repositories List", @@ -41549,7 +44041,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimeProviderRepositories rows that matched your query.", + "description": "Total number of runtimeProviderRepositories that matched your query.", "x-example": 5, "format": "int32" }, @@ -41565,7 +44057,11 @@ "required": [ "total", "runtimeProviderRepositories" - ] + ], + "example": { + "total": 5, + "runtimeProviderRepositories": "" + } }, "branchList": { "description": "Branches List", @@ -41573,7 +44069,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of branches rows that matched your query.", + "description": "Total number of branches that matched your query.", "x-example": 5, "format": "int32" }, @@ -41589,7 +44085,11 @@ "required": [ "total", "branches" - ] + ], + "example": { + "total": 5, + "branches": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -41597,7 +44097,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks rows that matched your query.", + "description": "Total number of frameworks that matched your query.", "x-example": 5, "format": "int32" }, @@ -41613,7 +44113,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -41621,7 +44125,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes rows that matched your query.", + "description": "Total number of runtimes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41637,7 +44141,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -41645,7 +44153,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments rows that matched your query.", + "description": "Total number of deployments that matched your query.", "x-example": 5, "format": "int32" }, @@ -41661,7 +44169,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -41669,7 +44181,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions rows that matched your query.", + "description": "Total number of executions that matched your query.", "x-example": 5, "format": "int32" }, @@ -41685,7 +44197,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "projectList": { "description": "Projects List", @@ -41693,7 +44209,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of projects rows that matched your query.", + "description": "Total number of projects that matched your query.", "x-example": 5, "format": "int32" }, @@ -41709,7 +44225,11 @@ "required": [ "total", "projects" - ] + ], + "example": { + "total": 5, + "projects": "" + } }, "webhookList": { "description": "Webhooks List", @@ -41717,7 +44237,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of webhooks rows that matched your query.", + "description": "Total number of webhooks that matched your query.", "x-example": 5, "format": "int32" }, @@ -41733,7 +44253,11 @@ "required": [ "total", "webhooks" - ] + ], + "example": { + "total": 5, + "webhooks": "" + } }, "keyList": { "description": "API Keys List", @@ -41741,7 +44265,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of keys rows that matched your query.", + "description": "Total number of keys that matched your query.", "x-example": 5, "format": "int32" }, @@ -41757,7 +44281,11 @@ "required": [ "total", "keys" - ] + ], + "example": { + "total": 5, + "keys": "" + } }, "devKeyList": { "description": "Dev Keys List", @@ -41765,7 +44293,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of devKeys rows that matched your query.", + "description": "Total number of devKeys that matched your query.", "x-example": 5, "format": "int32" }, @@ -41781,7 +44309,11 @@ "required": [ "total", "devKeys" - ] + ], + "example": { + "total": 5, + "devKeys": "" + } }, "platformList": { "description": "Platforms List", @@ -41789,7 +44321,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of platforms rows that matched your query.", + "description": "Total number of platforms that matched your query.", "x-example": 5, "format": "int32" }, @@ -41805,7 +44337,11 @@ "required": [ "total", "platforms" - ] + ], + "example": { + "total": 5, + "platforms": "" + } }, "countryList": { "description": "Countries List", @@ -41813,7 +44349,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries rows that matched your query.", + "description": "Total number of countries that matched your query.", "x-example": 5, "format": "int32" }, @@ -41829,7 +44365,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -41837,7 +44377,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents rows that matched your query.", + "description": "Total number of continents that matched your query.", "x-example": 5, "format": "int32" }, @@ -41853,7 +44393,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -41861,7 +44405,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages rows that matched your query.", + "description": "Total number of languages that matched your query.", "x-example": 5, "format": "int32" }, @@ -41877,7 +44421,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -41885,7 +44433,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies rows that matched your query.", + "description": "Total number of currencies that matched your query.", "x-example": 5, "format": "int32" }, @@ -41901,7 +44449,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -41909,7 +44461,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones rows that matched your query.", + "description": "Total number of phones that matched your query.", "x-example": 5, "format": "int32" }, @@ -41925,7 +44477,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -41933,7 +44489,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables rows that matched your query.", + "description": "Total number of variables that matched your query.", "x-example": 5, "format": "int32" }, @@ -41949,7 +44505,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "proxyRuleList": { "description": "Rule List", @@ -41957,7 +44517,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rules rows that matched your query.", + "description": "Total number of rules that matched your query.", "x-example": 5, "format": "int32" }, @@ -41973,7 +44533,11 @@ "required": [ "total", "rules" - ] + ], + "example": { + "total": 5, + "rules": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -41981,7 +44545,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes rows that matched your query.", + "description": "Total number of localeCodes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41997,7 +44561,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -42005,7 +44573,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers rows that matched your query.", + "description": "Total number of providers that matched your query.", "x-example": 5, "format": "int32" }, @@ -42021,7 +44589,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -42029,7 +44601,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages rows that matched your query.", + "description": "Total number of messages that matched your query.", "x-example": 5, "format": "int32" }, @@ -42045,7 +44617,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -42053,7 +44629,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics rows that matched your query.", + "description": "Total number of topics that matched your query.", "x-example": 5, "format": "int32" }, @@ -42069,7 +44645,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -42077,7 +44657,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers rows that matched your query.", + "description": "Total number of subscribers that matched your query.", "x-example": 5, "format": "int32" }, @@ -42093,7 +44673,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -42101,7 +44685,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets rows that matched your query.", + "description": "Total number of targets that matched your query.", "x-example": 5, "format": "int32" }, @@ -42117,7 +44701,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "migrationList": { "description": "Migrations List", @@ -42125,7 +44713,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of migrations rows that matched your query.", + "description": "Total number of migrations that matched your query.", "x-example": 5, "format": "int32" }, @@ -42141,7 +44729,11 @@ "required": [ "total", "migrations" - ] + ], + "example": { + "total": 5, + "migrations": "" + } }, "specificationList": { "description": "Specifications List", @@ -42149,7 +44741,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications rows that matched your query.", + "description": "Total number of specifications that matched your query.", "x-example": 5, "format": "int32" }, @@ -42165,7 +44757,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "vcsContentList": { "description": "VCS Content List", @@ -42173,7 +44769,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of contents rows that matched your query.", + "description": "Total number of contents that matched your query.", "x-example": 5, "format": "int32" }, @@ -42189,7 +44785,11 @@ "required": [ "total", "contents" - ] + ], + "example": { + "total": 5, + "contents": "" + } }, "database": { "description": "Database", @@ -42219,6 +44819,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -42226,8 +44831,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -42337,7 +44951,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -42392,7 +45020,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -42467,7 +45099,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -42544,7 +45189,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -42621,7 +45279,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -42683,7 +45354,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -42751,7 +45433,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -42828,7 +45522,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -42896,7 +45603,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -42964,7 +45683,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -43032,7 +45763,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -43124,7 +45867,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -43234,7 +45993,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -43289,7 +46062,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -43364,7 +46141,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -43427,7 +46217,7 @@ }, "default": { "type": "integer", - "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.", "x-example": 10, "format": "int32", "nullable": true @@ -43441,7 +46231,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -43504,7 +46307,7 @@ }, "default": { "type": "number", - "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.", "x-example": 2.5, "format": "double", "nullable": true @@ -43518,7 +46321,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -43567,7 +46383,7 @@ }, "default": { "type": "boolean", - "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.", "x-example": false, "nullable": true } @@ -43580,7 +46396,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -43634,7 +46461,7 @@ }, "default": { "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.", "x-example": "default@example.com", "nullable": true } @@ -43648,7 +46475,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -43710,7 +46549,7 @@ }, "default": { "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.", "x-example": "element", "nullable": true } @@ -43725,7 +46564,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -43779,7 +46631,7 @@ }, "default": { "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.", "x-example": "192.0.2.0", "nullable": true } @@ -43793,7 +46645,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -43861,7 +46725,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -43915,7 +46791,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", + "description": "Default value for column when not provided. Only null is optional", "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true } @@ -43929,7 +46805,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -44021,7 +46909,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -44099,7 +47003,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -44177,7 +47093,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -44192,17 +47120,20 @@ "type": "integer", "description": "Row automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$tableId": { "type": "string", "description": "Table ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -44234,7 +47165,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -44249,17 +47191,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -44291,7 +47236,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -44425,7 +47386,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -44586,7 +47570,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -44600,7 +47610,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -44614,7 +47627,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -44628,7 +47644,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -44642,7 +47661,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -44684,7 +47706,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -44716,7 +47745,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -44751,12 +47786,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -44943,7 +47989,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -45011,7 +48090,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -45055,7 +48146,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -45069,7 +48168,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -45119,7 +48221,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -45139,7 +48250,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -45221,7 +48336,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -45313,7 +48443,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -45363,7 +48512,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -45414,7 +48572,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -45505,7 +48674,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -45691,7 +48877,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "templateSite": { "description": "Template Site", @@ -45786,7 +49003,22 @@ "providerOwner", "providerVersion", "variables" - ] + ], + "example": { + "key": "starter", + "name": "Starter site", + "tagline": "Minimal web app integrating with Appwrite.", + "demoUrl": "https:\/\/nextjs-starter.appwrite.network\/", + "screenshotDark": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png", + "screenshotLight": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png", + "useCases": "Starter", + "frameworks": [], + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [] + } }, "templateFramework": { "description": "Template Framework", @@ -45848,7 +49080,18 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/build", + "providerRootDirectory": ".\/svelte-kit\/starter", + "buildRuntime": "node-22", + "adapter": "ssr", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -46037,7 +49280,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "templateFunction": { "description": "Template Function", @@ -46166,7 +49439,26 @@ "providerVersion", "variables", "scopes" - ] + ], + "example": { + "icon": "icon-lightning-bolt", + "id": "starter", + "name": "Starter function", + "tagline": "A simple function to get started.", + "permissions": "any", + "events": "account.create", + "cron": "0 0 * * *", + "timeout": 300, + "useCases": "Starter", + "runtimes": [], + "instructions": "For documentation and instructions check out .", + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [], + "scopes": "users.read" + } }, "templateRuntime": { "description": "Template Runtime", @@ -46198,7 +49490,13 @@ "commands", "entrypoint", "providerRootDirectory" - ] + ], + "example": { + "name": "node-19.0", + "commands": "npm install", + "entrypoint": "index.js", + "providerRootDirectory": "node\/starter" + } }, "templateVariable": { "description": "Template Variable", @@ -46248,7 +49546,16 @@ "placeholder", "required", "type" - ] + ], + "example": { + "name": "APPWRITE_DATABASE_ID", + "description": "The ID of the Appwrite database that contains the collection to sync.", + "value": "512", + "secret": false, + "placeholder": "64a55...7b912", + "required": false, + "type": "password" + } }, "installation": { "description": "Installation", @@ -46292,7 +49599,15 @@ "provider", "organization", "providerInstallationId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "provider": "github", + "organization": "appwrite", + "providerInstallationId": "5322" + } }, "providerRepository": { "description": "ProviderRepository", @@ -46342,7 +49657,16 @@ "private", "defaultBranch", "pushedAt" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime" + } }, "providerRepositoryFramework": { "description": "ProviderRepositoryFramework", @@ -46398,7 +49722,17 @@ "defaultBranch", "pushedAt", "framework" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "framework": "nextjs" + } }, "providerRepositoryRuntime": { "description": "ProviderRepositoryRuntime", @@ -46454,7 +49788,17 @@ "defaultBranch", "pushedAt", "runtime" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "runtime": "node-22" + } }, "detectionFramework": { "description": "DetectionFramework", @@ -46486,7 +49830,13 @@ "installCommand", "buildCommand", "outputDirectory" - ] + ], + "example": { + "framework": "nuxt", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "dist" + } }, "detectionRuntime": { "description": "DetectionRuntime", @@ -46512,7 +49862,12 @@ "runtime", "entrypoint", "commands" - ] + ], + "example": { + "runtime": "node", + "entrypoint": "index.js", + "commands": "npm install && npm run build" + } }, "vcsContent": { "description": "VcsContents", @@ -46539,7 +49894,12 @@ }, "required": [ "name" - ] + ], + "example": { + "size": 1523, + "isDirectory": true, + "name": "Main.java" + } }, "branch": { "description": "Branch", @@ -46553,7 +49913,10 @@ }, "required": [ "name" - ] + ], + "example": { + "name": "main" + } }, "runtime": { "description": "Runtime", @@ -46612,7 +49975,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -46667,7 +50040,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -46705,7 +50096,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -46879,7 +50277,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -46897,7 +50324,7 @@ }, "$updatedAt": { "type": "string", - "description": "Execution upate date in ISO 8601 format.", + "description": "Execution update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$permissions": { @@ -46915,6 +50342,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -46999,6 +50431,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -47010,7 +50443,37 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "project": { "description": "Project", @@ -47304,9 +50767,9 @@ "description": "Databases (legacy) service status", "x-example": true }, - "serviceStatusForTables": { + "serviceStatusForTablesdb": { "type": "boolean", - "description": "Tables service status", + "description": "TablesDB service status", "x-example": true }, "serviceStatusForLocale": { @@ -47408,7 +50871,7 @@ "serviceStatusForAccount", "serviceStatusForAvatars", "serviceStatusForDatabases", - "serviceStatusForTables", + "serviceStatusForTablesdb", "serviceStatusForLocale", "serviceStatusForHealth", "serviceStatusForStorage", @@ -47418,7 +50881,75 @@ "serviceStatusForFunctions", "serviceStatusForGraphql", "serviceStatusForMessaging" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authMockNumbers": [ + {} + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + {} + ], + "platforms": {}, + "webhooks": {}, + "keys": {}, + "devKeys": {}, + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyTo": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "securepassword", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForGraphql": true, + "serviceStatusForMessaging": true + } }, "webhook": { "description": "Webhook", @@ -47511,7 +51042,25 @@ "enabled", "logs", "attempts" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "security": true, + "httpUser": "username", + "httpPass": "password", + "signatureKey": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } }, "key": { "description": "Key", @@ -47579,7 +51128,18 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "devKey": { "description": "DevKey", @@ -47638,7 +51198,17 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "mockNumber": { "description": "Mock Number", @@ -47658,7 +51228,11 @@ "required": [ "phone", "otp" - ] + ], + "example": { + "phone": "+1612842323", + "otp": "123456" + } }, "authProvider": { "description": "AuthProvider", @@ -47696,7 +51270,14 @@ "appId", "secret", "enabled" - ] + ], + "example": { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ", + "enabled": "" + } }, "platform": { "description": "Platform", @@ -47764,7 +51345,19 @@ "hostname", "httpUser", "httpPass" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "key": "com.company.appname", + "store": "", + "hostname": true, + "httpUser": "username", + "httpPass": "password" + } }, "variable": { "description": "Variable", @@ -47820,7 +51413,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -47840,7 +51443,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -47860,7 +51467,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -47886,7 +51497,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -47938,7 +51554,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -47964,7 +51589,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -47984,7 +51614,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -47999,7 +51633,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -48026,7 +51663,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -48070,7 +51712,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -48099,7 +51749,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "metric": { "description": "Metric", @@ -48120,7 +51775,11 @@ "required": [ "value", "date" - ] + ], + "example": { + "value": 1, + "date": "2020-10-15T06:38:00.000+00:00" + } }, "metricBreakdown": { "description": "Metric Breakdown", @@ -48154,7 +51813,13 @@ "required": [ "name", "value" - ] + ], + "example": { + "resourceId": "5e5ea5c16897e", + "name": "Documents", + "value": 1, + "estimate": 1 + } }, "usageDatabases": { "description": "UsageDatabases", @@ -48296,7 +51961,26 @@ "storage", "databasesReads", "databasesWrites" - ] + ], + "example": { + "range": "30d", + "databasesTotal": 0, + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "databases": [], + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databasesReads": [], + "databasesWrites": [] + } }, "usageDatabase": { "description": "UsageDatabase", @@ -48422,7 +52106,24 @@ "storage", "databaseReads", "databaseWrites" - ] + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } }, "usageTable": { "description": "UsageTable", @@ -48452,7 +52153,12 @@ "range", "rowsTotal", "rows" - ] + ], + "example": { + "range": "30d", + "rowsTotal": 0, + "rows": [] + } }, "usageCollection": { "description": "UsageCollection", @@ -48482,7 +52188,12 @@ "range", "documentsTotal", "documents" - ] + ], + "example": { + "range": "30d", + "documentsTotal": 0, + "documents": [] + } }, "usageUsers": { "description": "UsageUsers", @@ -48528,7 +52239,14 @@ "sessionsTotal", "users", "sessions" - ] + ], + "example": { + "range": "30d", + "usersTotal": 0, + "sessionsTotal": 0, + "users": [], + "sessions": [] + } }, "usageStorage": { "description": "StorageUsage", @@ -48590,7 +52308,16 @@ "buckets", "files", "storage" - ] + ], + "example": { + "range": "30d", + "bucketsTotal": 0, + "filesTotal": 0, + "filesStorageTotal": 0, + "buckets": [], + "files": [], + "storage": [] + } }, "usageBuckets": { "description": "UsageBuckets", @@ -48652,7 +52379,16 @@ "storage", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "range": "30d", + "filesTotal": 0, + "filesStorageTotal": 0, + "files": [], + "storage": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "usageFunctions": { "description": "UsageFunctions", @@ -48858,7 +52594,34 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "functionsTotal": 0, + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "functions": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageFunction": { "description": "UsageFunction", @@ -49055,7 +52818,33 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageSites": { "description": "UsageSites", @@ -49309,7 +53098,40 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "sitesTotal": 0, + "sites": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageSite": { "description": "UsageSite", @@ -49554,7 +53376,39 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageProject": { "description": "UsageProject", @@ -49814,7 +53668,41 @@ "databasesWrites", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "executionsTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "databasesTotal": 0, + "databasesStorageTotal": 0, + "usersTotal": 0, + "filesStorageTotal": 0, + "functionsStorageTotal": 0, + "buildsStorageTotal": 0, + "deploymentsStorageTotal": 0, + "bucketsTotal": 0, + "executionsMbSecondsTotal": 0, + "buildsMbSecondsTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "requests": [], + "network": [], + "users": [], + "executions": [], + "executionsBreakdown": [], + "bucketsBreakdown": [], + "databasesStorageBreakdown": [], + "executionsMbSecondsBreakdown": [], + "buildsMbSecondsBreakdown": [], + "functionsStorageBreakdown": [], + "authPhoneTotal": 0, + "authPhoneEstimate": 0, + "authPhoneCountryBreakdown": [], + "databasesReads": [], + "databasesWrites": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "headers": { "description": "Headers", @@ -49834,7 +53722,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -49868,7 +53760,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "proxyRule": { "description": "Rule", @@ -49967,7 +53865,24 @@ "status", "logs", "renewAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "function", + "status": "verified", + "logs": "HTTP challegne failed.", + "renewAt": "datetime" + } }, "smsTemplate": { "description": "SmsTemplate", @@ -49993,7 +53908,12 @@ "type", "locale", "message" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account." + } }, "emailTemplate": { "description": "EmailTemplate", @@ -50043,7 +53963,16 @@ "senderEmail", "replyTo", "subject" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyTo": "emails@appwrite.io", + "subject": "Please verify your email address" + } }, "consoleVariables": { "description": "Console Variables", @@ -50064,6 +53993,11 @@ "description": "AAAA target for your Appwrite custom domains.", "x-example": "::1" }, + "_APP_DOMAIN_TARGET_CAA": { + "type": "string", + "description": "CAA target for your Appwrite custom domains.", + "x-example": "digicert.com" + }, "_APP_STORAGE_LIMIT": { "type": "integer", "description": "Maximum file size allowed for file upload in bytes.", @@ -50121,6 +54055,7 @@ "_APP_DOMAIN_TARGET_CNAME", "_APP_DOMAIN_TARGET_A", "_APP_DOMAIN_TARGET_AAAA", + "_APP_DOMAIN_TARGET_CAA", "_APP_STORAGE_LIMIT", "_APP_COMPUTE_SIZE_LIMIT", "_APP_USAGE_STATS", @@ -50131,7 +54066,23 @@ "_APP_DOMAIN_FUNCTIONS", "_APP_OPTIONS_FORCE_HTTPS", "_APP_DOMAINS_NAMESERVERS" - ] + ], + "example": { + "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", + "_APP_DOMAIN_TARGET_A": "127.0.0.1", + "_APP_DOMAIN_TARGET_AAAA": "::1", + "_APP_DOMAIN_TARGET_CAA": "digicert.com", + "_APP_STORAGE_LIMIT": "30000000", + "_APP_COMPUTE_SIZE_LIMIT": "30000000", + "_APP_USAGE_STATS": "enabled", + "_APP_VCS_ENABLED": true, + "_APP_DOMAIN_ENABLED": true, + "_APP_ASSISTANT_ENABLED": true, + "_APP_DOMAIN_SITES": "sites.localhost", + "_APP_DOMAIN_FUNCTIONS": "functions.localhost", + "_APP_OPTIONS_FORCE_HTTPS": "enabled", + "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -50163,7 +54114,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -50183,7 +54140,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -50203,7 +54166,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -50235,7 +54202,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -50301,7 +54274,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -50411,7 +54399,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -50473,7 +54487,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -50547,7 +54571,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -50609,7 +54653,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } }, "migration": { "description": "Migration", @@ -50697,7 +54752,23 @@ "statusCounters", "resourceData", "errors" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "stage": "init", + "source": "Appwrite", + "destination": "Appwrite", + "resources": [ + "user" + ], + "resourceId": "databaseId:collectionId", + "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", + "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", + "errors": [] + } }, "migrationReport": { "description": "Migration Report", @@ -50767,7 +54838,18 @@ "function", "size", "version" - ] + ], + "example": { + "user": 20, + "team": 20, + "database": 20, + "row": 20, + "file": 20, + "bucket": 20, + "function": 20, + "size": 30000, + "version": "1.4.0" + } } }, "securitySchemes": { diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index d0f11523ab..0fe1cf72ae 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -387,7 +387,7 @@ "weight": 30, "cookies": false, "type": "", - "demo": "account\/create-j-w-t.md", + "demo": "account\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, "rate-time": 3600, @@ -503,7 +503,7 @@ "weight": 45, "cookies": false, "type": "", - "demo": "account\/update-m-f-a.md", + "demo": "account\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, "rate-time": 3600, @@ -567,7 +567,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", @@ -585,6 +585,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Session": [] @@ -634,7 +690,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", @@ -652,6 +708,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Session": [] @@ -713,7 +829,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -731,6 +847,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Session": [] @@ -782,7 +952,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", @@ -800,6 +970,60 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -856,7 +1080,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", @@ -874,6 +1098,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md" + } + ], "auth": { "Project": [], "Session": [] @@ -933,7 +1217,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -951,6 +1235,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md" + } + ], "auth": { "Project": [], "Session": [] @@ -985,7 +1317,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -1003,6 +1335,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1035,7 +1415,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -1053,6 +1433,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1085,7 +1513,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -1103,6 +1531,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1868,7 +2344,7 @@ "weight": 27, "cookies": false, "type": "", - "demo": "account\/update-magic-u-r-l-session.md", + "demo": "account\/update-magic-url-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, "rate-time": 3600, @@ -1879,6 +2355,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -1953,6 +2433,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2303,7 +2787,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2354,7 +2838,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2405,7 +2889,7 @@ "weight": 25, "cookies": false, "type": "", - "demo": "account\/create-magic-u-r-l-token.md", + "demo": "account\/create-magic-url-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, "rate-time": 3600, @@ -2436,7 +2920,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2485,7 +2969,7 @@ "weight": 24, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2token.md", + "demo": "account\/create-o-auth-2-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2658,7 +3142,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3129,7 +3613,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3147,7 +3631,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3167,7 +3651,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -3963,7 +4447,7 @@ "weight": 65, "cookies": false, "type": "location", - "demo": "avatars\/get-q-r.md", + "demo": "avatars\/get-qr.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, "rate-time": 3600, @@ -4061,7 +4545,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4076,12 +4560,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4098,30 +4583,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "queries", - "search" - ], - "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." } ], "auth": { @@ -4185,7 +4651,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4200,12 +4666,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4226,34 +4693,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4323,7 +4767,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -4338,12 +4782,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4361,31 +4806,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "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." } ], "auth": { @@ -4435,7 +4860,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -4450,12 +4875,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4476,34 +4902,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -4570,7 +4973,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -4585,12 +4988,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4607,30 +5011,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -4682,7 +5067,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -4697,7 +5082,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDB.listTables" }, "auth": { "Project": [], @@ -4770,7 +5155,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -4785,7 +5170,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDB.createTable" }, "auth": { "Project": [], @@ -4879,7 +5264,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -4894,7 +5279,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDB.getTable" }, "auth": { "Project": [], @@ -4953,7 +5338,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -4968,7 +5353,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDB.updateTable" }, "auth": { "Project": [], @@ -5057,7 +5442,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5072,7 +5457,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDB.deleteTable" }, "auth": { "Project": [], @@ -5133,7 +5518,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5148,7 +5533,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDB.listColumns" }, "auth": { "Project": [], @@ -5222,7 +5607,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5237,7 +5622,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDB.createBooleanColumn" }, "auth": { "Project": [], @@ -5333,7 +5718,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5348,7 +5733,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDB.updateBooleanColumn" }, "auth": { "Project": [], @@ -5449,7 +5834,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -5464,7 +5849,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDB.createDatetimeColumn" }, "auth": { "Project": [], @@ -5560,7 +5945,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -5575,7 +5960,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDB.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5676,7 +6061,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -5691,7 +6076,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDB.createEmailColumn" }, "auth": { "Project": [], @@ -5787,7 +6172,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -5802,7 +6187,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDB.updateEmailColumn" }, "auth": { "Project": [], @@ -5903,7 +6288,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -5918,7 +6303,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDB.createEnumColumn" }, "auth": { "Project": [], @@ -6023,7 +6408,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6038,7 +6423,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDB.updateEnumColumn" }, "auth": { "Project": [], @@ -6148,7 +6533,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6163,7 +6548,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDB.createFloatColumn" }, "auth": { "Project": [], @@ -6269,7 +6654,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6284,7 +6669,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDB.updateFloatColumn" }, "auth": { "Project": [], @@ -6395,7 +6780,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -6410,7 +6795,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDB.createIntegerColumn" }, "auth": { "Project": [], @@ -6516,7 +6901,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -6531,7 +6916,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDB.updateIntegerColumn" }, "auth": { "Project": [], @@ -6642,7 +7027,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -6657,7 +7042,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDB.createIpColumn" }, "auth": { "Project": [], @@ -6753,7 +7138,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -6768,7 +7153,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDB.updateIpColumn" }, "auth": { "Project": [], @@ -6869,7 +7254,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -6884,7 +7269,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDB.createRelationshipColumn" }, "auth": { "Project": [], @@ -7005,7 +7390,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7020,7 +7405,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDB.createStringColumn" }, "auth": { "Project": [], @@ -7127,7 +7512,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7142,7 +7527,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDB.updateStringColumn" }, "auth": { "Project": [], @@ -7248,7 +7633,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7263,7 +7648,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDB.createUrlColumn" }, "auth": { "Project": [], @@ -7359,7 +7744,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -7374,7 +7759,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDB.updateUrlColumn" }, "auth": { "Project": [], @@ -7506,7 +7891,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -7521,7 +7906,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDB.getColumn" }, "auth": { "Project": [], @@ -7582,7 +7967,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -7597,7 +7982,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDB.deleteColumn" }, "auth": { "Project": [], @@ -7667,7 +8052,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -7682,7 +8067,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDB.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7780,7 +8165,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -7797,7 +8182,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDB.listRows" }, "auth": { "Project": [], @@ -7871,7 +8256,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -7888,12 +8273,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [], "Session": [] @@ -7918,14 +8304,16 @@ } ], "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.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [], "Key": [] @@ -7946,10 +8334,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": "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.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDB.createRows" } } ], @@ -8027,12 +8416,12 @@ } }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "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.\n", + "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": { "201": { "description": "Documents List", @@ -8049,7 +8438,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8065,12 +8454,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -8091,10 +8481,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": "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", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" } } ], @@ -8160,7 +8551,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\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.", + "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.", "responses": { "200": { "description": "Documents List", @@ -8177,7 +8568,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8193,7 +8584,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDB.updateRows" }, "auth": { "Project": [], @@ -8259,7 +8650,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\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8276,7 +8667,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8292,7 +8683,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDB.deleteRows" }, "auth": { "Project": [], @@ -8372,7 +8763,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -8389,7 +8780,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [], @@ -8451,12 +8842,12 @@ ] }, "put": { - "summary": "Create or update a document", + "summary": "Upsert a document", "operationId": "databasesUpsertDocument", "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 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": "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": { "201": { "description": "Document", @@ -8473,7 +8864,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -8490,12 +8881,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Session": [] @@ -8519,10 +8911,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": "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.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -8622,7 +9015,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -8639,7 +9032,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [], @@ -8727,7 +9120,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -8744,7 +9137,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDB.deleteRow" }, "auth": { "Project": [], @@ -8817,7 +9210,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -8827,22 +9220,26 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ + "client", + "server", "console", "server" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDB.decrementRowColumn" }, "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], @@ -8934,7 +9331,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -8944,22 +9341,26 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ + "client", + "server", "console", "server" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDB.incrementRowColumn" }, "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], @@ -9051,7 +9452,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9066,7 +9467,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDB.listIndexes" }, "auth": { "Project": [], @@ -9138,7 +9539,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9153,7 +9554,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDB.createIndex" }, "auth": { "Project": [], @@ -9271,7 +9672,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9286,7 +9687,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDB.getIndex" }, "auth": { "Project": [], @@ -9347,7 +9748,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -9362,7 +9763,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDB.deleteIndex" }, "auth": { "Project": [], @@ -9408,4564 +9809,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "tags": [ - "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": { - "200": { - "description": "Tables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/tableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsCreateTable", - "tags": [ - "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": { - "201": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsUpdateTable", - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteTable", - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationshipType", - "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": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "tags": [ - "grids" - ], - "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" - } - ] - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteColumn", - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "gridsCreateIndex", - "tags": [ - "grids" - ], - "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", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "IndexType", - "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}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "gridsDeleteIndex", - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "tags": [ - "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": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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": "gridsCreateRow", - "tags": [ - "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": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "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", - "namespace": "grids", - "auth": { - "Project": [], - "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\/tables#tablesCreate). 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": "gridsUpsertRows", - "tags": [ - "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": { - "201": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "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": "gridsUpdateRows", - "tags": [ - "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": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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": "gridsDeleteRows", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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": "gridsUpsertRow", - "tags": [ - "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": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "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": "gridsUpdateRow", - "tags": [ - "grids" - ], - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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": "gridsDeleteRow", - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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", @@ -13990,7 +9833,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -14064,7 +9907,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -14298,7 +10141,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -14348,7 +10191,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -14399,7 +10242,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -14459,7 +10302,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -14690,7 +10533,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -14752,7 +10595,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -14833,7 +10676,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -14917,7 +10760,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -15014,7 +10857,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -15100,7 +10943,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -15204,7 +11047,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -15302,7 +11145,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -15365,7 +11208,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -15430,7 +11273,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -15521,7 +11364,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -15593,7 +11436,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -15670,7 +11513,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -15733,7 +11576,7 @@ }, "method": { "type": "string", - "description": "HTTP method of execution. Default value is GET.", + "description": "HTTP method of execution. Default value is POST.", "x-example": "GET", "enum": [ "GET", @@ -15741,7 +11584,8 @@ "PUT", "PATCH", "DELETE", - "OPTIONS" + "OPTIONS", + "HEAD" ], "x-enum-name": "ExecutionMethod", "x-enum-keys": [] @@ -15787,7 +11631,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -15854,7 +11698,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -15926,7 +11770,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -15986,7 +11830,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -16078,7 +11922,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -16148,7 +11992,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -16240,7 +12084,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -16312,7 +12156,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -16366,7 +12210,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -16634,7 +12478,7 @@ "weight": 80, "cookies": false, "type": "", - "demo": "health\/get-d-b.md", + "demo": "health\/get-db.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, "rate-time": 3600, @@ -17956,7 +13800,7 @@ "weight": 73, "cookies": false, "type": "", - "demo": "locale\/list-countries-e-u.md", + "demo": "locale\/list-countries-eu.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, @@ -18169,7 +14013,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -18246,7 +14090,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -18391,7 +14235,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -18538,7 +14382,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18713,7 +14557,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18888,11 +14732,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -18906,6 +14750,76 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md" + } + ], "auth": { "Project": [], "Key": [] @@ -18998,11 +14912,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -19016,6 +14930,74 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19115,7 +15097,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -19169,7 +15151,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -19232,7 +15214,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -19308,7 +15290,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -19384,7 +15366,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -19457,11 +15439,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19475,6 +15457,78 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19563,11 +15617,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19581,6 +15635,76 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19672,11 +15796,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19690,6 +15814,70 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19758,11 +15946,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19776,6 +15964,68 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19851,7 +16101,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -19967,7 +16217,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -20086,10 +16336,10 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", - "demo": "messaging\/create-msg91provider.md", + "demo": "messaging\/create-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -20182,10 +16432,10 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", - "demo": "messaging\/update-msg91provider.md", + "demo": "messaging\/update-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -20281,7 +16531,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20387,7 +16637,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20492,11 +16742,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20510,6 +16760,92 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -20636,11 +16972,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -20654,6 +16990,88 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -20786,7 +17204,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -20882,7 +17300,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -20981,7 +17399,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21077,7 +17495,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21176,7 +17594,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21272,7 +17690,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21371,7 +17789,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21467,7 +17885,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21566,7 +17984,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21620,7 +18038,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21683,7 +18101,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -21759,7 +18177,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -21835,7 +18253,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -21910,7 +18328,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -21994,7 +18412,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22055,7 +18473,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22133,7 +18551,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22196,7 +18614,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22272,7 +18690,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22357,7 +18775,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22449,7 +18867,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22513,7 +18931,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22590,7 +19008,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -22661,7 +19079,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -22911,7 +19329,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -22961,7 +19379,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -23012,7 +19430,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -23072,7 +19490,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -23318,7 +19736,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -23380,7 +19798,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -23461,7 +19879,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -23545,7 +19963,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -23647,7 +20065,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -23728,7 +20146,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -23832,7 +20250,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -23931,7 +20349,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -23994,7 +20412,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -24059,7 +20477,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -24150,7 +20568,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -24222,7 +20640,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -24294,7 +20712,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -24357,7 +20775,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -24429,7 +20847,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -24489,7 +20907,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -24581,7 +20999,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -24651,7 +21069,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -24743,7 +21161,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -26059,6 +22477,5062 @@ ] } }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tablesdb\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "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 columns: name", + "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 database", + "operationId": "tablesDBCreate", + "tags": [ + "tablesDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tablesdb\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "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": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDBGet", + "tags": [ + "tablesDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tablesdb\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", + "tags": [ + "tablesDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tablesdb\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", + "tags": [ + "tablesDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDBListTables", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": "tables", + "weight": 382, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: 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": "tablesDBCreateTable", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": "tables", + "weight": 378, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDBGetTable", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": "tables", + "weight": 379, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBUpdateTable", + "tags": [ + "tablesDB" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": "tables", + "weight": 380, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "tablesDBDeleteTable", + "tags": [ + "tablesDB" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": "tables", + "weight": 381, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDBListColumns", + "tags": [ + "tablesDB" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDBUpdateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", + "tags": [ + "tablesDB" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", + "tags": [ + "tablesDB" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationshipType", + "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": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "Column size for text columns, 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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", + "tags": [ + "tablesDB" + ], + "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" + } + ] + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBDeleteColumn", + "tags": [ + "tablesDB" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", + "tags": [ + "tablesDB" + ], + "description": "List indexes on the table.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "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 columns: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDBCreateIndex", + "tags": [ + "tablesDB" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "IndexType", + "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" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", + "tags": [ + "tablesDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "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": "tablesDBDeleteIndex", + "tags": [ + "tablesDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "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 TableDB service [server integration](https:\/\/appwrite.io\/docs\/server\/tablesdbdb#tablesdbCreate).", + "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": "tablesDBCreateRow", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [], + "Session": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDB", + "desc": "Create rows", + "auth": { + "Project": [], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md" + } + ], + "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\/tablesdb#tablesDBCreate). 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": "Upsert rows", + "operationId": "tablesDBUpsertRows", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md" + } + ], + "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": "tablesDBUpdateRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRows", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "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" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "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\/tablesdb#tablesDBCreate).", + "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": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md" + } + ], + "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": "tablesDBUpdateRow", + "tags": [ + "tablesDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRow", + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "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 + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "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 + } + } + } + } + } + } + } + }, "\/teams": { "get": { "summary": "List teams", @@ -27138,7 +28612,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -27219,7 +28693,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -27309,7 +28783,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -27370,7 +28844,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -27441,7 +28915,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -27670,7 +29144,7 @@ "weight": 188, "cookies": false, "type": "", - "demo": "users\/create-argon2user.md", + "demo": "users\/create-argon-2-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, "rate-time": 3600, @@ -27973,7 +29447,7 @@ "weight": 187, "cookies": false, "type": "", - "demo": "users\/create-m-d5user.md", + "demo": "users\/create-md-5-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28059,7 +29533,7 @@ "weight": 190, "cookies": false, "type": "", - "demo": "users\/create-p-h-pass-user.md", + "demo": "users\/create-ph-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28365,7 +29839,7 @@ "weight": 189, "cookies": false, "type": "", - "demo": "users\/create-s-h-a-user.md", + "demo": "users\/create-sha-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28667,7 +30141,7 @@ "weight": 226, "cookies": false, "type": "", - "demo": "users\/create-j-w-t.md", + "demo": "users\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, "rate-time": 3600, @@ -28988,7 +30462,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfa", "group": "users", @@ -29005,6 +30479,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29062,7 +30596,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -29079,6 +30613,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29139,7 +30731,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -29156,6 +30748,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29201,7 +30849,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -29218,6 +30866,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29261,7 +30965,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -29278,6 +30982,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29321,7 +31081,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -29338,6 +31098,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Key": [] @@ -30747,8 +32563,8 @@ "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": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -30812,7 +32628,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "error": { "description": "Error", @@ -30844,7 +32661,13 @@ "code", "type", "version" - ] + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } }, "rowList": { "description": "Rows List", @@ -30852,7 +32675,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rows rows that matched your query.", + "description": "Total number of rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -30868,7 +32691,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -30876,7 +32703,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of documents rows that matched your query.", + "description": "Total number of documents that matched your query.", "x-example": 5, "format": "int32" }, @@ -30892,7 +32719,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -30900,7 +32731,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tables rows that matched your query.", + "description": "Total number of tables that matched your query.", "x-example": 5, "format": "int32" }, @@ -30916,7 +32747,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -30924,7 +32759,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of collections rows that matched your query.", + "description": "Total number of collections that matched your query.", "x-example": 5, "format": "int32" }, @@ -30940,7 +32775,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -30948,7 +32787,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases rows that matched your query.", + "description": "Total number of databases that matched your query.", "x-example": 5, "format": "int32" }, @@ -30964,7 +32803,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -30972,7 +32815,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -30988,7 +32831,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -30996,7 +32843,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31012,7 +32859,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -31020,7 +32871,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of users rows that matched your query.", + "description": "Total number of users that matched your query.", "x-example": 5, "format": "int32" }, @@ -31036,7 +32887,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -31044,7 +32899,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions rows that matched your query.", + "description": "Total number of sessions that matched your query.", "x-example": 5, "format": "int32" }, @@ -31060,7 +32915,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -31068,7 +32927,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities rows that matched your query.", + "description": "Total number of identities that matched your query.", "x-example": 5, "format": "int32" }, @@ -31084,7 +32943,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -31092,7 +32955,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs rows that matched your query.", + "description": "Total number of logs that matched your query.", "x-example": 5, "format": "int32" }, @@ -31108,7 +32971,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -31116,7 +32983,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files rows that matched your query.", + "description": "Total number of files that matched your query.", "x-example": 5, "format": "int32" }, @@ -31132,7 +32999,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -31140,7 +33011,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets rows that matched your query.", + "description": "Total number of buckets that matched your query.", "x-example": 5, "format": "int32" }, @@ -31156,7 +33027,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -31164,7 +33039,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens rows that matched your query.", + "description": "Total number of tokens that matched your query.", "x-example": 5, "format": "int32" }, @@ -31180,7 +33055,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -31188,7 +33067,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams rows that matched your query.", + "description": "Total number of teams that matched your query.", "x-example": 5, "format": "int32" }, @@ -31204,7 +33083,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -31212,7 +33095,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships rows that matched your query.", + "description": "Total number of memberships that matched your query.", "x-example": 5, "format": "int32" }, @@ -31228,7 +33111,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -31236,7 +33123,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites rows that matched your query.", + "description": "Total number of sites that matched your query.", "x-example": 5, "format": "int32" }, @@ -31252,7 +33139,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "functionList": { "description": "Functions List", @@ -31260,7 +33151,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions rows that matched your query.", + "description": "Total number of functions that matched your query.", "x-example": 5, "format": "int32" }, @@ -31276,7 +33167,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -31284,7 +33179,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks rows that matched your query.", + "description": "Total number of frameworks that matched your query.", "x-example": 5, "format": "int32" }, @@ -31300,7 +33195,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -31308,7 +33207,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes rows that matched your query.", + "description": "Total number of runtimes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31324,7 +33223,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -31332,7 +33235,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments rows that matched your query.", + "description": "Total number of deployments that matched your query.", "x-example": 5, "format": "int32" }, @@ -31348,7 +33251,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -31356,7 +33263,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions rows that matched your query.", + "description": "Total number of executions that matched your query.", "x-example": 5, "format": "int32" }, @@ -31372,7 +33279,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -31380,7 +33291,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries rows that matched your query.", + "description": "Total number of countries that matched your query.", "x-example": 5, "format": "int32" }, @@ -31396,7 +33307,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -31404,7 +33319,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents rows that matched your query.", + "description": "Total number of continents that matched your query.", "x-example": 5, "format": "int32" }, @@ -31420,7 +33335,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -31428,7 +33347,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages rows that matched your query.", + "description": "Total number of languages that matched your query.", "x-example": 5, "format": "int32" }, @@ -31444,7 +33363,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -31452,7 +33375,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies rows that matched your query.", + "description": "Total number of currencies that matched your query.", "x-example": 5, "format": "int32" }, @@ -31468,7 +33391,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -31476,7 +33403,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones rows that matched your query.", + "description": "Total number of phones that matched your query.", "x-example": 5, "format": "int32" }, @@ -31492,7 +33419,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -31500,7 +33431,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables rows that matched your query.", + "description": "Total number of variables that matched your query.", "x-example": 5, "format": "int32" }, @@ -31516,7 +33447,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -31524,7 +33459,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes rows that matched your query.", + "description": "Total number of localeCodes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31540,7 +33475,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -31548,7 +33487,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers rows that matched your query.", + "description": "Total number of providers that matched your query.", "x-example": 5, "format": "int32" }, @@ -31564,7 +33503,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -31572,7 +33515,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages rows that matched your query.", + "description": "Total number of messages that matched your query.", "x-example": 5, "format": "int32" }, @@ -31588,7 +33531,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -31596,7 +33543,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics rows that matched your query.", + "description": "Total number of topics that matched your query.", "x-example": 5, "format": "int32" }, @@ -31612,7 +33559,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -31620,7 +33571,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers rows that matched your query.", + "description": "Total number of subscribers that matched your query.", "x-example": 5, "format": "int32" }, @@ -31636,7 +33587,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -31644,7 +33599,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets rows that matched your query.", + "description": "Total number of targets that matched your query.", "x-example": 5, "format": "int32" }, @@ -31660,7 +33615,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "specificationList": { "description": "Specifications List", @@ -31668,7 +33627,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications rows that matched your query.", + "description": "Total number of specifications that matched your query.", "x-example": 5, "format": "int32" }, @@ -31684,7 +33643,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "database": { "description": "Database", @@ -31714,6 +33677,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -31721,8 +33689,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -31832,7 +33809,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -31887,7 +33878,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -31962,7 +33957,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -32039,7 +34047,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -32116,7 +34137,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -32178,7 +34212,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -32246,7 +34291,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -32323,7 +34380,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -32391,7 +34461,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -32459,7 +34541,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -32527,7 +34621,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -32619,7 +34725,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -32729,7 +34851,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -32784,7 +34920,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -32859,7 +34999,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -32922,7 +35075,7 @@ }, "default": { "type": "integer", - "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.", "x-example": 10, "format": "int32", "nullable": true @@ -32936,7 +35089,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -32999,7 +35165,7 @@ }, "default": { "type": "number", - "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.", "x-example": 2.5, "format": "double", "nullable": true @@ -33013,7 +35179,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -33062,7 +35241,7 @@ }, "default": { "type": "boolean", - "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.", "x-example": false, "nullable": true } @@ -33075,7 +35254,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -33129,7 +35319,7 @@ }, "default": { "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.", "x-example": "default@example.com", "nullable": true } @@ -33143,7 +35333,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -33205,7 +35407,7 @@ }, "default": { "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.", "x-example": "element", "nullable": true } @@ -33220,7 +35422,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -33274,7 +35489,7 @@ }, "default": { "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.", "x-example": "192.0.2.0", "nullable": true } @@ -33288,7 +35503,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -33356,7 +35583,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -33410,7 +35649,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", + "description": "Default value for column when not provided. Only null is optional", "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true } @@ -33424,7 +35663,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -33516,7 +35767,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -33594,7 +35861,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -33672,7 +35951,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -33687,17 +35978,20 @@ "type": "integer", "description": "Row automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$tableId": { "type": "string", "description": "Table ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -33729,7 +36023,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -33789,7 +36094,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -33923,7 +36244,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -34084,7 +36428,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -34098,7 +36468,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -34112,7 +36485,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -34126,7 +36502,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -34140,7 +36519,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -34182,7 +36564,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -34214,7 +36603,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -34249,12 +36644,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -34441,7 +36847,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -34509,7 +36948,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -34553,7 +37004,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -34567,7 +37026,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -34617,7 +37079,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -34637,7 +37108,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -34719,7 +37194,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -34811,7 +37301,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -34861,7 +37370,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -34912,7 +37430,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -35003,7 +37532,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -35189,7 +37735,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -35378,7 +37955,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "runtime": { "description": "Runtime", @@ -35437,7 +38044,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -35492,7 +38109,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -35530,7 +38165,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -35704,7 +38346,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -35722,7 +38393,7 @@ }, "$updatedAt": { "type": "string", - "description": "Execution upate date in ISO 8601 format.", + "description": "Execution update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$permissions": { @@ -35740,6 +38411,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -35824,6 +38500,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -35835,7 +38512,37 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "variable": { "description": "Variable", @@ -35891,7 +38598,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -35911,7 +38628,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -35931,7 +38652,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -35957,7 +38682,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -36009,7 +38739,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -36035,7 +38774,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -36055,7 +38799,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -36070,7 +38818,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -36097,7 +38848,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -36141,7 +38897,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -36170,7 +38934,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "headers": { "description": "Headers", @@ -36190,7 +38959,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -36224,7 +38997,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -36256,7 +39035,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -36276,7 +39061,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -36296,7 +39087,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -36328,7 +39123,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -36394,7 +39195,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -36504,7 +39320,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -36566,7 +39408,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -36640,7 +39492,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -36702,7 +39574,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "securitySchemes": { diff --git a/app/config/specs/swagger2-1.7.x-client.json b/app/config/specs/swagger2-1.7.x-client.json index 386e5875f2..ff6b6d8984 100644 --- a/app/config/specs/swagger2-1.7.x-client.json +++ b/app/config/specs/swagger2-1.7.x-client.json @@ -2751,7 +2751,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2799,7 +2799,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2886,7 +2886,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3111,7 +3111,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3592,7 +3592,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3609,7 +3609,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3629,7 +3629,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -9885,6 +9885,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -9971,6 +9976,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -9991,6 +9997,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/swagger2-1.7.x-console.json b/app/config/specs/swagger2-1.7.x-console.json index 44bd326a43..26862c78bc 100644 --- a/app/config/specs/swagger2-1.7.x-console.json +++ b/app/config/specs/swagger2-1.7.x-console.json @@ -2770,7 +2770,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2818,7 +2818,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2905,7 +2905,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3130,7 +3130,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3607,7 +3607,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3624,7 +3624,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3644,7 +3644,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -41300,6 +41300,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -41386,6 +41391,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -41406,6 +41412,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/swagger2-1.7.x-server.json b/app/config/specs/swagger2-1.7.x-server.json index 2a04908c06..2a0035dec7 100644 --- a/app/config/specs/swagger2-1.7.x-server.json +++ b/app/config/specs/swagger2-1.7.x-server.json @@ -2438,7 +2438,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2486,7 +2486,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2573,7 +2573,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2798,7 +2798,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3287,7 +3287,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3304,7 +3304,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3324,7 +3324,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -30460,6 +30460,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -30546,6 +30551,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -30566,6 +30572,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 21264f2afb..efeb167a24 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -442,7 +442,7 @@ "weight": 30, "cookies": false, "type": "", - "demo": "account\/create-j-w-t.md", + "demo": "account\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, "rate-time": 3600, @@ -558,7 +558,7 @@ "weight": 45, "cookies": false, "type": "", - "demo": "account\/update-m-f-a.md", + "demo": "account\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, "rate-time": 3600, @@ -624,7 +624,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", @@ -642,6 +642,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -690,7 +744,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", @@ -708,6 +762,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -769,7 +881,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -787,6 +899,58 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -837,7 +1001,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", @@ -855,6 +1019,60 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -914,7 +1132,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", @@ -932,6 +1150,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -992,7 +1268,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -1010,6 +1286,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md" + } + ], "auth": { "Project": [] } @@ -1043,7 +1365,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -1061,6 +1383,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1094,7 +1462,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -1112,6 +1480,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1145,7 +1559,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -1163,6 +1577,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1953,7 +2413,7 @@ "weight": 27, "cookies": false, "type": "", - "demo": "account\/update-magic-u-r-l-session.md", + "demo": "account\/update-magic-url-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, "rate-time": 3600, @@ -1964,6 +2424,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2026,7 +2490,7 @@ "weight": 20, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2session.md", + "demo": "account\/create-o-auth-2-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2174,6 +2638,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2751,7 +3219,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2799,7 +3267,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2854,7 +3322,7 @@ "weight": 25, "cookies": false, "type": "", - "demo": "account\/create-magic-u-r-l-token.md", + "demo": "account\/create-magic-url-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, "rate-time": 3600, @@ -2886,7 +3354,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2942,7 +3410,7 @@ "weight": 24, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2token.md", + "demo": "account\/create-o-auth-2-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -3111,7 +3579,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3592,7 +4060,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3609,7 +4077,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3629,7 +4097,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -4417,7 +4885,7 @@ "weight": 65, "cookies": false, "type": "location", - "demo": "avatars\/get-q-r.md", + "demo": "avatars\/get-qr.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, "rate-time": 3600, @@ -4504,7 +4972,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -4520,7 +4988,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDB.listRows" }, "auth": { "Project": [] @@ -4589,7 +5057,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -4605,12 +5073,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -4634,9 +5103,10 @@ } ], "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.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" } } ], @@ -4734,7 +5204,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -4750,7 +5220,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [] @@ -4803,7 +5273,7 @@ ] }, "put": { - "summary": "Create or update a document", + "summary": "Upsert a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -4814,7 +5284,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 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": "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": { "201": { "description": "Document", @@ -4827,7 +5297,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -4843,12 +5313,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4871,10 +5342,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": "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.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -4968,7 +5440,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -4984,7 +5456,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [] @@ -5068,7 +5540,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -5084,7 +5556,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDB.deleteRow" }, "auth": { "Project": [] @@ -5125,89 +5597,10 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "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": "gridsCreateRow", + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", "consumes": [ "application\/json" ], @@ -5215,64 +5608,40 @@ "application\/json" ], "tags": [ - "grids" + "databases" ], - "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.", + "description": "Decrement a specific attribute of a document by a given value.", "responses": { - "201": { - "description": "Row", + "200": { + "description": "Document", "schema": { - "$ref": "#\/definitions\/row" + "$ref": "#\/definitions\/document" } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 343, "cookies": false, "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", + "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": "rows.write", + "scope": "documents.write", "platforms": [ "client", - "server" + "server", + "console" ], "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "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." - } - ], + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.decrementRowColumn" + }, "auth": { "Project": [] } @@ -5294,11 +5663,26 @@ "in": "path" }, { - "name": "tableId", - "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.", + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", "required": true, "type": "string", - "x-example": "", "in": "path" }, { @@ -5307,35 +5691,17 @@ "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": "" + "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.", - "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).", + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", "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" - } + "x-example": null } } } @@ -5343,226 +5709,10 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "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": "gridsUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "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" - }, - { - "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" - } - } - } - } - } - ] - }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", "consumes": [ "application\/json" ], @@ -5570,35 +5720,40 @@ "application\/json" ], "tags": [ - "grids" + "databases" ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Increment a specific attribute of a document by a given value.", "responses": { "200": { - "description": "Row", + "description": "Document", "schema": { - "$ref": "#\/definitions\/row" + "$ref": "#\/definitions\/document" } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 342, "cookies": false, "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", + "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": "rows.write", + "scope": "documents.write", "platforms": [ "client", - "server" + "server", + "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.incrementRowColumn" + }, "auth": { "Project": [] } @@ -5620,19 +5775,26 @@ "in": "path" }, { - "name": "tableId", - "description": "Table ID.", + "name": "collectionId", + "description": "Collection ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "rowId", - "description": "Row ID.", + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", "required": true, "type": "string", - "x-example": "", "in": "path" }, { @@ -5641,97 +5803,22 @@ "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": "{}" + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "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).", + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } + "x-example": null } } } } ] - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] } }, "\/functions\/{functionId}\/executions": { @@ -5758,7 +5845,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -5831,7 +5918,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -5891,7 +5978,7 @@ }, "method": { "type": "string", - "description": "HTTP method of execution. Default value is GET.", + "description": "HTTP method of execution. Default value is POST.", "default": "POST", "x-example": "GET", "enum": [ @@ -5900,7 +5987,8 @@ "PUT", "PATCH", "DELETE", - "OPTIONS" + "OPTIONS", + "HEAD" ], "x-enum-name": "ExecutionMethod", "x-enum-keys": [] @@ -5947,7 +6035,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -6018,7 +6106,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -6091,7 +6179,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -6369,7 +6457,7 @@ "weight": 73, "cookies": false, "type": "", - "demo": "locale\/list-countries-e-u.md", + "demo": "locale\/list-countries-eu.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, @@ -6572,7 +6660,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -6656,7 +6744,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -7461,6 +7549,859 @@ ] } }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "client", + "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 TableDB service [server integration](https:\/\/appwrite.io\/docs\/server\/tablesdbdb#tablesdbCreate).", + "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": "tablesDBCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md" + } + ], + "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\/tablesdb#tablesDBCreate). 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" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "client", + "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\/tablesdb#tablesDBCreate).", + "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": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md" + } + ], + "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 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": "tablesDBUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "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": "tablesDBDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "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": "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 + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "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": "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 + } + } + } + } + ] + } + }, "\/teams": { "get": { "summary": "List teams", @@ -8488,8 +9429,8 @@ "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": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -8552,7 +9493,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "rowList": { "description": "Rows List", @@ -8560,7 +9502,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rows rows that matched your query.", + "description": "Total number of rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8577,7 +9519,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -8585,7 +9531,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of documents rows that matched your query.", + "description": "Total number of documents that matched your query.", "x-example": 5, "format": "int32" }, @@ -8602,7 +9548,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "sessionList": { "description": "Sessions List", @@ -8610,7 +9560,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions rows that matched your query.", + "description": "Total number of sessions that matched your query.", "x-example": 5, "format": "int32" }, @@ -8627,7 +9577,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -8635,7 +9589,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities rows that matched your query.", + "description": "Total number of identities that matched your query.", "x-example": 5, "format": "int32" }, @@ -8652,7 +9606,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -8660,7 +9618,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs rows that matched your query.", + "description": "Total number of logs that matched your query.", "x-example": 5, "format": "int32" }, @@ -8677,7 +9635,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -8685,7 +9647,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files rows that matched your query.", + "description": "Total number of files that matched your query.", "x-example": 5, "format": "int32" }, @@ -8702,7 +9664,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "teamList": { "description": "Teams List", @@ -8710,7 +9676,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams rows that matched your query.", + "description": "Total number of teams that matched your query.", "x-example": 5, "format": "int32" }, @@ -8727,7 +9693,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -8735,7 +9705,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships rows that matched your query.", + "description": "Total number of memberships that matched your query.", "x-example": 5, "format": "int32" }, @@ -8752,7 +9722,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "executionList": { "description": "Executions List", @@ -8760,7 +9734,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions rows that matched your query.", + "description": "Total number of executions that matched your query.", "x-example": 5, "format": "int32" }, @@ -8777,7 +9751,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -8785,7 +9763,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries rows that matched your query.", + "description": "Total number of countries that matched your query.", "x-example": 5, "format": "int32" }, @@ -8802,7 +9780,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -8810,7 +9792,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents rows that matched your query.", + "description": "Total number of continents that matched your query.", "x-example": 5, "format": "int32" }, @@ -8827,7 +9809,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -8835,7 +9821,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages rows that matched your query.", + "description": "Total number of languages that matched your query.", "x-example": 5, "format": "int32" }, @@ -8852,7 +9838,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -8860,7 +9850,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies rows that matched your query.", + "description": "Total number of currencies that matched your query.", "x-example": 5, "format": "int32" }, @@ -8877,7 +9867,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -8885,7 +9879,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones rows that matched your query.", + "description": "Total number of phones that matched your query.", "x-example": 5, "format": "int32" }, @@ -8902,7 +9896,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -8910,7 +9908,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes rows that matched your query.", + "description": "Total number of localeCodes that matched your query.", "x-example": 5, "format": "int32" }, @@ -8927,7 +9925,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "row": { "description": "Row", @@ -8942,17 +9944,20 @@ "type": "integer", "description": "Row automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$tableId": { "type": "string", "description": "Table ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -8984,7 +9989,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -8999,17 +10015,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -9041,7 +10060,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -9175,7 +10210,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -9338,7 +10396,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -9352,7 +10436,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -9366,7 +10453,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -9380,7 +10470,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -9394,7 +10487,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -9436,7 +10532,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -9468,7 +10571,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -9503,12 +10612,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -9695,7 +10815,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -9763,7 +10916,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -9807,7 +10972,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -9821,7 +10994,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -9871,7 +11047,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -9891,7 +11076,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -9973,7 +11162,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "team": { "description": "Team", @@ -10025,7 +11229,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -10116,7 +11331,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "execution": { "description": "Execution", @@ -10134,7 +11366,7 @@ }, "$updatedAt": { "type": "string", - "description": "Execution upate date in ISO 8601 format.", + "description": "Execution update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$permissions": { @@ -10152,6 +11384,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -10238,6 +11475,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -10249,7 +11487,37 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "country": { "description": "Country", @@ -10269,7 +11537,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -10289,7 +11561,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -10315,7 +11591,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -10367,7 +11648,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -10393,7 +11683,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "headers": { "description": "Headers", @@ -10413,7 +11708,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -10445,7 +11744,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -10465,7 +11770,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -10485,7 +11796,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -10517,7 +11832,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "subscriber": { "description": "Subscriber", @@ -10592,7 +11913,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -10654,7 +11995,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "externalDocs": { diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index c8597b8b80..788279b595 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -487,7 +487,7 @@ "weight": 30, "cookies": false, "type": "", - "demo": "account\/create-j-w-t.md", + "demo": "account\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, "rate-time": 3600, @@ -602,7 +602,7 @@ "weight": 45, "cookies": false, "type": "", - "demo": "account\/update-m-f-a.md", + "demo": "account\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, "rate-time": 3600, @@ -667,7 +667,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", @@ -685,6 +685,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -732,7 +786,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", @@ -750,6 +804,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -810,7 +922,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -828,6 +940,58 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -877,7 +1041,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", @@ -895,6 +1059,60 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -954,7 +1172,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", @@ -972,6 +1190,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -1031,7 +1307,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -1049,6 +1325,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md" + } + ], "auth": { "Project": [] } @@ -1081,7 +1403,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -1099,6 +1421,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1131,7 +1499,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -1149,6 +1517,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1181,7 +1595,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -1199,6 +1613,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1979,7 +2439,7 @@ "weight": 27, "cookies": false, "type": "", - "demo": "account\/update-magic-u-r-l-session.md", + "demo": "account\/update-magic-url-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, "rate-time": 3600, @@ -1990,6 +2450,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2052,7 +2516,7 @@ "weight": 20, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2session.md", + "demo": "account\/create-o-auth-2-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2200,6 +2664,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2770,7 +3238,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2818,7 +3286,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2873,7 +3341,7 @@ "weight": 25, "cookies": false, "type": "", - "demo": "account\/create-magic-u-r-l-token.md", + "demo": "account\/create-magic-url-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, "rate-time": 3600, @@ -2905,7 +3373,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2961,7 +3429,7 @@ "weight": 24, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2token.md", + "demo": "account\/create-o-auth-2-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -3130,7 +3598,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3607,7 +4075,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3624,7 +4092,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3644,7 +4112,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -4432,7 +4900,7 @@ "weight": 65, "cookies": false, "type": "location", - "demo": "avatars\/get-q-r.md", + "demo": "avatars\/get-qr.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, "rate-time": 3600, @@ -4521,7 +4989,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -4584,7 +5052,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 480, + "weight": 488, "cookies": false, "type": "", "demo": "console\/get-resource.md", @@ -4655,7 +5123,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -4703,7 +5171,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4718,12 +5186,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4739,29 +5208,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "queries", - "search" - ], - "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." } ], "auth": { @@ -4823,7 +5274,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4838,12 +5289,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4863,33 +5315,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4948,7 +5378,7 @@ "tags": [ "databases" ], - "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, 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.", "responses": { "200": { "description": "UsageDatabases", @@ -4961,7 +5391,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 323, + "weight": 324, "cookies": false, "type": "", "demo": "databases\/list-usage.md", @@ -4976,12 +5406,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDB.listUsage" }, "methods": [ { "name": "listUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4995,29 +5426,12 @@ "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, 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.", + "demo": "databases\/list-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDB.listUsage" } - }, - { - "name": "listDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "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, 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": { @@ -5041,7 +5455,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -5077,7 +5491,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -5092,12 +5506,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5114,30 +5529,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "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." } ], "auth": { @@ -5186,7 +5582,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -5201,12 +5597,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5226,33 +5623,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -5320,7 +5695,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -5335,12 +5710,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5356,29 +5732,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -5427,7 +5785,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -5442,7 +5800,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDB.listTables" }, "auth": { "Project": [] @@ -5511,7 +5869,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -5526,7 +5884,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDB.createTable" }, "auth": { "Project": [] @@ -5620,7 +5978,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5635,7 +5993,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDB.getTable" }, "auth": { "Project": [] @@ -5691,7 +6049,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5706,7 +6064,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDB.updateTable" }, "auth": { "Project": [] @@ -5796,7 +6154,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5811,7 +6169,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDB.deleteTable" }, "auth": { "Project": [] @@ -5867,7 +6225,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5882,7 +6240,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDB.listColumns" }, "auth": { "Project": [] @@ -5952,7 +6310,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5967,7 +6325,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDB.createBooleanColumn" }, "auth": { "Project": [] @@ -6062,7 +6420,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -6077,7 +6435,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDB.updateBooleanColumn" }, "auth": { "Project": [] @@ -6174,7 +6532,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -6189,7 +6547,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDB.createDatetimeColumn" }, "auth": { "Project": [] @@ -6284,7 +6642,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -6299,7 +6657,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDB.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6396,7 +6754,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -6411,7 +6769,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDB.createEmailColumn" }, "auth": { "Project": [] @@ -6506,7 +6864,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -6521,7 +6879,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDB.updateEmailColumn" }, "auth": { "Project": [] @@ -6618,7 +6976,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6633,7 +6991,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDB.createEnumColumn" }, "auth": { "Project": [] @@ -6738,7 +7096,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6753,7 +7111,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDB.updateEnumColumn" }, "auth": { "Project": [] @@ -6860,7 +7218,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6875,7 +7233,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDB.createFloatColumn" }, "auth": { "Project": [] @@ -6982,7 +7340,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6997,7 +7355,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDB.updateFloatColumn" }, "auth": { "Project": [] @@ -7106,7 +7464,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -7121,7 +7479,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDB.createIntegerColumn" }, "auth": { "Project": [] @@ -7228,7 +7586,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -7243,7 +7601,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDB.updateIntegerColumn" }, "auth": { "Project": [] @@ -7352,7 +7710,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -7367,7 +7725,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDB.createIpColumn" }, "auth": { "Project": [] @@ -7462,7 +7820,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -7477,7 +7835,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDB.updateIpColumn" }, "auth": { "Project": [] @@ -7574,7 +7932,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -7589,7 +7947,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDB.createRelationshipColumn" }, "auth": { "Project": [] @@ -7711,7 +8069,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7726,7 +8084,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDB.createStringColumn" }, "auth": { "Project": [] @@ -7834,7 +8192,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7849,7 +8207,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDB.updateStringColumn" }, "auth": { "Project": [] @@ -7952,7 +8310,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7967,7 +8325,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDB.createUrlColumn" }, "auth": { "Project": [] @@ -8062,7 +8420,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -8077,7 +8435,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDB.updateUrlColumn" }, "auth": { "Project": [] @@ -8203,7 +8561,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -8218,7 +8576,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDB.getColumn" }, "auth": { "Project": [] @@ -8276,7 +8634,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -8291,7 +8649,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDB.deleteColumn" }, "auth": { "Project": [] @@ -8356,7 +8714,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -8371,7 +8729,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDB.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8462,7 +8820,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -8478,7 +8836,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDB.listRows" }, "auth": { "Project": [] @@ -8547,7 +8905,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -8563,12 +8921,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -8592,14 +8951,16 @@ } ], "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.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [] }, @@ -8619,10 +8980,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": "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.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDB.createRows" } } ], @@ -8696,7 +9058,7 @@ ] }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "consumes": [ "application\/json" @@ -8707,7 +9069,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.\n", + "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": { "201": { "description": "Documents List", @@ -8720,7 +9082,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8736,12 +9098,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -8761,10 +9124,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": "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", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" } } ], @@ -8830,7 +9194,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\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.", + "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.", "responses": { "200": { "description": "Documents List", @@ -8843,7 +9207,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8859,7 +9223,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDB.updateRows" }, "auth": { "Project": [] @@ -8926,7 +9290,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\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8939,7 +9303,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8955,7 +9319,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDB.deleteRows" }, "auth": { "Project": [] @@ -9029,7 +9393,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -9045,7 +9409,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [] @@ -9098,7 +9462,7 @@ ] }, "put": { - "summary": "Create or update a document", + "summary": "Upsert a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -9109,7 +9473,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 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": "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": { "201": { "description": "Document", @@ -9122,7 +9486,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -9138,12 +9502,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -9166,10 +9531,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": "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.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -9263,7 +9629,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -9279,7 +9645,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [] @@ -9363,7 +9729,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -9379,7 +9745,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDB.deleteRow" }, "auth": { "Project": [] @@ -9444,7 +9810,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/list-document-logs.md", @@ -9459,7 +9825,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRowLogs" + "replaceWith": "tablesDB.listRowLogs" }, "auth": { "Project": [] @@ -9536,7 +9902,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -9546,13 +9912,14 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", - "server" + "client", + "server", + "console" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDB.decrementRowColumn" }, "auth": { "Project": [] @@ -9561,6 +9928,7 @@ "security": [ { "Project": [], + "JWT": [], "Key": [] } ], @@ -9646,7 +10014,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -9656,13 +10024,14 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", - "server" + "client", + "server", + "console" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDB.incrementRowColumn" }, "auth": { "Project": [] @@ -9671,6 +10040,7 @@ "security": [ { "Project": [], + "JWT": [], "Key": [] } ], @@ -9754,7 +10124,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9769,7 +10139,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDB.listIndexes" }, "auth": { "Project": [] @@ -9837,7 +10207,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9852,7 +10222,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDB.createIndex" }, "auth": { "Project": [] @@ -9968,7 +10338,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9983,7 +10353,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDB.getIndex" }, "auth": { "Project": [] @@ -10041,7 +10411,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -10056,7 +10426,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDB.deleteIndex" }, "auth": { "Project": [] @@ -10119,7 +10489,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "demo": "databases\/list-collection-logs.md", @@ -10134,7 +10504,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTableLogs" + "replaceWith": "tablesDB.listTableLogs" }, "auth": { "Project": [] @@ -10201,7 +10571,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 330, + "weight": 331, "cookies": false, "type": "", "demo": "databases\/get-collection-usage.md", @@ -10216,7 +10586,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTableUsage" + "replaceWith": "tablesDB.getTableUsage" }, "auth": { "Project": [] @@ -10247,7 +10617,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -10267,4666 +10637,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Tables List", - "schema": { - "$ref": "#\/definitions\/tableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsCreateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsUpdateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteTable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "schema": { - "$ref": "#\/definitions\/columnList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationshipType", - "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": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - ] - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteColumn", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "schema": { - "$ref": "#\/definitions\/columnIndexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "gridsCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "IndexType", - "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}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "gridsDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { - "get": { - "summary": "List table logs", - "operationId": "gridsListTableLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get the table activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTableLogs", - "group": "tables", - "weight": 375, - "cookies": false, - "type": "", - "demo": "grids\/list-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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "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": "gridsCreateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "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", - "namespace": "grids", - "auth": { - "Project": [] - }, - "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\/tables#tablesCreate). 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": "gridsUpsertRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "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": "gridsUpdateRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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": "gridsDeleteRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "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": "gridsUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "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": "gridsUpdateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "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": "gridsDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { - "get": { - "summary": "List row logs", - "operationId": "gridsListRowLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get the row activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRowLogs", - "group": "logs", - "weight": 413, - "cookies": false, - "type": "", - "demo": "grids\/list-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}", - "scope": "rows.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": "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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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}\/grids\/tables\/{tableId}\/usage": { - "get": { - "summary": "Get table usage stats", - "operationId": "gridsGetTableUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "UsageTable", - "schema": { - "$ref": "#\/definitions\/usageTable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTableUsage", - "group": null, - "weight": 376, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "GridUsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, "\/databases\/{databaseId}\/logs": { "get": { "summary": "List database logs", @@ -14951,7 +10661,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "demo": "databases\/list-logs.md", @@ -14966,12 +10676,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDB.listDatabaseLogs" }, "methods": [ { "name": "listLogs", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -14989,31 +10700,11 @@ } ], "description": "Get the database activity logs list by its unique ID.", + "demo": "databases\/list-logs.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDB.listDatabaseLogs" } - }, - { - "name": "listDatabaseLogs", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "queries" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/logList" - } - ], - "description": "" } ], "auth": { @@ -15052,7 +10743,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetDatabaseUsage", + "operationId": "databasesGetUsage", "consumes": [], "produces": [ "application\/json" @@ -15071,12 +10762,12 @@ }, "deprecated": true, "x-appwrite": { - "method": "getDatabaseUsage", + "method": "getUsage", "group": null, - "weight": 322, + "weight": 323, "cookies": false, "type": "", - "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, @@ -15088,12 +10779,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDB.getUsage" }, "methods": [ { - "name": "getDatabaseUsage", + "name": "getUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -15111,31 +10803,11 @@ } ], "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.", + "demo": "databases\/get-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDB.getUsage" } - }, - { - "name": "getDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageDatabase" - } - ], - "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": { @@ -15167,7 +10839,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15203,7 +10875,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -15275,7 +10947,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -15526,7 +11198,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -15575,7 +11247,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -15625,7 +11297,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 450, + "weight": 458, "cookies": false, "type": "", "demo": "functions\/list-templates.md", @@ -15719,7 +11391,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 449, + "weight": 457, "cookies": false, "type": "", "demo": "functions\/get-template.md", @@ -15777,7 +11449,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 443, + "weight": 451, "cookies": false, "type": "", "demo": "functions\/list-usage.md", @@ -15811,7 +11483,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15847,7 +11519,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -15906,7 +11578,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -16153,7 +11825,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -16214,7 +11886,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -16291,7 +11963,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -16371,7 +12043,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -16463,7 +12135,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -16548,7 +12220,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -16654,7 +12326,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -16750,7 +12422,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -16812,7 +12484,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -16879,7 +12551,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -16964,7 +12636,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -17031,7 +12703,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -17104,7 +12776,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -17164,7 +12836,7 @@ }, "method": { "type": "string", - "description": "HTTP method of execution. Default value is GET.", + "description": "HTTP method of execution. Default value is POST.", "default": "POST", "x-example": "GET", "enum": [ @@ -17173,7 +12845,8 @@ "PUT", "PATCH", "DELETE", - "OPTIONS" + "OPTIONS", + "HEAD" ], "x-enum-name": "ExecutionMethod", "x-enum-keys": [] @@ -17220,7 +12893,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -17284,7 +12957,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -17351,7 +13024,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 442, + "weight": 450, "cookies": false, "type": "", "demo": "functions\/get-usage.md", @@ -17393,7 +13066,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -17429,7 +13102,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -17488,7 +13161,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -17578,7 +13251,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -17645,7 +13318,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -17737,7 +13410,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -17806,7 +13479,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -17879,7 +13552,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -18158,7 +13831,7 @@ "weight": 80, "cookies": false, "type": "", - "demo": "health\/get-d-b.md", + "demo": "health\/get-db.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, "rate-time": 3600, @@ -19420,7 +15093,7 @@ "weight": 73, "cookies": false, "type": "", - "demo": "locale\/list-countries-e-u.md", + "demo": "locale\/list-countries-eu.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, @@ -19621,7 +15294,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -19696,7 +15369,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -19854,7 +15527,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -20009,7 +15682,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -20204,7 +15877,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -20394,11 +16067,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -20412,6 +16085,74 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md" + } + ], "auth": { "Project": [] } @@ -20512,11 +16253,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -20530,6 +16271,72 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md" + } + ], "auth": { "Project": [] } @@ -20630,7 +16437,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -20685,7 +16492,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -20745,7 +16552,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -20817,7 +16624,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -20889,7 +16696,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -20960,11 +16767,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -20978,6 +16785,76 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md" + } + ], "auth": { "Project": [] } @@ -21075,11 +16952,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -21093,6 +16970,74 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md" + } + ], "auth": { "Project": [] } @@ -21188,11 +17133,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -21206,6 +17151,68 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md" + } + ], "auth": { "Project": [] } @@ -21279,11 +17286,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -21297,6 +17304,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md" + } + ], "auth": { "Project": [] } @@ -21372,7 +17439,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -21499,7 +17566,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -21624,10 +17691,10 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", - "demo": "messaging\/create-msg91provider.md", + "demo": "messaging\/create-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -21727,10 +17794,10 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", - "demo": "messaging\/update-msg91provider.md", + "demo": "messaging\/update-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -21828,7 +17895,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -21943,7 +18010,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -22052,11 +18119,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -22070,6 +18137,90 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md" + } + ], "auth": { "Project": [] } @@ -22211,11 +18362,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -22229,6 +18380,86 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md" + } + ], "auth": { "Project": [] } @@ -22371,7 +18602,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -22474,7 +18705,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -22575,7 +18806,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -22678,7 +18909,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -22779,7 +19010,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -22882,7 +19113,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -22983,7 +19214,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -23086,7 +19317,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -23185,7 +19416,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -23240,7 +19471,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -23300,7 +19531,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -23372,7 +19603,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -23444,7 +19675,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -23517,7 +19748,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -23605,7 +19836,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -23665,7 +19896,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -23744,7 +19975,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -23804,7 +20035,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -23876,7 +20107,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -23957,7 +20188,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -24044,7 +20275,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -24107,7 +20338,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -24177,7 +20408,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 262, + "weight": 263, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -24250,7 +20481,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 257, + "weight": 258, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -24342,7 +20573,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 264, + "weight": 265, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -24430,7 +20661,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 261, + "weight": 262, "cookies": false, "type": "", "demo": "migrations\/create-csv-migration.md", @@ -24476,6 +20707,12 @@ "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", "default": null, "x-example": "[ID1:ID2]" + }, + "internalFile": { + "type": "boolean", + "description": "Is the file stored in an internal bucket?", + "default": false, + "x-example": false } }, "required": [ @@ -24514,7 +20751,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 258, + "weight": 259, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -24592,7 +20829,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 265, + "weight": 266, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -24663,7 +20900,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 260, + "weight": 261, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -24782,7 +21019,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 267, + "weight": 268, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -24902,7 +21139,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 259, + "weight": 260, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -25014,7 +21251,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 266, + "weight": 267, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -25125,7 +21362,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 263, + "weight": 264, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -25183,7 +21420,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 268, + "weight": 269, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -25236,7 +21473,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 269, + "weight": 270, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -26161,7 +22398,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApiStatus", "group": "projects", @@ -26178,6 +22415,68 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatus" + }, + "methods": [ + { + "name": "updateApiStatus", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "api", + "status" + ], + "required": [ + "projectId", + "api", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/project" + } + ], + "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", + "demo": "projects\/update-api-status.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatus" + } + }, + { + "name": "updateAPIStatus", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "api", + "status" + ], + "required": [ + "projectId", + "api", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/project" + } + ], + "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", + "demo": "projects\/update-api-status.md" + } + ], "auth": { "Project": [] } @@ -26253,7 +22552,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", @@ -26270,6 +22569,64 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatusAll" + }, + "methods": [ + { + "name": "updateApiStatusAll", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "status" + ], + "required": [ + "projectId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/project" + } + ], + "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", + "demo": "projects\/update-api-status-all.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatusAll" + } + }, + { + "name": "updateAPIStatusAll", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "status" + ], + "required": [ + "projectId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/project" + } + ], + "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", + "demo": "projects\/update-api-status-all.md" + } + ], "auth": { "Project": [] } @@ -27227,7 +23584,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 419, + "weight": 427, "cookies": false, "type": "", "demo": "projects\/list-dev-keys.md", @@ -27297,7 +23654,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 416, + "weight": 424, "cookies": false, "type": "", "demo": "projects\/create-dev-key.md", @@ -27380,7 +23737,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 418, + "weight": 426, "cookies": false, "type": "", "demo": "projects\/get-dev-key.md", @@ -27446,7 +23803,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 417, + "weight": 425, "cookies": false, "type": "", "demo": "projects\/update-dev-key.md", @@ -27532,7 +23889,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 420, + "weight": 428, "cookies": false, "type": "", "demo": "projects\/delete-dev-key.md", @@ -27603,7 +23960,7 @@ "weight": 134, "cookies": false, "type": "", - "demo": "projects\/create-j-w-t.md", + "demo": "projects\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-jwt.md", "rate-limit": 0, "rate-time": 3600, @@ -28067,7 +24424,7 @@ "weight": 111, "cookies": false, "type": "", - "demo": "projects\/update-o-auth2.md", + "demo": "projects\/update-o-auth-2.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-oauth2.md", "rate-limit": 0, "rate-time": 3600, @@ -28657,7 +25014,7 @@ "account", "avatars", "databases", - "tables", + "tablesdb", "locale", "health", "storage", @@ -28787,7 +25144,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmtp", "group": "templates", @@ -28804,6 +25161,80 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMTP" + }, + "methods": [ + { + "name": "updateSmtp", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "enabled", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "enabled" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/project" + } + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", + "demo": "projects\/update-smtp.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMTP" + } + }, + { + "name": "updateSMTP", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "enabled", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "enabled" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/project" + } + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", + "demo": "projects\/update-smtp.md" + } + ], "auth": { "Project": [] } @@ -28916,7 +25347,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSmtpTest", "group": "templates", @@ -28933,6 +25364,84 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.createSMTPTest" + }, + "methods": [ + { + "name": "createSmtpTest", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "host" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Send a test email to verify SMTP configuration. ", + "demo": "projects\/create-smtp-test.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.createSMTPTest" + } + }, + { + "name": "createSMTPTest", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "host" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Send a test email to verify SMTP configuration. ", + "demo": "projects\/create-smtp-test.md" + } + ], "auth": { "Project": [] } @@ -29833,7 +26342,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getSmsTemplate", "group": "templates", @@ -29850,6 +26359,68 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.getSMSTemplate" + }, + "methods": [ + { + "name": "getSmsTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/smsTemplate" + } + ], + "description": "Get a custom SMS template for the specified locale and type returning it's contents.", + "demo": "projects\/get-sms-template.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.getSMSTemplate" + } + }, + { + "name": "getSMSTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/smsTemplate" + } + ], + "description": "Get a custom SMS template for the specified locale and type returning it's contents.", + "demo": "projects\/get-sms-template.md" + } + ], "auth": { "Project": [] } @@ -30050,7 +26621,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", @@ -30067,6 +26638,72 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMSTemplate" + }, + "methods": [ + { + "name": "updateSmsTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale", + "message" + ], + "required": [ + "projectId", + "type", + "locale", + "message" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/smsTemplate" + } + ], + "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", + "demo": "projects\/update-sms-template.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMSTemplate" + } + }, + { + "name": "updateSMSTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale", + "message" + ], + "required": [ + "projectId", + "type", + "locale", + "message" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/smsTemplate" + } + ], + "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", + "demo": "projects\/update-sms-template.md" + } + ], "auth": { "Project": [] } @@ -30285,7 +26922,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", @@ -30302,6 +26939,68 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.deleteSMSTemplate" + }, + "methods": [ + { + "name": "deleteSmsTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/smsTemplate" + } + ], + "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", + "demo": "projects\/delete-sms-template.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.deleteSMSTemplate" + } + }, + { + "name": "deleteSMSTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/smsTemplate" + } + ], + "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", + "demo": "projects\/delete-sms-template.md" + } + ], "auth": { "Project": [] } @@ -31076,10 +27775,10 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 481, + "weight": 489, "cookies": false, "type": "", - "demo": "proxy\/create-a-p-i-rule.md", + "demo": "proxy\/create-api-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, "rate-time": 60, @@ -31146,7 +27845,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 483, + "weight": 491, "cookies": false, "type": "", "demo": "proxy\/create-function-rule.md", @@ -31229,7 +27928,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 484, + "weight": 492, "cookies": false, "type": "", "demo": "proxy\/create-redirect-rule.md", @@ -31349,7 +28048,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 482, + "weight": 490, "cookies": false, "type": "", "demo": "proxy\/create-site-rule.md", @@ -31601,7 +28300,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -31673,7 +28372,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -31940,7 +28639,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -31989,7 +28688,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -32039,7 +28738,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 475, + "weight": 483, "cookies": false, "type": "", "demo": "sites\/list-templates.md", @@ -32133,7 +28832,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 476, + "weight": 484, "cookies": false, "type": "", "demo": "sites\/get-template.md", @@ -32191,7 +28890,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 477, + "weight": 485, "cookies": false, "type": "", "demo": "sites\/list-usage.md", @@ -32225,7 +28924,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -32261,7 +28960,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -32320,7 +29019,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -32582,7 +29281,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -32643,7 +29342,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -32720,7 +29419,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -32800,7 +29499,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -32900,7 +29599,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -32979,7 +29678,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -33085,7 +29784,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -33182,7 +29881,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -33244,7 +29943,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -33311,7 +30010,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -33396,7 +30095,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -33463,7 +30162,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -33534,7 +30233,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -33598,7 +30297,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -33665,7 +30364,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 478, + "weight": 486, "cookies": false, "type": "", "demo": "sites\/get-usage.md", @@ -33707,7 +30406,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -33743,7 +30442,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -33802,7 +30501,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -33892,7 +30591,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -33959,7 +30658,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -34051,7 +30750,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -35371,7 +32070,7 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -35449,7 +32148,5368 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tablesdb\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "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 columns: name", + "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 database", + "operationId": "tablesDBCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tablesdb\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "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": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDBListUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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.", + "responses": { + "200": { + "description": "UsageDatabases", + "schema": { + "$ref": "#\/definitions\/usageDatabases" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 377, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "listUsage", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "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, 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.", + "demo": "tablesdb\/list-usage.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDBGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tablesdb\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tablesdb\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDBListTables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": "tables", + "weight": 382, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: 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": "tablesDBCreateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": "tables", + "weight": 378, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDBGetTable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": "tables", + "weight": 379, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBUpdateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": "tables", + "weight": 380, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "tablesDBDeleteTable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": "tables", + "weight": 381, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDBListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDBUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationshipType", + "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": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "Column size for text columns, 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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + ] + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List indexes on the table.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "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 columns: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDBCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "IndexType", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDBDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesDBListTableLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTableLogs", + "group": "tables", + "weight": 383, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "client", + "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 TableDB service [server integration](https:\/\/appwrite.io\/docs\/server\/tablesdbdb#tablesdbCreate).", + "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": "tablesDBCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDB", + "desc": "Create rows", + "auth": { + "Project": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md" + } + ], + "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\/tablesdb#tablesDBCreate). 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": "Upsert rows", + "operationId": "tablesDBUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md" + } + ], + "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": "tablesDBUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "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" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "client", + "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\/tablesdb#tablesDBCreate).", + "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": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md" + } + ], + "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": "tablesDBUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "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": "tablesDBDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesDBListRowLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 421, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "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": "Table 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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "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 + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "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 + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesDBGetTableUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 384, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDBGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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.", + "responses": { + "200": { + "description": "UsageDatabase", + "schema": { + "$ref": "#\/definitions\/usageDatabase" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 376, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-database-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "getUsage", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabase" + } + ], + "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.", + "demo": "tablesdb\/get-usage.md" + } + ], + "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": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -36564,7 +38624,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -36644,7 +38704,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -36728,7 +38788,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -36788,7 +38848,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -36859,7 +38919,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -37089,7 +39149,7 @@ "weight": 188, "cookies": false, "type": "", - "demo": "users\/create-argon2user.md", + "demo": "users\/create-argon-2-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37399,7 +39459,7 @@ "weight": 187, "cookies": false, "type": "", - "demo": "users\/create-m-d5user.md", + "demo": "users\/create-md-5-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37490,7 +39550,7 @@ "weight": 190, "cookies": false, "type": "", - "demo": "users\/create-p-h-pass-user.md", + "demo": "users\/create-ph-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37819,7 +39879,7 @@ "weight": 189, "cookies": false, "type": "", - "demo": "users\/create-s-h-a-user.md", + "demo": "users\/create-sha-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37960,7 +40020,7 @@ "30d", "90d" ], - "x-enum-name": "UserUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -38193,7 +40253,7 @@ "weight": 226, "cookies": false, "type": "", - "demo": "users\/create-j-w-t.md", + "demo": "users\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, "rate-time": 3600, @@ -38501,7 +40561,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfa", "group": "users", @@ -38518,6 +40578,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md" + } + ], "auth": { "Project": [] } @@ -38575,7 +40693,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -38592,6 +40710,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -38647,7 +40821,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -38664,6 +40838,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md" + } + ], "auth": { "Project": [] } @@ -38706,7 +40934,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -38723,6 +40951,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -38765,7 +41047,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -38782,6 +41064,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -38824,7 +41160,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -38841,6 +41177,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -40957,8 +43347,8 @@ "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": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -41021,7 +43411,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "rowList": { "description": "Rows List", @@ -41029,7 +43420,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rows rows that matched your query.", + "description": "Total number of rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -41046,7 +43437,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -41054,7 +43449,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of documents rows that matched your query.", + "description": "Total number of documents that matched your query.", "x-example": 5, "format": "int32" }, @@ -41071,7 +43466,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -41079,7 +43478,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tables rows that matched your query.", + "description": "Total number of tables that matched your query.", "x-example": 5, "format": "int32" }, @@ -41096,7 +43495,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -41104,7 +43507,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of collections rows that matched your query.", + "description": "Total number of collections that matched your query.", "x-example": 5, "format": "int32" }, @@ -41121,7 +43524,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -41129,7 +43536,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases rows that matched your query.", + "description": "Total number of databases that matched your query.", "x-example": 5, "format": "int32" }, @@ -41146,7 +43553,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -41154,7 +43565,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41171,7 +43582,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -41179,7 +43594,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41196,7 +43611,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -41204,7 +43623,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of users rows that matched your query.", + "description": "Total number of users that matched your query.", "x-example": 5, "format": "int32" }, @@ -41221,7 +43640,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -41229,7 +43652,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions rows that matched your query.", + "description": "Total number of sessions that matched your query.", "x-example": 5, "format": "int32" }, @@ -41246,7 +43669,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -41254,7 +43681,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities rows that matched your query.", + "description": "Total number of identities that matched your query.", "x-example": 5, "format": "int32" }, @@ -41271,7 +43698,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -41279,7 +43710,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs rows that matched your query.", + "description": "Total number of logs that matched your query.", "x-example": 5, "format": "int32" }, @@ -41296,7 +43727,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -41304,7 +43739,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files rows that matched your query.", + "description": "Total number of files that matched your query.", "x-example": 5, "format": "int32" }, @@ -41321,7 +43756,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -41329,7 +43768,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets rows that matched your query.", + "description": "Total number of buckets that matched your query.", "x-example": 5, "format": "int32" }, @@ -41346,7 +43785,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -41354,7 +43797,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens rows that matched your query.", + "description": "Total number of tokens that matched your query.", "x-example": 5, "format": "int32" }, @@ -41371,7 +43814,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -41379,7 +43826,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams rows that matched your query.", + "description": "Total number of teams that matched your query.", "x-example": 5, "format": "int32" }, @@ -41396,7 +43843,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -41404,7 +43855,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships rows that matched your query.", + "description": "Total number of memberships that matched your query.", "x-example": 5, "format": "int32" }, @@ -41421,7 +43872,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -41429,7 +43884,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites rows that matched your query.", + "description": "Total number of sites that matched your query.", "x-example": 5, "format": "int32" }, @@ -41446,7 +43901,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "templateSiteList": { "description": "Site Templates List", @@ -41454,7 +43913,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates rows that matched your query.", + "description": "Total number of templates that matched your query.", "x-example": 5, "format": "int32" }, @@ -41471,7 +43930,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "functionList": { "description": "Functions List", @@ -41479,7 +43942,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions rows that matched your query.", + "description": "Total number of functions that matched your query.", "x-example": 5, "format": "int32" }, @@ -41496,7 +43959,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "templateFunctionList": { "description": "Function Templates List", @@ -41504,7 +43971,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates rows that matched your query.", + "description": "Total number of templates that matched your query.", "x-example": 5, "format": "int32" }, @@ -41521,7 +43988,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "installationList": { "description": "Installations List", @@ -41529,7 +44000,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of installations rows that matched your query.", + "description": "Total number of installations that matched your query.", "x-example": 5, "format": "int32" }, @@ -41546,7 +44017,11 @@ "required": [ "total", "installations" - ] + ], + "example": { + "total": 5, + "installations": "" + } }, "providerRepositoryFrameworkList": { "description": "Framework Provider Repositories List", @@ -41554,7 +44029,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworkProviderRepositories rows that matched your query.", + "description": "Total number of frameworkProviderRepositories that matched your query.", "x-example": 5, "format": "int32" }, @@ -41571,7 +44046,11 @@ "required": [ "total", "frameworkProviderRepositories" - ] + ], + "example": { + "total": 5, + "frameworkProviderRepositories": "" + } }, "providerRepositoryRuntimeList": { "description": "Runtime Provider Repositories List", @@ -41579,7 +44058,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimeProviderRepositories rows that matched your query.", + "description": "Total number of runtimeProviderRepositories that matched your query.", "x-example": 5, "format": "int32" }, @@ -41596,7 +44075,11 @@ "required": [ "total", "runtimeProviderRepositories" - ] + ], + "example": { + "total": 5, + "runtimeProviderRepositories": "" + } }, "branchList": { "description": "Branches List", @@ -41604,7 +44087,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of branches rows that matched your query.", + "description": "Total number of branches that matched your query.", "x-example": 5, "format": "int32" }, @@ -41621,7 +44104,11 @@ "required": [ "total", "branches" - ] + ], + "example": { + "total": 5, + "branches": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -41629,7 +44116,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks rows that matched your query.", + "description": "Total number of frameworks that matched your query.", "x-example": 5, "format": "int32" }, @@ -41646,7 +44133,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -41654,7 +44145,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes rows that matched your query.", + "description": "Total number of runtimes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41671,7 +44162,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -41679,7 +44174,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments rows that matched your query.", + "description": "Total number of deployments that matched your query.", "x-example": 5, "format": "int32" }, @@ -41696,7 +44191,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -41704,7 +44203,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions rows that matched your query.", + "description": "Total number of executions that matched your query.", "x-example": 5, "format": "int32" }, @@ -41721,7 +44220,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "projectList": { "description": "Projects List", @@ -41729,7 +44232,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of projects rows that matched your query.", + "description": "Total number of projects that matched your query.", "x-example": 5, "format": "int32" }, @@ -41746,7 +44249,11 @@ "required": [ "total", "projects" - ] + ], + "example": { + "total": 5, + "projects": "" + } }, "webhookList": { "description": "Webhooks List", @@ -41754,7 +44261,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of webhooks rows that matched your query.", + "description": "Total number of webhooks that matched your query.", "x-example": 5, "format": "int32" }, @@ -41771,7 +44278,11 @@ "required": [ "total", "webhooks" - ] + ], + "example": { + "total": 5, + "webhooks": "" + } }, "keyList": { "description": "API Keys List", @@ -41779,7 +44290,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of keys rows that matched your query.", + "description": "Total number of keys that matched your query.", "x-example": 5, "format": "int32" }, @@ -41796,7 +44307,11 @@ "required": [ "total", "keys" - ] + ], + "example": { + "total": 5, + "keys": "" + } }, "devKeyList": { "description": "Dev Keys List", @@ -41804,7 +44319,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of devKeys rows that matched your query.", + "description": "Total number of devKeys that matched your query.", "x-example": 5, "format": "int32" }, @@ -41821,7 +44336,11 @@ "required": [ "total", "devKeys" - ] + ], + "example": { + "total": 5, + "devKeys": "" + } }, "platformList": { "description": "Platforms List", @@ -41829,7 +44348,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of platforms rows that matched your query.", + "description": "Total number of platforms that matched your query.", "x-example": 5, "format": "int32" }, @@ -41846,7 +44365,11 @@ "required": [ "total", "platforms" - ] + ], + "example": { + "total": 5, + "platforms": "" + } }, "countryList": { "description": "Countries List", @@ -41854,7 +44377,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries rows that matched your query.", + "description": "Total number of countries that matched your query.", "x-example": 5, "format": "int32" }, @@ -41871,7 +44394,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -41879,7 +44406,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents rows that matched your query.", + "description": "Total number of continents that matched your query.", "x-example": 5, "format": "int32" }, @@ -41896,7 +44423,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -41904,7 +44435,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages rows that matched your query.", + "description": "Total number of languages that matched your query.", "x-example": 5, "format": "int32" }, @@ -41921,7 +44452,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -41929,7 +44464,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies rows that matched your query.", + "description": "Total number of currencies that matched your query.", "x-example": 5, "format": "int32" }, @@ -41946,7 +44481,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -41954,7 +44493,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones rows that matched your query.", + "description": "Total number of phones that matched your query.", "x-example": 5, "format": "int32" }, @@ -41971,7 +44510,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -41979,7 +44522,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables rows that matched your query.", + "description": "Total number of variables that matched your query.", "x-example": 5, "format": "int32" }, @@ -41996,7 +44539,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "proxyRuleList": { "description": "Rule List", @@ -42004,7 +44551,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rules rows that matched your query.", + "description": "Total number of rules that matched your query.", "x-example": 5, "format": "int32" }, @@ -42021,7 +44568,11 @@ "required": [ "total", "rules" - ] + ], + "example": { + "total": 5, + "rules": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -42029,7 +44580,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes rows that matched your query.", + "description": "Total number of localeCodes that matched your query.", "x-example": 5, "format": "int32" }, @@ -42046,7 +44597,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -42054,7 +44609,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers rows that matched your query.", + "description": "Total number of providers that matched your query.", "x-example": 5, "format": "int32" }, @@ -42071,7 +44626,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -42079,7 +44638,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages rows that matched your query.", + "description": "Total number of messages that matched your query.", "x-example": 5, "format": "int32" }, @@ -42096,7 +44655,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -42104,7 +44667,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics rows that matched your query.", + "description": "Total number of topics that matched your query.", "x-example": 5, "format": "int32" }, @@ -42121,7 +44684,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -42129,7 +44696,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers rows that matched your query.", + "description": "Total number of subscribers that matched your query.", "x-example": 5, "format": "int32" }, @@ -42146,7 +44713,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -42154,7 +44725,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets rows that matched your query.", + "description": "Total number of targets that matched your query.", "x-example": 5, "format": "int32" }, @@ -42171,7 +44742,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "migrationList": { "description": "Migrations List", @@ -42179,7 +44754,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of migrations rows that matched your query.", + "description": "Total number of migrations that matched your query.", "x-example": 5, "format": "int32" }, @@ -42196,7 +44771,11 @@ "required": [ "total", "migrations" - ] + ], + "example": { + "total": 5, + "migrations": "" + } }, "specificationList": { "description": "Specifications List", @@ -42204,7 +44783,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications rows that matched your query.", + "description": "Total number of specifications that matched your query.", "x-example": 5, "format": "int32" }, @@ -42221,7 +44800,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "vcsContentList": { "description": "VCS Content List", @@ -42229,7 +44812,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of contents rows that matched your query.", + "description": "Total number of contents that matched your query.", "x-example": 5, "format": "int32" }, @@ -42246,7 +44829,11 @@ "required": [ "total", "contents" - ] + ], + "example": { + "total": 5, + "contents": "" + } }, "database": { "description": "Database", @@ -42276,6 +44863,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -42283,8 +44875,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -42395,7 +44996,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -42450,7 +45065,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -42525,7 +45144,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -42602,7 +45234,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -42679,7 +45324,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -42741,7 +45399,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -42809,7 +45478,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -42886,7 +45567,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -42954,7 +45648,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -43022,7 +45728,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -43090,7 +45808,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -43182,7 +45912,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -43293,7 +46039,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -43348,7 +46108,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -43423,7 +46187,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -43486,7 +46263,7 @@ }, "default": { "type": "integer", - "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.", "x-example": 10, "format": "int32", "x-nullable": true @@ -43500,7 +46277,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -43563,7 +46353,7 @@ }, "default": { "type": "number", - "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.", "x-example": 2.5, "format": "double", "x-nullable": true @@ -43577,7 +46367,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -43626,7 +46429,7 @@ }, "default": { "type": "boolean", - "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.", "x-example": false, "x-nullable": true } @@ -43639,7 +46442,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -43693,7 +46507,7 @@ }, "default": { "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.", "x-example": "default@example.com", "x-nullable": true } @@ -43707,7 +46521,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -43769,7 +46595,7 @@ }, "default": { "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.", "x-example": "element", "x-nullable": true } @@ -43784,7 +46610,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -43838,7 +46677,7 @@ }, "default": { "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.", "x-example": "192.0.2.0", "x-nullable": true } @@ -43852,7 +46691,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -43920,7 +46771,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -43974,7 +46837,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", + "description": "Default value for column when not provided. Only null is optional", "x-example": "2020-10-15T06:38:00.000+00:00", "x-nullable": true } @@ -43988,7 +46851,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -44080,7 +46955,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -44158,7 +47049,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -44236,7 +47139,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -44251,17 +47166,20 @@ "type": "integer", "description": "Row automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$tableId": { "type": "string", "description": "Table ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -44293,7 +47211,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -44308,17 +47237,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -44350,7 +47282,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -44484,7 +47432,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -44647,7 +47618,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -44661,7 +47658,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -44675,7 +47675,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -44689,7 +47692,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -44703,7 +47709,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -44745,7 +47754,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -44777,7 +47793,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -44812,12 +47834,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -45004,7 +48037,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -45072,7 +48138,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -45116,7 +48194,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -45130,7 +48216,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -45180,7 +48269,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -45200,7 +48298,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -45282,7 +48384,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -45374,7 +48491,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -45424,7 +48560,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -45476,7 +48621,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -45567,7 +48723,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -45754,7 +48927,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "templateSite": { "description": "Template Site", @@ -45851,7 +49055,22 @@ "providerOwner", "providerVersion", "variables" - ] + ], + "example": { + "key": "starter", + "name": "Starter site", + "tagline": "Minimal web app integrating with Appwrite.", + "demoUrl": "https:\/\/nextjs-starter.appwrite.network\/", + "screenshotDark": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png", + "screenshotLight": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png", + "useCases": "Starter", + "frameworks": [], + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [] + } }, "templateFramework": { "description": "Template Framework", @@ -45913,7 +49132,18 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/build", + "providerRootDirectory": ".\/svelte-kit\/starter", + "buildRuntime": "node-22", + "adapter": "ssr", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -46103,7 +49333,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "templateFunction": { "description": "Template Function", @@ -46234,7 +49494,26 @@ "providerVersion", "variables", "scopes" - ] + ], + "example": { + "icon": "icon-lightning-bolt", + "id": "starter", + "name": "Starter function", + "tagline": "A simple function to get started.", + "permissions": "any", + "events": "account.create", + "cron": "0 0 * * *", + "timeout": 300, + "useCases": "Starter", + "runtimes": [], + "instructions": "For documentation and instructions check out .", + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [], + "scopes": "users.read" + } }, "templateRuntime": { "description": "Template Runtime", @@ -46266,7 +49545,13 @@ "commands", "entrypoint", "providerRootDirectory" - ] + ], + "example": { + "name": "node-19.0", + "commands": "npm install", + "entrypoint": "index.js", + "providerRootDirectory": "node\/starter" + } }, "templateVariable": { "description": "Template Variable", @@ -46316,7 +49601,16 @@ "placeholder", "required", "type" - ] + ], + "example": { + "name": "APPWRITE_DATABASE_ID", + "description": "The ID of the Appwrite database that contains the collection to sync.", + "value": "512", + "secret": false, + "placeholder": "64a55...7b912", + "required": false, + "type": "password" + } }, "installation": { "description": "Installation", @@ -46360,7 +49654,15 @@ "provider", "organization", "providerInstallationId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "provider": "github", + "organization": "appwrite", + "providerInstallationId": "5322" + } }, "providerRepository": { "description": "ProviderRepository", @@ -46410,7 +49712,16 @@ "private", "defaultBranch", "pushedAt" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime" + } }, "providerRepositoryFramework": { "description": "ProviderRepositoryFramework", @@ -46466,7 +49777,17 @@ "defaultBranch", "pushedAt", "framework" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "framework": "nextjs" + } }, "providerRepositoryRuntime": { "description": "ProviderRepositoryRuntime", @@ -46522,7 +49843,17 @@ "defaultBranch", "pushedAt", "runtime" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "runtime": "node-22" + } }, "detectionFramework": { "description": "DetectionFramework", @@ -46554,7 +49885,13 @@ "installCommand", "buildCommand", "outputDirectory" - ] + ], + "example": { + "framework": "nuxt", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "dist" + } }, "detectionRuntime": { "description": "DetectionRuntime", @@ -46580,7 +49917,12 @@ "runtime", "entrypoint", "commands" - ] + ], + "example": { + "runtime": "node", + "entrypoint": "index.js", + "commands": "npm install && npm run build" + } }, "vcsContent": { "description": "VcsContents", @@ -46607,7 +49949,12 @@ }, "required": [ "name" - ] + ], + "example": { + "size": 1523, + "isDirectory": true, + "name": "Main.java" + } }, "branch": { "description": "Branch", @@ -46621,7 +49968,10 @@ }, "required": [ "name" - ] + ], + "example": { + "name": "main" + } }, "runtime": { "description": "Runtime", @@ -46680,7 +50030,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -46736,7 +50096,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -46774,7 +50152,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -46948,7 +50333,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -46966,7 +50380,7 @@ }, "$updatedAt": { "type": "string", - "description": "Execution upate date in ISO 8601 format.", + "description": "Execution update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$permissions": { @@ -46984,6 +50398,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -47070,6 +50489,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -47081,7 +50501,37 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "project": { "description": "Project", @@ -47381,9 +50831,9 @@ "description": "Databases (legacy) service status", "x-example": true }, - "serviceStatusForTables": { + "serviceStatusForTablesdb": { "type": "boolean", - "description": "Tables service status", + "description": "TablesDB service status", "x-example": true }, "serviceStatusForLocale": { @@ -47485,7 +50935,7 @@ "serviceStatusForAccount", "serviceStatusForAvatars", "serviceStatusForDatabases", - "serviceStatusForTables", + "serviceStatusForTablesdb", "serviceStatusForLocale", "serviceStatusForHealth", "serviceStatusForStorage", @@ -47495,7 +50945,75 @@ "serviceStatusForFunctions", "serviceStatusForGraphql", "serviceStatusForMessaging" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authMockNumbers": [ + {} + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + {} + ], + "platforms": {}, + "webhooks": {}, + "keys": {}, + "devKeys": {}, + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyTo": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "securepassword", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForGraphql": true, + "serviceStatusForMessaging": true + } }, "webhook": { "description": "Webhook", @@ -47588,7 +51106,25 @@ "enabled", "logs", "attempts" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "security": true, + "httpUser": "username", + "httpPass": "password", + "signatureKey": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } }, "key": { "description": "Key", @@ -47656,7 +51192,18 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "devKey": { "description": "DevKey", @@ -47715,7 +51262,17 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "mockNumber": { "description": "Mock Number", @@ -47735,7 +51292,11 @@ "required": [ "phone", "otp" - ] + ], + "example": { + "phone": "+1612842323", + "otp": "123456" + } }, "authProvider": { "description": "AuthProvider", @@ -47773,7 +51334,14 @@ "appId", "secret", "enabled" - ] + ], + "example": { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ", + "enabled": "" + } }, "platform": { "description": "Platform", @@ -47841,7 +51409,19 @@ "hostname", "httpUser", "httpPass" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "key": "com.company.appname", + "store": "", + "hostname": true, + "httpUser": "username", + "httpPass": "password" + } }, "variable": { "description": "Variable", @@ -47897,7 +51477,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -47917,7 +51507,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -47937,7 +51531,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -47963,7 +51561,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -48015,7 +51618,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -48041,7 +51653,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -48061,7 +51678,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -48076,7 +51697,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -48103,7 +51727,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -48147,7 +51776,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -48176,7 +51813,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "metric": { "description": "Metric", @@ -48197,7 +51839,11 @@ "required": [ "value", "date" - ] + ], + "example": { + "value": 1, + "date": "2020-10-15T06:38:00.000+00:00" + } }, "metricBreakdown": { "description": "Metric Breakdown", @@ -48231,7 +51877,13 @@ "required": [ "name", "value" - ] + ], + "example": { + "resourceId": "5e5ea5c16897e", + "name": "Documents", + "value": 1, + "estimate": 1 + } }, "usageDatabases": { "description": "UsageDatabases", @@ -48381,7 +52033,26 @@ "storage", "databasesReads", "databasesWrites" - ] + ], + "example": { + "range": "30d", + "databasesTotal": 0, + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "databases": [], + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databasesReads": [], + "databasesWrites": [] + } }, "usageDatabase": { "description": "UsageDatabase", @@ -48514,7 +52185,24 @@ "storage", "databaseReads", "databaseWrites" - ] + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } }, "usageTable": { "description": "UsageTable", @@ -48545,7 +52233,12 @@ "range", "rowsTotal", "rows" - ] + ], + "example": { + "range": "30d", + "rowsTotal": 0, + "rows": [] + } }, "usageCollection": { "description": "UsageCollection", @@ -48576,7 +52269,12 @@ "range", "documentsTotal", "documents" - ] + ], + "example": { + "range": "30d", + "documentsTotal": 0, + "documents": [] + } }, "usageUsers": { "description": "UsageUsers", @@ -48624,7 +52322,14 @@ "sessionsTotal", "users", "sessions" - ] + ], + "example": { + "range": "30d", + "usersTotal": 0, + "sessionsTotal": 0, + "users": [], + "sessions": [] + } }, "usageStorage": { "description": "StorageUsage", @@ -48689,7 +52394,16 @@ "buckets", "files", "storage" - ] + ], + "example": { + "range": "30d", + "bucketsTotal": 0, + "filesTotal": 0, + "filesStorageTotal": 0, + "buckets": [], + "files": [], + "storage": [] + } }, "usageBuckets": { "description": "UsageBuckets", @@ -48754,7 +52468,16 @@ "storage", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "range": "30d", + "filesTotal": 0, + "filesStorageTotal": 0, + "files": [], + "storage": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "usageFunctions": { "description": "UsageFunctions", @@ -48972,7 +52695,34 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "functionsTotal": 0, + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "functions": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageFunction": { "description": "UsageFunction", @@ -49180,7 +52930,33 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageSites": { "description": "UsageSites", @@ -49449,7 +53225,40 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "sitesTotal": 0, + "sites": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageSite": { "description": "UsageSite", @@ -49708,7 +53517,39 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageProject": { "description": "UsageProject", @@ -49982,7 +53823,41 @@ "databasesWrites", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "executionsTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "databasesTotal": 0, + "databasesStorageTotal": 0, + "usersTotal": 0, + "filesStorageTotal": 0, + "functionsStorageTotal": 0, + "buildsStorageTotal": 0, + "deploymentsStorageTotal": 0, + "bucketsTotal": 0, + "executionsMbSecondsTotal": 0, + "buildsMbSecondsTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "requests": [], + "network": [], + "users": [], + "executions": [], + "executionsBreakdown": [], + "bucketsBreakdown": [], + "databasesStorageBreakdown": [], + "executionsMbSecondsBreakdown": [], + "buildsMbSecondsBreakdown": [], + "functionsStorageBreakdown": [], + "authPhoneTotal": 0, + "authPhoneEstimate": 0, + "authPhoneCountryBreakdown": [], + "databasesReads": [], + "databasesWrites": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "headers": { "description": "Headers", @@ -50002,7 +53877,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -50036,7 +53915,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "proxyRule": { "description": "Rule", @@ -50135,7 +54020,24 @@ "status", "logs", "renewAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "function", + "status": "verified", + "logs": "HTTP challegne failed.", + "renewAt": "datetime" + } }, "smsTemplate": { "description": "SmsTemplate", @@ -50161,7 +54063,12 @@ "type", "locale", "message" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account." + } }, "emailTemplate": { "description": "EmailTemplate", @@ -50211,7 +54118,16 @@ "senderEmail", "replyTo", "subject" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyTo": "emails@appwrite.io", + "subject": "Please verify your email address" + } }, "consoleVariables": { "description": "Console Variables", @@ -50232,6 +54148,11 @@ "description": "AAAA target for your Appwrite custom domains.", "x-example": "::1" }, + "_APP_DOMAIN_TARGET_CAA": { + "type": "string", + "description": "CAA target for your Appwrite custom domains.", + "x-example": "digicert.com" + }, "_APP_STORAGE_LIMIT": { "type": "integer", "description": "Maximum file size allowed for file upload in bytes.", @@ -50289,6 +54210,7 @@ "_APP_DOMAIN_TARGET_CNAME", "_APP_DOMAIN_TARGET_A", "_APP_DOMAIN_TARGET_AAAA", + "_APP_DOMAIN_TARGET_CAA", "_APP_STORAGE_LIMIT", "_APP_COMPUTE_SIZE_LIMIT", "_APP_USAGE_STATS", @@ -50299,7 +54221,23 @@ "_APP_DOMAIN_FUNCTIONS", "_APP_OPTIONS_FORCE_HTTPS", "_APP_DOMAINS_NAMESERVERS" - ] + ], + "example": { + "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", + "_APP_DOMAIN_TARGET_A": "127.0.0.1", + "_APP_DOMAIN_TARGET_AAAA": "::1", + "_APP_DOMAIN_TARGET_CAA": "digicert.com", + "_APP_STORAGE_LIMIT": "30000000", + "_APP_COMPUTE_SIZE_LIMIT": "30000000", + "_APP_USAGE_STATS": "enabled", + "_APP_VCS_ENABLED": true, + "_APP_DOMAIN_ENABLED": true, + "_APP_ASSISTANT_ENABLED": true, + "_APP_DOMAIN_SITES": "sites.localhost", + "_APP_DOMAIN_FUNCTIONS": "functions.localhost", + "_APP_OPTIONS_FORCE_HTTPS": "enabled", + "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -50331,7 +54269,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -50351,7 +54295,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -50371,7 +54321,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -50403,7 +54357,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -50470,7 +54430,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -50581,7 +54556,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -50643,7 +54644,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -50718,7 +54729,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -50780,7 +54811,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } }, "migration": { "description": "Migration", @@ -50870,7 +54912,23 @@ "statusCounters", "resourceData", "errors" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "stage": "init", + "source": "Appwrite", + "destination": "Appwrite", + "resources": [ + "user" + ], + "resourceId": "databaseId:collectionId", + "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", + "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", + "errors": [] + } }, "migrationReport": { "description": "Migration Report", @@ -50940,7 +54998,18 @@ "function", "size", "version" - ] + ], + "example": { + "user": 20, + "team": 20, + "database": 20, + "row": 20, + "file": 20, + "bucket": 20, + "function": 20, + "size": 30000, + "version": "1.4.0" + } } }, "externalDocs": { diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index a7f93152d1..9293ce6928 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -455,7 +455,7 @@ "weight": 30, "cookies": false, "type": "", - "demo": "account\/create-j-w-t.md", + "demo": "account\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, "rate-time": 3600, @@ -572,7 +572,7 @@ "weight": 45, "cookies": false, "type": "", - "demo": "account\/update-m-f-a.md", + "demo": "account\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, "rate-time": 3600, @@ -639,7 +639,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", @@ -657,6 +657,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Session": [] @@ -706,7 +762,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", @@ -724,6 +780,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Session": [] @@ -786,7 +902,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -804,6 +920,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Session": [] @@ -855,7 +1025,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", @@ -873,6 +1043,60 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -932,7 +1156,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", @@ -950,6 +1174,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1011,7 +1295,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -1029,6 +1313,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1063,7 +1395,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -1081,6 +1413,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1115,7 +1495,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -1133,6 +1513,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1167,7 +1595,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -1185,6 +1613,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1985,7 +2461,7 @@ "weight": 27, "cookies": false, "type": "", - "demo": "account\/update-magic-u-r-l-session.md", + "demo": "account\/update-magic-url-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, "rate-time": 3600, @@ -1996,6 +2472,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2074,6 +2554,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2438,7 +2922,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2486,7 +2970,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2541,7 +3025,7 @@ "weight": 25, "cookies": false, "type": "", - "demo": "account\/create-magic-u-r-l-token.md", + "demo": "account\/create-magic-url-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, "rate-time": 3600, @@ -2573,7 +3057,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2629,7 +3113,7 @@ "weight": 24, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2token.md", + "demo": "account\/create-o-auth-2-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2798,7 +3282,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3287,7 +3771,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3304,7 +3788,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3324,7 +3808,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -4120,7 +4604,7 @@ "weight": 65, "cookies": false, "type": "location", - "demo": "avatars\/get-q-r.md", + "demo": "avatars\/get-qr.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, "rate-time": 3600, @@ -4209,7 +4693,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4224,12 +4708,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4246,30 +4731,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "queries", - "search" - ], - "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." } ], "auth": { @@ -4332,7 +4798,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4347,12 +4813,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4373,34 +4840,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4473,7 +4917,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -4488,12 +4932,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4511,31 +4956,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "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." } ], "auth": { @@ -4585,7 +5010,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -4600,12 +5025,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4626,34 +5052,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -4722,7 +5125,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -4737,12 +5140,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4759,30 +5163,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -4832,7 +5217,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -4847,7 +5232,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDB.listTables" }, "auth": { "Project": [], @@ -4917,7 +5302,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -4932,7 +5317,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDB.createTable" }, "auth": { "Project": [], @@ -5027,7 +5412,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5042,7 +5427,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDB.getTable" }, "auth": { "Project": [], @@ -5099,7 +5484,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5114,7 +5499,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDB.updateTable" }, "auth": { "Project": [], @@ -5205,7 +5590,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5220,7 +5605,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDB.deleteTable" }, "auth": { "Project": [], @@ -5277,7 +5662,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5292,7 +5677,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDB.listColumns" }, "auth": { "Project": [], @@ -5363,7 +5748,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5378,7 +5763,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDB.createBooleanColumn" }, "auth": { "Project": [], @@ -5474,7 +5859,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5489,7 +5874,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDB.updateBooleanColumn" }, "auth": { "Project": [], @@ -5587,7 +5972,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -5602,7 +5987,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDB.createDatetimeColumn" }, "auth": { "Project": [], @@ -5698,7 +6083,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -5713,7 +6098,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDB.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5811,7 +6196,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -5826,7 +6211,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDB.createEmailColumn" }, "auth": { "Project": [], @@ -5922,7 +6307,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -5937,7 +6322,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDB.updateEmailColumn" }, "auth": { "Project": [], @@ -6035,7 +6420,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6050,7 +6435,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDB.createEnumColumn" }, "auth": { "Project": [], @@ -6156,7 +6541,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6171,7 +6556,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDB.updateEnumColumn" }, "auth": { "Project": [], @@ -6279,7 +6664,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6294,7 +6679,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDB.createFloatColumn" }, "auth": { "Project": [], @@ -6402,7 +6787,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6417,7 +6802,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDB.updateFloatColumn" }, "auth": { "Project": [], @@ -6527,7 +6912,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -6542,7 +6927,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDB.createIntegerColumn" }, "auth": { "Project": [], @@ -6650,7 +7035,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -6665,7 +7050,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDB.updateIntegerColumn" }, "auth": { "Project": [], @@ -6775,7 +7160,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -6790,7 +7175,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDB.createIpColumn" }, "auth": { "Project": [], @@ -6886,7 +7271,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -6901,7 +7286,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDB.updateIpColumn" }, "auth": { "Project": [], @@ -6999,7 +7384,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -7014,7 +7399,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDB.createRelationshipColumn" }, "auth": { "Project": [], @@ -7137,7 +7522,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7152,7 +7537,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDB.createStringColumn" }, "auth": { "Project": [], @@ -7261,7 +7646,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7276,7 +7661,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDB.updateStringColumn" }, "auth": { "Project": [], @@ -7380,7 +7765,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7395,7 +7780,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDB.createUrlColumn" }, "auth": { "Project": [], @@ -7491,7 +7876,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -7506,7 +7891,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDB.updateUrlColumn" }, "auth": { "Project": [], @@ -7633,7 +8018,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -7648,7 +8033,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDB.getColumn" }, "auth": { "Project": [], @@ -7707,7 +8092,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -7722,7 +8107,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDB.deleteColumn" }, "auth": { "Project": [], @@ -7788,7 +8173,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -7803,7 +8188,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDB.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7895,7 +8280,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -7911,7 +8296,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDB.listRows" }, "auth": { "Project": [], @@ -7982,7 +8367,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -7998,12 +8383,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [], "Session": [] @@ -8028,14 +8414,16 @@ } ], "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.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [], "Key": [] @@ -8056,10 +8444,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": "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.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDB.createRows" } } ], @@ -8135,7 +8524,7 @@ ] }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "consumes": [ "application\/json" @@ -8146,7 +8535,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.\n", + "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": { "201": { "description": "Documents List", @@ -8159,7 +8548,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8175,12 +8564,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -8201,10 +8591,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": "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", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" } } ], @@ -8271,7 +8662,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\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.", + "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.", "responses": { "200": { "description": "Documents List", @@ -8284,7 +8675,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8300,7 +8691,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDB.updateRows" }, "auth": { "Project": [], @@ -8368,7 +8759,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\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8381,7 +8772,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8397,7 +8788,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDB.deleteRows" }, "auth": { "Project": [], @@ -8472,7 +8863,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -8488,7 +8879,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [], @@ -8543,7 +8934,7 @@ ] }, "put": { - "summary": "Create or update a document", + "summary": "Upsert a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -8554,7 +8945,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 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": "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": { "201": { "description": "Document", @@ -8567,7 +8958,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -8583,12 +8974,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Session": [] @@ -8612,10 +9004,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": "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.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -8711,7 +9104,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -8727,7 +9120,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [], @@ -8813,7 +9206,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -8829,7 +9222,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDB.deleteRow" }, "auth": { "Project": [], @@ -8898,7 +9291,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -8908,22 +9301,25 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", - "server" + "client", + "server", + "console" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDB.decrementRowColumn" }, "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], @@ -9009,7 +9405,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -9019,22 +9415,25 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", - "server" + "client", + "server", + "console" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDB.incrementRowColumn" }, "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], @@ -9118,7 +9517,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9133,7 +9532,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDB.listIndexes" }, "auth": { "Project": [], @@ -9202,7 +9601,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9217,7 +9616,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDB.createIndex" }, "auth": { "Project": [], @@ -9334,7 +9733,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9349,7 +9748,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDB.getIndex" }, "auth": { "Project": [], @@ -9408,7 +9807,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -9423,7 +9822,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDB.deleteIndex" }, "auth": { "Project": [], @@ -9463,4469 +9862,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Tables List", - "schema": { - "$ref": "#\/definitions\/tableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsCreateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsUpdateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteTable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "schema": { - "$ref": "#\/definitions\/columnList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationshipType", - "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": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - ] - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteColumn", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "schema": { - "$ref": "#\/definitions\/columnIndexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "gridsCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "IndexType", - "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}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "gridsDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "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": "gridsCreateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "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", - "namespace": "grids", - "auth": { - "Project": [], - "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\/tables#tablesCreate). 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": "gridsUpsertRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "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": "gridsUpdateRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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": "gridsDeleteRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "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": "gridsUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "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": "gridsUpdateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "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": "gridsDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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", @@ -13950,7 +9886,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -14023,7 +9959,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -14275,7 +10211,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -14325,7 +10261,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -14376,7 +10312,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -14436,7 +10372,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -14684,7 +10620,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -14746,7 +10682,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -14824,7 +10760,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -14905,7 +10841,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -14998,7 +10934,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -15084,7 +11020,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -15191,7 +11127,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -15288,7 +11224,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -15351,7 +11287,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -15419,7 +11355,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -15505,7 +11441,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -15573,7 +11509,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -15648,7 +11584,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -15710,7 +11646,7 @@ }, "method": { "type": "string", - "description": "HTTP method of execution. Default value is GET.", + "description": "HTTP method of execution. Default value is POST.", "default": "POST", "x-example": "GET", "enum": [ @@ -15719,7 +11655,8 @@ "PUT", "PATCH", "DELETE", - "OPTIONS" + "OPTIONS", + "HEAD" ], "x-enum-name": "ExecutionMethod", "x-enum-keys": [] @@ -15766,7 +11703,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -15832,7 +11769,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -15900,7 +11837,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -15960,7 +11897,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -16051,7 +11988,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -16119,7 +12056,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -16212,7 +12149,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -16282,7 +12219,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -16357,7 +12294,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -16642,7 +12579,7 @@ "weight": 80, "cookies": false, "type": "", - "demo": "health\/get-d-b.md", + "demo": "health\/get-db.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, "rate-time": 3600, @@ -17930,7 +13867,7 @@ "weight": 73, "cookies": false, "type": "", - "demo": "locale\/list-countries-e-u.md", + "demo": "locale\/list-countries-eu.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, @@ -18139,7 +14076,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -18215,7 +14152,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -18374,7 +14311,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -18530,7 +14467,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18726,7 +14663,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18917,11 +14854,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -18935,6 +14872,76 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19036,11 +15043,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -19054,6 +15061,74 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19155,7 +15230,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -19211,7 +15286,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -19272,7 +15347,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -19345,7 +15420,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -19418,7 +15493,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -19490,11 +15565,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19508,6 +15583,78 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19606,11 +15753,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19624,6 +15771,76 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19720,11 +15937,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19738,6 +15955,70 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19812,11 +16093,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19830,6 +16111,68 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19906,7 +16249,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -20034,7 +16377,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -20160,10 +16503,10 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", - "demo": "messaging\/create-msg91provider.md", + "demo": "messaging\/create-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -20264,10 +16607,10 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", - "demo": "messaging\/update-msg91provider.md", + "demo": "messaging\/update-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -20366,7 +16709,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20482,7 +16825,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20592,11 +16935,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20610,6 +16953,92 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -20752,11 +17181,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -20770,6 +17199,88 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -20913,7 +17424,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -21017,7 +17528,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -21119,7 +17630,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21223,7 +17734,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21325,7 +17836,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21429,7 +17940,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21531,7 +18042,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21635,7 +18146,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21735,7 +18246,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21791,7 +18302,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21852,7 +18363,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -21925,7 +18436,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -21998,7 +18509,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -22072,7 +18583,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -22161,7 +18672,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22222,7 +18733,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22302,7 +18813,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22363,7 +18874,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22436,7 +18947,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22518,7 +19029,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22607,7 +19118,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22671,7 +19182,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22743,7 +19254,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -22816,7 +19327,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -23084,7 +19595,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -23134,7 +19645,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -23185,7 +19696,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -23245,7 +19756,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -23508,7 +20019,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -23570,7 +20081,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -23648,7 +20159,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -23729,7 +20240,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -23830,7 +20341,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -23910,7 +20421,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -24017,7 +20528,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -24115,7 +20626,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -24178,7 +20689,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -24246,7 +20757,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -24332,7 +20843,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -24400,7 +20911,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -24472,7 +20983,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -24537,7 +21048,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -24605,7 +21116,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -24665,7 +21176,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -24756,7 +21267,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -24824,7 +21335,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -24917,7 +21428,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -26201,6 +22712,4967 @@ ] } }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tablesdb\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "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 columns: name", + "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 database", + "operationId": "tablesDBCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tablesdb\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "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": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDBGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tablesdb\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tablesdb\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDBListTables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": "tables", + "weight": 382, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: 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": "tablesDBCreateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": "tables", + "weight": 378, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDBGetTable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": "tables", + "weight": 379, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBUpdateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": "tables", + "weight": 380, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "tablesDBDeleteTable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": "tables", + "weight": 381, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDBListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDBUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationshipType", + "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": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "Column size for text columns, 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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + ] + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List indexes on the table.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "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 columns: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDBCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "IndexType", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDBDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "client", + "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 TableDB service [server integration](https:\/\/appwrite.io\/docs\/server\/tablesdbdb#tablesdbCreate).", + "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": "tablesDBCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [], + "Session": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDB", + "desc": "Create rows", + "auth": { + "Project": [], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md" + } + ], + "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\/tablesdb#tablesDBCreate). 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": "Upsert rows", + "operationId": "tablesDBUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md" + } + ], + "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": "tablesDBUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "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" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "client", + "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\/tablesdb#tablesDBCreate).", + "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": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md" + } + ], + "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": "tablesDBUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "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": "tablesDBDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "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 + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "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 + } + } + } + } + ] + } + }, "\/teams": { "get": { "summary": "List teams", @@ -27260,7 +28732,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -27341,7 +28813,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -27426,7 +28898,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -27487,7 +28959,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -27559,7 +29031,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -27792,7 +29264,7 @@ "weight": 188, "cookies": false, "type": "", - "demo": "users\/create-argon2user.md", + "demo": "users\/create-argon-2-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28106,7 +29578,7 @@ "weight": 187, "cookies": false, "type": "", - "demo": "users\/create-m-d5user.md", + "demo": "users\/create-md-5-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28198,7 +29670,7 @@ "weight": 190, "cookies": false, "type": "", - "demo": "users\/create-p-h-pass-user.md", + "demo": "users\/create-ph-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28530,7 +30002,7 @@ "weight": 189, "cookies": false, "type": "", - "demo": "users\/create-s-h-a-user.md", + "demo": "users\/create-sha-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28838,7 +30310,7 @@ "weight": 226, "cookies": false, "type": "", - "demo": "users\/create-j-w-t.md", + "demo": "users\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, "rate-time": 3600, @@ -29150,7 +30622,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfa", "group": "users", @@ -29167,6 +30639,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29225,7 +30757,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -29242,6 +30774,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29298,7 +30888,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -29315,6 +30905,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29358,7 +31004,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -29375,6 +31021,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29418,7 +31120,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -29435,6 +31137,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29478,7 +31236,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -29495,6 +31253,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Key": [] @@ -30888,8 +32702,8 @@ "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": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -30952,7 +32766,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "rowList": { "description": "Rows List", @@ -30960,7 +32775,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rows rows that matched your query.", + "description": "Total number of rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -30977,7 +32792,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -30985,7 +32804,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of documents rows that matched your query.", + "description": "Total number of documents that matched your query.", "x-example": 5, "format": "int32" }, @@ -31002,7 +32821,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -31010,7 +32833,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tables rows that matched your query.", + "description": "Total number of tables that matched your query.", "x-example": 5, "format": "int32" }, @@ -31027,7 +32850,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -31035,7 +32862,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of collections rows that matched your query.", + "description": "Total number of collections that matched your query.", "x-example": 5, "format": "int32" }, @@ -31052,7 +32879,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -31060,7 +32891,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases rows that matched your query.", + "description": "Total number of databases that matched your query.", "x-example": 5, "format": "int32" }, @@ -31077,7 +32908,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -31085,7 +32920,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31102,7 +32937,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -31110,7 +32949,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31127,7 +32966,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -31135,7 +32978,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of users rows that matched your query.", + "description": "Total number of users that matched your query.", "x-example": 5, "format": "int32" }, @@ -31152,7 +32995,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -31160,7 +33007,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions rows that matched your query.", + "description": "Total number of sessions that matched your query.", "x-example": 5, "format": "int32" }, @@ -31177,7 +33024,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -31185,7 +33036,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities rows that matched your query.", + "description": "Total number of identities that matched your query.", "x-example": 5, "format": "int32" }, @@ -31202,7 +33053,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -31210,7 +33065,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs rows that matched your query.", + "description": "Total number of logs that matched your query.", "x-example": 5, "format": "int32" }, @@ -31227,7 +33082,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -31235,7 +33094,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files rows that matched your query.", + "description": "Total number of files that matched your query.", "x-example": 5, "format": "int32" }, @@ -31252,7 +33111,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -31260,7 +33123,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets rows that matched your query.", + "description": "Total number of buckets that matched your query.", "x-example": 5, "format": "int32" }, @@ -31277,7 +33140,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -31285,7 +33152,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens rows that matched your query.", + "description": "Total number of tokens that matched your query.", "x-example": 5, "format": "int32" }, @@ -31302,7 +33169,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -31310,7 +33181,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams rows that matched your query.", + "description": "Total number of teams that matched your query.", "x-example": 5, "format": "int32" }, @@ -31327,7 +33198,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -31335,7 +33210,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships rows that matched your query.", + "description": "Total number of memberships that matched your query.", "x-example": 5, "format": "int32" }, @@ -31352,7 +33227,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -31360,7 +33239,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites rows that matched your query.", + "description": "Total number of sites that matched your query.", "x-example": 5, "format": "int32" }, @@ -31377,7 +33256,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "functionList": { "description": "Functions List", @@ -31385,7 +33268,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions rows that matched your query.", + "description": "Total number of functions that matched your query.", "x-example": 5, "format": "int32" }, @@ -31402,7 +33285,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -31410,7 +33297,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks rows that matched your query.", + "description": "Total number of frameworks that matched your query.", "x-example": 5, "format": "int32" }, @@ -31427,7 +33314,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -31435,7 +33326,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes rows that matched your query.", + "description": "Total number of runtimes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31452,7 +33343,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -31460,7 +33355,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments rows that matched your query.", + "description": "Total number of deployments that matched your query.", "x-example": 5, "format": "int32" }, @@ -31477,7 +33372,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -31485,7 +33384,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions rows that matched your query.", + "description": "Total number of executions that matched your query.", "x-example": 5, "format": "int32" }, @@ -31502,7 +33401,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -31510,7 +33413,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries rows that matched your query.", + "description": "Total number of countries that matched your query.", "x-example": 5, "format": "int32" }, @@ -31527,7 +33430,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -31535,7 +33442,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents rows that matched your query.", + "description": "Total number of continents that matched your query.", "x-example": 5, "format": "int32" }, @@ -31552,7 +33459,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -31560,7 +33471,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages rows that matched your query.", + "description": "Total number of languages that matched your query.", "x-example": 5, "format": "int32" }, @@ -31577,7 +33488,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -31585,7 +33500,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies rows that matched your query.", + "description": "Total number of currencies that matched your query.", "x-example": 5, "format": "int32" }, @@ -31602,7 +33517,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -31610,7 +33529,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones rows that matched your query.", + "description": "Total number of phones that matched your query.", "x-example": 5, "format": "int32" }, @@ -31627,7 +33546,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -31635,7 +33558,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables rows that matched your query.", + "description": "Total number of variables that matched your query.", "x-example": 5, "format": "int32" }, @@ -31652,7 +33575,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -31660,7 +33587,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes rows that matched your query.", + "description": "Total number of localeCodes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31677,7 +33604,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -31685,7 +33616,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers rows that matched your query.", + "description": "Total number of providers that matched your query.", "x-example": 5, "format": "int32" }, @@ -31702,7 +33633,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -31710,7 +33645,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages rows that matched your query.", + "description": "Total number of messages that matched your query.", "x-example": 5, "format": "int32" }, @@ -31727,7 +33662,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -31735,7 +33674,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics rows that matched your query.", + "description": "Total number of topics that matched your query.", "x-example": 5, "format": "int32" }, @@ -31752,7 +33691,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -31760,7 +33703,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers rows that matched your query.", + "description": "Total number of subscribers that matched your query.", "x-example": 5, "format": "int32" }, @@ -31777,7 +33720,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -31785,7 +33732,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets rows that matched your query.", + "description": "Total number of targets that matched your query.", "x-example": 5, "format": "int32" }, @@ -31802,7 +33749,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "specificationList": { "description": "Specifications List", @@ -31810,7 +33761,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications rows that matched your query.", + "description": "Total number of specifications that matched your query.", "x-example": 5, "format": "int32" }, @@ -31827,7 +33778,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "database": { "description": "Database", @@ -31857,6 +33812,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -31864,8 +33824,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -31976,7 +33945,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -32031,7 +34014,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -32106,7 +34093,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -32183,7 +34183,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -32260,7 +34273,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -32322,7 +34348,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -32390,7 +34427,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -32467,7 +34516,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -32535,7 +34597,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -32603,7 +34677,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -32671,7 +34757,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -32763,7 +34861,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -32874,7 +34988,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -32929,7 +35057,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -33004,7 +35136,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -33067,7 +35212,7 @@ }, "default": { "type": "integer", - "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.", "x-example": 10, "format": "int32", "x-nullable": true @@ -33081,7 +35226,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -33144,7 +35302,7 @@ }, "default": { "type": "number", - "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.", "x-example": 2.5, "format": "double", "x-nullable": true @@ -33158,7 +35316,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -33207,7 +35378,7 @@ }, "default": { "type": "boolean", - "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.", "x-example": false, "x-nullable": true } @@ -33220,7 +35391,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -33274,7 +35456,7 @@ }, "default": { "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.", "x-example": "default@example.com", "x-nullable": true } @@ -33288,7 +35470,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -33350,7 +35544,7 @@ }, "default": { "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.", "x-example": "element", "x-nullable": true } @@ -33365,7 +35559,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -33419,7 +35626,7 @@ }, "default": { "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.", "x-example": "192.0.2.0", "x-nullable": true } @@ -33433,7 +35640,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -33501,7 +35720,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -33555,7 +35786,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", + "description": "Default value for column when not provided. Only null is optional", "x-example": "2020-10-15T06:38:00.000+00:00", "x-nullable": true } @@ -33569,7 +35800,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -33661,7 +35904,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -33739,7 +35998,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -33817,7 +36088,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -33832,17 +36115,20 @@ "type": "integer", "description": "Row automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$tableId": { "type": "string", "description": "Table ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -33874,7 +36160,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -33889,17 +36186,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -33931,7 +36231,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -34065,7 +36381,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -34228,7 +36567,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -34242,7 +36607,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -34256,7 +36624,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -34270,7 +36641,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -34284,7 +36658,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -34326,7 +36703,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -34358,7 +36742,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -34393,12 +36783,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -34585,7 +36986,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -34653,7 +37087,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -34697,7 +37143,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -34711,7 +37165,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -34761,7 +37218,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -34781,7 +37247,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -34863,7 +37333,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -34955,7 +37440,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -35005,7 +37509,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -35057,7 +37570,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -35148,7 +37672,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -35335,7 +37876,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -35525,7 +38097,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "runtime": { "description": "Runtime", @@ -35584,7 +38186,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -35640,7 +38252,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -35678,7 +38308,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -35852,7 +38489,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -35870,7 +38536,7 @@ }, "$updatedAt": { "type": "string", - "description": "Execution upate date in ISO 8601 format.", + "description": "Execution update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$permissions": { @@ -35888,6 +38554,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -35974,6 +38645,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -35985,7 +38657,37 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "variable": { "description": "Variable", @@ -36041,7 +38743,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -36061,7 +38773,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -36081,7 +38797,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -36107,7 +38827,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -36159,7 +38884,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -36185,7 +38919,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -36205,7 +38944,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -36220,7 +38963,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -36247,7 +38993,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -36291,7 +39042,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -36320,7 +39079,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "headers": { "description": "Headers", @@ -36340,7 +39104,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -36374,7 +39142,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -36406,7 +39180,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -36426,7 +39206,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -36446,7 +39232,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -36478,7 +39268,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -36545,7 +39341,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -36656,7 +39467,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -36718,7 +39555,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -36793,7 +39640,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -36855,7 +39722,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "externalDocs": { diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index f875b23616..efeb167a24 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -442,7 +442,7 @@ "weight": 30, "cookies": false, "type": "", - "demo": "account\/create-j-w-t.md", + "demo": "account\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, "rate-time": 3600, @@ -558,7 +558,7 @@ "weight": 45, "cookies": false, "type": "", - "demo": "account\/update-m-f-a.md", + "demo": "account\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, "rate-time": 3600, @@ -624,7 +624,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", @@ -642,6 +642,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -690,7 +744,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", @@ -708,6 +762,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -769,7 +881,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -787,6 +899,58 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -837,7 +1001,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", @@ -855,6 +1019,60 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -914,7 +1132,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", @@ -932,6 +1150,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -992,7 +1268,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -1010,6 +1286,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md" + } + ], "auth": { "Project": [] } @@ -1043,7 +1365,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -1061,6 +1383,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1094,7 +1462,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -1112,6 +1480,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1145,7 +1559,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -1163,6 +1577,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1953,7 +2413,7 @@ "weight": 27, "cookies": false, "type": "", - "demo": "account\/update-magic-u-r-l-session.md", + "demo": "account\/update-magic-url-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, "rate-time": 3600, @@ -1964,6 +2424,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2026,7 +2490,7 @@ "weight": 20, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2session.md", + "demo": "account\/create-o-auth-2-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2174,6 +2638,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2751,7 +3219,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2799,7 +3267,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2854,7 +3322,7 @@ "weight": 25, "cookies": false, "type": "", - "demo": "account\/create-magic-u-r-l-token.md", + "demo": "account\/create-magic-url-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, "rate-time": 3600, @@ -2886,7 +3354,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2942,7 +3410,7 @@ "weight": 24, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2token.md", + "demo": "account\/create-o-auth-2-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -3111,7 +3579,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3592,7 +4060,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3609,7 +4077,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3629,7 +4097,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -4417,7 +4885,7 @@ "weight": 65, "cookies": false, "type": "location", - "demo": "avatars\/get-q-r.md", + "demo": "avatars\/get-qr.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, "rate-time": 3600, @@ -4504,7 +4972,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -4520,7 +4988,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDB.listRows" }, "auth": { "Project": [] @@ -4589,7 +5057,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -4605,12 +5073,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -4634,9 +5103,10 @@ } ], "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.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" } } ], @@ -4734,7 +5204,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -4750,7 +5220,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [] @@ -4803,7 +5273,7 @@ ] }, "put": { - "summary": "Create or update a document", + "summary": "Upsert a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -4814,7 +5284,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 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": "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": { "201": { "description": "Document", @@ -4827,7 +5297,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -4843,12 +5313,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4871,10 +5342,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": "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.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -4968,7 +5440,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -4984,7 +5456,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [] @@ -5068,7 +5540,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -5084,7 +5556,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDB.deleteRow" }, "auth": { "Project": [] @@ -5125,89 +5597,10 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "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": "gridsCreateRow", + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", "consumes": [ "application\/json" ], @@ -5215,64 +5608,40 @@ "application\/json" ], "tags": [ - "grids" + "databases" ], - "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.", + "description": "Decrement a specific attribute of a document by a given value.", "responses": { - "201": { - "description": "Row", + "200": { + "description": "Document", "schema": { - "$ref": "#\/definitions\/row" + "$ref": "#\/definitions\/document" } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 343, "cookies": false, "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", + "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": "rows.write", + "scope": "documents.write", "platforms": [ "client", - "server" + "server", + "console" ], "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "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." - } - ], + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.decrementRowColumn" + }, "auth": { "Project": [] } @@ -5294,11 +5663,26 @@ "in": "path" }, { - "name": "tableId", - "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.", + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", "required": true, "type": "string", - "x-example": "", "in": "path" }, { @@ -5307,35 +5691,17 @@ "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": "" + "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.", - "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).", + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", "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" - } + "x-example": null } } } @@ -5343,226 +5709,10 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "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": "gridsUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "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" - }, - { - "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" - } - } - } - } - } - ] - }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", "consumes": [ "application\/json" ], @@ -5570,35 +5720,40 @@ "application\/json" ], "tags": [ - "grids" + "databases" ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Increment a specific attribute of a document by a given value.", "responses": { "200": { - "description": "Row", + "description": "Document", "schema": { - "$ref": "#\/definitions\/row" + "$ref": "#\/definitions\/document" } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 342, "cookies": false, "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", + "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": "rows.write", + "scope": "documents.write", "platforms": [ "client", - "server" + "server", + "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.incrementRowColumn" + }, "auth": { "Project": [] } @@ -5620,19 +5775,26 @@ "in": "path" }, { - "name": "tableId", - "description": "Table ID.", + "name": "collectionId", + "description": "Collection ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "rowId", - "description": "Row ID.", + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", "required": true, "type": "string", - "x-example": "", "in": "path" }, { @@ -5641,97 +5803,22 @@ "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": "{}" + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "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).", + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } + "x-example": null } } } } ] - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] } }, "\/functions\/{functionId}\/executions": { @@ -5758,7 +5845,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -5831,7 +5918,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -5891,7 +5978,7 @@ }, "method": { "type": "string", - "description": "HTTP method of execution. Default value is GET.", + "description": "HTTP method of execution. Default value is POST.", "default": "POST", "x-example": "GET", "enum": [ @@ -5900,7 +5987,8 @@ "PUT", "PATCH", "DELETE", - "OPTIONS" + "OPTIONS", + "HEAD" ], "x-enum-name": "ExecutionMethod", "x-enum-keys": [] @@ -5947,7 +6035,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -6018,7 +6106,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -6091,7 +6179,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -6369,7 +6457,7 @@ "weight": 73, "cookies": false, "type": "", - "demo": "locale\/list-countries-e-u.md", + "demo": "locale\/list-countries-eu.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, @@ -6572,7 +6660,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -6656,7 +6744,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -7461,6 +7549,859 @@ ] } }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "client", + "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 TableDB service [server integration](https:\/\/appwrite.io\/docs\/server\/tablesdbdb#tablesdbCreate).", + "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": "tablesDBCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md" + } + ], + "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\/tablesdb#tablesDBCreate). 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" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "client", + "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\/tablesdb#tablesDBCreate).", + "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": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md" + } + ], + "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 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": "tablesDBUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "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": "tablesDBDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "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": "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 + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "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": "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 + } + } + } + } + ] + } + }, "\/teams": { "get": { "summary": "List teams", @@ -8488,8 +9429,8 @@ "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": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -8552,7 +9493,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "rowList": { "description": "Rows List", @@ -8560,7 +9502,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rows rows that matched your query.", + "description": "Total number of rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8577,7 +9519,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -8585,7 +9531,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of documents rows that matched your query.", + "description": "Total number of documents that matched your query.", "x-example": 5, "format": "int32" }, @@ -8602,7 +9548,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "sessionList": { "description": "Sessions List", @@ -8610,7 +9560,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions rows that matched your query.", + "description": "Total number of sessions that matched your query.", "x-example": 5, "format": "int32" }, @@ -8627,7 +9577,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -8635,7 +9589,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities rows that matched your query.", + "description": "Total number of identities that matched your query.", "x-example": 5, "format": "int32" }, @@ -8652,7 +9606,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -8660,7 +9618,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs rows that matched your query.", + "description": "Total number of logs that matched your query.", "x-example": 5, "format": "int32" }, @@ -8677,7 +9635,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -8685,7 +9647,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files rows that matched your query.", + "description": "Total number of files that matched your query.", "x-example": 5, "format": "int32" }, @@ -8702,7 +9664,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "teamList": { "description": "Teams List", @@ -8710,7 +9676,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams rows that matched your query.", + "description": "Total number of teams that matched your query.", "x-example": 5, "format": "int32" }, @@ -8727,7 +9693,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -8735,7 +9705,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships rows that matched your query.", + "description": "Total number of memberships that matched your query.", "x-example": 5, "format": "int32" }, @@ -8752,7 +9722,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "executionList": { "description": "Executions List", @@ -8760,7 +9734,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions rows that matched your query.", + "description": "Total number of executions that matched your query.", "x-example": 5, "format": "int32" }, @@ -8777,7 +9751,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -8785,7 +9763,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries rows that matched your query.", + "description": "Total number of countries that matched your query.", "x-example": 5, "format": "int32" }, @@ -8802,7 +9780,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -8810,7 +9792,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents rows that matched your query.", + "description": "Total number of continents that matched your query.", "x-example": 5, "format": "int32" }, @@ -8827,7 +9809,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -8835,7 +9821,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages rows that matched your query.", + "description": "Total number of languages that matched your query.", "x-example": 5, "format": "int32" }, @@ -8852,7 +9838,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -8860,7 +9850,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies rows that matched your query.", + "description": "Total number of currencies that matched your query.", "x-example": 5, "format": "int32" }, @@ -8877,7 +9867,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -8885,7 +9879,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones rows that matched your query.", + "description": "Total number of phones that matched your query.", "x-example": 5, "format": "int32" }, @@ -8902,7 +9896,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -8910,7 +9908,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes rows that matched your query.", + "description": "Total number of localeCodes that matched your query.", "x-example": 5, "format": "int32" }, @@ -8927,7 +9925,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "row": { "description": "Row", @@ -8942,17 +9944,20 @@ "type": "integer", "description": "Row automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$tableId": { "type": "string", "description": "Table ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -8984,7 +9989,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -9044,7 +10060,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -9178,7 +10210,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -9341,7 +10396,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -9355,7 +10436,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -9369,7 +10453,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -9383,7 +10470,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -9397,7 +10487,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -9439,7 +10532,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -9471,7 +10571,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -9506,12 +10612,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -9698,7 +10815,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -9766,7 +10916,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -9810,7 +10972,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -9824,7 +10994,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -9874,7 +11047,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -9894,7 +11076,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -9976,7 +11162,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "team": { "description": "Team", @@ -10028,7 +11229,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -10119,7 +11331,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "execution": { "description": "Execution", @@ -10137,7 +11366,7 @@ }, "$updatedAt": { "type": "string", - "description": "Execution upate date in ISO 8601 format.", + "description": "Execution update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$permissions": { @@ -10155,6 +11384,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -10241,6 +11475,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -10252,7 +11487,37 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "country": { "description": "Country", @@ -10272,7 +11537,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -10292,7 +11561,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -10318,7 +11591,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -10370,7 +11648,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -10396,7 +11683,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "headers": { "description": "Headers", @@ -10416,7 +11708,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -10448,7 +11744,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -10468,7 +11770,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -10488,7 +11796,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -10520,7 +11832,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "subscriber": { "description": "Subscriber", @@ -10595,7 +11913,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -10657,7 +11995,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "externalDocs": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index d44f1ee6cb..788279b595 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -487,7 +487,7 @@ "weight": 30, "cookies": false, "type": "", - "demo": "account\/create-j-w-t.md", + "demo": "account\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, "rate-time": 3600, @@ -602,7 +602,7 @@ "weight": 45, "cookies": false, "type": "", - "demo": "account\/update-m-f-a.md", + "demo": "account\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, "rate-time": 3600, @@ -667,7 +667,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", @@ -685,6 +685,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -732,7 +786,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", @@ -750,6 +804,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -810,7 +922,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -828,6 +940,58 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -877,7 +1041,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", @@ -895,6 +1059,60 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -954,7 +1172,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", @@ -972,6 +1190,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -1031,7 +1307,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -1049,6 +1325,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md" + } + ], "auth": { "Project": [] } @@ -1081,7 +1403,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -1099,6 +1421,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1131,7 +1499,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -1149,6 +1517,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1181,7 +1595,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -1199,6 +1613,52 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -1979,7 +2439,7 @@ "weight": 27, "cookies": false, "type": "", - "demo": "account\/update-magic-u-r-l-session.md", + "demo": "account\/update-magic-url-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, "rate-time": 3600, @@ -1990,6 +2450,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2052,7 +2516,7 @@ "weight": 20, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2session.md", + "demo": "account\/create-o-auth-2-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2200,6 +2664,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2770,7 +3238,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2818,7 +3286,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2873,7 +3341,7 @@ "weight": 25, "cookies": false, "type": "", - "demo": "account\/create-magic-u-r-l-token.md", + "demo": "account\/create-magic-url-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, "rate-time": 3600, @@ -2905,7 +3373,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2961,7 +3429,7 @@ "weight": 24, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2token.md", + "demo": "account\/create-o-auth-2-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -3130,7 +3598,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3607,7 +4075,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3624,7 +4092,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3644,7 +4112,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -4432,7 +4900,7 @@ "weight": 65, "cookies": false, "type": "location", - "demo": "avatars\/get-q-r.md", + "demo": "avatars\/get-qr.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, "rate-time": 3600, @@ -4521,7 +4989,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -4584,7 +5052,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 480, + "weight": 488, "cookies": false, "type": "", "demo": "console\/get-resource.md", @@ -4655,7 +5123,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -4703,7 +5171,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4718,12 +5186,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4739,29 +5208,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "queries", - "search" - ], - "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." } ], "auth": { @@ -4823,7 +5274,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4838,12 +5289,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4863,33 +5315,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4948,7 +5378,7 @@ "tags": [ "databases" ], - "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, 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.", "responses": { "200": { "description": "UsageDatabases", @@ -4961,7 +5391,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 323, + "weight": 324, "cookies": false, "type": "", "demo": "databases\/list-usage.md", @@ -4976,12 +5406,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDB.listUsage" }, "methods": [ { "name": "listUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4995,29 +5426,12 @@ "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, 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.", + "demo": "databases\/list-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDB.listUsage" } - }, - { - "name": "listDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "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, 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": { @@ -5041,7 +5455,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -5077,7 +5491,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -5092,12 +5506,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5114,30 +5529,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "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." } ], "auth": { @@ -5186,7 +5582,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -5201,12 +5597,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5226,33 +5623,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -5320,7 +5695,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -5335,12 +5710,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5356,29 +5732,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -5427,7 +5785,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -5442,7 +5800,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDB.listTables" }, "auth": { "Project": [] @@ -5511,7 +5869,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -5526,7 +5884,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDB.createTable" }, "auth": { "Project": [] @@ -5620,7 +5978,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5635,7 +5993,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDB.getTable" }, "auth": { "Project": [] @@ -5691,7 +6049,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5706,7 +6064,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDB.updateTable" }, "auth": { "Project": [] @@ -5796,7 +6154,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5811,7 +6169,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDB.deleteTable" }, "auth": { "Project": [] @@ -5867,7 +6225,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5882,7 +6240,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDB.listColumns" }, "auth": { "Project": [] @@ -5952,7 +6310,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5967,7 +6325,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDB.createBooleanColumn" }, "auth": { "Project": [] @@ -6062,7 +6420,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -6077,7 +6435,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDB.updateBooleanColumn" }, "auth": { "Project": [] @@ -6174,7 +6532,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -6189,7 +6547,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDB.createDatetimeColumn" }, "auth": { "Project": [] @@ -6284,7 +6642,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -6299,7 +6657,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDB.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6396,7 +6754,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -6411,7 +6769,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDB.createEmailColumn" }, "auth": { "Project": [] @@ -6506,7 +6864,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -6521,7 +6879,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDB.updateEmailColumn" }, "auth": { "Project": [] @@ -6618,7 +6976,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6633,7 +6991,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDB.createEnumColumn" }, "auth": { "Project": [] @@ -6738,7 +7096,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6753,7 +7111,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDB.updateEnumColumn" }, "auth": { "Project": [] @@ -6860,7 +7218,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6875,7 +7233,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDB.createFloatColumn" }, "auth": { "Project": [] @@ -6982,7 +7340,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6997,7 +7355,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDB.updateFloatColumn" }, "auth": { "Project": [] @@ -7106,7 +7464,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -7121,7 +7479,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDB.createIntegerColumn" }, "auth": { "Project": [] @@ -7228,7 +7586,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -7243,7 +7601,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDB.updateIntegerColumn" }, "auth": { "Project": [] @@ -7352,7 +7710,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -7367,7 +7725,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDB.createIpColumn" }, "auth": { "Project": [] @@ -7462,7 +7820,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -7477,7 +7835,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDB.updateIpColumn" }, "auth": { "Project": [] @@ -7574,7 +7932,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -7589,7 +7947,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDB.createRelationshipColumn" }, "auth": { "Project": [] @@ -7711,7 +8069,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7726,7 +8084,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDB.createStringColumn" }, "auth": { "Project": [] @@ -7834,7 +8192,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7849,7 +8207,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDB.updateStringColumn" }, "auth": { "Project": [] @@ -7952,7 +8310,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7967,7 +8325,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDB.createUrlColumn" }, "auth": { "Project": [] @@ -8062,7 +8420,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -8077,7 +8435,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDB.updateUrlColumn" }, "auth": { "Project": [] @@ -8203,7 +8561,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -8218,7 +8576,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDB.getColumn" }, "auth": { "Project": [] @@ -8276,7 +8634,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -8291,7 +8649,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDB.deleteColumn" }, "auth": { "Project": [] @@ -8356,7 +8714,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -8371,7 +8729,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDB.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8462,7 +8820,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -8478,7 +8836,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDB.listRows" }, "auth": { "Project": [] @@ -8547,7 +8905,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -8563,12 +8921,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -8592,14 +8951,16 @@ } ], "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.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [] }, @@ -8619,10 +8980,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": "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.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDB.createRows" } } ], @@ -8696,7 +9058,7 @@ ] }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "consumes": [ "application\/json" @@ -8707,7 +9069,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.\n", + "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": { "201": { "description": "Documents List", @@ -8720,7 +9082,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8736,12 +9098,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -8761,10 +9124,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": "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", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" } } ], @@ -8830,7 +9194,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\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.", + "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.", "responses": { "200": { "description": "Documents List", @@ -8843,7 +9207,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8859,7 +9223,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDB.updateRows" }, "auth": { "Project": [] @@ -8926,7 +9290,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\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8939,7 +9303,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8955,7 +9319,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDB.deleteRows" }, "auth": { "Project": [] @@ -9029,7 +9393,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -9045,7 +9409,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [] @@ -9098,7 +9462,7 @@ ] }, "put": { - "summary": "Create or update a document", + "summary": "Upsert a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -9109,7 +9473,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 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": "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": { "201": { "description": "Document", @@ -9122,7 +9486,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -9138,12 +9502,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -9166,10 +9531,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": "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.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -9263,7 +9629,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -9279,7 +9645,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [] @@ -9363,7 +9729,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -9379,7 +9745,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDB.deleteRow" }, "auth": { "Project": [] @@ -9444,7 +9810,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/list-document-logs.md", @@ -9459,7 +9825,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRowLogs" + "replaceWith": "tablesDB.listRowLogs" }, "auth": { "Project": [] @@ -9536,7 +9902,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -9546,13 +9912,14 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", - "server" + "client", + "server", + "console" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDB.decrementRowColumn" }, "auth": { "Project": [] @@ -9561,6 +9928,7 @@ "security": [ { "Project": [], + "JWT": [], "Key": [] } ], @@ -9646,7 +10014,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -9656,13 +10024,14 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", - "server" + "client", + "server", + "console" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDB.incrementRowColumn" }, "auth": { "Project": [] @@ -9671,6 +10040,7 @@ "security": [ { "Project": [], + "JWT": [], "Key": [] } ], @@ -9754,7 +10124,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9769,7 +10139,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDB.listIndexes" }, "auth": { "Project": [] @@ -9837,7 +10207,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9852,7 +10222,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDB.createIndex" }, "auth": { "Project": [] @@ -9968,7 +10338,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9983,7 +10353,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDB.getIndex" }, "auth": { "Project": [] @@ -10041,7 +10411,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -10056,7 +10426,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDB.deleteIndex" }, "auth": { "Project": [] @@ -10119,7 +10489,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "demo": "databases\/list-collection-logs.md", @@ -10134,7 +10504,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTableLogs" + "replaceWith": "tablesDB.listTableLogs" }, "auth": { "Project": [] @@ -10201,7 +10571,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 330, + "weight": 331, "cookies": false, "type": "", "demo": "databases\/get-collection-usage.md", @@ -10216,7 +10586,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTableUsage" + "replaceWith": "tablesDB.getTableUsage" }, "auth": { "Project": [] @@ -10247,7 +10617,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -10267,4666 +10637,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Tables List", - "schema": { - "$ref": "#\/definitions\/tableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsCreateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsUpdateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteTable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "schema": { - "$ref": "#\/definitions\/columnList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationshipType", - "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": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - ] - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteColumn", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "schema": { - "$ref": "#\/definitions\/columnIndexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "gridsCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "IndexType", - "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}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "gridsDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { - "get": { - "summary": "List table logs", - "operationId": "gridsListTableLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get the table activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTableLogs", - "group": "tables", - "weight": 375, - "cookies": false, - "type": "", - "demo": "grids\/list-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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "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": "gridsCreateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "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", - "namespace": "grids", - "auth": { - "Project": [] - }, - "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\/tables#tablesCreate). 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": "gridsUpsertRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "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": "gridsUpdateRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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": "gridsDeleteRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "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": "gridsUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "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": "gridsUpdateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "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": "gridsDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { - "get": { - "summary": "List row logs", - "operationId": "gridsListRowLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get the row activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRowLogs", - "group": "logs", - "weight": 413, - "cookies": false, - "type": "", - "demo": "grids\/list-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}", - "scope": "rows.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": "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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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}\/grids\/tables\/{tableId}\/usage": { - "get": { - "summary": "Get table usage stats", - "operationId": "gridsGetTableUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "UsageTable", - "schema": { - "$ref": "#\/definitions\/usageTable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTableUsage", - "group": null, - "weight": 376, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "GridUsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, "\/databases\/{databaseId}\/logs": { "get": { "summary": "List database logs", @@ -14951,7 +10661,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "demo": "databases\/list-logs.md", @@ -14966,12 +10676,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDB.listDatabaseLogs" }, "methods": [ { "name": "listLogs", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -14989,31 +10700,11 @@ } ], "description": "Get the database activity logs list by its unique ID.", + "demo": "databases\/list-logs.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDB.listDatabaseLogs" } - }, - { - "name": "listDatabaseLogs", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "queries" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/logList" - } - ], - "description": "" } ], "auth": { @@ -15052,7 +10743,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetDatabaseUsage", + "operationId": "databasesGetUsage", "consumes": [], "produces": [ "application\/json" @@ -15071,12 +10762,12 @@ }, "deprecated": true, "x-appwrite": { - "method": "getDatabaseUsage", + "method": "getUsage", "group": null, - "weight": 322, + "weight": 323, "cookies": false, "type": "", - "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, @@ -15088,12 +10779,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDB.getUsage" }, "methods": [ { - "name": "getDatabaseUsage", + "name": "getUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -15111,31 +10803,11 @@ } ], "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.", + "demo": "databases\/get-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDB.getUsage" } - }, - { - "name": "getDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageDatabase" - } - ], - "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": { @@ -15167,7 +10839,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15203,7 +10875,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -15275,7 +10947,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -15526,7 +11198,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -15575,7 +11247,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -15625,7 +11297,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 450, + "weight": 458, "cookies": false, "type": "", "demo": "functions\/list-templates.md", @@ -15719,7 +11391,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 449, + "weight": 457, "cookies": false, "type": "", "demo": "functions\/get-template.md", @@ -15777,7 +11449,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 443, + "weight": 451, "cookies": false, "type": "", "demo": "functions\/list-usage.md", @@ -15811,7 +11483,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15847,7 +11519,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -15906,7 +11578,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -16153,7 +11825,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -16214,7 +11886,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -16291,7 +11963,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -16371,7 +12043,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -16463,7 +12135,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -16548,7 +12220,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -16654,7 +12326,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -16750,7 +12422,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -16812,7 +12484,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -16879,7 +12551,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -16964,7 +12636,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -17031,7 +12703,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -17104,7 +12776,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -17164,7 +12836,7 @@ }, "method": { "type": "string", - "description": "HTTP method of execution. Default value is GET.", + "description": "HTTP method of execution. Default value is POST.", "default": "POST", "x-example": "GET", "enum": [ @@ -17173,7 +12845,8 @@ "PUT", "PATCH", "DELETE", - "OPTIONS" + "OPTIONS", + "HEAD" ], "x-enum-name": "ExecutionMethod", "x-enum-keys": [] @@ -17220,7 +12893,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -17284,7 +12957,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -17351,7 +13024,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 442, + "weight": 450, "cookies": false, "type": "", "demo": "functions\/get-usage.md", @@ -17393,7 +13066,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -17429,7 +13102,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -17488,7 +13161,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -17578,7 +13251,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -17645,7 +13318,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -17737,7 +13410,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -17806,7 +13479,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -17879,7 +13552,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -18158,7 +13831,7 @@ "weight": 80, "cookies": false, "type": "", - "demo": "health\/get-d-b.md", + "demo": "health\/get-db.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, "rate-time": 3600, @@ -19420,7 +15093,7 @@ "weight": 73, "cookies": false, "type": "", - "demo": "locale\/list-countries-e-u.md", + "demo": "locale\/list-countries-eu.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, @@ -19621,7 +15294,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -19696,7 +15369,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -19854,7 +15527,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -20009,7 +15682,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -20204,7 +15877,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -20394,11 +16067,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -20412,6 +16085,74 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md" + } + ], "auth": { "Project": [] } @@ -20512,11 +16253,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -20530,6 +16271,72 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md" + } + ], "auth": { "Project": [] } @@ -20630,7 +16437,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -20685,7 +16492,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -20745,7 +16552,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -20817,7 +16624,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -20889,7 +16696,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -20960,11 +16767,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -20978,6 +16785,76 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md" + } + ], "auth": { "Project": [] } @@ -21075,11 +16952,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -21093,6 +16970,74 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md" + } + ], "auth": { "Project": [] } @@ -21188,11 +17133,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -21206,6 +17151,68 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md" + } + ], "auth": { "Project": [] } @@ -21279,11 +17286,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -21297,6 +17304,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md" + } + ], "auth": { "Project": [] } @@ -21372,7 +17439,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -21499,7 +17566,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -21624,10 +17691,10 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", - "demo": "messaging\/create-msg91provider.md", + "demo": "messaging\/create-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -21727,10 +17794,10 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", - "demo": "messaging\/update-msg91provider.md", + "demo": "messaging\/update-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -21828,7 +17895,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -21943,7 +18010,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -22052,11 +18119,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -22070,6 +18137,90 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md" + } + ], "auth": { "Project": [] } @@ -22211,11 +18362,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -22229,6 +18380,86 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md" + } + ], "auth": { "Project": [] } @@ -22371,7 +18602,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -22474,7 +18705,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -22575,7 +18806,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -22678,7 +18909,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -22779,7 +19010,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -22882,7 +19113,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -22983,7 +19214,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -23086,7 +19317,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -23185,7 +19416,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -23240,7 +19471,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -23300,7 +19531,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -23372,7 +19603,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -23444,7 +19675,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -23517,7 +19748,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -23605,7 +19836,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -23665,7 +19896,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -23744,7 +19975,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -23804,7 +20035,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -23876,7 +20107,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -23957,7 +20188,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -24044,7 +20275,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -24107,7 +20338,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -24177,7 +20408,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 262, + "weight": 263, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -24250,7 +20481,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 257, + "weight": 258, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -24342,7 +20573,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 264, + "weight": 265, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -24430,7 +20661,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 261, + "weight": 262, "cookies": false, "type": "", "demo": "migrations\/create-csv-migration.md", @@ -24476,6 +20707,12 @@ "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", "default": null, "x-example": "[ID1:ID2]" + }, + "internalFile": { + "type": "boolean", + "description": "Is the file stored in an internal bucket?", + "default": false, + "x-example": false } }, "required": [ @@ -24514,7 +20751,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 258, + "weight": 259, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -24592,7 +20829,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 265, + "weight": 266, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -24663,7 +20900,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 260, + "weight": 261, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -24782,7 +21019,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 267, + "weight": 268, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -24902,7 +21139,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 259, + "weight": 260, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -25014,7 +21251,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 266, + "weight": 267, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -25125,7 +21362,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 263, + "weight": 264, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -25183,7 +21420,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 268, + "weight": 269, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -25236,7 +21473,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 269, + "weight": 270, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -26161,7 +22398,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApiStatus", "group": "projects", @@ -26178,6 +22415,68 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatus" + }, + "methods": [ + { + "name": "updateApiStatus", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "api", + "status" + ], + "required": [ + "projectId", + "api", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/project" + } + ], + "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", + "demo": "projects\/update-api-status.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatus" + } + }, + { + "name": "updateAPIStatus", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "api", + "status" + ], + "required": [ + "projectId", + "api", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/project" + } + ], + "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", + "demo": "projects\/update-api-status.md" + } + ], "auth": { "Project": [] } @@ -26253,7 +22552,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", @@ -26270,6 +22569,64 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatusAll" + }, + "methods": [ + { + "name": "updateApiStatusAll", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "status" + ], + "required": [ + "projectId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/project" + } + ], + "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", + "demo": "projects\/update-api-status-all.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateAPIStatusAll" + } + }, + { + "name": "updateAPIStatusAll", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "status" + ], + "required": [ + "projectId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/project" + } + ], + "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", + "demo": "projects\/update-api-status-all.md" + } + ], "auth": { "Project": [] } @@ -27227,7 +23584,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 419, + "weight": 427, "cookies": false, "type": "", "demo": "projects\/list-dev-keys.md", @@ -27297,7 +23654,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 416, + "weight": 424, "cookies": false, "type": "", "demo": "projects\/create-dev-key.md", @@ -27380,7 +23737,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 418, + "weight": 426, "cookies": false, "type": "", "demo": "projects\/get-dev-key.md", @@ -27446,7 +23803,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 417, + "weight": 425, "cookies": false, "type": "", "demo": "projects\/update-dev-key.md", @@ -27532,7 +23889,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 420, + "weight": 428, "cookies": false, "type": "", "demo": "projects\/delete-dev-key.md", @@ -27603,7 +23960,7 @@ "weight": 134, "cookies": false, "type": "", - "demo": "projects\/create-j-w-t.md", + "demo": "projects\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-jwt.md", "rate-limit": 0, "rate-time": 3600, @@ -28067,7 +24424,7 @@ "weight": 111, "cookies": false, "type": "", - "demo": "projects\/update-o-auth2.md", + "demo": "projects\/update-o-auth-2.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-oauth2.md", "rate-limit": 0, "rate-time": 3600, @@ -28657,7 +25014,7 @@ "account", "avatars", "databases", - "tables", + "tablesdb", "locale", "health", "storage", @@ -28787,7 +25144,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmtp", "group": "templates", @@ -28804,6 +25161,80 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMTP" + }, + "methods": [ + { + "name": "updateSmtp", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "enabled", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "enabled" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/project" + } + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", + "demo": "projects\/update-smtp.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMTP" + } + }, + { + "name": "updateSMTP", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "enabled", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "enabled" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/project" + } + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", + "demo": "projects\/update-smtp.md" + } + ], "auth": { "Project": [] } @@ -28916,7 +25347,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSmtpTest", "group": "templates", @@ -28933,6 +25364,84 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.createSMTPTest" + }, + "methods": [ + { + "name": "createSmtpTest", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "host" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Send a test email to verify SMTP configuration. ", + "demo": "projects\/create-smtp-test.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.createSMTPTest" + } + }, + { + "name": "createSMTPTest", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "replyTo", + "host", + "port", + "username", + "password", + "secure" + ], + "required": [ + "projectId", + "emails", + "senderName", + "senderEmail", + "host" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Send a test email to verify SMTP configuration. ", + "demo": "projects\/create-smtp-test.md" + } + ], "auth": { "Project": [] } @@ -29833,7 +26342,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getSmsTemplate", "group": "templates", @@ -29850,6 +26359,68 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.getSMSTemplate" + }, + "methods": [ + { + "name": "getSmsTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/smsTemplate" + } + ], + "description": "Get a custom SMS template for the specified locale and type returning it's contents.", + "demo": "projects\/get-sms-template.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.getSMSTemplate" + } + }, + { + "name": "getSMSTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/smsTemplate" + } + ], + "description": "Get a custom SMS template for the specified locale and type returning it's contents.", + "demo": "projects\/get-sms-template.md" + } + ], "auth": { "Project": [] } @@ -30050,7 +26621,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", @@ -30067,6 +26638,72 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMSTemplate" + }, + "methods": [ + { + "name": "updateSmsTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale", + "message" + ], + "required": [ + "projectId", + "type", + "locale", + "message" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/smsTemplate" + } + ], + "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", + "demo": "projects\/update-sms-template.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.updateSMSTemplate" + } + }, + { + "name": "updateSMSTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale", + "message" + ], + "required": [ + "projectId", + "type", + "locale", + "message" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/smsTemplate" + } + ], + "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", + "demo": "projects\/update-sms-template.md" + } + ], "auth": { "Project": [] } @@ -30285,7 +26922,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", @@ -30302,6 +26939,68 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.deleteSMSTemplate" + }, + "methods": [ + { + "name": "deleteSmsTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/smsTemplate" + } + ], + "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", + "demo": "projects\/delete-sms-template.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "projects.deleteSMSTemplate" + } + }, + { + "name": "deleteSMSTemplate", + "namespace": "projects", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "projectId", + "type", + "locale" + ], + "required": [ + "projectId", + "type", + "locale" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/smsTemplate" + } + ], + "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", + "demo": "projects\/delete-sms-template.md" + } + ], "auth": { "Project": [] } @@ -31076,10 +27775,10 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 481, + "weight": 489, "cookies": false, "type": "", - "demo": "proxy\/create-a-p-i-rule.md", + "demo": "proxy\/create-api-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, "rate-time": 60, @@ -31146,7 +27845,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 483, + "weight": 491, "cookies": false, "type": "", "demo": "proxy\/create-function-rule.md", @@ -31229,7 +27928,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 484, + "weight": 492, "cookies": false, "type": "", "demo": "proxy\/create-redirect-rule.md", @@ -31349,7 +28048,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 482, + "weight": 490, "cookies": false, "type": "", "demo": "proxy\/create-site-rule.md", @@ -31601,7 +28300,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -31673,7 +28372,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -31940,7 +28639,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -31989,7 +28688,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -32039,7 +28738,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 475, + "weight": 483, "cookies": false, "type": "", "demo": "sites\/list-templates.md", @@ -32133,7 +28832,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 476, + "weight": 484, "cookies": false, "type": "", "demo": "sites\/get-template.md", @@ -32191,7 +28890,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 477, + "weight": 485, "cookies": false, "type": "", "demo": "sites\/list-usage.md", @@ -32225,7 +28924,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -32261,7 +28960,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -32320,7 +29019,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -32582,7 +29281,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -32643,7 +29342,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -32720,7 +29419,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -32800,7 +29499,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -32900,7 +29599,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -32979,7 +29678,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -33085,7 +29784,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -33182,7 +29881,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -33244,7 +29943,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -33311,7 +30010,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -33396,7 +30095,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -33463,7 +30162,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -33534,7 +30233,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -33598,7 +30297,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -33665,7 +30364,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 478, + "weight": 486, "cookies": false, "type": "", "demo": "sites\/get-usage.md", @@ -33707,7 +30406,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -33743,7 +30442,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -33802,7 +30501,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -33892,7 +30591,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -33959,7 +30658,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -34051,7 +30750,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -35371,7 +32070,7 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -35449,7 +32148,5368 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tablesdb\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "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 columns: name", + "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 database", + "operationId": "tablesDBCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tablesdb\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "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": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDBListUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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.", + "responses": { + "200": { + "description": "UsageDatabases", + "schema": { + "$ref": "#\/definitions\/usageDatabases" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 377, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "listUsage", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "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, 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.", + "demo": "tablesdb\/list-usage.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDBGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tablesdb\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tablesdb\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDBListTables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": "tables", + "weight": 382, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: 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": "tablesDBCreateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": "tables", + "weight": 378, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDBGetTable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": "tables", + "weight": 379, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBUpdateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": "tables", + "weight": 380, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "tablesDBDeleteTable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": "tables", + "weight": 381, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDBListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDBUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationshipType", + "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": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "Column size for text columns, 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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + ] + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List indexes on the table.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "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 columns: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDBCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "IndexType", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDBDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesDBListTableLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTableLogs", + "group": "tables", + "weight": 383, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "client", + "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 TableDB service [server integration](https:\/\/appwrite.io\/docs\/server\/tablesdbdb#tablesdbCreate).", + "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": "tablesDBCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDB", + "desc": "Create rows", + "auth": { + "Project": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md" + } + ], + "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\/tablesdb#tablesDBCreate). 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": "Upsert rows", + "operationId": "tablesDBUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md" + } + ], + "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": "tablesDBUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "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" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "client", + "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\/tablesdb#tablesDBCreate).", + "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": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md" + } + ], + "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": "tablesDBUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "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": "tablesDBDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesDBListRowLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 421, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "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": "Table 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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "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 + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "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 + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesDBGetTableUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 384, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDBGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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.", + "responses": { + "200": { + "description": "UsageDatabase", + "schema": { + "$ref": "#\/definitions\/usageDatabase" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 376, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-database-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "getUsage", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabase" + } + ], + "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.", + "demo": "tablesdb\/get-usage.md" + } + ], + "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": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -36564,7 +38624,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -36644,7 +38704,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -36728,7 +38788,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -36788,7 +38848,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -36859,7 +38919,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -37089,7 +39149,7 @@ "weight": 188, "cookies": false, "type": "", - "demo": "users\/create-argon2user.md", + "demo": "users\/create-argon-2-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37399,7 +39459,7 @@ "weight": 187, "cookies": false, "type": "", - "demo": "users\/create-m-d5user.md", + "demo": "users\/create-md-5-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37490,7 +39550,7 @@ "weight": 190, "cookies": false, "type": "", - "demo": "users\/create-p-h-pass-user.md", + "demo": "users\/create-ph-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37819,7 +39879,7 @@ "weight": 189, "cookies": false, "type": "", - "demo": "users\/create-s-h-a-user.md", + "demo": "users\/create-sha-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, "rate-time": 3600, @@ -37960,7 +40020,7 @@ "30d", "90d" ], - "x-enum-name": "UserUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -38193,7 +40253,7 @@ "weight": 226, "cookies": false, "type": "", - "demo": "users\/create-j-w-t.md", + "demo": "users\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, "rate-time": 3600, @@ -38501,7 +40561,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfa", "group": "users", @@ -38518,6 +40578,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md" + } + ], "auth": { "Project": [] } @@ -38575,7 +40693,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -38592,6 +40710,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [] } @@ -38647,7 +40821,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -38664,6 +40838,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md" + } + ], "auth": { "Project": [] } @@ -38706,7 +40934,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -38723,6 +40951,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -38765,7 +41047,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -38782,6 +41064,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -38824,7 +41160,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -38841,6 +41177,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [] } @@ -40957,8 +43347,8 @@ "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": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -41021,7 +43411,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "rowList": { "description": "Rows List", @@ -41029,7 +43420,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rows rows that matched your query.", + "description": "Total number of rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -41046,7 +43437,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -41054,7 +43449,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of documents rows that matched your query.", + "description": "Total number of documents that matched your query.", "x-example": 5, "format": "int32" }, @@ -41071,7 +43466,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -41079,7 +43478,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tables rows that matched your query.", + "description": "Total number of tables that matched your query.", "x-example": 5, "format": "int32" }, @@ -41096,7 +43495,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -41104,7 +43507,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of collections rows that matched your query.", + "description": "Total number of collections that matched your query.", "x-example": 5, "format": "int32" }, @@ -41121,7 +43524,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -41129,7 +43536,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases rows that matched your query.", + "description": "Total number of databases that matched your query.", "x-example": 5, "format": "int32" }, @@ -41146,7 +43553,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -41154,7 +43565,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41171,7 +43582,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -41179,7 +43594,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41196,7 +43611,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -41204,7 +43623,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of users rows that matched your query.", + "description": "Total number of users that matched your query.", "x-example": 5, "format": "int32" }, @@ -41221,7 +43640,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -41229,7 +43652,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions rows that matched your query.", + "description": "Total number of sessions that matched your query.", "x-example": 5, "format": "int32" }, @@ -41246,7 +43669,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -41254,7 +43681,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities rows that matched your query.", + "description": "Total number of identities that matched your query.", "x-example": 5, "format": "int32" }, @@ -41271,7 +43698,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -41279,7 +43710,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs rows that matched your query.", + "description": "Total number of logs that matched your query.", "x-example": 5, "format": "int32" }, @@ -41296,7 +43727,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -41304,7 +43739,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files rows that matched your query.", + "description": "Total number of files that matched your query.", "x-example": 5, "format": "int32" }, @@ -41321,7 +43756,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -41329,7 +43768,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets rows that matched your query.", + "description": "Total number of buckets that matched your query.", "x-example": 5, "format": "int32" }, @@ -41346,7 +43785,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -41354,7 +43797,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens rows that matched your query.", + "description": "Total number of tokens that matched your query.", "x-example": 5, "format": "int32" }, @@ -41371,7 +43814,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -41379,7 +43826,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams rows that matched your query.", + "description": "Total number of teams that matched your query.", "x-example": 5, "format": "int32" }, @@ -41396,7 +43843,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -41404,7 +43855,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships rows that matched your query.", + "description": "Total number of memberships that matched your query.", "x-example": 5, "format": "int32" }, @@ -41421,7 +43872,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -41429,7 +43884,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites rows that matched your query.", + "description": "Total number of sites that matched your query.", "x-example": 5, "format": "int32" }, @@ -41446,7 +43901,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "templateSiteList": { "description": "Site Templates List", @@ -41454,7 +43913,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates rows that matched your query.", + "description": "Total number of templates that matched your query.", "x-example": 5, "format": "int32" }, @@ -41471,7 +43930,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "functionList": { "description": "Functions List", @@ -41479,7 +43942,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions rows that matched your query.", + "description": "Total number of functions that matched your query.", "x-example": 5, "format": "int32" }, @@ -41496,7 +43959,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "templateFunctionList": { "description": "Function Templates List", @@ -41504,7 +43971,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates rows that matched your query.", + "description": "Total number of templates that matched your query.", "x-example": 5, "format": "int32" }, @@ -41521,7 +43988,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "installationList": { "description": "Installations List", @@ -41529,7 +44000,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of installations rows that matched your query.", + "description": "Total number of installations that matched your query.", "x-example": 5, "format": "int32" }, @@ -41546,7 +44017,11 @@ "required": [ "total", "installations" - ] + ], + "example": { + "total": 5, + "installations": "" + } }, "providerRepositoryFrameworkList": { "description": "Framework Provider Repositories List", @@ -41554,7 +44029,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworkProviderRepositories rows that matched your query.", + "description": "Total number of frameworkProviderRepositories that matched your query.", "x-example": 5, "format": "int32" }, @@ -41571,7 +44046,11 @@ "required": [ "total", "frameworkProviderRepositories" - ] + ], + "example": { + "total": 5, + "frameworkProviderRepositories": "" + } }, "providerRepositoryRuntimeList": { "description": "Runtime Provider Repositories List", @@ -41579,7 +44058,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimeProviderRepositories rows that matched your query.", + "description": "Total number of runtimeProviderRepositories that matched your query.", "x-example": 5, "format": "int32" }, @@ -41596,7 +44075,11 @@ "required": [ "total", "runtimeProviderRepositories" - ] + ], + "example": { + "total": 5, + "runtimeProviderRepositories": "" + } }, "branchList": { "description": "Branches List", @@ -41604,7 +44087,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of branches rows that matched your query.", + "description": "Total number of branches that matched your query.", "x-example": 5, "format": "int32" }, @@ -41621,7 +44104,11 @@ "required": [ "total", "branches" - ] + ], + "example": { + "total": 5, + "branches": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -41629,7 +44116,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks rows that matched your query.", + "description": "Total number of frameworks that matched your query.", "x-example": 5, "format": "int32" }, @@ -41646,7 +44133,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -41654,7 +44145,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes rows that matched your query.", + "description": "Total number of runtimes that matched your query.", "x-example": 5, "format": "int32" }, @@ -41671,7 +44162,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -41679,7 +44174,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments rows that matched your query.", + "description": "Total number of deployments that matched your query.", "x-example": 5, "format": "int32" }, @@ -41696,7 +44191,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -41704,7 +44203,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions rows that matched your query.", + "description": "Total number of executions that matched your query.", "x-example": 5, "format": "int32" }, @@ -41721,7 +44220,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "projectList": { "description": "Projects List", @@ -41729,7 +44232,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of projects rows that matched your query.", + "description": "Total number of projects that matched your query.", "x-example": 5, "format": "int32" }, @@ -41746,7 +44249,11 @@ "required": [ "total", "projects" - ] + ], + "example": { + "total": 5, + "projects": "" + } }, "webhookList": { "description": "Webhooks List", @@ -41754,7 +44261,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of webhooks rows that matched your query.", + "description": "Total number of webhooks that matched your query.", "x-example": 5, "format": "int32" }, @@ -41771,7 +44278,11 @@ "required": [ "total", "webhooks" - ] + ], + "example": { + "total": 5, + "webhooks": "" + } }, "keyList": { "description": "API Keys List", @@ -41779,7 +44290,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of keys rows that matched your query.", + "description": "Total number of keys that matched your query.", "x-example": 5, "format": "int32" }, @@ -41796,7 +44307,11 @@ "required": [ "total", "keys" - ] + ], + "example": { + "total": 5, + "keys": "" + } }, "devKeyList": { "description": "Dev Keys List", @@ -41804,7 +44319,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of devKeys rows that matched your query.", + "description": "Total number of devKeys that matched your query.", "x-example": 5, "format": "int32" }, @@ -41821,7 +44336,11 @@ "required": [ "total", "devKeys" - ] + ], + "example": { + "total": 5, + "devKeys": "" + } }, "platformList": { "description": "Platforms List", @@ -41829,7 +44348,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of platforms rows that matched your query.", + "description": "Total number of platforms that matched your query.", "x-example": 5, "format": "int32" }, @@ -41846,7 +44365,11 @@ "required": [ "total", "platforms" - ] + ], + "example": { + "total": 5, + "platforms": "" + } }, "countryList": { "description": "Countries List", @@ -41854,7 +44377,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries rows that matched your query.", + "description": "Total number of countries that matched your query.", "x-example": 5, "format": "int32" }, @@ -41871,7 +44394,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -41879,7 +44406,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents rows that matched your query.", + "description": "Total number of continents that matched your query.", "x-example": 5, "format": "int32" }, @@ -41896,7 +44423,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -41904,7 +44435,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages rows that matched your query.", + "description": "Total number of languages that matched your query.", "x-example": 5, "format": "int32" }, @@ -41921,7 +44452,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -41929,7 +44464,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies rows that matched your query.", + "description": "Total number of currencies that matched your query.", "x-example": 5, "format": "int32" }, @@ -41946,7 +44481,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -41954,7 +44493,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones rows that matched your query.", + "description": "Total number of phones that matched your query.", "x-example": 5, "format": "int32" }, @@ -41971,7 +44510,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -41979,7 +44522,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables rows that matched your query.", + "description": "Total number of variables that matched your query.", "x-example": 5, "format": "int32" }, @@ -41996,7 +44539,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "proxyRuleList": { "description": "Rule List", @@ -42004,7 +44551,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rules rows that matched your query.", + "description": "Total number of rules that matched your query.", "x-example": 5, "format": "int32" }, @@ -42021,7 +44568,11 @@ "required": [ "total", "rules" - ] + ], + "example": { + "total": 5, + "rules": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -42029,7 +44580,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes rows that matched your query.", + "description": "Total number of localeCodes that matched your query.", "x-example": 5, "format": "int32" }, @@ -42046,7 +44597,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -42054,7 +44609,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers rows that matched your query.", + "description": "Total number of providers that matched your query.", "x-example": 5, "format": "int32" }, @@ -42071,7 +44626,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -42079,7 +44638,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages rows that matched your query.", + "description": "Total number of messages that matched your query.", "x-example": 5, "format": "int32" }, @@ -42096,7 +44655,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -42104,7 +44667,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics rows that matched your query.", + "description": "Total number of topics that matched your query.", "x-example": 5, "format": "int32" }, @@ -42121,7 +44684,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -42129,7 +44696,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers rows that matched your query.", + "description": "Total number of subscribers that matched your query.", "x-example": 5, "format": "int32" }, @@ -42146,7 +44713,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -42154,7 +44725,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets rows that matched your query.", + "description": "Total number of targets that matched your query.", "x-example": 5, "format": "int32" }, @@ -42171,7 +44742,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "migrationList": { "description": "Migrations List", @@ -42179,7 +44754,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of migrations rows that matched your query.", + "description": "Total number of migrations that matched your query.", "x-example": 5, "format": "int32" }, @@ -42196,7 +44771,11 @@ "required": [ "total", "migrations" - ] + ], + "example": { + "total": 5, + "migrations": "" + } }, "specificationList": { "description": "Specifications List", @@ -42204,7 +44783,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications rows that matched your query.", + "description": "Total number of specifications that matched your query.", "x-example": 5, "format": "int32" }, @@ -42221,7 +44800,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "vcsContentList": { "description": "VCS Content List", @@ -42229,7 +44812,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of contents rows that matched your query.", + "description": "Total number of contents that matched your query.", "x-example": 5, "format": "int32" }, @@ -42246,7 +44829,11 @@ "required": [ "total", "contents" - ] + ], + "example": { + "total": 5, + "contents": "" + } }, "database": { "description": "Database", @@ -42276,6 +44863,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -42283,8 +44875,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -42395,7 +44996,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -42450,7 +45065,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -42525,7 +45144,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -42602,7 +45234,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -42679,7 +45324,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -42741,7 +45399,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -42809,7 +45478,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -42886,7 +45567,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -42954,7 +45648,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -43022,7 +45728,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -43090,7 +45808,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -43182,7 +45912,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -43293,7 +46039,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -43348,7 +46108,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -43423,7 +46187,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -43486,7 +46263,7 @@ }, "default": { "type": "integer", - "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.", "x-example": 10, "format": "int32", "x-nullable": true @@ -43500,7 +46277,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -43563,7 +46353,7 @@ }, "default": { "type": "number", - "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.", "x-example": 2.5, "format": "double", "x-nullable": true @@ -43577,7 +46367,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -43626,7 +46429,7 @@ }, "default": { "type": "boolean", - "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.", "x-example": false, "x-nullable": true } @@ -43639,7 +46442,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -43693,7 +46507,7 @@ }, "default": { "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.", "x-example": "default@example.com", "x-nullable": true } @@ -43707,7 +46521,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -43769,7 +46595,7 @@ }, "default": { "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.", "x-example": "element", "x-nullable": true } @@ -43784,7 +46610,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -43838,7 +46677,7 @@ }, "default": { "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.", "x-example": "192.0.2.0", "x-nullable": true } @@ -43852,7 +46691,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -43920,7 +46771,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -43974,7 +46837,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", + "description": "Default value for column when not provided. Only null is optional", "x-example": "2020-10-15T06:38:00.000+00:00", "x-nullable": true } @@ -43988,7 +46851,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -44080,7 +46955,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -44158,7 +47049,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -44236,7 +47139,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -44251,17 +47166,20 @@ "type": "integer", "description": "Row automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$tableId": { "type": "string", "description": "Table ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -44293,7 +47211,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -44353,7 +47282,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -44487,7 +47432,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -44650,7 +47618,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -44664,7 +47658,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -44678,7 +47675,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -44692,7 +47692,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -44706,7 +47709,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -44748,7 +47754,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -44780,7 +47793,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -44815,12 +47834,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -45007,7 +48037,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -45075,7 +48138,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -45119,7 +48194,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -45133,7 +48216,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -45183,7 +48269,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -45203,7 +48298,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -45285,7 +48384,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -45377,7 +48491,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -45427,7 +48560,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -45479,7 +48621,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -45570,7 +48723,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -45757,7 +48927,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "templateSite": { "description": "Template Site", @@ -45854,7 +49055,22 @@ "providerOwner", "providerVersion", "variables" - ] + ], + "example": { + "key": "starter", + "name": "Starter site", + "tagline": "Minimal web app integrating with Appwrite.", + "demoUrl": "https:\/\/nextjs-starter.appwrite.network\/", + "screenshotDark": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png", + "screenshotLight": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png", + "useCases": "Starter", + "frameworks": [], + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [] + } }, "templateFramework": { "description": "Template Framework", @@ -45916,7 +49132,18 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/build", + "providerRootDirectory": ".\/svelte-kit\/starter", + "buildRuntime": "node-22", + "adapter": "ssr", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -46106,7 +49333,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "templateFunction": { "description": "Template Function", @@ -46237,7 +49494,26 @@ "providerVersion", "variables", "scopes" - ] + ], + "example": { + "icon": "icon-lightning-bolt", + "id": "starter", + "name": "Starter function", + "tagline": "A simple function to get started.", + "permissions": "any", + "events": "account.create", + "cron": "0 0 * * *", + "timeout": 300, + "useCases": "Starter", + "runtimes": [], + "instructions": "For documentation and instructions check out .", + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [], + "scopes": "users.read" + } }, "templateRuntime": { "description": "Template Runtime", @@ -46269,7 +49545,13 @@ "commands", "entrypoint", "providerRootDirectory" - ] + ], + "example": { + "name": "node-19.0", + "commands": "npm install", + "entrypoint": "index.js", + "providerRootDirectory": "node\/starter" + } }, "templateVariable": { "description": "Template Variable", @@ -46319,7 +49601,16 @@ "placeholder", "required", "type" - ] + ], + "example": { + "name": "APPWRITE_DATABASE_ID", + "description": "The ID of the Appwrite database that contains the collection to sync.", + "value": "512", + "secret": false, + "placeholder": "64a55...7b912", + "required": false, + "type": "password" + } }, "installation": { "description": "Installation", @@ -46363,7 +49654,15 @@ "provider", "organization", "providerInstallationId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "provider": "github", + "organization": "appwrite", + "providerInstallationId": "5322" + } }, "providerRepository": { "description": "ProviderRepository", @@ -46413,7 +49712,16 @@ "private", "defaultBranch", "pushedAt" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime" + } }, "providerRepositoryFramework": { "description": "ProviderRepositoryFramework", @@ -46469,7 +49777,17 @@ "defaultBranch", "pushedAt", "framework" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "framework": "nextjs" + } }, "providerRepositoryRuntime": { "description": "ProviderRepositoryRuntime", @@ -46525,7 +49843,17 @@ "defaultBranch", "pushedAt", "runtime" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "runtime": "node-22" + } }, "detectionFramework": { "description": "DetectionFramework", @@ -46557,7 +49885,13 @@ "installCommand", "buildCommand", "outputDirectory" - ] + ], + "example": { + "framework": "nuxt", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "dist" + } }, "detectionRuntime": { "description": "DetectionRuntime", @@ -46583,7 +49917,12 @@ "runtime", "entrypoint", "commands" - ] + ], + "example": { + "runtime": "node", + "entrypoint": "index.js", + "commands": "npm install && npm run build" + } }, "vcsContent": { "description": "VcsContents", @@ -46610,7 +49949,12 @@ }, "required": [ "name" - ] + ], + "example": { + "size": 1523, + "isDirectory": true, + "name": "Main.java" + } }, "branch": { "description": "Branch", @@ -46624,7 +49968,10 @@ }, "required": [ "name" - ] + ], + "example": { + "name": "main" + } }, "runtime": { "description": "Runtime", @@ -46683,7 +50030,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -46739,7 +50096,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -46777,7 +50152,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -46951,7 +50333,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -46969,7 +50380,7 @@ }, "$updatedAt": { "type": "string", - "description": "Execution upate date in ISO 8601 format.", + "description": "Execution update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$permissions": { @@ -46987,6 +50398,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -47073,6 +50489,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -47084,7 +50501,37 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "project": { "description": "Project", @@ -47384,9 +50831,9 @@ "description": "Databases (legacy) service status", "x-example": true }, - "serviceStatusForTables": { + "serviceStatusForTablesdb": { "type": "boolean", - "description": "Tables service status", + "description": "TablesDB service status", "x-example": true }, "serviceStatusForLocale": { @@ -47488,7 +50935,7 @@ "serviceStatusForAccount", "serviceStatusForAvatars", "serviceStatusForDatabases", - "serviceStatusForTables", + "serviceStatusForTablesdb", "serviceStatusForLocale", "serviceStatusForHealth", "serviceStatusForStorage", @@ -47498,7 +50945,75 @@ "serviceStatusForFunctions", "serviceStatusForGraphql", "serviceStatusForMessaging" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authMockNumbers": [ + {} + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + {} + ], + "platforms": {}, + "webhooks": {}, + "keys": {}, + "devKeys": {}, + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyTo": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "securepassword", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForGraphql": true, + "serviceStatusForMessaging": true + } }, "webhook": { "description": "Webhook", @@ -47591,7 +51106,25 @@ "enabled", "logs", "attempts" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "security": true, + "httpUser": "username", + "httpPass": "password", + "signatureKey": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } }, "key": { "description": "Key", @@ -47659,7 +51192,18 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "devKey": { "description": "DevKey", @@ -47718,7 +51262,17 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "mockNumber": { "description": "Mock Number", @@ -47738,7 +51292,11 @@ "required": [ "phone", "otp" - ] + ], + "example": { + "phone": "+1612842323", + "otp": "123456" + } }, "authProvider": { "description": "AuthProvider", @@ -47776,7 +51334,14 @@ "appId", "secret", "enabled" - ] + ], + "example": { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ", + "enabled": "" + } }, "platform": { "description": "Platform", @@ -47844,7 +51409,19 @@ "hostname", "httpUser", "httpPass" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "key": "com.company.appname", + "store": "", + "hostname": true, + "httpUser": "username", + "httpPass": "password" + } }, "variable": { "description": "Variable", @@ -47900,7 +51477,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -47920,7 +51507,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -47940,7 +51531,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -47966,7 +51561,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -48018,7 +51618,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -48044,7 +51653,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -48064,7 +51678,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -48079,7 +51697,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -48106,7 +51727,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -48150,7 +51776,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -48179,7 +51813,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "metric": { "description": "Metric", @@ -48200,7 +51839,11 @@ "required": [ "value", "date" - ] + ], + "example": { + "value": 1, + "date": "2020-10-15T06:38:00.000+00:00" + } }, "metricBreakdown": { "description": "Metric Breakdown", @@ -48234,7 +51877,13 @@ "required": [ "name", "value" - ] + ], + "example": { + "resourceId": "5e5ea5c16897e", + "name": "Documents", + "value": 1, + "estimate": 1 + } }, "usageDatabases": { "description": "UsageDatabases", @@ -48384,7 +52033,26 @@ "storage", "databasesReads", "databasesWrites" - ] + ], + "example": { + "range": "30d", + "databasesTotal": 0, + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "databases": [], + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databasesReads": [], + "databasesWrites": [] + } }, "usageDatabase": { "description": "UsageDatabase", @@ -48517,7 +52185,24 @@ "storage", "databaseReads", "databaseWrites" - ] + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } }, "usageTable": { "description": "UsageTable", @@ -48548,7 +52233,12 @@ "range", "rowsTotal", "rows" - ] + ], + "example": { + "range": "30d", + "rowsTotal": 0, + "rows": [] + } }, "usageCollection": { "description": "UsageCollection", @@ -48579,7 +52269,12 @@ "range", "documentsTotal", "documents" - ] + ], + "example": { + "range": "30d", + "documentsTotal": 0, + "documents": [] + } }, "usageUsers": { "description": "UsageUsers", @@ -48627,7 +52322,14 @@ "sessionsTotal", "users", "sessions" - ] + ], + "example": { + "range": "30d", + "usersTotal": 0, + "sessionsTotal": 0, + "users": [], + "sessions": [] + } }, "usageStorage": { "description": "StorageUsage", @@ -48692,7 +52394,16 @@ "buckets", "files", "storage" - ] + ], + "example": { + "range": "30d", + "bucketsTotal": 0, + "filesTotal": 0, + "filesStorageTotal": 0, + "buckets": [], + "files": [], + "storage": [] + } }, "usageBuckets": { "description": "UsageBuckets", @@ -48757,7 +52468,16 @@ "storage", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "range": "30d", + "filesTotal": 0, + "filesStorageTotal": 0, + "files": [], + "storage": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "usageFunctions": { "description": "UsageFunctions", @@ -48975,7 +52695,34 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "functionsTotal": 0, + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "functions": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageFunction": { "description": "UsageFunction", @@ -49183,7 +52930,33 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageSites": { "description": "UsageSites", @@ -49452,7 +53225,40 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "sitesTotal": 0, + "sites": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageSite": { "description": "UsageSite", @@ -49711,7 +53517,39 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageProject": { "description": "UsageProject", @@ -49985,7 +53823,41 @@ "databasesWrites", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "executionsTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "databasesTotal": 0, + "databasesStorageTotal": 0, + "usersTotal": 0, + "filesStorageTotal": 0, + "functionsStorageTotal": 0, + "buildsStorageTotal": 0, + "deploymentsStorageTotal": 0, + "bucketsTotal": 0, + "executionsMbSecondsTotal": 0, + "buildsMbSecondsTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "requests": [], + "network": [], + "users": [], + "executions": [], + "executionsBreakdown": [], + "bucketsBreakdown": [], + "databasesStorageBreakdown": [], + "executionsMbSecondsBreakdown": [], + "buildsMbSecondsBreakdown": [], + "functionsStorageBreakdown": [], + "authPhoneTotal": 0, + "authPhoneEstimate": 0, + "authPhoneCountryBreakdown": [], + "databasesReads": [], + "databasesWrites": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "headers": { "description": "Headers", @@ -50005,7 +53877,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -50039,7 +53915,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "proxyRule": { "description": "Rule", @@ -50138,7 +54020,24 @@ "status", "logs", "renewAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "function", + "status": "verified", + "logs": "HTTP challegne failed.", + "renewAt": "datetime" + } }, "smsTemplate": { "description": "SmsTemplate", @@ -50164,7 +54063,12 @@ "type", "locale", "message" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account." + } }, "emailTemplate": { "description": "EmailTemplate", @@ -50214,7 +54118,16 @@ "senderEmail", "replyTo", "subject" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyTo": "emails@appwrite.io", + "subject": "Please verify your email address" + } }, "consoleVariables": { "description": "Console Variables", @@ -50308,7 +54221,23 @@ "_APP_DOMAIN_FUNCTIONS", "_APP_OPTIONS_FORCE_HTTPS", "_APP_DOMAINS_NAMESERVERS" - ] + ], + "example": { + "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", + "_APP_DOMAIN_TARGET_A": "127.0.0.1", + "_APP_DOMAIN_TARGET_AAAA": "::1", + "_APP_DOMAIN_TARGET_CAA": "digicert.com", + "_APP_STORAGE_LIMIT": "30000000", + "_APP_COMPUTE_SIZE_LIMIT": "30000000", + "_APP_USAGE_STATS": "enabled", + "_APP_VCS_ENABLED": true, + "_APP_DOMAIN_ENABLED": true, + "_APP_ASSISTANT_ENABLED": true, + "_APP_DOMAIN_SITES": "sites.localhost", + "_APP_DOMAIN_FUNCTIONS": "functions.localhost", + "_APP_OPTIONS_FORCE_HTTPS": "enabled", + "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -50340,7 +54269,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -50360,7 +54295,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -50380,7 +54321,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -50412,7 +54357,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -50479,7 +54430,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -50590,7 +54556,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -50652,7 +54644,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -50727,7 +54729,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -50789,7 +54811,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } }, "migration": { "description": "Migration", @@ -50879,7 +54912,23 @@ "statusCounters", "resourceData", "errors" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "stage": "init", + "source": "Appwrite", + "destination": "Appwrite", + "resources": [ + "user" + ], + "resourceId": "databaseId:collectionId", + "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", + "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", + "errors": [] + } }, "migrationReport": { "description": "Migration Report", @@ -50949,7 +54998,18 @@ "function", "size", "version" - ] + ], + "example": { + "user": 20, + "team": 20, + "database": 20, + "row": 20, + "file": 20, + "bucket": 20, + "function": 20, + "size": 30000, + "version": "1.4.0" + } } }, "externalDocs": { diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index f929384a42..9293ce6928 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -455,7 +455,7 @@ "weight": 30, "cookies": false, "type": "", - "demo": "account\/create-j-w-t.md", + "demo": "account\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, "rate-time": 3600, @@ -572,7 +572,7 @@ "weight": 45, "cookies": false, "type": "", - "demo": "account\/update-m-f-a.md", + "demo": "account\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, "rate-time": 3600, @@ -639,7 +639,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", @@ -657,6 +657,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Session": [] @@ -706,7 +762,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", @@ -724,6 +780,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Session": [] @@ -786,7 +902,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -804,6 +920,60 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Session": [] @@ -855,7 +1025,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", @@ -873,6 +1043,60 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md" + } + ], "auth": { "Project": [] } @@ -932,7 +1156,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", @@ -950,6 +1174,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1011,7 +1295,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -1029,6 +1313,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1063,7 +1395,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -1081,6 +1413,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1115,7 +1495,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -1133,6 +1513,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1167,7 +1595,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -1185,6 +1613,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Session": [] @@ -1985,7 +2461,7 @@ "weight": 27, "cookies": false, "type": "", - "demo": "account\/update-magic-u-r-l-session.md", + "demo": "account\/update-magic-url-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, "rate-time": 3600, @@ -1996,6 +2472,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2074,6 +2554,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2438,7 +2922,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2486,7 +2970,7 @@ "properties": { "userId": { "type": "string", - "description": "User 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.", + "description": "User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2541,7 +3025,7 @@ "weight": 25, "cookies": false, "type": "", - "demo": "account\/create-magic-u-r-l-token.md", + "demo": "account\/create-magic-url-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, "rate-time": 3600, @@ -2573,7 +3057,7 @@ "properties": { "userId": { "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.", + "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2629,7 +3113,7 @@ "weight": 24, "cookies": false, "type": "webAuth", - "demo": "account\/create-o-auth2token.md", + "demo": "account\/create-o-auth-2-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, "rate-time": 3600, @@ -2798,7 +3282,7 @@ "properties": { "userId": { "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.", + "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3287,7 +3771,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3304,7 +3788,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3324,7 +3808,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -4120,7 +4604,7 @@ "weight": 65, "cookies": false, "type": "location", - "demo": "avatars\/get-q-r.md", + "demo": "avatars\/get-qr.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, "rate-time": 3600, @@ -4209,7 +4693,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4224,12 +4708,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4246,30 +4731,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDB.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "queries", - "search" - ], - "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." } ], "auth": { @@ -4332,7 +4798,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4347,12 +4813,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4373,34 +4840,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDB.create" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4473,7 +4917,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -4488,12 +4932,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4511,31 +4956,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDB.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "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." } ], "auth": { @@ -4585,7 +5010,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -4600,12 +5025,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4626,34 +5052,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDB.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -4722,7 +5125,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -4737,12 +5140,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4759,30 +5163,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDB.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -4832,7 +5217,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -4847,7 +5232,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDB.listTables" }, "auth": { "Project": [], @@ -4917,7 +5302,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -4932,7 +5317,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDB.createTable" }, "auth": { "Project": [], @@ -5027,7 +5412,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5042,7 +5427,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDB.getTable" }, "auth": { "Project": [], @@ -5099,7 +5484,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5114,7 +5499,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDB.updateTable" }, "auth": { "Project": [], @@ -5205,7 +5590,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5220,7 +5605,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDB.deleteTable" }, "auth": { "Project": [], @@ -5277,7 +5662,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5292,7 +5677,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDB.listColumns" }, "auth": { "Project": [], @@ -5363,7 +5748,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5378,7 +5763,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDB.createBooleanColumn" }, "auth": { "Project": [], @@ -5474,7 +5859,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5489,7 +5874,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDB.updateBooleanColumn" }, "auth": { "Project": [], @@ -5587,7 +5972,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -5602,7 +5987,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDB.createDatetimeColumn" }, "auth": { "Project": [], @@ -5698,7 +6083,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -5713,7 +6098,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDB.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5811,7 +6196,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -5826,7 +6211,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDB.createEmailColumn" }, "auth": { "Project": [], @@ -5922,7 +6307,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -5937,7 +6322,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDB.updateEmailColumn" }, "auth": { "Project": [], @@ -6035,7 +6420,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6050,7 +6435,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDB.createEnumColumn" }, "auth": { "Project": [], @@ -6156,7 +6541,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6171,7 +6556,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDB.updateEnumColumn" }, "auth": { "Project": [], @@ -6279,7 +6664,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6294,7 +6679,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDB.createFloatColumn" }, "auth": { "Project": [], @@ -6402,7 +6787,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6417,7 +6802,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDB.updateFloatColumn" }, "auth": { "Project": [], @@ -6527,7 +6912,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -6542,7 +6927,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDB.createIntegerColumn" }, "auth": { "Project": [], @@ -6650,7 +7035,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -6665,7 +7050,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDB.updateIntegerColumn" }, "auth": { "Project": [], @@ -6775,7 +7160,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -6790,7 +7175,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDB.createIpColumn" }, "auth": { "Project": [], @@ -6886,7 +7271,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -6901,7 +7286,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDB.updateIpColumn" }, "auth": { "Project": [], @@ -6999,7 +7384,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -7014,7 +7399,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDB.createRelationshipColumn" }, "auth": { "Project": [], @@ -7137,7 +7522,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7152,7 +7537,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDB.createStringColumn" }, "auth": { "Project": [], @@ -7261,7 +7646,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7276,7 +7661,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDB.updateStringColumn" }, "auth": { "Project": [], @@ -7380,7 +7765,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7395,7 +7780,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDB.createUrlColumn" }, "auth": { "Project": [], @@ -7491,7 +7876,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -7506,7 +7891,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDB.updateUrlColumn" }, "auth": { "Project": [], @@ -7633,7 +8018,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -7648,7 +8033,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDB.getColumn" }, "auth": { "Project": [], @@ -7707,7 +8092,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -7722,7 +8107,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDB.deleteColumn" }, "auth": { "Project": [], @@ -7788,7 +8173,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -7803,7 +8188,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDB.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7895,7 +8280,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -7911,7 +8296,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDB.listRows" }, "auth": { "Project": [], @@ -7982,7 +8367,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -7998,12 +8383,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [], "Session": [] @@ -8028,14 +8414,16 @@ } ], "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.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDB.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [], "Key": [] @@ -8056,10 +8444,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": "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.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDB.createRows" } } ], @@ -8135,7 +8524,7 @@ ] }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "consumes": [ "application\/json" @@ -8146,7 +8535,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.\n", + "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": { "201": { "description": "Documents List", @@ -8159,7 +8548,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8175,12 +8564,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -8201,10 +8591,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": "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", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDB.upsertRows" } } ], @@ -8271,7 +8662,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\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.", + "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.", "responses": { "200": { "description": "Documents List", @@ -8284,7 +8675,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8300,7 +8691,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDB.updateRows" }, "auth": { "Project": [], @@ -8368,7 +8759,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\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8381,7 +8772,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8397,7 +8788,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDB.deleteRows" }, "auth": { "Project": [], @@ -8472,7 +8863,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -8488,7 +8879,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [], @@ -8543,7 +8934,7 @@ ] }, "put": { - "summary": "Create or update a document", + "summary": "Upsert a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -8554,7 +8945,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 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": "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": { "201": { "description": "Document", @@ -8567,7 +8958,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -8583,12 +8974,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Session": [] @@ -8612,10 +9004,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": "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.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -8711,7 +9104,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -8727,7 +9120,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [], @@ -8813,7 +9206,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -8829,7 +9222,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDB.deleteRow" }, "auth": { "Project": [], @@ -8898,7 +9291,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -8908,22 +9301,25 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", - "server" + "client", + "server", + "console" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDB.decrementRowColumn" }, "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], @@ -9009,7 +9405,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -9019,22 +9415,25 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", - "server" + "client", + "server", + "console" ], "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDB.incrementRowColumn" }, "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], @@ -9118,7 +9517,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9133,7 +9532,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDB.listIndexes" }, "auth": { "Project": [], @@ -9202,7 +9601,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9217,7 +9616,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDB.createIndex" }, "auth": { "Project": [], @@ -9334,7 +9733,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9349,7 +9748,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDB.getIndex" }, "auth": { "Project": [], @@ -9408,7 +9807,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -9423,7 +9822,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDB.deleteIndex" }, "auth": { "Project": [], @@ -9463,4469 +9862,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Tables List", - "schema": { - "$ref": "#\/definitions\/tableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsCreateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsUpdateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteTable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "schema": { - "$ref": "#\/definitions\/columnList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationshipType", - "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": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - ] - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "gridsDeleteColumn", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "schema": { - "$ref": "#\/definitions\/columnIndexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "gridsCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "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": "IndexType", - "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}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "gridsDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "tables.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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "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": "gridsCreateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "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", - "namespace": "grids", - "auth": { - "Project": [], - "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\/tables#tablesCreate). 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": "gridsUpsertRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "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": "gridsUpdateRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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": "gridsDeleteRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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\/tables#tablesCreate).", - "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}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.read", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "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": "gridsUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "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": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "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": "gridsUpdateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "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" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "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": "gridsDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.write", - "platforms": [ - "client", - "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\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/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}", - "scope": "rows.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", @@ -13950,7 +9886,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -14023,7 +9959,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -14275,7 +10211,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -14325,7 +10261,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -14376,7 +10312,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -14436,7 +10372,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -14684,7 +10620,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -14746,7 +10682,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -14824,7 +10760,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -14905,7 +10841,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -14998,7 +10934,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -15084,7 +11020,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -15191,7 +11127,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -15288,7 +11224,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -15351,7 +11287,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -15419,7 +11355,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -15505,7 +11441,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -15573,7 +11509,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -15648,7 +11584,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -15710,7 +11646,7 @@ }, "method": { "type": "string", - "description": "HTTP method of execution. Default value is GET.", + "description": "HTTP method of execution. Default value is POST.", "default": "POST", "x-example": "GET", "enum": [ @@ -15719,7 +11655,8 @@ "PUT", "PATCH", "DELETE", - "OPTIONS" + "OPTIONS", + "HEAD" ], "x-enum-name": "ExecutionMethod", "x-enum-keys": [] @@ -15766,7 +11703,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -15832,7 +11769,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -15900,7 +11837,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -15960,7 +11897,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -16051,7 +11988,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -16119,7 +12056,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -16212,7 +12149,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -16282,7 +12219,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -16357,7 +12294,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -16642,7 +12579,7 @@ "weight": 80, "cookies": false, "type": "", - "demo": "health\/get-d-b.md", + "demo": "health\/get-db.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, "rate-time": 3600, @@ -17930,7 +13867,7 @@ "weight": 73, "cookies": false, "type": "", - "demo": "locale\/list-countries-e-u.md", + "demo": "locale\/list-countries-eu.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, @@ -18139,7 +14076,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -18215,7 +14152,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -18374,7 +14311,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -18530,7 +14467,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18726,7 +14663,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18917,11 +14854,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -18935,6 +14872,76 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19036,11 +15043,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -19054,6 +15061,74 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19155,7 +15230,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -19211,7 +15286,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -19272,7 +15347,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -19345,7 +15420,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -19418,7 +15493,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -19490,11 +15565,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19508,6 +15583,78 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19606,11 +15753,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19624,6 +15771,76 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19720,11 +15937,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19738,6 +15955,70 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19812,11 +16093,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19830,6 +16111,68 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -19906,7 +16249,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -20034,7 +16377,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -20160,10 +16503,10 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", - "demo": "messaging\/create-msg91provider.md", + "demo": "messaging\/create-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -20264,10 +16607,10 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", - "demo": "messaging\/update-msg91provider.md", + "demo": "messaging\/update-msg-91-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, "rate-time": 3600, @@ -20366,7 +16709,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20482,7 +16825,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20592,11 +16935,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20610,6 +16953,92 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -20752,11 +17181,11 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -20770,6 +17199,88 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md" + } + ], "auth": { "Project": [], "Key": [] @@ -20913,7 +17424,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -21017,7 +17528,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -21119,7 +17630,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21223,7 +17734,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21325,7 +17836,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21429,7 +17940,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21531,7 +18042,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21635,7 +18146,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21735,7 +18246,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21791,7 +18302,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21852,7 +18363,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -21925,7 +18436,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -21998,7 +18509,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -22072,7 +18583,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -22161,7 +18672,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22222,7 +18733,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22302,7 +18813,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22363,7 +18874,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22436,7 +18947,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22518,7 +19029,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22607,7 +19118,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22671,7 +19182,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22743,7 +19254,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -22816,7 +19327,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -23084,7 +19595,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -23134,7 +19645,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -23185,7 +19696,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -23245,7 +19756,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -23508,7 +20019,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -23570,7 +20081,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -23648,7 +20159,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -23729,7 +20240,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -23830,7 +20341,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -23910,7 +20421,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -24017,7 +20528,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -24115,7 +20626,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -24178,7 +20689,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -24246,7 +20757,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -24332,7 +20843,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -24400,7 +20911,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -24472,7 +20983,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -24537,7 +21048,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -24605,7 +21116,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -24665,7 +21176,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -24756,7 +21267,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -24824,7 +21335,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -24917,7 +21428,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -26201,6 +22712,4967 @@ ] } }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tablesdb\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "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 columns: name", + "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 database", + "operationId": "tablesDBCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tablesdb\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "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": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDBGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tablesdb\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tablesdb\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDBListTables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": "tables", + "weight": 382, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: 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": "tablesDBCreateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": "tables", + "weight": 378, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDBGetTable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": "tables", + "weight": 379, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBUpdateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": "tables", + "weight": 380, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "tablesDBDeleteTable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": "tables", + "weight": 381, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDBListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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 columns: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDBUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationshipType", + "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": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "Column size for text columns, 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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + ] + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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": "tablesDBDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List indexes on the table.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "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 columns: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDBCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "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": "IndexType", + "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" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDBDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "client", + "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 TableDB service [server integration](https:\/\/appwrite.io\/docs\/server\/tablesdbdb#tablesdbCreate).", + "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": "tablesDBCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [], + "Session": [] + }, + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDB", + "desc": "Create rows", + "auth": { + "Project": [], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md" + } + ], + "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\/tablesdb#tablesDBCreate). 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": "Upsert rows", + "operationId": "tablesDBUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md" + } + ], + "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": "tablesDBUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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": "tablesDBDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "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\/tablesdb#tablesDBCreate).", + "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" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "client", + "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\/tablesdb#tablesDBCreate).", + "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": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "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\/tablesdb#tablesDBCreateTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md" + } + ], + "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": "tablesDBUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "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" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "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": "tablesDBDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "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\/tablesdb#tablesDBCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "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 + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "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 + } + } + } + } + ] + } + }, "\/teams": { "get": { "summary": "List teams", @@ -27260,7 +28732,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -27341,7 +28813,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -27426,7 +28898,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -27487,7 +28959,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -27559,7 +29031,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -27792,7 +29264,7 @@ "weight": 188, "cookies": false, "type": "", - "demo": "users\/create-argon2user.md", + "demo": "users\/create-argon-2-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28106,7 +29578,7 @@ "weight": 187, "cookies": false, "type": "", - "demo": "users\/create-m-d5user.md", + "demo": "users\/create-md-5-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28198,7 +29670,7 @@ "weight": 190, "cookies": false, "type": "", - "demo": "users\/create-p-h-pass-user.md", + "demo": "users\/create-ph-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28530,7 +30002,7 @@ "weight": 189, "cookies": false, "type": "", - "demo": "users\/create-s-h-a-user.md", + "demo": "users\/create-sha-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, "rate-time": 3600, @@ -28838,7 +30310,7 @@ "weight": 226, "cookies": false, "type": "", - "demo": "users\/create-j-w-t.md", + "demo": "users\/create-jwt.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, "rate-time": 3600, @@ -29150,7 +30622,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfa", "group": "users", @@ -29167,6 +30639,66 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29225,7 +30757,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", @@ -29242,6 +30774,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29298,7 +30888,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", @@ -29315,6 +30905,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29358,7 +31004,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", @@ -29375,6 +31021,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29418,7 +31120,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", @@ -29435,6 +31137,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Key": [] @@ -29478,7 +31236,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", @@ -29495,6 +31253,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md" + } + ], "auth": { "Project": [], "Key": [] @@ -30888,8 +32702,8 @@ "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": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -30952,7 +32766,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "rowList": { "description": "Rows List", @@ -30960,7 +32775,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rows rows that matched your query.", + "description": "Total number of rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -30977,7 +32792,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -30985,7 +32804,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of documents rows that matched your query.", + "description": "Total number of documents that matched your query.", "x-example": 5, "format": "int32" }, @@ -31002,7 +32821,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -31010,7 +32833,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tables rows that matched your query.", + "description": "Total number of tables that matched your query.", "x-example": 5, "format": "int32" }, @@ -31027,7 +32850,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -31035,7 +32862,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of collections rows that matched your query.", + "description": "Total number of collections that matched your query.", "x-example": 5, "format": "int32" }, @@ -31052,7 +32879,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -31060,7 +32891,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases rows that matched your query.", + "description": "Total number of databases that matched your query.", "x-example": 5, "format": "int32" }, @@ -31077,7 +32908,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -31085,7 +32920,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31102,7 +32937,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -31110,7 +32949,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes rows that matched your query.", + "description": "Total number of indexes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31127,7 +32966,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -31135,7 +32978,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of users rows that matched your query.", + "description": "Total number of users that matched your query.", "x-example": 5, "format": "int32" }, @@ -31152,7 +32995,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -31160,7 +33007,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions rows that matched your query.", + "description": "Total number of sessions that matched your query.", "x-example": 5, "format": "int32" }, @@ -31177,7 +33024,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -31185,7 +33036,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities rows that matched your query.", + "description": "Total number of identities that matched your query.", "x-example": 5, "format": "int32" }, @@ -31202,7 +33053,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -31210,7 +33065,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs rows that matched your query.", + "description": "Total number of logs that matched your query.", "x-example": 5, "format": "int32" }, @@ -31227,7 +33082,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -31235,7 +33094,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files rows that matched your query.", + "description": "Total number of files that matched your query.", "x-example": 5, "format": "int32" }, @@ -31252,7 +33111,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -31260,7 +33123,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets rows that matched your query.", + "description": "Total number of buckets that matched your query.", "x-example": 5, "format": "int32" }, @@ -31277,7 +33140,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -31285,7 +33152,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens rows that matched your query.", + "description": "Total number of tokens that matched your query.", "x-example": 5, "format": "int32" }, @@ -31302,7 +33169,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -31310,7 +33181,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams rows that matched your query.", + "description": "Total number of teams that matched your query.", "x-example": 5, "format": "int32" }, @@ -31327,7 +33198,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -31335,7 +33210,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships rows that matched your query.", + "description": "Total number of memberships that matched your query.", "x-example": 5, "format": "int32" }, @@ -31352,7 +33227,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -31360,7 +33239,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites rows that matched your query.", + "description": "Total number of sites that matched your query.", "x-example": 5, "format": "int32" }, @@ -31377,7 +33256,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "functionList": { "description": "Functions List", @@ -31385,7 +33268,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions rows that matched your query.", + "description": "Total number of functions that matched your query.", "x-example": 5, "format": "int32" }, @@ -31402,7 +33285,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -31410,7 +33297,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks rows that matched your query.", + "description": "Total number of frameworks that matched your query.", "x-example": 5, "format": "int32" }, @@ -31427,7 +33314,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -31435,7 +33326,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes rows that matched your query.", + "description": "Total number of runtimes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31452,7 +33343,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -31460,7 +33355,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments rows that matched your query.", + "description": "Total number of deployments that matched your query.", "x-example": 5, "format": "int32" }, @@ -31477,7 +33372,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -31485,7 +33384,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions rows that matched your query.", + "description": "Total number of executions that matched your query.", "x-example": 5, "format": "int32" }, @@ -31502,7 +33401,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -31510,7 +33413,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries rows that matched your query.", + "description": "Total number of countries that matched your query.", "x-example": 5, "format": "int32" }, @@ -31527,7 +33430,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -31535,7 +33442,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents rows that matched your query.", + "description": "Total number of continents that matched your query.", "x-example": 5, "format": "int32" }, @@ -31552,7 +33459,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -31560,7 +33471,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages rows that matched your query.", + "description": "Total number of languages that matched your query.", "x-example": 5, "format": "int32" }, @@ -31577,7 +33488,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -31585,7 +33500,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies rows that matched your query.", + "description": "Total number of currencies that matched your query.", "x-example": 5, "format": "int32" }, @@ -31602,7 +33517,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -31610,7 +33529,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones rows that matched your query.", + "description": "Total number of phones that matched your query.", "x-example": 5, "format": "int32" }, @@ -31627,7 +33546,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -31635,7 +33558,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables rows that matched your query.", + "description": "Total number of variables that matched your query.", "x-example": 5, "format": "int32" }, @@ -31652,7 +33575,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -31660,7 +33587,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes rows that matched your query.", + "description": "Total number of localeCodes that matched your query.", "x-example": 5, "format": "int32" }, @@ -31677,7 +33604,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -31685,7 +33616,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers rows that matched your query.", + "description": "Total number of providers that matched your query.", "x-example": 5, "format": "int32" }, @@ -31702,7 +33633,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -31710,7 +33645,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages rows that matched your query.", + "description": "Total number of messages that matched your query.", "x-example": 5, "format": "int32" }, @@ -31727,7 +33662,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -31735,7 +33674,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics rows that matched your query.", + "description": "Total number of topics that matched your query.", "x-example": 5, "format": "int32" }, @@ -31752,7 +33691,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -31760,7 +33703,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers rows that matched your query.", + "description": "Total number of subscribers that matched your query.", "x-example": 5, "format": "int32" }, @@ -31777,7 +33720,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -31785,7 +33732,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets rows that matched your query.", + "description": "Total number of targets that matched your query.", "x-example": 5, "format": "int32" }, @@ -31802,7 +33749,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "specificationList": { "description": "Specifications List", @@ -31810,7 +33761,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications rows that matched your query.", + "description": "Total number of specifications that matched your query.", "x-example": 5, "format": "int32" }, @@ -31827,7 +33778,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "database": { "description": "Database", @@ -31857,6 +33812,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -31864,8 +33824,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -31976,7 +33945,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -32031,7 +34014,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -32106,7 +34093,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -32183,7 +34183,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -32260,7 +34273,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -32322,7 +34348,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -32390,7 +34427,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -32467,7 +34516,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -32535,7 +34597,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -32603,7 +34677,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -32671,7 +34757,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -32763,7 +34861,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -32874,7 +34988,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -32929,7 +35057,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -33004,7 +35136,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -33067,7 +35212,7 @@ }, "default": { "type": "integer", - "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.", "x-example": 10, "format": "int32", "x-nullable": true @@ -33081,7 +35226,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -33144,7 +35302,7 @@ }, "default": { "type": "number", - "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.", "x-example": 2.5, "format": "double", "x-nullable": true @@ -33158,7 +35316,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -33207,7 +35378,7 @@ }, "default": { "type": "boolean", - "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.", "x-example": false, "x-nullable": true } @@ -33220,7 +35391,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -33274,7 +35456,7 @@ }, "default": { "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.", "x-example": "default@example.com", "x-nullable": true } @@ -33288,7 +35470,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -33350,7 +35544,7 @@ }, "default": { "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.", "x-example": "element", "x-nullable": true } @@ -33365,7 +35559,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -33419,7 +35626,7 @@ }, "default": { "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.", "x-example": "192.0.2.0", "x-nullable": true } @@ -33433,7 +35640,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -33501,7 +35720,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -33555,7 +35786,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", + "description": "Default value for column when not provided. Only null is optional", "x-example": "2020-10-15T06:38:00.000+00:00", "x-nullable": true } @@ -33569,7 +35800,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -33661,7 +35904,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -33739,7 +35998,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -33817,7 +36088,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -33832,17 +36115,20 @@ "type": "integer", "description": "Row automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$tableId": { "type": "string", "description": "Table ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -33874,7 +36160,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -33934,7 +36231,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -34068,7 +36381,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -34231,7 +36567,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -34245,7 +36607,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -34259,7 +36624,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -34273,7 +36641,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -34287,7 +36658,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -34329,7 +36703,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -34361,7 +36742,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -34396,12 +36783,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -34588,7 +36986,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -34656,7 +37087,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -34700,7 +37143,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -34714,7 +37165,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -34764,7 +37218,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -34784,7 +37247,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -34866,7 +37333,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -34958,7 +37440,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -35008,7 +37509,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -35060,7 +37570,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -35151,7 +37672,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -35338,7 +37876,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -35528,7 +38097,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "runtime": { "description": "Runtime", @@ -35587,7 +38186,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -35643,7 +38252,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -35681,7 +38308,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -35855,7 +38489,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -35873,7 +38536,7 @@ }, "$updatedAt": { "type": "string", - "description": "Execution upate date in ISO 8601 format.", + "description": "Execution update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$permissions": { @@ -35891,6 +38554,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -35977,6 +38645,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -35988,7 +38657,37 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "variable": { "description": "Variable", @@ -36044,7 +38743,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -36064,7 +38773,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -36084,7 +38797,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -36110,7 +38827,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -36162,7 +38884,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -36188,7 +38919,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -36208,7 +38944,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -36223,7 +38963,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -36250,7 +38993,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -36294,7 +39042,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -36323,7 +39079,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "headers": { "description": "Headers", @@ -36343,7 +39104,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -36377,7 +39142,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -36409,7 +39180,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -36429,7 +39206,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -36449,7 +39232,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -36481,7 +39268,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -36548,7 +39341,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -36659,7 +39467,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -36721,7 +39555,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -36796,7 +39640,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -36858,7 +39722,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "externalDocs": { diff --git a/app/config/templates/function.php b/app/config/templates/function.php index 9a905c83b1..16838341a9 100644 --- a/app/config/templates/function.php +++ b/app/config/templates/function.php @@ -2080,6 +2080,61 @@ return [ 'type' => 'text' ] ], + 'scopes' => ['databases.read', 'databases.write', 'collections.write', 'attributes.write', 'documents.read', 'documents.write'] + ], + [ + 'icon' => 'icon-apple', + 'id' => 'sign-in-with-apple', + 'name' => 'Sign in with Apple', + 'score' => 6, + 'tagline' => 'Use native Apple sign-in APIs on Apple devices with Appwrite Auth', + 'permissions' => ['any'], + 'events' => [], + 'cron' => '', + 'timeout' => 15, + 'useCases' => ['auth'], + 'runtimes' => [ + ...getRuntimes($templateRuntimes['DART'], 'dart pub get', 'lib/main.dart', 'dart/sign_in_with_apple') + ], + 'instructions' => 'For documentation and instructions, check out file.', + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.2.*', + 'variables' => [ + [ + 'name' => 'BUNDLE_ID', + 'description' => 'Bundle ID of the app. Learn more.', + 'value' => '', + 'placeholder' => 'com.companyname.appname', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'TEAM_ID', + 'description' => 'Team ID of the Apple Developer account.', + 'value' => '', + 'placeholder' => '6K3...5PH', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'KEY_ID', + 'description' => 'Key ID required to communicate with Apple Developer services. Learn more.', + 'value' => '', + 'placeholder' => '9G8...6YF', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'KEY_CONTENTS_ENCODED', + 'description' => 'Contents of Key required to communicated with Apple Developer services, encoded in Base64. Learn more.', + 'value' => '', + 'placeholder' => '7x8aA...Ab7c', + 'required' => true, + 'type' => 'password' + ] + ], 'scopes' => ['users.read', 'users.write'] ] ]; diff --git a/app/config/templates/site.php b/app/config/templates/site.php index 95a2161902..c7e169f05e 100644 --- a/app/config/templates/site.php +++ b/app/config/templates/site.php @@ -1006,7 +1006,7 @@ return [ getFramework('NEXTJS', [ 'providerRootDirectory' => './', 'installCommand' => 'pnpm install', - 'buildCommand' => 'npm run build', + 'buildCommand' => 'pnpm build', ]), ], 'vcsProvider' => 'github', @@ -1015,7 +1015,7 @@ return [ 'providerVersion' => '0.1.*', 'variables' => [ [ - 'name' => 'NEXT_PUBLIC_APPWRITE_FUNCTION_PROJECT_ID', + 'name' => 'NEXT_PUBLIC_APPWRITE_FUNCTION_API_ENDPOINT', 'description' => 'Endpoint of Appwrite server', 'value' => '{apiEndpoint}', 'placeholder' => '{apiEndpoint}', @@ -1023,7 +1023,7 @@ return [ 'type' => 'text' ], [ - 'name' => 'NEXT_PUBLIC_APPWRITE_FUNCTION_API_ENDPOINT', + 'name' => 'NEXT_PUBLIC_APPWRITE_FUNCTION_PROJECT_ID', 'description' => 'Your Appwrite project ID', 'value' => '{projectId}', 'placeholder' => '{projectId}', diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 4956e8b6a2..24cc116aed 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -25,6 +25,7 @@ use Appwrite\Network\Validator\Redirect; use Appwrite\OpenSSL\OpenSSL; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\MethodType; use Appwrite\SDK\Response as SDKResponse; @@ -1917,7 +1918,7 @@ App::post('/v1/account/tokens/magic-url') )) ->label('abuse-limit', 60) ->label('abuse-key', ['url:{url},email:{param-email}', 'url:{url},ip:{ip}']) - ->param('userId', '', 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('userId', '', 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.') ->param('email', '', new Email(), 'User email.') ->param('url', '', fn ($platforms, $devKey) => $devKey->isEmpty() ? new Redirect($platforms) : new URL(), 'URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.', true, ['platforms', 'devKey']) ->param('phrase', false, new Boolean(), 'Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.', true) @@ -2170,7 +2171,7 @@ App::post('/v1/account/tokens/email') )) ->label('abuse-limit', 10) ->label('abuse-key', ['url:{url},email:{param-email}', 'url:{url},ip:{ip}']) - ->param('userId', '', new CustomId(), 'User 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('userId', '', new CustomId(), 'User 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.') ->param('email', '', new Email(), 'User email.') ->param('phrase', false, new Boolean(), 'Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.', true) ->inject('request') @@ -2418,7 +2419,10 @@ App::put('/v1/account/sessions/magic-url') ) ], contentType: ContentType::JSON, - deprecated: true, + deprecated: new Deprecated( + since: '1.6.0', + replaceWith: 'account.createSession' + ), )) ->label('abuse-limit', 10) ->label('abuse-key', 'ip:{ip},userId:{param-userId}') @@ -2456,7 +2460,10 @@ App::put('/v1/account/sessions/phone') ) ], contentType: ContentType::JSON, - deprecated: true, + deprecated: new Deprecated( + since: '1.6.0', + replaceWith: 'account.createSession' + ), )) ->label('abuse-limit', 10) ->label('abuse-key', 'ip:{ip},userId:{param-userId}') @@ -2498,7 +2505,7 @@ App::post('/v1/account/tokens/phone') )) ->label('abuse-limit', 10) ->label('abuse-key', ['url:{url},phone:{param-phone}', 'url:{url},ip:{ip}']) - ->param('userId', '', 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('userId', '', 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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.') ->param('phone', '', new Phone(), 'Phone number. Format this number with a leading \'+\' and a country code, e.g., +16175551212.') ->inject('request') ->inject('response') @@ -4008,20 +4015,40 @@ App::get('/v1/account/mfa/factors') ->desc('List factors') ->groups(['api', 'account', 'mfa']) ->label('scope', 'account') - ->label('sdk', new Method( - namespace: 'account', - group: 'mfa', - name: 'listMfaFactors', - description: '/docs/references/account/list-mfa-factors.md', - auth: [AuthType::SESSION, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_MFA_FACTORS, - ) - ], - contentType: ContentType::JSON - )) + ->label('sdk', [ + new Method( + namespace: 'account', + group: 'mfa', + name: 'listMfaFactors', + description: '/docs/references/account/list-mfa-factors.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_FACTORS, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'account.listMFAFactors', + ), + ), + new Method( + namespace: 'account', + group: 'mfa', + name: 'listMFAFactors', + description: '/docs/references/account/list-mfa-factors.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_FACTORS, + ) + ], + contentType: ContentType::JSON + ) + ]) ->inject('response') ->inject('user') ->action(function (Response $response, Document $user) { @@ -4049,20 +4076,40 @@ App::post('/v1/account/mfa/authenticators/:type') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk', new Method( - namespace: 'account', - group: 'mfa', - name: 'createMfaAuthenticator', - description: '/docs/references/account/create-mfa-authenticator.md', - auth: [AuthType::SESSION, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_MFA_TYPE, - ) - ], - contentType: ContentType::JSON - )) + ->label('sdk', [ + new Method( + namespace: 'account', + group: 'mfa', + name: 'createMfaAuthenticator', + description: '/docs/references/account/create-mfa-authenticator.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_TYPE, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'account.createMFAAuthenticator', + ), + ), + new Method( + namespace: 'account', + group: 'mfa', + name: 'createMFAAuthenticator', + description: '/docs/references/account/create-mfa-authenticator.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_TYPE, + ) + ], + contentType: ContentType::JSON + ) + ]) ->param('type', null, new WhiteList([Type::TOTP]), 'Type of authenticator. Must be `' . Type::TOTP . '`') ->inject('requestTimestamp') ->inject('response') @@ -4126,20 +4173,40 @@ App::put('/v1/account/mfa/authenticators/:type') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk', new Method( - namespace: 'account', - group: 'mfa', - name: 'updateMfaAuthenticator', - description: '/docs/references/account/update-mfa-authenticator.md', - auth: [AuthType::SESSION, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_USER, - ) - ], - contentType: ContentType::JSON - )) + ->label('sdk', [ + new Method( + namespace: 'account', + group: 'mfa', + name: 'updateMfaAuthenticator', + description: '/docs/references/account/update-mfa-authenticator.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'account.updateMFAAuthenticator', + ), + ), + new Method( + namespace: 'account', + group: 'mfa', + name: 'updateMFAAuthenticator', + description: '/docs/references/account/update-mfa-authenticator.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ], + contentType: ContentType::JSON + ) + ]) ->param('type', null, new WhiteList([Type::TOTP]), 'Type of authenticator.') ->param('otp', '', new Text(256), 'Valid verification token.') ->inject('response') @@ -4196,20 +4263,40 @@ App::post('/v1/account/mfa/recovery-codes') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk', new Method( - namespace: 'account', - group: 'mfa', - name: 'createMfaRecoveryCodes', - description: '/docs/references/account/create-mfa-recovery-codes.md', - auth: [AuthType::SESSION, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_CREATED, - model: Response::MODEL_MFA_RECOVERY_CODES, - ) - ], - contentType: ContentType::JSON - )) + ->label('sdk', [ + new Method( + namespace: 'account', + group: 'mfa', + name: 'createMfaRecoveryCodes', + description: '/docs/references/account/create-mfa-recovery-codes.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'account.createMFARecoveryCodes', + ), + ), + new Method( + namespace: 'account', + group: 'mfa', + name: 'createMFARecoveryCodes', + description: '/docs/references/account/create-mfa-recovery-codes.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ], + contentType: ContentType::JSON + ) + ]) ->inject('response') ->inject('user') ->inject('dbForProject') @@ -4243,20 +4330,40 @@ App::patch('/v1/account/mfa/recovery-codes') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk', new Method( - namespace: 'account', - group: 'mfa', - name: 'updateMfaRecoveryCodes', - description: '/docs/references/account/update-mfa-recovery-codes.md', - auth: [AuthType::SESSION, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_MFA_RECOVERY_CODES, - ) - ], - contentType: ContentType::JSON - )) + ->label('sdk', [ + new Method( + namespace: 'account', + group: 'mfa', + name: 'updateMfaRecoveryCodes', + description: '/docs/references/account/update-mfa-recovery-codes.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'account.updateMFARecoveryCodes', + ), + ), + new Method( + namespace: 'account', + group: 'mfa', + name: 'updateMFARecoveryCodes', + description: '/docs/references/account/update-mfa-recovery-codes.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ], + contentType: ContentType::JSON + ) + ]) ->inject('dbForProject') ->inject('response') ->inject('user') @@ -4285,20 +4392,40 @@ App::get('/v1/account/mfa/recovery-codes') ->desc('List MFA recovery codes') ->groups(['api', 'account', 'mfaProtected']) ->label('scope', 'account') - ->label('sdk', new Method( - namespace: 'account', - group: 'mfa', - name: 'getMfaRecoveryCodes', - description: '/docs/references/account/get-mfa-recovery-codes.md', - auth: [AuthType::SESSION, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_MFA_RECOVERY_CODES, - ) - ], - contentType: ContentType::JSON - )) + ->label('sdk', [ + new Method( + namespace: 'account', + group: 'mfa', + name: 'getMfaRecoveryCodes', + description: '/docs/references/account/get-mfa-recovery-codes.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'account.getMFARecoveryCodes', + ), + ), + new Method( + namespace: 'account', + group: 'mfa', + name: 'getMFARecoveryCodes', + description: '/docs/references/account/get-mfa-recovery-codes.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ], + contentType: ContentType::JSON + ) + ]) ->inject('response') ->inject('user') ->action(function (Response $response, Document $user) { @@ -4324,20 +4451,40 @@ App::delete('/v1/account/mfa/authenticators/:type') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk', new Method( - namespace: 'account', - group: 'mfa', - name: 'deleteMfaAuthenticator', - description: '/docs/references/account/delete-mfa-authenticator.md', - auth: [AuthType::SESSION, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_NOCONTENT, - model: Response::MODEL_NONE, - ) - ], - contentType: ContentType::NONE - )) + ->label('sdk', [ + new Method( + namespace: 'account', + group: 'mfa', + name: 'deleteMfaAuthenticator', + description: '/docs/references/account/delete-mfa-authenticator.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'account.deleteMFAAuthenticator', + ), + ), + new Method( + namespace: 'account', + group: 'mfa', + name: 'deleteMFAAuthenticator', + description: '/docs/references/account/delete-mfa-authenticator.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + ) + ]) ->param('type', null, new WhiteList([Type::TOTP]), 'Type of authenticator.') ->inject('response') ->inject('user') @@ -4370,20 +4517,40 @@ App::post('/v1/account/mfa/challenge') ->label('audits.event', 'challenge.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk', new Method( - namespace: 'account', - group: 'mfa', - name: 'createMfaChallenge', - description: '/docs/references/account/create-mfa-challenge.md', - auth: [], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_CREATED, - model: Response::MODEL_MFA_CHALLENGE, - ) - ], - contentType: ContentType::JSON, - )) + ->label('sdk', [ + new Method( + namespace: 'account', + group: 'mfa', + name: 'createMfaChallenge', + description: '/docs/references/account/create-mfa-challenge.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MFA_CHALLENGE, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'account.createMFAChallenge', + ), + ), + new Method( + namespace: 'account', + group: 'mfa', + name: 'createMFAChallenge', + description: '/docs/references/account/create-mfa-challenge.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MFA_CHALLENGE, + ) + ], + contentType: ContentType::JSON + ) + ]) ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},userId:{userId}') ->param('factor', '', new WhiteList([Type::EMAIL, Type::PHONE, Type::TOTP, Type::RECOVERY_CODE]), 'Factor used for verification. Must be one of following: `' . Type::EMAIL . '`, `' . Type::PHONE . '`, `' . Type::TOTP . '`, `' . Type::RECOVERY_CODE . '`.') @@ -4592,20 +4759,40 @@ App::put('/v1/account/mfa/challenge') ->label('audits.event', 'challenges.update') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk', new Method( - namespace: 'account', - group: 'mfa', - name: 'updateMfaChallenge', - description: '/docs/references/account/update-mfa-challenge.md', - auth: [AuthType::SESSION, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_SESSION, - ) - ], - contentType: ContentType::JSON - )) + ->label('sdk', [ + new Method( + namespace: 'account', + group: 'mfa', + name: 'updateMfaChallenge', + description: '/docs/references/account/update-mfa-challenge.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SESSION, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'account.updateMFAChallenge', + ), + ), + new Method( + namespace: 'account', + group: 'mfa', + name: 'updateMFAChallenge', + description: '/docs/references/account/update-mfa-challenge.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SESSION, + ) + ], + contentType: ContentType::JSON + ) + ]) ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},challengeId:{param-challengeId}') ->param('challengeId', '', new Text(256), 'ID of the challenge.') diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 785324739b..90364d997e 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -474,7 +474,7 @@ App::get('/v1/avatars/favicon') $sanitizer->minify(true); $cleanSvg = $sanitizer->sanitize($data); if ($cleanSvg === false) { - throw new \Exception('SVG sanitization failed'); + throw new Exception(Exception::AVATAR_SVG_SANITIZATION_FAILED); } $response ->addHeader('Cache-Control', 'private, max-age=2592000') // 30 days diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 39ebae9590..fb084fddb3 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -23,10 +23,12 @@ use Utopia\Storage\Device; use Utopia\Storage\Device\Local; use Utopia\Storage\Storage; use Utopia\System\System; +use Utopia\Validator\AnyOf; use Utopia\Validator\Domain; use Utopia\Validator\Integer; use Utopia\Validator\Multiple; use Utopia\Validator\Text; +use Utopia\Validator\URL; use Utopia\Validator\WhiteList; App::get('/v1/health') @@ -397,7 +399,7 @@ App::get('/v1/health/certificate') ], contentType: ContentType::JSON )) - ->param('domain', null, new Multiple([new Domain(), new PublicDomain()]), Multiple::TYPE_STRING, 'Domain name') + ->param('domain', null, new Multiple([new AnyOf([new URL(), new Domain()]), new PublicDomain()]), Multiple::TYPE_STRING, 'Domain name') ->inject('response') ->action(function (string $domain, Response $response) { if (filter_var($domain, FILTER_VALIDATE_URL)) { @@ -554,12 +556,12 @@ App::get('/v1/health/queue/deletes') contentType: ContentType::JSON )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) - ->inject('publisher') + ->inject('publisherDeletes') ->inject('response') - ->action(function (int|string $threshold, Publisher $publisher, Response $response) { + ->action(function (int|string $threshold, Publisher $publisherDeletes, Response $response) { $threshold = \intval($threshold); - $size = $publisher->getQueueSize(new Queue(Event::DELETE_QUEUE_NAME)); + $size = $publisherDeletes->getQueueSize(new Queue(Event::DELETE_QUEUE_NAME)); if ($size >= $threshold) { throw new Exception(Exception::HEALTH_QUEUE_SIZE_EXCEEDED, "Queue size threshold hit. Current size is {$size} and threshold is {$threshold}."); @@ -587,12 +589,12 @@ App::get('/v1/health/queue/mails') contentType: ContentType::JSON )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) - ->inject('publisher') + ->inject('publisherMails') ->inject('response') - ->action(function (int|string $threshold, Publisher $publisher, Response $response) { + ->action(function (int|string $threshold, Publisher $publisherMails, Response $response) { $threshold = \intval($threshold); - $size = $publisher->getQueueSize(new Queue(Event::MAILS_QUEUE_NAME)); + $size = $publisherMails->getQueueSize(new Queue(Event::MAILS_QUEUE_NAME)); if ($size >= $threshold) { throw new Exception(Exception::HEALTH_QUEUE_SIZE_EXCEEDED, "Queue size threshold hit. Current size is {$size} and threshold is {$threshold}."); @@ -620,12 +622,12 @@ App::get('/v1/health/queue/messaging') contentType: ContentType::JSON )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) - ->inject('publisher') + ->inject('publisherMessaging') ->inject('response') - ->action(function (int|string $threshold, Publisher $publisher, Response $response) { + ->action(function (int|string $threshold, Publisher $publisherMessaging, Response $response) { $threshold = \intval($threshold); - $size = $publisher->getQueueSize(new Queue(Event::MESSAGING_QUEUE_NAME)); + $size = $publisherMessaging->getQueueSize(new Queue(Event::MESSAGING_QUEUE_NAME)); if ($size >= $threshold) { throw new Exception(Exception::HEALTH_QUEUE_SIZE_EXCEEDED, "Queue size threshold hit. Current size is {$size} and threshold is {$threshold}."); @@ -686,12 +688,12 @@ App::get('/v1/health/queue/functions') contentType: ContentType::JSON )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) - ->inject('publisher') + ->inject('publisherFunctions') ->inject('response') - ->action(function (int|string $threshold, Publisher $publisher, Response $response) { + ->action(function (int|string $threshold, Publisher $publisherFunctions, Response $response) { $threshold = \intval($threshold); - $size = $publisher->getQueueSize(new Queue(Event::FUNCTIONS_QUEUE_NAME)); + $size = $publisherFunctions->getQueueSize(new Queue(Event::FUNCTIONS_QUEUE_NAME)); if ($size >= $threshold) { throw new Exception(Exception::HEALTH_QUEUE_SIZE_EXCEEDED, "Queue size threshold hit. Current size is {$size} and threshold is {$threshold}."); diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index 0bc6f93787..d22c5cb2c2 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -13,6 +13,7 @@ use Appwrite\Permission; use Appwrite\Role; 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\CompoundUID; @@ -238,19 +239,38 @@ App::post('/v1/messaging/providers/smtp') ->label('event', 'providers.[providerId].create') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk', new Method( - namespace: 'messaging', - group: 'providers', - name: 'createSmtpProvider', - description: '/docs/references/messaging/create-smtp-provider.md', - auth: [AuthType::ADMIN, AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_CREATED, - model: Response::MODEL_PROVIDER, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'messaging', + group: 'providers', + name: 'createSmtpProvider', + description: '/docs/references/messaging/create-smtp-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'messaging.createSMTPProvider', + ), + ), + new Method( + namespace: 'messaging', + group: 'providers', + name: 'createSMTPProvider', + description: '/docs/references/messaging/create-smtp-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ] + ) + ]) ->param('providerId', '', new CustomId(), 'Provider 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), 'Provider name.') ->param('host', '', new Text(0), 'SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.') @@ -752,19 +772,38 @@ App::post('/v1/messaging/providers/fcm') ->label('event', 'providers.[providerId].create') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk', new Method( - namespace: 'messaging', - group: 'providers', - name: 'createFcmProvider', - description: '/docs/references/messaging/create-fcm-provider.md', - auth: [AuthType::ADMIN, AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_CREATED, - model: Response::MODEL_PROVIDER, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'messaging', + group: 'providers', + name: 'createFcmProvider', + description: '/docs/references/messaging/create-fcm-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'messaging.createFCMProvider', + ), + ), + new Method( + namespace: 'messaging', + group: 'providers', + name: 'createFCMProvider', + description: '/docs/references/messaging/create-fcm-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ] + ) + ]) ->param('providerId', '', new CustomId(), 'Provider 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), 'Provider name.') ->param('serviceAccountJSON', null, new JSON(), 'FCM service account JSON.', true) @@ -822,19 +861,38 @@ App::post('/v1/messaging/providers/apns') ->label('event', 'providers.[providerId].create') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk', new Method( - namespace: 'messaging', - group: 'providers', - name: 'createApnsProvider', - description: '/docs/references/messaging/create-apns-provider.md', - auth: [AuthType::ADMIN, AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_CREATED, - model: Response::MODEL_PROVIDER, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'messaging', + group: 'providers', + name: 'createApnsProvider', + description: '/docs/references/messaging/create-apns-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'messaging.createAPNSProvider', + ), + ), + new Method( + namespace: 'messaging', + group: 'providers', + name: 'createAPNSProvider', + description: '/docs/references/messaging/create-apns-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ] + ) + ]) ->param('providerId', '', new CustomId(), 'Provider 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), 'Provider name.') ->param('authKey', '', new Text(0), 'APNS authentication key.', true) @@ -1322,19 +1380,38 @@ App::patch('/v1/messaging/providers/smtp/:providerId') ->label('event', 'providers.[providerId].update') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk', new Method( - namespace: 'messaging', - group: 'providers', - name: 'updateSmtpProvider', - description: '/docs/references/messaging/update-smtp-provider.md', - auth: [AuthType::ADMIN, AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_PROVIDER, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'messaging', + group: 'providers', + name: 'updateSmtpProvider', + description: '/docs/references/messaging/update-smtp-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'messaging.updateSMTPProvider', + ), + ), + new Method( + namespace: 'messaging', + group: 'providers', + name: 'updateSMTPProvider', + description: '/docs/references/messaging/update-smtp-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + ) + ]) ->param('providerId', '', new UID(), 'Provider ID.') ->param('name', '', new Text(128), 'Provider name.', true) ->param('host', '', new Text(0), 'SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.', true) @@ -1894,19 +1971,38 @@ App::patch('/v1/messaging/providers/fcm/:providerId') ->label('event', 'providers.[providerId].update') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk', new Method( - namespace: 'messaging', - group: 'providers', - name: 'updateFcmProvider', - description: '/docs/references/messaging/update-fcm-provider.md', - auth: [AuthType::ADMIN, AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_PROVIDER, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'messaging', + group: 'providers', + name: 'updateFcmProvider', + description: '/docs/references/messaging/update-fcm-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'messaging.updateFCMProvider', + ), + ), + new Method( + namespace: 'messaging', + group: 'providers', + name: 'updateFCMProvider', + description: '/docs/references/messaging/update-fcm-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + ) + ]) ->param('providerId', '', new UID(), 'Provider ID.') ->param('name', '', new Text(128), 'Provider name.', true) ->param('enabled', null, new Boolean(), 'Set as enabled.', true) @@ -1970,19 +2066,38 @@ App::patch('/v1/messaging/providers/apns/:providerId') ->label('event', 'providers.[providerId].update') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk', new Method( - namespace: 'messaging', - group: 'providers', - name: 'updateApnsProvider', - description: '/docs/references/messaging/update-apns-provider.md', - auth: [AuthType::ADMIN, AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_PROVIDER, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'messaging', + group: 'providers', + name: 'updateApnsProvider', + description: '/docs/references/messaging/update-apns-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'messaging.updateAPNSProvider', + ), + ), + new Method( + namespace: 'messaging', + group: 'providers', + name: 'updateAPNSProvider', + description: '/docs/references/messaging/update-apns-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + ) + ]) ->param('providerId', '', new UID(), 'Provider ID.') ->param('name', '', new Text(128), 'Provider name.', true) ->param('enabled', null, new Boolean(), 'Set as enabled.', true) @@ -2896,7 +3011,7 @@ App::post('/v1/messaging/messages/email') ->inject('project') ->inject('queueForMessaging') ->inject('response') - ->action(function (string $messageId, string $subject, string $content, array $topics, array $users, array $targets, array $cc, array $bcc, array $attachments, bool $draft, bool $html, ?string $scheduledAt, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, Messaging $queueForMessaging, Response $response) { + ->action(function (string $messageId, string $subject, string $content, ?array $topics, ?array $users, ?array $targets, ?array $cc, ?array $bcc, ?array $attachments, bool $draft, bool $html, ?string $scheduledAt, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, Messaging $queueForMessaging, Response $response) { $messageId = $messageId == 'unique()' ? ID::unique() : $messageId; @@ -3024,19 +3139,38 @@ App::post('/v1/messaging/messages/sms') ->label('event', 'messages.[messageId].create') ->label('scope', 'messages.write') ->label('resourceType', RESOURCE_TYPE_MESSAGES) - ->label('sdk', new Method( - namespace: 'messaging', - group: 'messages', - name: 'createSms', - description: '/docs/references/messaging/create-sms.md', - auth: [AuthType::ADMIN, AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_CREATED, - model: Response::MODEL_MESSAGE, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'messaging', + group: 'messages', + name: 'createSms', + description: '/docs/references/messaging/create-sms.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MESSAGE, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'messaging.createSMS', + ), + ), + new Method( + namespace: 'messaging', + group: 'messages', + name: 'createSMS', + description: '/docs/references/messaging/create-sms.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MESSAGE, + ) + ] + ) + ]) ->param('messageId', '', new CustomId(), 'Message 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('content', '', new Text(64230), 'SMS Content.') ->param('topics', [], new ArrayList(new UID()), 'List of Topic IDs.', true) @@ -3050,7 +3184,7 @@ App::post('/v1/messaging/messages/sms') ->inject('project') ->inject('queueForMessaging') ->inject('response') - ->action(function (string $messageId, string $content, array $topics, array $users, array $targets, bool $draft, ?string $scheduledAt, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, Messaging $queueForMessaging, Response $response) { + ->action(function (string $messageId, string $content, ?array $topics, ?array $users, ?array $targets, bool $draft, ?string $scheduledAt, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, Messaging $queueForMessaging, Response $response) { $messageId = $messageId == 'unique()' ? ID::unique() : $messageId; @@ -3185,7 +3319,7 @@ App::post('/v1/messaging/messages/push') ->inject('project') ->inject('queueForMessaging') ->inject('response') - ->action(function (string $messageId, string $title, string $body, array $topics, array $users, array $targets, ?array $data, string $action, string $image, string $icon, string $sound, string $color, string $tag, int $badge, bool $draft, ?string $scheduledAt, bool $contentAvailable, bool $critical, string $priority, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, Messaging $queueForMessaging, Response $response) { + ->action(function (string $messageId, string $title, string $body, ?array $topics, ?array $users, ?array $targets, ?array $data, string $action, string $image, string $icon, string $sound, string $color, string $tag, int $badge, bool $draft, ?string $scheduledAt, bool $contentAvailable, bool $critical, string $priority, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, Messaging $queueForMessaging, Response $response) { $messageId = $messageId == 'unique()' ? ID::unique() : $messageId; @@ -3851,19 +3985,38 @@ App::patch('/v1/messaging/messages/sms/:messageId') ->label('event', 'messages.[messageId].update') ->label('scope', 'messages.write') ->label('resourceType', RESOURCE_TYPE_MESSAGES) - ->label('sdk', new Method( - namespace: 'messaging', - group: 'messages', - name: 'updateSms', - description: '/docs/references/messaging/update-sms.md', - auth: [AuthType::ADMIN, AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_MESSAGE, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'messaging', + group: 'messages', + name: 'updateSms', + description: '/docs/references/messaging/update-sms.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MESSAGE, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'messaging.updateSMS', + ), + ), + new Method( + namespace: 'messaging', + group: 'messages', + name: 'updateSMS', + description: '/docs/references/messaging/update-sms.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MESSAGE, + ) + ] + ) + ]) ->param('messageId', '', new UID(), 'Message ID.') ->param('topics', null, new ArrayList(new UID()), 'List of Topic IDs.', true) ->param('users', null, new ArrayList(new UID()), 'List of User IDs.', true) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index f201929021..4f34156115 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -12,6 +12,7 @@ use Appwrite\Network\Platform; use Appwrite\Network\Validator\Email; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Template\Template; @@ -619,19 +620,38 @@ App::patch('/v1/projects/:projectId/api') ->desc('Update API status') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk', new Method( - namespace: 'projects', - group: 'projects', - name: 'updateApiStatus', - description: '/docs/references/projects/update-api-status.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_PROJECT, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'projects', + group: 'projects', + name: 'updateApiStatus', + description: '/docs/references/projects/update-api-status.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'projects.updateAPIStatus', + ), + ), + new Method( + namespace: 'projects', + group: 'projects', + name: 'updateAPIStatus', + description: '/docs/references/projects/update-api-status.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + ) + ]) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('api', '', new WhiteList(array_keys(Config::getParam('apis')), true), 'API name.') ->param('status', null, new Boolean(), 'API status.') @@ -657,19 +677,38 @@ App::patch('/v1/projects/:projectId/api/all') ->desc('Update all API status') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk', new Method( - namespace: 'projects', - group: 'projects', - name: 'updateApiStatusAll', - description: '/docs/references/projects/update-api-status-all.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_PROJECT, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'projects', + group: 'projects', + name: 'updateApiStatusAll', + description: '/docs/references/projects/update-api-status-all.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'projects.updateAPIStatusAll', + ), + ), + new Method( + namespace: 'projects', + group: 'projects', + name: 'updateAPIStatusAll', + description: '/docs/references/projects/update-api-status-all.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + ) + ]) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('status', null, new Boolean(), 'API status.') ->inject('response') @@ -2018,19 +2057,38 @@ App::patch('/v1/projects/:projectId/smtp') ->desc('Update SMTP') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk', new Method( - namespace: 'projects', - group: 'templates', - name: 'updateSmtp', - description: '/docs/references/projects/update-smtp.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_PROJECT, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'projects', + group: 'templates', + name: 'updateSmtp', + description: '/docs/references/projects/update-smtp.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'projects.updateSMTP', + ), + ), + new Method( + namespace: 'projects', + group: 'templates', + name: 'updateSMTP', + description: '/docs/references/projects/update-smtp.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + ) + ]) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('enabled', false, new Boolean(), 'Enable custom SMTP service') ->param('senderName', '', new Text(255, 0), 'Name of the email sender', true) @@ -2115,19 +2173,38 @@ App::post('/v1/projects/:projectId/smtp/tests') ->desc('Create SMTP test') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk', new Method( - namespace: 'projects', - group: 'templates', - name: 'createSmtpTest', - description: '/docs/references/projects/create-smtp-test.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_NOCONTENT, - model: Response::MODEL_NONE, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'projects', + group: 'templates', + name: 'createSmtpTest', + description: '/docs/references/projects/create-smtp-test.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'projects.createSMTPTest', + ), + ), + new Method( + namespace: 'projects', + group: 'templates', + name: 'createSMTPTest', + description: '/docs/references/projects/create-smtp-test.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ] + ) + ]) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('emails', [], new ArrayList(new Email(), 10), 'Array of emails to send test email to. Maximum of 10 emails are allowed.') ->param('senderName', System::getEnv('_APP_SYSTEM_EMAIL_NAME', APP_NAME . ' Server'), new Text(255, 0), 'Name of the email sender') @@ -2190,19 +2267,38 @@ App::get('/v1/projects/:projectId/templates/sms/:type/:locale') ->desc('Get custom SMS template') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk', new Method( - namespace: 'projects', - group: 'templates', - name: 'getSmsTemplate', - description: '/docs/references/projects/get-sms-template.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_SMS_TEMPLATE, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'projects', + group: 'templates', + name: 'getSmsTemplate', + description: '/docs/references/projects/get-sms-template.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SMS_TEMPLATE, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'projects.getSMSTemplate', + ), + ), + new Method( + namespace: 'projects', + group: 'templates', + name: 'getSMSTemplate', + description: '/docs/references/projects/get-sms-template.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SMS_TEMPLATE, + ) + ] + ) + ]) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('type', '', new WhiteList(Config::getParam('locale-templates')['sms'] ?? []), 'Template type') ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) @@ -2337,19 +2433,38 @@ App::patch('/v1/projects/:projectId/templates/sms/:type/:locale') ->desc('Update custom SMS template') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk', new Method( - namespace: 'projects', - group: 'templates', - name: 'updateSmsTemplate', - description: '/docs/references/projects/update-sms-template.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_SMS_TEMPLATE, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'projects', + group: 'templates', + name: 'updateSmsTemplate', + description: '/docs/references/projects/update-sms-template.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SMS_TEMPLATE, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'projects.updateSMSTemplate', + ), + ), + new Method( + namespace: 'projects', + group: 'templates', + name: 'updateSMSTemplate', + description: '/docs/references/projects/update-sms-template.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SMS_TEMPLATE, + ) + ] + ) + ]) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('type', '', new WhiteList(Config::getParam('locale-templates')['sms'] ?? []), 'Template type') ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) @@ -2441,20 +2556,40 @@ App::delete('/v1/projects/:projectId/templates/sms/:type/:locale') ->desc('Reset custom SMS template') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk', new Method( - namespace: 'projects', - group: 'templates', - name: 'deleteSmsTemplate', - description: '/docs/references/projects/delete-sms-template.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_SMS_TEMPLATE, - ) - ], - contentType: ContentType::JSON - )) + ->label('sdk', [ + new Method( + namespace: 'projects', + group: 'templates', + name: 'deleteSmsTemplate', + description: '/docs/references/projects/delete-sms-template.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SMS_TEMPLATE, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'projects.deleteSMSTemplate', + ), + ), + new Method( + namespace: 'projects', + group: 'templates', + name: 'deleteSMSTemplate', + description: '/docs/references/projects/delete-sms-template.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SMS_TEMPLATE, + ) + ], + contentType: ContentType::JSON + ) + ]) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('type', '', new WhiteList(Config::getParam('locale-templates')['sms'] ?? []), 'Template type') ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 993f8a03c9..5498a33bf5 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -19,6 +19,7 @@ use Appwrite\Hooks\Hooks; use Appwrite\Network\Validator\Email; 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; @@ -1756,19 +1757,38 @@ App::patch('/v1/users/:userId/mfa') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') ->label('usage.metric', 'users.{scope}.requests.update') - ->label('sdk', new Method( - namespace: 'users', - group: 'users', - name: 'updateMfa', - description: '/docs/references/users/update-user-mfa.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_USER, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'users', + group: 'users', + name: 'updateMfa', + description: '/docs/references/users/update-user-mfa.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'users.updateMFA', + ), + ), + new Method( + namespace: 'users', + group: 'users', + name: 'updateMFA', + description: '/docs/references/users/update-user-mfa.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ] + ) + ]) ->param('userId', '', new UID(), 'User ID.') ->param('mfa', null, new Boolean(), 'Enable or disable MFA.') ->inject('response') @@ -1796,19 +1816,38 @@ App::get('/v1/users/:userId/mfa/factors') ->groups(['api', 'users']) ->label('scope', 'users.read') ->label('usage.metric', 'users.{scope}.requests.read') - ->label('sdk', new Method( - namespace: 'users', - group: 'mfa', - name: 'listMfaFactors', - description: '/docs/references/users/list-mfa-factors.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_MFA_FACTORS, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'users', + group: 'mfa', + name: 'listMfaFactors', + description: '/docs/references/users/list-mfa-factors.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_FACTORS, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'users.listMFAFactors', + ), + ), + new Method( + namespace: 'users', + group: 'mfa', + name: 'listMFAFactors', + description: '/docs/references/users/list-mfa-factors.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_FACTORS, + ) + ] + ) + ]) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -1835,19 +1874,38 @@ App::get('/v1/users/:userId/mfa/recovery-codes') ->groups(['api', 'users']) ->label('scope', 'users.read') ->label('usage.metric', 'users.{scope}.requests.read') - ->label('sdk', new Method( - namespace: 'users', - group: 'mfa', - name: 'getMfaRecoveryCodes', - description: '/docs/references/users/get-mfa-recovery-codes.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_MFA_RECOVERY_CODES, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'users', + group: 'mfa', + name: 'getMfaRecoveryCodes', + description: '/docs/references/users/get-mfa-recovery-codes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'users.getMFARecoveryCodes', + ), + ), + new Method( + namespace: 'users', + group: 'mfa', + name: 'getMFARecoveryCodes', + description: '/docs/references/users/get-mfa-recovery-codes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ] + ) + ]) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -1880,19 +1938,38 @@ App::patch('/v1/users/:userId/mfa/recovery-codes') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') ->label('usage.metric', 'users.{scope}.requests.update') - ->label('sdk', new Method( - namespace: 'users', - group: 'mfa', - name: 'createMfaRecoveryCodes', - description: '/docs/references/users/create-mfa-recovery-codes.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_CREATED, - model: Response::MODEL_MFA_RECOVERY_CODES, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'users', + group: 'mfa', + name: 'createMfaRecoveryCodes', + description: '/docs/references/users/create-mfa-recovery-codes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'users.createMFARecoveryCodes', + ), + ), + new Method( + namespace: 'users', + group: 'mfa', + name: 'createMFARecoveryCodes', + description: '/docs/references/users/create-mfa-recovery-codes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ] + ) + ]) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -1932,19 +2009,38 @@ App::put('/v1/users/:userId/mfa/recovery-codes') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') ->label('usage.metric', 'users.{scope}.requests.update') - ->label('sdk', new Method( - namespace: 'users', - group: 'mfa', - name: 'updateMfaRecoveryCodes', - description: '/docs/references/users/update-mfa-recovery-codes.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_MFA_RECOVERY_CODES, - ) - ] - )) + ->label('sdk', [ + new Method( + namespace: 'users', + group: 'mfa', + name: 'updateMfaRecoveryCodes', + description: '/docs/references/users/update-mfa-recovery-codes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'users.updateMFARecoveryCodes', + ), + ), + new Method( + namespace: 'users', + group: 'mfa', + name: 'updateMFARecoveryCodes', + description: '/docs/references/users/update-mfa-recovery-codes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ] + ) + ]) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -1983,20 +2079,40 @@ App::delete('/v1/users/:userId/mfa/authenticators/:type') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') ->label('usage.metric', 'users.{scope}.requests.update') - ->label('sdk', new Method( - namespace: 'users', - group: 'mfa', - name: 'deleteMfaAuthenticator', - description: '/docs/references/users/delete-mfa-authenticator.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_NOCONTENT, - model: Response::MODEL_NONE, - ) - ], - contentType: ContentType::NONE - )) + ->label('sdk', [ + new Method( + namespace: 'users', + group: 'mfa', + name: 'deleteMfaAuthenticator', + description: '/docs/references/users/delete-mfa-authenticator.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'users.deleteMFAAuthenticator', + ), + ), + new Method( + namespace: 'users', + group: 'mfa', + name: 'deleteMFAAuthenticator', + description: '/docs/references/users/delete-mfa-authenticator.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + ) + ]) ->param('userId', '', new UID(), 'User ID.') ->param('type', null, new WhiteList([Type::TOTP]), 'Type of authenticator.') ->inject('response') diff --git a/app/controllers/general.php b/app/controllers/general.php index 0c2a20cadc..40ce66b574 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -28,7 +28,6 @@ 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; @@ -357,11 +356,16 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw } } + $executionId = ID::unique(); + $headers = \array_merge([], $requestHeaders); + $headers['x-appwrite-execution-id'] = $executionId ?? ''; $headers['x-appwrite-user-id'] = ''; $headers['x-appwrite-country-code'] = ''; $headers['x-appwrite-continent-code'] = ''; $headers['x-appwrite-continent-eu'] = 'false'; + $ip = $request->getIP(); + $headers['x-appwrite-client-ip'] = $ip; $jwtExpiry = $resource->getAttribute('timeout', 900) + 60; // 1min extra to account for possible cold-starts $jwtObj = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', $jwtExpiry, 0); @@ -373,7 +377,6 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw $headers['x-appwrite-trigger'] = 'http'; $headers['x-appwrite-user-jwt'] = ''; - $ip = $headers['x-real-ip'] ?? ''; if (!empty($ip)) { $record = $geodb->get($ip); @@ -393,8 +396,6 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw } } - $executionId = ID::unique(); - $execution = new Document([ '$id' => $executionId, '$permissions' => [], @@ -610,6 +611,12 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw } } + if ($deployment->getAttribute('resourceType') === 'functions') { + $executionResponse['headers']['x-appwrite-execution-id'] = $execution->getId(); + } elseif ($deployment->getAttribute('resourceType') === 'sites') { + $executionResponse['headers']['x-appwrite-log-id'] = $execution->getId(); + } + $headersFiltered = []; foreach ($executionResponse['headers'] as $key => $value) { if (\in_array(\strtolower($key), FUNCTION_ALLOWLIST_HEADERS_RESPONSE)) { @@ -617,11 +624,32 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw } } + // Truncate logs if they exceed the limit + $maxLogLength = APP_FUNCTION_LOG_LENGTH_LIMIT; + $logs = $executionResponse['logs'] ?? ''; + + if (\is_string($logs) && \strlen($logs) > $maxLogLength) { + $warningMessage = "[WARNING] Logs truncated. The output exceeded {$maxLogLength} characters.\n"; + $warningLength = \strlen($warningMessage); + $maxContentLength = max(0, $maxLogLength - $warningLength); + $logs = $warningMessage . ($maxContentLength > 0 ? \substr($logs, -$maxContentLength) : ''); + } + + // Truncate errors if they exceed the limit + $maxErrorLength = APP_FUNCTION_ERROR_LENGTH_LIMIT; + $errors = $executionResponse['errors'] ?? ''; + + if (\is_string($errors) && \strlen($errors) > $maxErrorLength) { + $warningMessage = "[WARNING] Errors truncated. The output exceeded {$maxErrorLength} characters.\n"; + $warningLength = \strlen($warningMessage); + $maxContentLength = max(0, $maxErrorLength - $warningLength); + $errors = $warningMessage . ($maxContentLength > 0 ? \substr($errors, -$maxContentLength) : ''); + } /** Update execution status */ $status = $executionResponse['statusCode'] >= 500 ? 'failed' : 'completed'; $execution->setAttribute('status', $status); - $execution->setAttribute('logs', $executionResponse['logs']); - $execution->setAttribute('errors', $executionResponse['errors']); + $execution->setAttribute('logs', $logs); + $execution->setAttribute('errors', $errors); $execution->setAttribute('responseStatusCode', $executionResponse['statusCode']); $execution->setAttribute('responseHeaders', $headersFiltered); $execution->setAttribute('duration', $executionResponse['duration']); @@ -854,7 +882,7 @@ App::init() } if (version_compare($requestFormat, '1.8.0', '<')) { $dbForProject = $getProjectDB($project); - $request->addFilter(new RequestV20($dbForProject, $request->getParams())); + $request->addFilter(new RequestV20($dbForProject, $route->getPathValues($request))); } } @@ -994,9 +1022,6 @@ 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, '>')) { $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"; } @@ -1035,26 +1060,6 @@ App::init() $response->addHeader('Access-Control-Allow-Origin', '*'); } - /** - * Deprecation Warning - */ - /** @var \Appwrite\SDK\Method $sdk */ - $sdk = $route->getLabel('sdk', false); - $deprecationWarning = 'This route is deprecated. See the updated documentation for improved compatibility and migration details.'; - $sdkItems = is_array($sdk) ? $sdk : (!empty($sdk) ? [$sdk] : []); - if (!empty($sdkItems) && count($sdkItems) > 0) { - $allDeprecated = true; - foreach ($sdkItems as $sdkItem) { - if (!$sdkItem->isDeprecated()) { - $allDeprecated = false; - break; - } - } - if ($allDeprecated) { - $warnings[] = $deprecationWarning; - } - } - if (!empty($warnings)) { $response->addHeader('X-Appwrite-Warning', implode(';', $warnings)); } diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index c2f5c415a0..6dcb99b56f 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -60,6 +60,12 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; +/** + * This isolated event handling for `users.*.create` which is based on a `Database::EVENT_DOCUMENT_CREATE` listener may look odd, but it is **intentional**. + * + * Accounts can be created in many ways beyond `createAccount` + * (anonymous, OAuth, phone, etc.), and those flows are probably not covered in event tests; so we handle this here. + */ $eventDatabaseListener = function (Document $project, Document $document, Response $response, Event $queueForEvents, Func $queueForFunctions, Webhook $queueForWebhooks, Realtime $queueForRealtime) { // Only trigger events for user creation with the database listener. if ($document->getCollection() !== 'users') { @@ -372,9 +378,9 @@ App::init() } // Do now allow access if scope is not allowed - $scope = $route->getLabel('scope', 'none'); - if (!\in_array($scope, $scopes)) { - throw new Exception(Exception::GENERAL_UNAUTHORIZED_SCOPE, $user->getAttribute('email', 'User') . ' (role: ' . \strtolower($roles[$role]['label']) . ') missing scope (' . $scope . ')'); + $allowed = (array)$route->getLabel('scope', 'none'); + if (empty(\array_intersect($allowed, $scopes))) { + throw new Exception(Exception::GENERAL_UNAUTHORIZED_SCOPE, $user->getAttribute('email', 'User') . ' (role: ' . \strtolower($roles[$role]['label']) . ') missing scopes (' . \json_encode($allowed) . ')'); } // Do not allow access to blocked accounts @@ -408,6 +414,8 @@ App::init() ->inject('project') ->inject('user') ->inject('publisher') + ->inject('publisherFunctions') + ->inject('publisherWebhooks') ->inject('queueForEvents') ->inject('queueForMessaging') ->inject('queueForAudits') @@ -423,7 +431,7 @@ App::init() ->inject('plan') ->inject('devKey') ->inject('telemetry') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Publisher $publisher, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, StatsUsage $queueForStatsUsage, Database $dbForProject, callable $timelimit, Document $resourceToken, string $mode, ?Key $apiKey, array $plan, Document $devKey, Telemetry $telemetry) use ($usageDatabaseListener, $eventDatabaseListener) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Publisher $publisher, Publisher $publisherFunctions, Publisher $publisherWebhooks, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, StatsUsage $queueForStatsUsage, Database $dbForProject, callable $timelimit, Document $resourceToken, string $mode, ?Key $apiKey, array $plan, Document $devKey, Telemetry $telemetry) use ($usageDatabaseListener, $eventDatabaseListener) { $route = $utopia->getRoute(); @@ -535,8 +543,8 @@ App::init() // Clone the queues, to prevent events triggered by the database listener // from overwriting the events that are supposed to be triggered in the shutdown hook. $queueForEventsClone = new Event($publisher); - $queueForFunctions = new Func($publisher); - $queueForWebhooks = new Webhook($publisher); + $queueForFunctions = new Func($publisherFunctions); + $queueForWebhooks = new Webhook($publisherWebhooks); $queueForRealtime = new Realtime(); $dbForProject @@ -802,12 +810,6 @@ App::shutdown() } if (!empty($queueForDatabase->getType())) { - Console::info("Triggering database event: \n" . \json_encode([ - 'projectId' => $project->getId(), - 'databaseId' => $queueForDatabase->getDatabase()?->getId(), - 'tableId' => $queueForDatabase->getTable()?->getId() ?? $queueForDatabase->getCollection()?->getId(), - 'rowId' => $queueForDatabase->getRow()?->getId() ?? $queueForDatabase->getDocument()?->getId(), - ])); $queueForDatabase->trigger(); } diff --git a/app/init/constants.php b/app/init/constants.php index e811fbe306..66933149a8 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -149,8 +149,10 @@ const APP_AUTH_TYPE_KEY = 'Key'; const APP_AUTH_TYPE_ADMIN = 'Admin'; // Response related const MAX_OUTPUT_CHUNK_SIZE = 10 * 1024 * 1024; // 10MB +const APP_FUNCTION_LOG_LENGTH_LIMIT = 1000000; +const APP_FUNCTION_ERROR_LENGTH_LIMIT = 1000000; // Function headers -const FUNCTION_ALLOWLIST_HEADERS_REQUEST = ['content-type', 'agent', 'content-length', 'host']; +const FUNCTION_ALLOWLIST_HEADERS_REQUEST = ['content-type', 'agent', 'content-length', 'host', 'x-appwrite-client-ip']; const FUNCTION_ALLOWLIST_HEADERS_RESPONSE = ['content-type', 'content-length']; // Message types const MESSAGE_TYPE_EMAIL = 'email'; diff --git a/app/init/resources.php b/app/init/resources.php index 468ca4fbd8..d4f0433447 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -84,27 +84,30 @@ App::setResource('localeCodes', function () { App::setResource('publisher', function (Group $pools) { return new BrokerPool(publisher: $pools->get('publisher')); }, ['pools']); -App::setResource('publisherDatabases', function (BrokerPool $publisher) { +App::setResource('publisherDatabases', function (Publisher $publisher) { return $publisher; }, ['publisher']); -App::setResource('publisherMigrations', function (BrokerPool $publisher) { +App::setResource('publisherFunctions', function (Publisher $publisher) { return $publisher; }, ['publisher']); -App::setResource('publisherStatsUsage', function (BrokerPool $publisher) { +App::setResource('publisherMigrations', function (Publisher $publisher) { + return $publisher; +}, ['publisher']); +App::setResource('publisherStatsUsage', function (Publisher $publisher) { + return $publisher; +}, ['publisher']); +App::setResource('publisherMails', function (Publisher $publisher) { + return $publisher; +}, ['publisher']); +App::setResource('publisherDeletes', function (Publisher $publisher) { + return $publisher; +}, ['publisher']); +App::setResource('publisherMessaging', function (Publisher $publisher) { + return $publisher; +}, ['publisher']); +App::setResource('publisherWebhooks', function (Publisher $publisher) { return $publisher; }, ['publisher']); -App::setResource('consumer', function (Group $pools) { - return new BrokerPool(consumer: $pools->get('consumer')); -}, ['pools']); -App::setResource('consumerDatabases', function (BrokerPool $consumer) { - return $consumer; -}, ['consumer']); -App::setResource('consumerMigrations', function (BrokerPool $consumer) { - return $consumer; -}, ['consumer']); -App::setResource('consumerStatsUsage', function (BrokerPool $consumer) { - return $consumer; -}, ['consumer']); App::setResource('queueForMessaging', function (Publisher $publisher) { return new Messaging($publisher); }, ['publisher']); diff --git a/app/views/general/404.phtml b/app/views/general/404.phtml index 2a9ff7f312..e89e295701 100644 --- a/app/views/general/404.phtml +++ b/app/views/general/404.phtml @@ -6,9 +6,32 @@ 404 Not Found + + + <?php echo $this->print($title); ?> - +
-
+
print($label); ?>

print($message); ?>

@@ -474,14 +486,14 @@ switch ($type) { - +
-
-
Error trace
@@ -512,6 +524,17 @@ switch ($type) {
+ \ No newline at end of file diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 8e165e45e5..ed4de38d2b 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -179,7 +179,7 @@ $image = $this->getParam('image', ''); appwrite-console: <<: *x-logging container_name: appwrite-console - image: /console:6.2.0 + image: /console:7.0.2 restart: unless-stopped networks: - appwrite diff --git a/app/worker.php b/app/worker.php index 90f3368fe7..bf0a6583ec 100644 --- a/app/worker.php +++ b/app/worker.php @@ -251,6 +251,10 @@ Server::setResource('publisherDatabases', function (BrokerPool $publisher) { return $publisher; }, ['publisher']); +Server::setResource('publisherFunctions', function (BrokerPool $publisher) { + return $publisher; +}, ['publisher']); + Server::setResource('publisherMigrations', function (BrokerPool $publisher) { return $publisher; }, ['publisher']); @@ -259,6 +263,10 @@ Server::setResource('publisherStatsUsage', function (BrokerPool $publisher) { return $publisher; }, ['publisher']); +Server::setResource('publisherMessaging', function (BrokerPool $publisher) { + return $publisher; +}, ['publisher']); + Server::setResource('consumer', function (Group $pools) { return new BrokerPool(consumer: $pools->get('consumer')); }, ['pools']); diff --git a/composer.lock b/composer.lock index 4321d88110..3bf17bc228 100644 --- a/composer.lock +++ b/composer.lock @@ -486,16 +486,16 @@ }, { "name": "composer/semver", - "version": "3.4.3", + "version": "3.4.4", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" + "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", - "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95", + "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95", "shasum": "" }, "require": { @@ -547,7 +547,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.3" + "source": "https://github.com/composer/semver/tree/3.4.4" }, "funding": [ { @@ -557,13 +557,9 @@ { "url": "https://github.com/composer", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" } ], - "time": "2024-09-19T14:15:21+00:00" + "time": "2025-08-20T19:15:30+00:00" }, { "name": "dragonmantank/cron-expression", @@ -898,16 +894,16 @@ }, { "name": "matomo/device-detector", - "version": "6.4.6", + "version": "6.4.7", "source": { "type": "git", "url": "https://github.com/matomo-org/device-detector.git", - "reference": "6f07f615199851548db47a900815d2ea2cdcde08" + "reference": "e53eed31bb1530851feebe52bd64c3451da19e77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/6f07f615199851548db47a900815d2ea2cdcde08", - "reference": "6f07f615199851548db47a900815d2ea2cdcde08", + "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/e53eed31bb1530851feebe52bd64c3451da19e77", + "reference": "e53eed31bb1530851feebe52bd64c3451da19e77", "shasum": "" }, "require": { @@ -964,7 +960,7 @@ "source": "https://github.com/matomo-org/matomo", "wiki": "https://dev.matomo.org/" }, - "time": "2025-06-10T10:00:59+00:00" + "time": "2025-08-20T17:20:16+00:00" }, { "name": "mustangostang/spyc", @@ -2780,7 +2776,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -2841,7 +2837,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" }, "funding": [ { @@ -2852,6 +2848,10 @@ "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" @@ -2861,7 +2861,7 @@ }, { "name": "symfony/polyfill-php82", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php82.git", @@ -2917,7 +2917,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php82/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-php82/tree/v1.33.0" }, "funding": [ { @@ -2928,6 +2928,10 @@ "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" @@ -3553,16 +3557,16 @@ }, { "name": "utopia-php/database", - "version": "1.0.2", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "e194da3ff803c51486d343c88156619fec9d1531" + "reference": "8a536fead840d9da6ee819fe6b80e0f047997f69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/e194da3ff803c51486d343c88156619fec9d1531", - "reference": "e194da3ff803c51486d343c88156619fec9d1531", + "url": "https://api.github.com/repos/utopia-php/database/zipball/8a536fead840d9da6ee819fe6b80e0f047997f69", + "reference": "8a536fead840d9da6ee819fe6b80e0f047997f69", "shasum": "" }, "require": { @@ -3603,9 +3607,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/1.0.2" + "source": "https://github.com/utopia-php/database/tree/1.2.3" }, - "time": "2025-08-15T07:11:01+00:00" + "time": "2025-08-27T11:47:04+00:00" }, { "name": "utopia-php/detector", @@ -3857,16 +3861,16 @@ }, { "name": "utopia-php/framework", - "version": "0.33.20", + "version": "0.33.22", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "e1c7ab4e0b5b0a9a70256b1e00912e101e76a131" + "reference": "c01a815cb976c9255e045fc3bcc3f5fcf477e0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/e1c7ab4e0b5b0a9a70256b1e00912e101e76a131", - "reference": "e1c7ab4e0b5b0a9a70256b1e00912e101e76a131", + "url": "https://api.github.com/repos/utopia-php/http/zipball/c01a815cb976c9255e045fc3bcc3f5fcf477e0bc", + "reference": "c01a815cb976c9255e045fc3bcc3f5fcf477e0bc", "shasum": "" }, "require": { @@ -3898,9 +3902,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.20" + "source": "https://github.com/utopia-php/http/tree/0.33.22" }, - "time": "2025-05-18T23:51:21+00:00" + "time": "2025-08-26T10:29:50+00:00" }, { "name": "utopia-php/image", @@ -4922,16 +4926,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.29", + "version": "1.1.15", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "4af563f3b0879747efc8434eb8ed8bf97e75039f" + "reference": "8e8e39634ba7558704522959d88f3542563a5444" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/4af563f3b0879747efc8434eb8ed8bf97e75039f", - "reference": "4af563f3b0879747efc8434eb8ed8bf97e75039f", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/8e8e39634ba7558704522959d88f3542563a5444", + "reference": "8e8e39634ba7558704522959d88f3542563a5444", "shasum": "" }, "require": { @@ -4967,9 +4971,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.29" + "source": "https://github.com/appwrite/sdk-generator/tree/1.1.15" }, - "time": "2025-08-04T04:34:45+00:00" + "time": "2025-08-27T04:59:35+00:00" }, { "name": "doctrine/annotations", @@ -6151,16 +6155,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.24", + "version": "9.6.25", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ea49afa29aeea25ea7bf9de9fdd7cab163cc0701" + "reference": "049c011e01be805202d8eebedef49f769a8ec7b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea49afa29aeea25ea7bf9de9fdd7cab163cc0701", - "reference": "ea49afa29aeea25ea7bf9de9fdd7cab163cc0701", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/049c011e01be805202d8eebedef49f769a8ec7b7", + "reference": "049c011e01be805202d8eebedef49f769a8ec7b7", "shasum": "" }, "require": { @@ -6234,7 +6238,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.24" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.25" }, "funding": [ { @@ -6258,7 +6262,7 @@ "type": "tidelift" } ], - "time": "2025-08-10T08:32:42+00:00" + "time": "2025-08-20T14:38:31+00:00" }, { "name": "psr/cache", @@ -7713,7 +7717,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -7772,7 +7776,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" }, "funding": [ { @@ -7783,6 +7787,10 @@ "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" @@ -7792,16 +7800,16 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", - "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", "shasum": "" }, "require": { @@ -7850,7 +7858,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" }, "funding": [ { @@ -7861,16 +7869,20 @@ "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-09-09T11:45:10+00:00" + "time": "2025-06-27T09:58:17+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -7931,7 +7943,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" }, "funding": [ { @@ -7942,6 +7954,10 @@ "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" @@ -7951,7 +7967,7 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", @@ -8007,7 +8023,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.33.0" }, "funding": [ { @@ -8018,6 +8034,10 @@ "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" @@ -8407,7 +8427,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -8431,5 +8451,5 @@ "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/docker-compose.yml b/docker-compose.yml index bdc8974a35..87385aa086 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -71,6 +71,9 @@ services: - traefik.http.routers.appwrite_api_https.service=appwrite_api - traefik.http.routers.appwrite_api_https.tls=true volumes: + - /var/run/docker.sock:/var/run/docker.sock # Only needed for tests + - ./docker-compose.yml:/usr/src/code/docker-compose.yml # Only needed for tests + - ./.env:/usr/src/code/.env # Only needed for tests - appwrite-uploads:/storage/uploads:rw - appwrite-imports:/storage/imports:rw - appwrite-cache:/storage/cache:rw @@ -216,7 +219,7 @@ services: appwrite-console: <<: *x-logging container_name: appwrite-console - image: appwrite/console:7.0.0-qa.8 + image: appwrite/console:7.0.2 restart: unless-stopped networks: - appwrite 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/client-android/java/account/create-j-w-t.md rename to docs/examples/1.8.x/client-android/java/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/client-android/java/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/client-android/java/account/create-magic-url-token.md 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 index 54781f2dc8..d236f46c6c 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client(context) Account account = new Account(client); -account.createMfaAuthenticator( +account.createMFAAuthenticator( AuthenticatorType.TOTP, // type new CoroutineCallback<>((result, error) -> { if (error != null) { 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 index 87a56fe350..222c0bdad2 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client(context) Account account = new Account(client); -account.createMfaChallenge( +account.createMFAChallenge( AuthenticationFactor.EMAIL, // factor new CoroutineCallback<>((result, error) -> { if (error != null) { 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 index ab50734215..792e0860f7 100644 --- 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 @@ -8,7 +8,7 @@ Client client = new Client(context) Account account = new Account(client); -account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { +account.createMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; 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-auth-2-session.md similarity index 100% rename from docs/examples/1.8.x/client-android/java/account/create-o-auth2session.md rename to docs/examples/1.8.x/client-android/java/account/create-o-auth-2-session.md 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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/client-android/java/account/create-o-auth2token.md rename to docs/examples/1.8.x/client-android/java/account/create-o-auth-2-token.md 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 index 4a9693bf8c..b5ff26cbec 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client(context) Account account = new Account(client); -account.deleteMfaAuthenticator( +account.deleteMFAAuthenticator( AuthenticatorType.TOTP, // type new CoroutineCallback<>((result, error) -> { if (error != null) { 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 index 8274bb351a..22bc1c1637 100644 --- 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 @@ -8,7 +8,7 @@ Client client = new Client(context) Account account = new Account(client); -account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { +account.getMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; 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 index 9ea8331620..06f20e1a5a 100644 --- 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 @@ -8,7 +8,7 @@ Client client = new Client(context) Account account = new Account(client); -account.listMfaFactors(new CoroutineCallback<>((result, error) -> { +account.listMFAFactors(new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/client-android/java/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/client-android/java/account/update-magic-url-session.md 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 index b8016e75f2..00ddd46b26 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client(context) Account account = new Account(client); -account.updateMfaAuthenticator( +account.updateMFAAuthenticator( AuthenticatorType.TOTP, // type "", // otp new CoroutineCallback<>((result, error) -> { 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 index c6401504d8..10b5db49f8 100644 --- 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 @@ -8,7 +8,7 @@ Client client = new Client(context) Account account = new Account(client); -account.updateMfaChallenge( +account.updateMFAChallenge( "", // challengeId "", // otp new CoroutineCallback<>((result, error) -> { 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 index 650ae24128..c0d6c69fa0 100644 --- 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 @@ -8,7 +8,7 @@ Client client = new Client(context) Account account = new Account(client); -account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { +account.updateMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/client-android/java/account/update-m-f-a.md rename to docs/examples/1.8.x/client-android/java/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/client-android/java/avatars/get-q-r.md rename to docs/examples/1.8.x/client-android/java/avatars/get-qr.md 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/decrement-document-attribute.md similarity index 73% rename from docs/examples/1.8.x/client-android/java/databases/create-documents.md rename to docs/examples/1.8.x/client-android/java/databases/decrement-document-attribute.md index d5629b803f..de6a4ab48d 100644 --- a/docs/examples/1.8.x/client-android/java/databases/create-documents.md +++ b/docs/examples/1.8.x/client-android/java/databases/decrement-document-attribute.md @@ -4,15 +4,17 @@ import io.appwrite.services.Databases; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey(""); // + .setProject(""); // Your project ID Databases databases = new Databases(client); -databases.createDocuments( +databases.decrementDocumentAttribute( "", // databaseId "", // collectionId - listOf(), // documents + "", // documentId + "", // attribute + 0, // value (optional) + 0, // min (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/client-android/java/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-android/java/databases/increment-document-attribute.md new file mode 100644 index 0000000000..94ffa9d749 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/increment-document-attribute.md @@ -0,0 +1,27 @@ +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.incrementDocumentAttribute( + "", // databaseId + "", // collectionId + "", // documentId + "", // attribute + 0, // value (optional) + 0, // max (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/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-android/java/locale/list-countries-eu.md similarity index 100% rename from docs/examples/1.8.x/client-android/java/locale/list-countries-e-u.md rename to docs/examples/1.8.x/client-android/java/locale/list-countries-eu.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/tablesdb/create-row.md similarity index 86% rename from docs/examples/1.8.x/client-android/java/grids/create-row.md rename to docs/examples/1.8.x/client-android/java/tablesdb/create-row.md index 93cea1f09c..12d1680b0f 100644 --- a/docs/examples/1.8.x/client-android/java/grids/create-row.md +++ b/docs/examples/1.8.x/client-android/java/tablesdb/create-row.md @@ -1,14 +1,14 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject(""); // Your project ID -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createRow( +tablesDB.createRow( "", // databaseId "", // tableId "", // rowId diff --git a/docs/examples/1.8.x/client-android/java/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-android/java/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..73f2128a8f --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tablesdb/decrement-row-column.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.decrementRowColumn( + "", // databaseId + "", // tableId + "", // rowId + "", // column + 0, // value (optional) + 0, // min (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/tablesdb/delete-row.md similarity index 84% rename from docs/examples/1.8.x/client-android/java/grids/delete-row.md rename to docs/examples/1.8.x/client-android/java/tablesdb/delete-row.md index a73c03a06e..d4c351bc32 100644 --- a/docs/examples/1.8.x/client-android/java/grids/delete-row.md +++ b/docs/examples/1.8.x/client-android/java/tablesdb/delete-row.md @@ -1,14 +1,14 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject(""); // Your project ID -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.deleteRow( +tablesDB.deleteRow( "", // databaseId "", // tableId "", // rowId diff --git a/docs/examples/1.8.x/client-android/java/grids/get-row.md b/docs/examples/1.8.x/client-android/java/tablesdb/get-row.md similarity index 85% rename from docs/examples/1.8.x/client-android/java/grids/get-row.md rename to docs/examples/1.8.x/client-android/java/tablesdb/get-row.md index 4968759d6b..191fc896e9 100644 --- a/docs/examples/1.8.x/client-android/java/grids/get-row.md +++ b/docs/examples/1.8.x/client-android/java/tablesdb/get-row.md @@ -1,14 +1,14 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject(""); // Your project ID -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.getRow( +tablesDB.getRow( "", // databaseId "", // tableId "", // rowId diff --git a/docs/examples/1.8.x/client-android/java/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-android/java/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..dc2120ea07 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tablesdb/increment-row-column.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.incrementRowColumn( + "", // databaseId + "", // tableId + "", // rowId + "", // column + 0, // value (optional) + 0, // max (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/tablesdb/list-rows.md similarity index 84% rename from docs/examples/1.8.x/client-android/java/grids/list-rows.md rename to docs/examples/1.8.x/client-android/java/tablesdb/list-rows.md index 55336dc452..dc50574f1e 100644 --- a/docs/examples/1.8.x/client-android/java/grids/list-rows.md +++ b/docs/examples/1.8.x/client-android/java/tablesdb/list-rows.md @@ -1,14 +1,14 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject(""); // Your project ID -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.listRows( +tablesDB.listRows( "", // databaseId "", // tableId listOf(), // queries (optional) diff --git a/docs/examples/1.8.x/client-android/java/grids/update-row.md b/docs/examples/1.8.x/client-android/java/tablesdb/update-row.md similarity index 86% rename from docs/examples/1.8.x/client-android/java/grids/update-row.md rename to docs/examples/1.8.x/client-android/java/tablesdb/update-row.md index 23dc0907eb..0f1fabc91e 100644 --- a/docs/examples/1.8.x/client-android/java/grids/update-row.md +++ b/docs/examples/1.8.x/client-android/java/tablesdb/update-row.md @@ -1,14 +1,14 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject(""); // Your project ID -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateRow( +tablesDB.updateRow( "", // databaseId "", // tableId "", // rowId diff --git a/docs/examples/1.8.x/client-android/java/grids/upsert-row.md b/docs/examples/1.8.x/client-android/java/tablesdb/upsert-row.md similarity index 86% rename from docs/examples/1.8.x/client-android/java/grids/upsert-row.md rename to docs/examples/1.8.x/client-android/java/tablesdb/upsert-row.md index 3938fde103..22c0e94b44 100644 --- a/docs/examples/1.8.x/client-android/java/grids/upsert-row.md +++ b/docs/examples/1.8.x/client-android/java/tablesdb/upsert-row.md @@ -1,14 +1,14 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject(""); // Your project ID -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.upsertRow( +tablesDB.upsertRow( "", // databaseId "", // tableId "", // rowId 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/client-android/kotlin/account/create-j-w-t.md rename to docs/examples/1.8.x/client-android/kotlin/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/client-android/kotlin/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/client-android/kotlin/account/create-magic-url-token.md 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 index ffb2f2f9bf..934de1cc1c 100644 --- 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 @@ -9,6 +9,6 @@ val client = Client(context) val account = Account(client) -val result = account.createMfaAuthenticator( +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 index 36b12d3f98..f79c49891a 100644 --- 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 @@ -9,6 +9,6 @@ val client = Client(context) val account = Account(client) -val result = account.createMfaChallenge( +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 index 974c8f25a0..cc5696646c 100644 --- 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 @@ -8,4 +8,4 @@ val client = Client(context) val account = Account(client) -val result = account.createMfaRecoveryCodes() +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-auth-2-session.md similarity index 100% rename from docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2session.md rename to docs/examples/1.8.x/client-android/kotlin/account/create-o-auth-2-session.md 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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2token.md rename to docs/examples/1.8.x/client-android/kotlin/account/create-o-auth-2-token.md 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 index 057e021f6d..b140a11f55 100644 --- 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 @@ -9,6 +9,6 @@ val client = Client(context) val account = Account(client) -val result = account.deleteMfaAuthenticator( +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/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-android/kotlin/account/get-mfa-recovery-codes.md index 6201658fe3..f9d36122bb 100644 --- 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 @@ -8,4 +8,4 @@ val client = Client(context) val account = Account(client) -val result = account.getMfaRecoveryCodes() +val result = account.getMFARecoveryCodes() 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 index 09119ab65a..56d1c4dbc4 100644 --- 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 @@ -8,4 +8,4 @@ val client = Client(context) val account = Account(client) -val result = account.listMfaFactors() +val result = account.listMFAFactors() 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/client-android/kotlin/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/client-android/kotlin/account/update-magic-url-session.md 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 index 987825e589..4f6ecd7d39 100644 --- 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 @@ -9,7 +9,7 @@ val client = Client(context) val account = Account(client) -val result = account.updateMfaAuthenticator( +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 index c7f8139f15..d5cbc1fdab 100644 --- 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 @@ -8,7 +8,7 @@ val client = Client(context) val account = Account(client) -val result = account.updateMfaChallenge( +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 index c0ee3c386f..0277ca7587 100644 --- 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 @@ -8,4 +8,4 @@ val client = Client(context) val account = Account(client) -val result = account.updateMfaRecoveryCodes() +val result = account.updateMFARecoveryCodes() 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/client-android/kotlin/account/update-m-f-a.md rename to docs/examples/1.8.x/client-android/kotlin/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/client-android/kotlin/avatars/get-q-r.md rename to docs/examples/1.8.x/client-android/kotlin/avatars/get-qr.md 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/decrement-document-attribute.md similarity index 60% rename from docs/examples/1.8.x/client-android/kotlin/databases/create-documents.md rename to docs/examples/1.8.x/client-android/kotlin/databases/decrement-document-attribute.md index 6f9e1f98f7..c500fa8687 100644 --- a/docs/examples/1.8.x/client-android/kotlin/databases/create-documents.md +++ b/docs/examples/1.8.x/client-android/kotlin/databases/decrement-document-attribute.md @@ -4,13 +4,15 @@ import io.appwrite.services.Databases val client = Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("") // + .setProject("") // Your project ID val databases = Databases(client) -val result = databases.createDocuments( +val result = databases.decrementDocumentAttribute( databaseId = "", collectionId = "", - documents = listOf(), + documentId = "", + attribute = "", + value = 0, // (optional) + min = 0, // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-android/kotlin/databases/increment-document-attribute.md new file mode 100644 index 0000000000..0ae6b02d3d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/increment-document-attribute.md @@ -0,0 +1,18 @@ +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.incrementDocumentAttribute( + databaseId = "", + collectionId = "", + documentId = "", + attribute = "", + value = 0, // (optional) + max = 0, // (optional) +) \ No newline at end of file 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-eu.md similarity index 100% rename from docs/examples/1.8.x/client-android/kotlin/locale/list-countries-e-u.md rename to docs/examples/1.8.x/client-android/kotlin/locale/list-countries-eu.md diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/create-row.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/create-row.md similarity index 80% rename from docs/examples/1.8.x/client-android/kotlin/grids/create-row.md rename to docs/examples/1.8.x/client-android/kotlin/tablesdb/create-row.md index 5b29ac0db0..1a9cbdb488 100644 --- a/docs/examples/1.8.x/client-android/kotlin/grids/create-row.md +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/create-row.md @@ -1,14 +1,14 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID -val grids = Grids(client) +val tablesDB = TablesDB(client) -val result = grids.createRow( +val result = tablesDB.createRow( databaseId = "", tableId = "", rowId = "", diff --git a/docs/examples/1.8.x/client-android/kotlin/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..645e9f4a66 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/decrement-row-column.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.decrementRowColumn( + databaseId = "", + tableId = "", + rowId = "", + column = "", + value = 0, // (optional) + min = 0, // (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/tablesdb/delete-row.md similarity index 76% rename from docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md rename to docs/examples/1.8.x/client-android/kotlin/tablesdb/delete-row.md index e85ff6c4ad..3fcd409295 100644 --- a/docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/delete-row.md @@ -1,14 +1,14 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID -val grids = Grids(client) +val tablesDB = TablesDB(client) -val result = grids.deleteRow( +val result = tablesDB.deleteRow( databaseId = "", tableId = "", rowId = "", diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/get-row.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/get-row.md similarity index 78% rename from docs/examples/1.8.x/client-android/kotlin/grids/get-row.md rename to docs/examples/1.8.x/client-android/kotlin/tablesdb/get-row.md index 0b6c313645..b754cba915 100644 --- a/docs/examples/1.8.x/client-android/kotlin/grids/get-row.md +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/get-row.md @@ -1,14 +1,14 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID -val grids = Grids(client) +val tablesDB = TablesDB(client) -val result = grids.getRow( +val result = tablesDB.getRow( databaseId = "", tableId = "", rowId = "", diff --git a/docs/examples/1.8.x/client-android/kotlin/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..230408abac --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/increment-row-column.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.incrementRowColumn( + databaseId = "", + tableId = "", + rowId = "", + column = "", + value = 0, // (optional) + max = 0, // (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/tablesdb/list-rows.md similarity index 77% rename from docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md rename to docs/examples/1.8.x/client-android/kotlin/tablesdb/list-rows.md index 153e62787f..05d9ca33b3 100644 --- a/docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/list-rows.md @@ -1,14 +1,14 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID -val grids = Grids(client) +val tablesDB = TablesDB(client) -val result = grids.listRows( +val result = tablesDB.listRows( databaseId = "", tableId = "", queries = listOf(), // (optional) diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/update-row.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/update-row.md similarity index 80% rename from docs/examples/1.8.x/client-android/kotlin/grids/update-row.md rename to docs/examples/1.8.x/client-android/kotlin/tablesdb/update-row.md index 8dff0b157c..f99f8f275e 100644 --- a/docs/examples/1.8.x/client-android/kotlin/grids/update-row.md +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/update-row.md @@ -1,14 +1,14 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID -val grids = Grids(client) +val tablesDB = TablesDB(client) -val result = grids.updateRow( +val result = tablesDB.updateRow( databaseId = "", tableId = "", rowId = "", diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/upsert-row.md similarity index 80% rename from docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md rename to docs/examples/1.8.x/client-android/kotlin/tablesdb/upsert-row.md index a6f5bb846e..d82406a7f8 100644 --- a/docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/upsert-row.md @@ -1,14 +1,14 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID -val grids = Grids(client) +val tablesDB = TablesDB(client) -val result = grids.upsertRow( +val result = tablesDB.upsertRow( databaseId = "", tableId = "", rowId = "", 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/client-apple/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/client-apple/examples/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/client-apple/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/client-apple/examples/account/create-magic-url-token.md 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 index 56799e327e..cfe0082fba 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let account = Account(client) -let mfaType = try await account.createMfaAuthenticator( +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 index 0b5d385999..27f1bc1784 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let account = Account(client) -let mfaChallenge = try await account.createMfaChallenge( +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 index c0ccb39e86..2674a40760 100644 --- 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 @@ -6,5 +6,5 @@ let client = Client() let account = Account(client) -let mfaRecoveryCodes = try await account.createMfaRecoveryCodes() +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-auth-2-session.md similarity index 100% rename from docs/examples/1.8.x/client-apple/examples/account/create-o-auth2session.md rename to docs/examples/1.8.x/client-apple/examples/account/create-o-auth-2-session.md 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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/client-apple/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/client-apple/examples/account/create-o-auth-2-token.md 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 index 16cbbe3b72..adfa363bcc 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let account = Account(client) -let result = try await account.deleteMfaAuthenticator( +let result = try await account.deleteMFAAuthenticator( type: .totp ) 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 index 2f5d623304..efee499ea7 100644 --- 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 @@ -6,5 +6,5 @@ let client = Client() let account = Account(client) -let mfaRecoveryCodes = try await account.getMfaRecoveryCodes() +let mfaRecoveryCodes = try await account.getMFARecoveryCodes() 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 index f6d7a6fe75..d81e77e7ac 100644 --- 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 @@ -6,5 +6,5 @@ let client = Client() let account = Account(client) -let mfaFactors = try await account.listMfaFactors() +let mfaFactors = try await account.listMFAFactors() 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/client-apple/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/client-apple/examples/account/update-magic-url-session.md 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 index 6a42fb9b6d..5245be2ec3 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let account = Account(client) -let user = try await account.updateMfaAuthenticator( +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 index db9753b777..473393eecd 100644 --- 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 @@ -6,7 +6,7 @@ let client = Client() let account = Account(client) -let session = try await account.updateMfaChallenge( +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 index c3b8d412c5..fbd6847e89 100644 --- 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 @@ -6,5 +6,5 @@ let client = Client() let account = Account(client) -let mfaRecoveryCodes = try await account.updateMfaRecoveryCodes() +let mfaRecoveryCodes = try await account.updateMFARecoveryCodes() 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/client-apple/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/client-apple/examples/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/client-apple/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/client-apple/examples/avatars/get-qr.md 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/decrement-document-attribute.md similarity index 50% rename from docs/examples/1.8.x/client-apple/examples/databases/create-documents.md rename to docs/examples/1.8.x/client-apple/examples/databases/decrement-document-attribute.md index d60cf01cd9..8ef2637bf2 100644 --- a/docs/examples/1.8.x/client-apple/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/client-apple/examples/databases/decrement-document-attribute.md @@ -2,14 +2,16 @@ import Appwrite let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("") // + .setProject("") // Your project ID let databases = Databases(client) -let documentList = try await databases.createDocuments( +let document = try await databases.decrementDocumentAttribute( databaseId: "", collectionId: "", - documents: [] + documentId: "", + attribute: "", + value: 0, // optional + min: 0 // optional ) diff --git a/docs/examples/1.8.x/client-apple/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-apple/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..f64b2cd76c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/increment-document-attribute.md @@ -0,0 +1,17 @@ +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.incrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, // optional + max: 0 // optional +) + 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-eu.md similarity index 100% rename from docs/examples/1.8.x/client-apple/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/client-apple/examples/locale/list-countries-eu.md diff --git a/docs/examples/1.8.x/client-apple/examples/grids/create-row.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/create-row.md similarity index 81% rename from docs/examples/1.8.x/client-apple/examples/grids/create-row.md rename to docs/examples/1.8.x/client-apple/examples/tablesdb/create-row.md index 0739b27949..0972892585 100644 --- a/docs/examples/1.8.x/client-apple/examples/grids/create-row.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/create-row.md @@ -4,9 +4,9 @@ let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID -let grids = Grids(client) +let tablesDB = TablesDB(client) -let row = try await grids.createRow( +let row = try await tablesDB.createRow( databaseId: "", tableId: "", rowId: "", diff --git a/docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/decrement-row-column.md similarity index 72% rename from docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md rename to docs/examples/1.8.x/client-apple/examples/tablesdb/decrement-row-column.md index 9445843d71..ab8ac5b0b8 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/decrement-row-column.md @@ -3,11 +3,10 @@ import Appwrite let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setKey("") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let row = try await grids.decrementRowColumn( +let row = try await tablesDB.decrementRowColumn( databaseId: "", tableId: "", rowId: "", diff --git a/docs/examples/1.8.x/client-apple/examples/grids/delete-row.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/delete-row.md similarity index 77% rename from docs/examples/1.8.x/client-apple/examples/grids/delete-row.md rename to docs/examples/1.8.x/client-apple/examples/tablesdb/delete-row.md index 58ae835ec5..b527acaed9 100644 --- a/docs/examples/1.8.x/client-apple/examples/grids/delete-row.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/delete-row.md @@ -4,9 +4,9 @@ let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID -let grids = Grids(client) +let tablesDB = TablesDB(client) -let result = try await grids.deleteRow( +let result = try await tablesDB.deleteRow( databaseId: "", tableId: "", rowId: "" diff --git a/docs/examples/1.8.x/client-apple/examples/grids/get-row.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/get-row.md similarity index 80% rename from docs/examples/1.8.x/client-apple/examples/grids/get-row.md rename to docs/examples/1.8.x/client-apple/examples/tablesdb/get-row.md index fccdad1f34..bc2e2c6b55 100644 --- a/docs/examples/1.8.x/client-apple/examples/grids/get-row.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/get-row.md @@ -4,9 +4,9 @@ let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID -let grids = Grids(client) +let tablesDB = TablesDB(client) -let row = try await grids.getRow( +let row = try await tablesDB.getRow( databaseId: "", tableId: "", rowId: "", diff --git a/docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/increment-row-column.md similarity index 72% rename from docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md rename to docs/examples/1.8.x/client-apple/examples/tablesdb/increment-row-column.md index 00d9663c22..550d6685af 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/increment-row-column.md @@ -3,11 +3,10 @@ import Appwrite let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setKey("") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let row = try await grids.incrementRowColumn( +let row = try await tablesDB.incrementRowColumn( databaseId: "", tableId: "", rowId: "", diff --git a/docs/examples/1.8.x/client-apple/examples/grids/list-rows.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/list-rows.md similarity index 78% rename from docs/examples/1.8.x/client-apple/examples/grids/list-rows.md rename to docs/examples/1.8.x/client-apple/examples/tablesdb/list-rows.md index 1b4d885a64..94853c24a0 100644 --- a/docs/examples/1.8.x/client-apple/examples/grids/list-rows.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/list-rows.md @@ -4,9 +4,9 @@ let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID -let grids = Grids(client) +let tablesDB = TablesDB(client) -let rowList = try await grids.listRows( +let rowList = try await tablesDB.listRows( databaseId: "", tableId: "", 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/tablesdb/update-row.md similarity index 82% rename from docs/examples/1.8.x/client-apple/examples/grids/update-row.md rename to docs/examples/1.8.x/client-apple/examples/tablesdb/update-row.md index 95a3611a92..87a8f27313 100644 --- a/docs/examples/1.8.x/client-apple/examples/grids/update-row.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/update-row.md @@ -4,9 +4,9 @@ let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID -let grids = Grids(client) +let tablesDB = TablesDB(client) -let row = try await grids.updateRow( +let row = try await tablesDB.updateRow( databaseId: "", tableId: "", rowId: "", diff --git a/docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/upsert-row.md similarity index 82% rename from docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md rename to docs/examples/1.8.x/client-apple/examples/tablesdb/upsert-row.md index c5638a4881..ed95da7b62 100644 --- a/docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/upsert-row.md @@ -4,9 +4,9 @@ let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID -let grids = Grids(client) +let tablesDB = TablesDB(client) -let row = try await grids.upsertRow( +let row = try await tablesDB.upsertRow( databaseId: "", tableId: "", rowId: "", 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/client-flutter/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/client-flutter/examples/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/client-flutter/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/client-flutter/examples/account/create-magic-url-token.md 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 index ca66149654..b9d7e967b2 100644 --- 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 @@ -6,6 +6,6 @@ Client client = Client() Account account = Account(client); -MfaType result = await account.createMfaAuthenticator( +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 index 6815e5c52f..09ce17b27c 100644 --- 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 @@ -6,6 +6,6 @@ Client client = Client() Account account = Account(client); -MfaChallenge result = await account.createMfaChallenge( +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 index 274dc598a8..9b69ad1bd9 100644 --- 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 @@ -6,4 +6,4 @@ Client client = Client() Account account = Account(client); -MfaRecoveryCodes result = await account.createMfaRecoveryCodes(); +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-auth-2-session.md similarity index 100% rename from docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2session.md rename to docs/examples/1.8.x/client-flutter/examples/account/create-o-auth-2-session.md 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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/client-flutter/examples/account/create-o-auth-2-token.md 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 index bf4b0c509b..b938ca68e9 100644 --- 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 @@ -6,6 +6,6 @@ Client client = Client() Account account = Account(client); -await account.deleteMfaAuthenticator( +await account.deleteMFAAuthenticator( type: AuthenticatorType.totp, ); 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 index f9d50131e5..09bff7ffbd 100644 --- 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 @@ -6,4 +6,4 @@ Client client = Client() Account account = Account(client); -MfaRecoveryCodes result = await account.getMfaRecoveryCodes(); +MfaRecoveryCodes result = await account.getMFARecoveryCodes(); 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 index 9f945400ac..5e87cbaac5 100644 --- 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 @@ -6,4 +6,4 @@ Client client = Client() Account account = Account(client); -MfaFactors result = await account.listMfaFactors(); +MfaFactors result = await account.listMFAFactors(); 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/client-flutter/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/client-flutter/examples/account/update-magic-url-session.md 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 index 7f026578c5..96bdcc1bc3 100644 --- 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 @@ -6,7 +6,7 @@ Client client = Client() Account account = Account(client); -User result = await account.updateMfaAuthenticator( +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 index a938f0af68..b917e4119c 100644 --- 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 @@ -6,7 +6,7 @@ Client client = Client() Account account = Account(client); -Session result = await account.updateMfaChallenge( +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 index 37334ef69a..377149bf60 100644 --- 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 @@ -6,4 +6,4 @@ Client client = Client() Account account = Account(client); -MfaRecoveryCodes result = await account.updateMfaRecoveryCodes(); +MfaRecoveryCodes result = await account.updateMFARecoveryCodes(); 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/client-flutter/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/client-flutter/examples/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/client-flutter/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/client-flutter/examples/avatars/get-qr.md 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/decrement-document-attribute.md similarity index 54% rename from docs/examples/1.8.x/client-flutter/examples/databases/create-documents.md rename to docs/examples/1.8.x/client-flutter/examples/databases/decrement-document-attribute.md index 29014be0e2..ec0d9ee300 100644 --- a/docs/examples/1.8.x/client-flutter/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/client-flutter/examples/databases/decrement-document-attribute.md @@ -2,13 +2,15 @@ import 'package:appwrite/appwrite.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey(''); // + .setProject(''); // Your project ID Databases databases = Databases(client); -DocumentList result = await databases.createDocuments( +Document result = await databases.decrementDocumentAttribute( databaseId: '', collectionId: '', - documents: [], + documentId: '', + attribute: '', + value: 0, // optional + min: 0, // optional ); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-flutter/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..78f5b0cb6f --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/increment-document-attribute.md @@ -0,0 +1,16 @@ +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.incrementDocumentAttribute( + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 0, // optional + max: 0, // optional +); 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-eu.md similarity index 100% rename from docs/examples/1.8.x/client-flutter/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/client-flutter/examples/locale/list-countries-eu.md diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/create-row.md b/docs/examples/1.8.x/client-flutter/examples/tablesdb/create-row.md similarity index 82% rename from docs/examples/1.8.x/client-flutter/examples/grids/create-row.md rename to docs/examples/1.8.x/client-flutter/examples/tablesdb/create-row.md index 2f80a01806..f546133b87 100644 --- a/docs/examples/1.8.x/client-flutter/examples/grids/create-row.md +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/create-row.md @@ -4,9 +4,9 @@ Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Row result = await grids.createRow( +Row result = await tablesDB.createRow( databaseId: '', tableId: '', rowId: '', diff --git a/docs/examples/1.8.x/client-flutter/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-flutter/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..4f3b4bdb61 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,16 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.decrementRowColumn( + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: 0, // optional + min: 0, // 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/tablesdb/delete-row.md similarity index 81% rename from docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md rename to docs/examples/1.8.x/client-flutter/examples/tablesdb/delete-row.md index 04f5aec544..cc902fa198 100644 --- a/docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/delete-row.md @@ -4,9 +4,9 @@ Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -await grids.deleteRow( +await tablesDB.deleteRow( databaseId: '', tableId: '', rowId: '', diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/get-row.md b/docs/examples/1.8.x/client-flutter/examples/tablesdb/get-row.md similarity index 81% rename from docs/examples/1.8.x/client-flutter/examples/grids/get-row.md rename to docs/examples/1.8.x/client-flutter/examples/tablesdb/get-row.md index a8a380ee7c..29e6eaab93 100644 --- a/docs/examples/1.8.x/client-flutter/examples/grids/get-row.md +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/get-row.md @@ -4,9 +4,9 @@ Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Row result = await grids.getRow( +Row result = await tablesDB.getRow( databaseId: '', tableId: '', rowId: '', diff --git a/docs/examples/1.8.x/client-flutter/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-flutter/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..e05dc76753 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/increment-row-column.md @@ -0,0 +1,16 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.incrementRowColumn( + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: 0, // optional + max: 0, // 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/tablesdb/list-rows.md similarity index 78% rename from docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md rename to docs/examples/1.8.x/client-flutter/examples/tablesdb/list-rows.md index 6654c57aaa..7763e2ae3d 100644 --- a/docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/list-rows.md @@ -4,9 +4,9 @@ Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -RowList result = await grids.listRows( +RowList result = await tablesDB.listRows( databaseId: '', tableId: '', 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/tablesdb/update-row.md similarity index 82% rename from docs/examples/1.8.x/client-flutter/examples/grids/update-row.md rename to docs/examples/1.8.x/client-flutter/examples/tablesdb/update-row.md index 293f38877a..c2cc84d7f6 100644 --- a/docs/examples/1.8.x/client-flutter/examples/grids/update-row.md +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/update-row.md @@ -4,9 +4,9 @@ Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Row result = await grids.updateRow( +Row result = await tablesDB.updateRow( databaseId: '', tableId: '', rowId: '', diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-flutter/examples/tablesdb/upsert-row.md similarity index 82% rename from docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md rename to docs/examples/1.8.x/client-flutter/examples/tablesdb/upsert-row.md index 2cec5621b7..6a958a1898 100644 --- a/docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/upsert-row.md @@ -4,9 +4,9 @@ Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Row result = await grids.upsertRow( +Row result = await tablesDB.upsertRow( databaseId: '', tableId: '', rowId: '', 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/client-graphql/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/client-graphql/examples/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/client-graphql/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/client-graphql/examples/account/create-magic-url-token.md 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 index 6b29292494..8605340168 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountCreateMfaAuthenticator( + accountCreateMFAAuthenticator( type: "totp" ) { secret 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 index eb5cba127d..aff5a10123 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountCreateMfaChallenge( + accountCreateMFAChallenge( factor: "email" ) { _id 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 index f39b7d080d..4cb6d36d42 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountCreateMfaRecoveryCodes { + accountCreateMFARecoveryCodes { recoveryCodes } } 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 index fc5486623a..03e876e3f9 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountDeleteMfaAuthenticator( + accountDeleteMFAAuthenticator( type: "totp" ) { status 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/client-graphql/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/client-graphql/examples/account/update-magic-url-session.md 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 index 9cfe9150be..b3021b70b8 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountUpdateMfaAuthenticator( + accountUpdateMFAAuthenticator( type: "totp", otp: "" ) { 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 index 0bcec2157f..bf389f1eff 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountUpdateMfaChallenge( + accountUpdateMFAChallenge( challengeId: "", otp: "" ) { 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 index e706d2b9d7..dc46be71ad 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountUpdateMfaRecoveryCodes { + accountUpdateMFARecoveryCodes { recoveryCodes } } 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/client-graphql/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/client-graphql/examples/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/client-graphql/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/client-graphql/examples/avatars/get-qr.md 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 deleted file mode 100644 index 8ce79dcbb5..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/databases/create-documents.md +++ /dev/null @@ -1,19 +0,0 @@ -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/decrement-document-attribute.md b/docs/examples/1.8.x/client-graphql/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..2e7970049d --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/decrement-document-attribute.md @@ -0,0 +1,19 @@ +mutation { + databasesDecrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, + min: 0 + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-graphql/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..322ed69ced --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/increment-document-attribute.md @@ -0,0 +1,19 @@ +mutation { + databasesIncrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, + max: 0 + ) { + _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 index 8979880723..ff0ecbe739 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 @@ -13,6 +13,7 @@ mutation { _updatedAt _permissions functionId + deploymentId trigger status requestMethod diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/get-row.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-countries-eu.md similarity index 100% rename from docs/examples/1.8.x/client-graphql/examples/grids/get-row.md rename to docs/examples/1.8.x/client-graphql/examples/locale/list-countries-eu.md diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-row.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/create-row.md similarity index 93% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-row.md rename to docs/examples/1.8.x/client-graphql/examples/tablesdb/create-row.md index cffb7361f2..621e46a64e 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-row.md +++ b/docs/examples/1.8.x/client-graphql/examples/tablesdb/create-row.md @@ -1,5 +1,5 @@ mutation { - gridsCreateRow( + tablesDBCreateRow( databaseId: "", tableId: "", rowId: "", diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/decrement-row-column.md similarity index 90% rename from docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md rename to docs/examples/1.8.x/client-graphql/examples/tablesdb/decrement-row-column.md index 6b47884a92..398ec19901 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md +++ b/docs/examples/1.8.x/client-graphql/examples/tablesdb/decrement-row-column.md @@ -1,5 +1,5 @@ mutation { - gridsDecrementRowColumn( + tablesDBDecrementRowColumn( databaseId: "", tableId: "", rowId: "", diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/delete-row.md similarity index 85% rename from docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md rename to docs/examples/1.8.x/client-graphql/examples/tablesdb/delete-row.md index 40dcbdc219..1a08b0f60d 100644 --- a/docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md +++ b/docs/examples/1.8.x/client-graphql/examples/tablesdb/delete-row.md @@ -1,5 +1,5 @@ mutation { - gridsDeleteRow( + tablesDBDeleteRow( databaseId: "", tableId: "", rowId: "" diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-row.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/get-row.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/grids/get-row.md rename to docs/examples/1.8.x/client-graphql/examples/tablesdb/get-row.md diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/increment-row-column.md similarity index 90% rename from docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md rename to docs/examples/1.8.x/client-graphql/examples/tablesdb/increment-row-column.md index 709e6b2f0d..b7ff87f387 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md +++ b/docs/examples/1.8.x/client-graphql/examples/tablesdb/increment-row-column.md @@ -1,5 +1,5 @@ mutation { - gridsIncrementRowColumn( + tablesDBIncrementRowColumn( databaseId: "", tableId: "", rowId: "", diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/list-rows.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/list-rows.md similarity index 100% rename from docs/examples/1.8.x/client-graphql/examples/grids/list-rows.md rename to docs/examples/1.8.x/client-graphql/examples/tablesdb/list-rows.md diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-row.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/update-row.md similarity index 93% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-row.md rename to docs/examples/1.8.x/client-graphql/examples/tablesdb/update-row.md index 2bb105e8c0..5a5b288ab8 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-row.md +++ b/docs/examples/1.8.x/client-graphql/examples/tablesdb/update-row.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateRow( + tablesDBUpdateRow( databaseId: "", tableId: "", rowId: "", diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/upsert-row.md similarity index 93% rename from docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md rename to docs/examples/1.8.x/client-graphql/examples/tablesdb/upsert-row.md index f8e0606109..cc3b63de4a 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md +++ b/docs/examples/1.8.x/client-graphql/examples/tablesdb/upsert-row.md @@ -1,5 +1,5 @@ mutation { - gridsUpsertRow( + tablesDBUpsertRow( databaseId: "", tableId: "", rowId: "", 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 index 217d7873ae..47fb5573b1 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createEmailPasswordSession( - 'email@example.com', // email - 'password' // password -); +const result = await account.createEmailPasswordSession({ + email: 'email@example.com', + 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 index b9bdf3bbe2..aef74a8e46 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.createEmailToken( - '', // userId - 'email@example.com', // email - false // phrase (optional) -); +const result = await account.createEmailToken({ + userId: '', + email: 'email@example.com', + phrase: false // 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/client-react-native/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/client-react-native/examples/account/create-jwt.md 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-url-token.md similarity index 59% rename from docs/examples/1.8.x/client-react-native/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/client-react-native/examples/account/create-magic-url-token.md index 413e347aef..5c30ef538e 100644 --- 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-url-token.md @@ -6,11 +6,11 @@ const client = new Client() const account = new Account(client); -const result = await account.createMagicURLToken( - '', // userId - 'email@example.com', // email - 'https://example.com', // url (optional) - false // phrase (optional) -); +const result = await account.createMagicURLToken({ + userId: '', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false // 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 index ec243490aa..d859850f2f 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaAuthenticator( - AuthenticatorType.Totp // type -); +const result = await account.createMFAAuthenticator({ + type: AuthenticatorType.Totp +}); 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 index 04de25863f..c7e5f6216a 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaChallenge( - AuthenticationFactor.Email // factor -); +const result = await account.createMFAChallenge({ + factor: AuthenticationFactor.Email +}); 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 index f256be308b..22d6a579d6 100644 --- 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 @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaRecoveryCodes(); +const result = await account.createMFARecoveryCodes(); console.log(result); 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-auth-2-session.md similarity index 58% rename from docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/client-react-native/examples/account/create-o-auth-2-session.md index cd4ee86aa1..4212803ca8 100644 --- 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-auth-2-session.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Token( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +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-react-native/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth-2-token.md similarity index 58% rename from docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2session.md rename to docs/examples/1.8.x/client-react-native/examples/account/create-o-auth-2-token.md index 84bddb4777..8989e489c2 100644 --- 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-auth-2-token.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Session( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +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-react-native/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-react-native/examples/account/create-phone-token.md index d03e5ea4bc..68eaa38dbd 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createPhoneToken( - '', // userId - '+12065550100' // phone -); +const result = await account.createPhoneToken({ + userId: '', + phone: '+12065550100' +}); 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 index 83211ab9f3..d3fae6fd84 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.createPushTarget( - '', // targetId - '', // identifier - '' // providerId (optional) -); +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 index 802af82fb7..01c5c387e8 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createRecovery( - 'email@example.com', // email - 'https://example.com' // url -); +const result = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com' +}); 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 index bb3040aef6..b6741518d1 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createSession( - '', // userId - '' // secret -); +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 index 5fdffcba5c..f4a210be05 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createVerification( - 'https://example.com' // url -); +const result = await account.createVerification({ + url: 'https://example.com' +}); 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 index eb3d04ac54..2c6850a101 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const account = new Account(client); -const result = await account.create( - '', // userId - 'email@example.com', // email - '', // password - '' // name (optional) -); +const result = await account.create({ + userId: '', + email: 'email@example.com', + 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 index df492a528d..0d9a971225 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteIdentity( - '' // identityId -); +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 index 093ba4d5a2..90a6e347a8 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteMfaAuthenticator( - AuthenticatorType.Totp // type -); +const result = await account.deleteMFAAuthenticator({ + type: AuthenticatorType.Totp +}); 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 index a926ede9c6..dff171b305 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deletePushTarget( - '' // targetId -); +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 index 134a2caa56..f1ce4a0a88 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteSession( - '' // sessionId -); +const result = await account.deleteSession({ + sessionId: '' +}); 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 index c660a17ab8..94896eb752 100644 --- 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 @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const result = await account.getMfaRecoveryCodes(); +const result = await account.getMFARecoveryCodes(); 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 index 1db05d5c26..4c0fdfc0b5 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.getSession( - '' // sessionId -); +const result = await account.getSession({ + sessionId: '' +}); 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 index 239dbbf21f..2a3bbae35d 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.listIdentities( - [] // queries (optional) -); +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 index 9cf441453c..4bb9f9fd88 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.listLogs( - [] // queries (optional) -); +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 index 51b76c90e4..98ba939768 100644 --- 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 @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const result = await account.listMfaFactors(); +const result = await account.listMFAFactors(); 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 index 4bbe0b03e7..325fa472fe 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateEmail( - 'email@example.com', // email - 'password' // password -); +const result = await account.updateEmail({ + email: 'email@example.com', + password: 'password' +}); 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-url-session.md similarity index 72% rename from docs/examples/1.8.x/client-react-native/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/client-react-native/examples/account/update-magic-url-session.md index c5e6b61395..4feaa59f52 100644 --- 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-url-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMagicURLSession( - '', // userId - '' // secret -); +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 index 07a798e7a6..58f2329564 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaAuthenticator( - AuthenticatorType.Totp, // type - '' // otp -); +const result = await account.updateMFAAuthenticator({ + type: AuthenticatorType.Totp, + 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 index b93e0bf520..c2ce59f6ef 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaChallenge( - '', // challengeId - '' // otp -); +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 index 2ed9bb0204..1f7b4f0d96 100644 --- 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 @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaRecoveryCodes(); +const result = await account.updateMFARecoveryCodes(); 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-mfa.md similarity index 82% rename from docs/examples/1.8.x/client-react-native/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/client-react-native/examples/account/update-mfa.md index ebbfc0c8cd..26d26ffe97 100644 --- 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-mfa.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMFA( - false // mfa -); +const result = await account.updateMFA({ + mfa: false +}); 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 index adbbcab5be..f58f26baae 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateName( - '' // name -); +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 index 3bde58e68a..89f99d9790 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePassword( - '', // password - 'password' // oldPassword (optional) -); +const result = await account.updatePassword({ + password: '', + oldPassword: 'password' // 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 index c9c82696fc..b3a3ffffb3 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhoneSession( - '', // userId - '' // secret -); +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 index 0ef7e53e66..2f1be2f345 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhoneVerification( - '', // userId - '' // secret -); +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 index bf8aae2a3d..4e123547cb 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhone( - '+12065550100', // phone - 'password' // password -); +const result = await account.updatePhone({ + phone: '+12065550100', + 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 index 01d4fd6878..43fa9fc776 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePrefs( - {} // prefs -); +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 index d88e22e04d..c61f65612f 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePushTarget( - '', // targetId - '' // identifier -); +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 index 9a5ef04f3a..9e0c439714 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.updateRecovery( - '', // userId - '', // secret - '' // password -); +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 index 0c8a9e5df3..948514d6f6 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateSession( - '' // sessionId -); +const result = await account.updateSession({ + sessionId: '' +}); 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 index c956d5fcd6..287a7feaf7 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateVerification( - '', // userId - '' // secret -); +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 index 433cbe5999..6506f2e715 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getBrowser( - Browser.AvantBrowser, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getBrowser({ + code: Browser.AvantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index bbd0007fe0..05d3a53b4c 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getCreditCard( - CreditCard.AmericanExpress, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getCreditCard({ + code: CreditCard.AmericanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index ff48c76ffc..d3931e3ef4 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFavicon( - 'https://example.com' // url -); +const result = avatars.getFavicon({ + url: 'https://example.com' +}); 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 index 4e6070d190..651771a0ef 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFlag( - Flag.Afghanistan, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getFlag({ + code: Flag.Afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index 006155effd..e3b89c31d7 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getImage( - 'https://example.com', // url - 0, // width (optional) - 0 // height (optional) -); +const result = avatars.getImage({ + url: 'https://example.com', + width: 0, // optional + height: 0 // 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 index a87a643450..3abc399a24 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getInitials( - '', // name (optional) - 0, // width (optional) - 0, // height (optional) - '' // background (optional) -); +const result = avatars.getInitials({ + name: '', // optional + width: 0, // optional + height: 0, // 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-qr.md similarity index 66% rename from docs/examples/1.8.x/client-react-native/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/client-react-native/examples/avatars/get-qr.md index 177759d9ef..3cbe72a920 100644 --- 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-qr.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getQR( - '', // text - 1, // size (optional) - 0, // margin (optional) - false // download (optional) -); +const result = avatars.getQR({ + text: '', + size: 1, // optional + margin: 0, // optional + download: false // 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 index 1b28231ed3..d0d25bd87d 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] // 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 deleted file mode 100644 index c0a8f1d03c..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/databases/create-documents.md +++ /dev/null @@ -1,16 +0,0 @@ -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/decrement-document-attribute.md b/docs/examples/1.8.x/client-react-native/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..8eb4387cfa --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/decrement-document-attribute.md @@ -0,0 +1,18 @@ +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.decrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, // optional + min: null // optional +}); + +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 index 9136107a3c..828cefdda8 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteDocument( - '', // databaseId - '', // collectionId - '' // documentId -); +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 index 9993e2c941..7d28ee03d5 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getDocument( - '', // databaseId - '', // collectionId - '', // documentId - [] // queries (optional) -); +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/increment-document-attribute.md b/docs/examples/1.8.x/client-react-native/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..8cb3d816cb --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/increment-document-attribute.md @@ -0,0 +1,18 @@ +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.incrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, // optional + max: null // 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 index b2f377e53c..8d210b08e9 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listDocuments( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +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 index 7676ee109b..ce4a6f2222 100644 --- 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); +const result = await databases.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: ["read("any")"] // 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 index ae423d12a7..a351ed7d4d 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.upsertDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] // 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 7d850c8103..b9e6682f3e 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 @@ -6,14 +6,14 @@ const client = new Client() 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) -); +const result = await functions.createExecution({ + functionId: '', + body: '', // optional + async: false, // optional + path: '', // optional + method: ExecutionMethod.GET, // 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 index 848747ea2f..2ef4e9f817 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getExecution( - '', // functionId - '' // executionId -); +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 index 346f8c7ea8..7b046dde82 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listExecutions( - '', // functionId - [] // queries (optional) -); +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 index 3292a5dad2..dbc27ff120 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const graphql = new Graphql(client); -const result = await graphql.mutation( - {} // query -); +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 index a00c517a46..560b7e5cf1 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const graphql = new Graphql(client); -const result = await graphql.query( - {} // query -); +const result = await graphql.query({ + query: {} +}); 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createRow( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteRow( - '', // databaseId - '', // tableId - '' // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getRow( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listRows( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.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/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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.upsertRow( - '', // databaseId - '', // tableId - '', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -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-eu.md similarity index 100% rename from docs/examples/1.8.x/client-react-native/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/client-react-native/examples/locale/list-countries-eu.md 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 index c950e90bae..2057f1da59 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createSubscriber( - '', // topicId - '', // subscriberId - '' // targetId -); +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 index 5004b59cac..38545f6280 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.deleteSubscriber( - '', // topicId - '' // subscriberId -); +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 index efbfd607c1..4a44d3ca5e 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.createFile( - '', // bucketId - '', // fileId - await pickSingle(), // file - ["read("any")"] // permissions (optional) -); +const result = await storage.createFile({ + bucketId: '', + fileId: '', + file: await pickSingle(), + permissions: ["read("any")"] // 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 index 1a436ac8a8..776ec7fa18 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.deleteFile( - '', // bucketId - '' // fileId -); +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 index e21bad67eb..317141c87d 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileDownload( - '', // bucketId - '', // fileId - '' // token (optional) -); +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 index 6f116c5df6..94623fb011 100644 --- 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 @@ -6,21 +6,21 @@ const client = new Client() 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) -); +const 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 +}); 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 index 9b229f6a54..bacd1088c9 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileView( - '', // bucketId - '', // fileId - '' // token (optional) -); +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 index 6d358adabd..f284182479 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.getFile( - '', // bucketId - '' // fileId -); +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 index 19099b1288..4c6e159d38 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.listFiles( - '', // bucketId - [], // queries (optional) - '' // search (optional) -); +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 index d4ed68a337..2a8092f86d 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.updateFile( - '', // bucketId - '', // fileId - '', // name (optional) - ["read("any")"] // permissions (optional) -); +const result = await storage.updateFile({ + bucketId: '', + fileId: '', + name: '', // optional + permissions: ["read("any")"] // optional +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/create-row.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..43018476f3 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/create-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createRow({ + databaseId: '', + tableId: '', + rowId: '', + data: {}, + permissions: ["read("any")"] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..6b47c18cf9 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.decrementRowColumn({ + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: null, // optional + min: null // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..624f1a191f --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/delete-row.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteRow({ + databaseId: '', + tableId: '', + rowId: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/get-row.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..081db46f18 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/get-row.md @@ -0,0 +1,16 @@ +import { Client, TablesDB } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.getRow({ + databaseId: '', + tableId: '', + rowId: '', + queries: [] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..62b7dd0c21 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/increment-row-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.incrementRowColumn({ + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: null, // optional + max: null // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..6148e97e90 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/list-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.listRows({ + databaseId: '', + tableId: '', + queries: [] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/update-row.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..01ed6e6acc --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/update-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateRow({ + databaseId: '', + tableId: '', + rowId: '', + data: {}, // optional + permissions: ["read("any")"] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..72fad15ac4 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.upsertRow({ + databaseId: '', + tableId: '', + rowId: '', + data: {}, // optional + permissions: ["read("any")"] // optional +}); + +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 index 680fdb2ad8..e89d2deddb 100644 --- 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 @@ -6,14 +6,14 @@ const client = new Client() 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) -); +const result = await teams.createMembership({ + teamId: '', + roles: [], + email: 'email@example.com', // optional + userId: '', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // 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 index 51aaee358e..6c8dbbba49 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.create( - '', // teamId - '', // name - [] // roles (optional) -); +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 index 37bdc7f87f..b881c5ac8c 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.deleteMembership( - '', // teamId - '' // membershipId -); +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 index fe67eaffd1..8c98139c5b 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.delete( - '' // teamId -); +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 index 2b253c8b51..46cdc4126c 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.getMembership( - '', // teamId - '' // membershipId -); +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 index 943ed1a181..0e3b4894cb 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.getPrefs( - '' // teamId -); +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 index 9267b57e2f..6305365688 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.get( - '' // teamId -); +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 index 4444bcd664..12f71549b5 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.listMemberships( - '', // teamId - [], // queries (optional) - '' // search (optional) -); +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 index 779538a70a..f9ca4c4054 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.list( - [], // queries (optional) - '' // search (optional) -); +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 index c8edbf08c7..0aba8065c4 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateMembershipStatus( - '', // teamId - '', // membershipId - '', // userId - '' // secret -); +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 index 347cbdd095..ada2863419 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateMembership( - '', // teamId - '', // membershipId - [] // roles -); +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 index 0ab4aa1c84..251ff26ada 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateName( - '', // teamId - '' // name -); +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 index fda16a05db..490450210f 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updatePrefs( - '', // teamId - {} // prefs -); +const result = await teams.updatePrefs({ + teamId: '', + prefs: {} +}); console.log(result); 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/client-rest/examples/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/client-rest/examples/account/create-magic-url-token.md 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-auth-2-session.md similarity index 100% rename from docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md rename to docs/examples/1.8.x/client-rest/examples/account/create-o-auth-2-session.md 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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/client-rest/examples/account/create-o-auth-2-token.md 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/client-rest/examples/account/update-magic-url-session.md 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/client-rest/examples/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/client-rest/examples/avatars/get-qr.md 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 deleted file mode 100644 index e4d2b956e0..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/databases/create-documents.md +++ /dev/null @@ -1,11 +0,0 @@ -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/decrement-document-attribute.md b/docs/examples/1.8.x/client-rest/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..85ee70588b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/decrement-document-attribute.md @@ -0,0 +1,12 @@ +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-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "value": 0, + "min": 0 +} diff --git a/docs/examples/1.8.x/client-rest/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-rest/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..68b091a31e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/increment-document-attribute.md @@ -0,0 +1,12 @@ +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-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "value": 0, + "max": 0 +} 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-eu.md similarity index 100% rename from docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/client-rest/examples/locale/list-countries-eu.md diff --git a/docs/examples/1.8.x/client-rest/examples/grids/create-row.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/create-row.md similarity index 78% rename from docs/examples/1.8.x/client-rest/examples/grids/create-row.md rename to docs/examples/1.8.x/client-rest/examples/tablesdb/create-row.md index 98b261ecba..1f7943f10c 100644 --- a/docs/examples/1.8.x/client-rest/examples/grids/create-row.md +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/create-row.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/client-rest/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..676e090150 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,12 @@ +PATCH /v1/tablesdb/{databaseId}/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: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "value": 0, + "min": 0 +} diff --git a/docs/examples/1.8.x/client-rest/examples/grids/delete-row.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/delete-row.md similarity index 69% rename from docs/examples/1.8.x/client-rest/examples/grids/delete-row.md rename to docs/examples/1.8.x/client-rest/examples/tablesdb/delete-row.md index 6f702a8526..f3ba056f7e 100644 --- a/docs/examples/1.8.x/client-rest/examples/grids/delete-row.md +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/delete-row.md @@ -1,4 +1,4 @@ -DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/client-rest/examples/grids/get-row.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/get-row.md similarity index 65% rename from docs/examples/1.8.x/client-rest/examples/grids/get-row.md rename to docs/examples/1.8.x/client-rest/examples/tablesdb/get-row.md index 876fe0f796..8c2187f696 100644 --- a/docs/examples/1.8.x/client-rest/examples/grids/get-row.md +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/get-row.md @@ -1,4 +1,4 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +GET /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 Host: cloud.appwrite.io X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: diff --git a/docs/examples/1.8.x/client-rest/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..5172cb420b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/increment-row-column.md @@ -0,0 +1,12 @@ +PATCH /v1/tablesdb/{databaseId}/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: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "value": 0, + "max": 0 +} diff --git a/docs/examples/1.8.x/client-rest/examples/grids/list-rows.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/list-rows.md similarity index 67% rename from docs/examples/1.8.x/client-rest/examples/grids/list-rows.md rename to docs/examples/1.8.x/client-rest/examples/tablesdb/list-rows.md index 86751cfcaf..0d69509ca6 100644 --- a/docs/examples/1.8.x/client-rest/examples/grids/list-rows.md +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/list-rows.md @@ -1,4 +1,4 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +GET /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 Host: cloud.appwrite.io X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: diff --git a/docs/examples/1.8.x/client-rest/examples/grids/update-row.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/update-row.md similarity index 74% rename from docs/examples/1.8.x/client-rest/examples/grids/update-row.md rename to docs/examples/1.8.x/client-rest/examples/tablesdb/update-row.md index bacfb5389a..40d276a0fe 100644 --- a/docs/examples/1.8.x/client-rest/examples/grids/update-row.md +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/update-row.md @@ -1,4 +1,4 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/upsert-row.md similarity index 75% rename from docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md rename to docs/examples/1.8.x/client-rest/examples/tablesdb/upsert-row.md index 7368fc436d..581790fc01 100644 --- a/docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/upsert-row.md @@ -1,4 +1,4 @@ -PUT /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +PUT /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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 index 3438ffbe54..26a745a6b2 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createEmailPasswordSession( - 'email@example.com', // email - 'password' // password -); +const result = await account.createEmailPasswordSession({ + email: 'email@example.com', + 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 index e7cab7c360..e0c4cdaaf8 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.createEmailToken( - '', // userId - 'email@example.com', // email - false // phrase (optional) -); +const result = await account.createEmailToken({ + userId: '', + email: 'email@example.com', + phrase: false // 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/client-web/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/client-web/examples/account/create-jwt.md 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-url-token.md similarity index 58% rename from docs/examples/1.8.x/client-web/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/client-web/examples/account/create-magic-url-token.md index ba87bd9a3f..16d35672b4 100644 --- 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-url-token.md @@ -6,11 +6,11 @@ const client = new Client() const account = new Account(client); -const result = await account.createMagicURLToken( - '', // userId - 'email@example.com', // email - 'https://example.com', // url (optional) - false // phrase (optional) -); +const result = await account.createMagicURLToken({ + userId: '', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false // 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 index 510481511d..154be4e185 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaAuthenticator( - AuthenticatorType.Totp // type -); +const result = await account.createMFAAuthenticator({ + type: AuthenticatorType.Totp +}); 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 index e9f6f08b48..1328305538 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaChallenge( - AuthenticationFactor.Email // factor -); +const result = await account.createMFAChallenge({ + factor: AuthenticationFactor.Email +}); 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 index 2cc744175e..d9041f273d 100644 --- 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 @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaRecoveryCodes(); +const result = await account.createMFARecoveryCodes(); console.log(result); 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-auth-2-session.md similarity index 57% rename from docs/examples/1.8.x/client-web/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/client-web/examples/account/create-o-auth-2-session.md index 5f0aab36d8..b451e25e5e 100644 --- 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-auth-2-session.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Token( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +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-web/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-web/examples/account/create-o-auth-2-token.md similarity index 57% rename from docs/examples/1.8.x/client-web/examples/account/create-o-auth2session.md rename to docs/examples/1.8.x/client-web/examples/account/create-o-auth-2-token.md index caad309ffd..0fce114dc6 100644 --- 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-auth-2-token.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Session( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +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-web/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-web/examples/account/create-phone-token.md index 481e57d353..60d032ef51 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createPhoneToken( - '', // userId - '+12065550100' // phone -); +const result = await account.createPhoneToken({ + userId: '', + phone: '+12065550100' +}); 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 index c987e3d2a8..1f973e1b46 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.createPushTarget( - '', // targetId - '', // identifier - '' // providerId (optional) -); +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 index f0a400d86d..2195ed93d5 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createRecovery( - 'email@example.com', // email - 'https://example.com' // url -); +const result = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com' +}); 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 index b6d7ef8bbb..4858f9f2e0 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createSession( - '', // userId - '' // secret -); +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 index 4a3b3144b6..0325e40581 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createVerification( - 'https://example.com' // url -); +const result = await account.createVerification({ + url: 'https://example.com' +}); 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 index bf2dbec02a..dbb374daf3 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create.md +++ b/docs/examples/1.8.x/client-web/examples/account/create.md @@ -6,11 +6,11 @@ const client = new Client() const account = new Account(client); -const result = await account.create( - '', // userId - 'email@example.com', // email - '', // password - '' // name (optional) -); +const result = await account.create({ + userId: '', + email: 'email@example.com', + 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 index f34baaaf5e..48434496d2 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteIdentity( - '' // identityId -); +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 index d11351442c..2b1a8785fd 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteMfaAuthenticator( - AuthenticatorType.Totp // type -); +const result = await account.deleteMFAAuthenticator({ + type: AuthenticatorType.Totp +}); 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 index 79bb06ed5d..1a09b32ad1 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deletePushTarget( - '' // targetId -); +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 index 4d27221d85..bf17ffce8b 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteSession( - '' // sessionId -); +const result = await account.deleteSession({ + sessionId: '' +}); 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 index 850488b0c8..527ebd9dab 100644 --- 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 @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const result = await account.getMfaRecoveryCodes(); +const result = await account.getMFARecoveryCodes(); 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 index 29af11052e..8c4bdd79f6 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.getSession( - '' // sessionId -); +const result = await account.getSession({ + sessionId: '' +}); 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 index 54c569b836..28cc409f26 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.listIdentities( - [] // queries (optional) -); +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 index 17c214f949..ec763f9a08 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.listLogs( - [] // queries (optional) -); +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 index c9fa7da1bc..80151d977c 100644 --- 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 @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const result = await account.listMfaFactors(); +const result = await account.listMFAFactors(); 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 index 9e02fc9416..96dcec5bdf 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateEmail( - 'email@example.com', // email - 'password' // password -); +const result = await account.updateEmail({ + email: 'email@example.com', + password: 'password' +}); 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-url-session.md similarity index 71% rename from docs/examples/1.8.x/client-web/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/client-web/examples/account/update-magic-url-session.md index 47501c528f..c126f7ce80 100644 --- 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-url-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMagicURLSession( - '', // userId - '' // secret -); +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 index 74eedd8dc7..f5ce65eeab 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaAuthenticator( - AuthenticatorType.Totp, // type - '' // otp -); +const result = await account.updateMFAAuthenticator({ + type: AuthenticatorType.Totp, + 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 index 01a09dd354..016533c09b 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaChallenge( - '', // challengeId - '' // otp -); +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 index 24ff10b1e4..3ab0385027 100644 --- 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 @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaRecoveryCodes(); +const result = await account.updateMFARecoveryCodes(); 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-mfa.md similarity index 81% rename from docs/examples/1.8.x/client-web/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/client-web/examples/account/update-mfa.md index 58b6a061b1..4d20604da4 100644 --- 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-mfa.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMFA( - false // mfa -); +const result = await account.updateMFA({ + mfa: false +}); 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 index d6a6946795..6a9ba82cdc 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateName( - '' // name -); +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 index 575779e35c..743335b8ba 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePassword( - '', // password - 'password' // oldPassword (optional) -); +const result = await account.updatePassword({ + password: '', + oldPassword: 'password' // 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 index 092205ec6a..39d0d36533 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhoneSession( - '', // userId - '' // secret -); +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 index 1b85178e76..6be1b777a4 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhoneVerification( - '', // userId - '' // secret -); +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 index 0c5ff216d8..912b2e5256 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhone( - '+12065550100', // phone - 'password' // password -); +const result = await account.updatePhone({ + phone: '+12065550100', + 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 index b9e88eac28..98ea84181a 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePrefs( - {} // prefs -); +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 index 3475a22ba9..57fdd6b1ef 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePushTarget( - '', // targetId - '' // identifier -); +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 index 328e50ea4f..d975647a30 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.updateRecovery( - '', // userId - '', // secret - '' // password -); +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 index 4ccc8295d9..4c9890b216 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateSession( - '' // sessionId -); +const result = await account.updateSession({ + sessionId: '' +}); 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 index 6d15aeec2e..b5fea5c9d6 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateVerification( - '', // userId - '' // secret -); +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 index 08512d1dc7..a0deff3fbc 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getBrowser( - Browser.AvantBrowser, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getBrowser({ + code: Browser.AvantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index fb631a4e3e..af0599ace5 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getCreditCard( - CreditCard.AmericanExpress, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getCreditCard({ + code: CreditCard.AmericanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index 85317f1383..2e976c6436 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFavicon( - 'https://example.com' // url -); +const result = avatars.getFavicon({ + url: 'https://example.com' +}); 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 index bfbc6c2865..76e7733e8c 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFlag( - Flag.Afghanistan, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getFlag({ + code: Flag.Afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index 36f88ecb52..b8fe0f08b1 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getImage( - 'https://example.com', // url - 0, // width (optional) - 0 // height (optional) -); +const result = avatars.getImage({ + url: 'https://example.com', + width: 0, // optional + height: 0 // 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 index 321c448807..01c183031b 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getInitials( - '', // name (optional) - 0, // width (optional) - 0, // height (optional) - '' // background (optional) -); +const result = avatars.getInitials({ + name: '', // optional + width: 0, // optional + height: 0, // 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-qr.md similarity index 65% rename from docs/examples/1.8.x/client-web/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/client-web/examples/avatars/get-qr.md index cbbabbc2c8..53202d8cd4 100644 --- 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-qr.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getQR( - '', // text - 1, // size (optional) - 0, // margin (optional) - false // download (optional) -); +const result = avatars.getQR({ + text: '', + size: 1, // optional + margin: 0, // optional + download: false // 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 index 916cc92689..5c561ab799 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] // 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 deleted file mode 100644 index 85b1c4cb0a..0000000000 --- a/docs/examples/1.8.x/client-web/examples/databases/create-documents.md +++ /dev/null @@ -1,16 +0,0 @@ -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/decrement-document-attribute.md b/docs/examples/1.8.x/client-web/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..98629c4e6c --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/decrement-document-attribute.md @@ -0,0 +1,18 @@ +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.decrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, // optional + min: null // optional +}); + +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 index c9a1e9f759..4192085653 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteDocument( - '', // databaseId - '', // collectionId - '' // documentId -); +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 index a2836fc6ef..b3a7558907 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getDocument( - '', // databaseId - '', // collectionId - '', // documentId - [] // queries (optional) -); +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/increment-document-attribute.md b/docs/examples/1.8.x/client-web/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..8adb5d8091 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/increment-document-attribute.md @@ -0,0 +1,18 @@ +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.incrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, // optional + max: null // 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 index d00ac56390..fb1d508fed 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listDocuments( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +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 index c0e06fce40..bf3554812d 100644 --- 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); +const result = await databases.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: ["read("any")"] // 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 index cfefe06242..c56bc5534d 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.upsertDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] // 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 be9bb508c0..b8c955b8ec 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 @@ -6,14 +6,14 @@ const client = new Client() 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) -); +const result = await functions.createExecution({ + functionId: '', + body: '', // optional + async: false, // optional + path: '', // optional + method: ExecutionMethod.GET, // 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 index 9b88f81f6c..1e9a367df5 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getExecution( - '', // functionId - '' // executionId -); +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 index 9ec506346c..159882c512 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listExecutions( - '', // functionId - [] // queries (optional) -); +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 index 0e7466ac13..5771af061a 100644 --- a/docs/examples/1.8.x/client-web/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/client-web/examples/graphql/mutation.md @@ -6,8 +6,8 @@ const client = new Client() const graphql = new Graphql(client); -const result = await graphql.mutation( - {} // query -); +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 index f9cd9b740f..c367d07d3e 100644 --- a/docs/examples/1.8.x/client-web/examples/graphql/query.md +++ b/docs/examples/1.8.x/client-web/examples/graphql/query.md @@ -6,8 +6,8 @@ const client = new Client() const graphql = new Graphql(client); -const result = await graphql.query( - {} // query -); +const result = await graphql.query({ + query: {} +}); 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createRow( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteRow( - '', // databaseId - '', // tableId - '' // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getRow( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listRows( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateRow( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.upsertRow( - '', // databaseId - '', // tableId - '', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -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-eu.md similarity index 100% rename from docs/examples/1.8.x/client-web/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/client-web/examples/locale/list-countries-eu.md 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 index 254870985d..59b760358e 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createSubscriber( - '', // topicId - '', // subscriberId - '' // targetId -); +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 index 3d5d0a4b42..dfe2d0688c 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.deleteSubscriber( - '', // topicId - '' // subscriberId -); +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 index 20a42206a2..999fcb20ac 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.createFile( - '', // bucketId - '', // fileId - document.getElementById('uploader').files[0], // file - ["read("any")"] // permissions (optional) -); +const result = await storage.createFile({ + bucketId: '', + fileId: '', + file: document.getElementById('uploader').files[0], + permissions: ["read("any")"] // 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 index 373cdc03fc..101b87860b 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.deleteFile( - '', // bucketId - '' // fileId -); +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 index 3ebb8f8f71..8454be442a 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileDownload( - '', // bucketId - '', // fileId - '' // token (optional) -); +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 index ffc64c9f3a..c4e855b207 100644 --- 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 @@ -6,21 +6,21 @@ const client = new Client() 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) -); +const 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 +}); 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 index add5a6fba5..edc28f146b 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileView( - '', // bucketId - '', // fileId - '' // token (optional) -); +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 index 10bd9fb775..41c41b63d1 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.getFile( - '', // bucketId - '' // fileId -); +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 index f2c3ccb2b8..154212dfec 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.listFiles( - '', // bucketId - [], // queries (optional) - '' // search (optional) -); +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 index 1432b85099..96e1dc5ee2 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.updateFile( - '', // bucketId - '', // fileId - '', // name (optional) - ["read("any")"] // permissions (optional) -); +const result = await storage.updateFile({ + bucketId: '', + fileId: '', + name: '', // optional + permissions: ["read("any")"] // optional +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/create-row.md b/docs/examples/1.8.x/client-web/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..aafe71f4a5 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/create-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createRow({ + databaseId: '', + tableId: '', + rowId: '', + data: {}, + permissions: ["read("any")"] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-web/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..59f66d973f --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.decrementRowColumn({ + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: null, // optional + min: null // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/client-web/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..637114d413 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/delete-row.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteRow({ + databaseId: '', + tableId: '', + rowId: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/get-row.md b/docs/examples/1.8.x/client-web/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..4e436432b7 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/get-row.md @@ -0,0 +1,16 @@ +import { Client, TablesDB } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.getRow({ + databaseId: '', + tableId: '', + rowId: '', + queries: [] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-web/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..a7f3a8c312 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/increment-row-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.incrementRowColumn({ + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: null, // optional + max: null // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/client-web/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..63149aaba4 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/list-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.listRows({ + databaseId: '', + tableId: '', + queries: [] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/update-row.md b/docs/examples/1.8.x/client-web/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..1dba006762 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/update-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateRow({ + databaseId: '', + tableId: '', + rowId: '', + data: {}, // optional + permissions: ["read("any")"] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/client-web/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..1add1c45b9 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.upsertRow({ + databaseId: '', + tableId: '', + rowId: '', + data: {}, // optional + permissions: ["read("any")"] // optional +}); + +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 index 8802e25af9..c72da99abe 100644 --- 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 @@ -6,14 +6,14 @@ const client = new Client() 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) -); +const result = await teams.createMembership({ + teamId: '', + roles: [], + email: 'email@example.com', // optional + userId: '', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // 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 index b23f2201ac..a156156b0c 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/create.md +++ b/docs/examples/1.8.x/client-web/examples/teams/create.md @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.create( - '', // teamId - '', // name - [] // roles (optional) -); +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 index 2f360c3547..95e5fde3a4 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.deleteMembership( - '', // teamId - '' // membershipId -); +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 index 5fd7f5d858..7299f0f791 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/delete.md +++ b/docs/examples/1.8.x/client-web/examples/teams/delete.md @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.delete( - '' // teamId -); +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 index cd253fd6ef..a6d4186b65 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.getMembership( - '', // teamId - '' // membershipId -); +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 index a7f346f11f..98c7605639 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.getPrefs( - '' // teamId -); +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 index 539bdcf051..c910429fd6 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/get.md +++ b/docs/examples/1.8.x/client-web/examples/teams/get.md @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.get( - '' // teamId -); +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 index e8cc39b5d8..d4e342044d 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.listMemberships( - '', // teamId - [], // queries (optional) - '' // search (optional) -); +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 index 4ca13ce8dd..df57f25dfd 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/list.md +++ b/docs/examples/1.8.x/client-web/examples/teams/list.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.list( - [], // queries (optional) - '' // search (optional) -); +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 index 89cc13cac2..8fe61083a8 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateMembershipStatus( - '', // teamId - '', // membershipId - '', // userId - '' // secret -); +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 index fd6fffffcb..5db27e064d 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateMembership( - '', // teamId - '', // membershipId - [] // roles -); +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 index d91939ff73..db1ff4c4ca 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateName( - '', // teamId - '' // name -); +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 index d7d4c36759..0844353546 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updatePrefs( - '', // teamId - {} // prefs -); +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 index a7eb9c5be3..b6f2432c21 100644 --- 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 @@ -1 +1 @@ -appwrite account createAnonymousSession +appwrite account create-anonymous-session 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 index 951293b4b2..b13874c732 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite account createEmailPasswordSession \ - --email email@example.com \ - --password password +appwrite account create-email-password-session \ + --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 index 0aaf2476c9..1902e8b24a 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite account createEmailToken \ - --userId \ - --email email@example.com \ - +appwrite account create-email-token \ + --user-id \ + --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 deleted file mode 100644 index 7b5337993d..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/account/create-j-w-t.md +++ /dev/null @@ -1 +0,0 @@ -appwrite account createJWT diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-jwt.md b/docs/examples/1.8.x/console-cli/examples/account/create-jwt.md new file mode 100644 index 0000000000..f2d656958a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-jwt.md @@ -0,0 +1 @@ +appwrite account create-jwt 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 deleted file mode 100644 index 69203b085d..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/account/create-magic-u-r-l-token.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite account createMagicURLToken \ - --userId \ - --email email@example.com \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-magic-url-token.md b/docs/examples/1.8.x/console-cli/examples/account/create-magic-url-token.md new file mode 100644 index 0000000000..4f16a8b289 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-magic-url-token.md @@ -0,0 +1,3 @@ +appwrite account create-magic-url-token \ + --user-id \ + --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 index 7634217700..a45427677d 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite account createMfaAuthenticator \ - --type totp +appwrite account create-mfa-authenticator \ + --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 index 8696be7ec1..24bab3d672 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite account createMfaChallenge \ - --factor email +appwrite account create-mfa-challenge \ + --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 index 0ef25446fd..4f165d9080 100644 --- 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 @@ -1 +1 @@ -appwrite account createMfaRecoveryCodes +appwrite account create-mfa-recovery-codes diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-o-auth-2-session.md b/docs/examples/1.8.x/console-cli/examples/account/create-o-auth-2-session.md new file mode 100644 index 0000000000..fda2faacaa --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-o-auth-2-session.md @@ -0,0 +1,2 @@ +appwrite account create-o-auth-2-session \ + --provider amazon diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-o-auth-2-token.md b/docs/examples/1.8.x/console-cli/examples/account/create-o-auth-2-token.md new file mode 100644 index 0000000000..7fff73f564 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-o-auth-2-token.md @@ -0,0 +1,2 @@ +appwrite account create-o-auth-2-token \ + --provider amazon 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 deleted file mode 100644 index 9159b8f25f..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index b36f350d99..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2token.md +++ /dev/null @@ -1,5 +0,0 @@ -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 index 23f7f19cac..619478c65f 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite account createPhoneToken \ - --userId \ - --phone +12065550100 +appwrite account create-phone-token \ + --user-id \ + --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 index 3c4402ba1f..b5a95ed987 100644 --- 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 @@ -1 +1 @@ -appwrite account createPhoneVerification +appwrite account create-phone-verification 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 index 41c380b288..1ba6fe304e 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite account createPushTarget \ - --targetId \ - --identifier \ - +appwrite account create-push-target \ + --target-id \ + --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 index ea8c145abb..d6977de8d4 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite account createRecovery \ - --email email@example.com \ - --url https://example.com +appwrite account create-recovery \ + --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 index 426713ef50..eefeb3504e 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite account createSession \ - --userId \ - --secret +appwrite account create-session \ + --user-id \ + --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 index 402038b4b6..6e972f2f7a 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite account createVerification \ - --url https://example.com +appwrite account create-verification \ + --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 index 09686a2454..56eca76d49 100644 --- a/docs/examples/1.8.x/console-cli/examples/account/create.md +++ b/docs/examples/1.8.x/console-cli/examples/account/create.md @@ -1,5 +1,4 @@ appwrite account create \ - --userId \ - --email email@example.com \ - --password '' \ - + --user-id \ + --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 index acd8511dfb..650ab7bf1c 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite account deleteIdentity \ - --identityId +appwrite account delete-identity \ + --identity-id 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 index d4664855b5..e3689b17a0 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite account deleteMfaAuthenticator \ - --type totp +appwrite account delete-mfa-authenticator \ + --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 index 610ea232d8..04f94f64dd 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite account deletePushTarget \ - --targetId +appwrite account delete-push-target \ + --target-id 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 index 9774552408..6476fd9aa5 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite account deleteSession \ - --sessionId +appwrite account delete-session \ + --session-id 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 index dd11877a5d..7381069181 100644 --- 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 @@ -1 +1 @@ -appwrite account deleteSessions +appwrite account delete-sessions 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 index 0e61d658de..01a2f35e5c 100644 --- 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 @@ -1 +1 @@ -appwrite account getMfaRecoveryCodes +appwrite account get-mfa-recovery-codes 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 index 6569925d99..5796c083ed 100644 --- 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 @@ -1 +1 @@ -appwrite account getPrefs +appwrite account get-prefs 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 index 120dc8277f..9901eb244e 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite account getSession \ - --sessionId +appwrite account get-session \ + --session-id 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 index 877b443ea8..095dcc479e 100644 --- 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 @@ -1,2 +1 @@ -appwrite account listIdentities \ - +appwrite account list-identities 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 index e92f49063a..73fb9b629d 100644 --- 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 @@ -1,2 +1 @@ -appwrite account listLogs \ - +appwrite account list-logs 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 index a29f287d24..6930f34747 100644 --- 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 @@ -1 +1 @@ -appwrite account listMfaFactors +appwrite account list-mfa-factors 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 index 87cbab0f66..1aca27baf4 100644 --- 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 @@ -1 +1 @@ -appwrite account listSessions +appwrite account list-sessions 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 index 81938ff3a9..9753a064fc 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite account updateEmail \ - --email email@example.com \ - --password password +appwrite account update-email \ + --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 deleted file mode 100644 index f714d4dbe9..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/account/update-m-f-a.md +++ /dev/null @@ -1,2 +0,0 @@ -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 deleted file mode 100644 index 919bd70a30..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/account/update-magic-u-r-l-session.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite account updateMagicURLSession \ - --userId \ - --secret diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-magic-url-session.md b/docs/examples/1.8.x/console-cli/examples/account/update-magic-url-session.md new file mode 100644 index 0000000000..0bf9ed7d76 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-magic-url-session.md @@ -0,0 +1,3 @@ +appwrite account update-magic-url-session \ + --user-id \ + --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 index b51796a79e..838297ba43 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite account updateMfaAuthenticator \ - --type totp \ - --otp +appwrite account update-mfa-authenticator \ + --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 index 37e09ef4e8..4a5c8fbf63 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite account updateMfaChallenge \ - --challengeId \ - --otp +appwrite account update-mfa-challenge \ + --challenge-id \ + --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 index a129ca6f98..9e9ab074bd 100644 --- 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 @@ -1 +1 @@ -appwrite account updateMfaRecoveryCodes +appwrite account update-mfa-recovery-codes diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-mfa.md b/docs/examples/1.8.x/console-cli/examples/account/update-mfa.md new file mode 100644 index 0000000000..fa122d9bde --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-mfa.md @@ -0,0 +1,2 @@ +appwrite account update-mfa \ + --mfa false 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 index 6f3b5977f4..c858d0e378 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite account updateName \ - --name +appwrite account update-name \ + --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 index 340baec562..e4bbdfc4e9 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite account updatePassword \ - --password '' \ - +appwrite account update-password \ + --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 index d70f33fab5..599a905367 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite account updatePhoneSession \ - --userId \ - --secret +appwrite account update-phone-session \ + --user-id \ + --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 index cef2b5a40d..59dde678eb 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite account updatePhoneVerification \ - --userId \ - --secret +appwrite account update-phone-verification \ + --user-id \ + --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 index 93a619a801..5c257c8455 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite account updatePhone \ - --phone +12065550100 \ - --password password +appwrite account update-phone \ + --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 index 568ac66e48..7b00d7bcfc 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite account updatePrefs \ - --prefs '{ "key": "value" }' +appwrite account update-prefs \ + --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 index f3aa1a906a..f71232af3e 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite account updatePushTarget \ - --targetId \ - --identifier +appwrite account update-push-target \ + --target-id \ + --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 index 903a99cc99..c2a97bda55 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite account updateRecovery \ - --userId \ - --secret \ - --password '' +appwrite account update-recovery \ + --user-id \ + --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 index 5fb6a2e8d5..36833c4674 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite account updateSession \ - --sessionId +appwrite account update-session \ + --session-id 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 index 8886dbbc6a..d27174920b 100644 --- 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 @@ -1 +1 @@ -appwrite account updateStatus +appwrite account update-status 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 index afdfaa8372..d7276c6325 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite account updateVerification \ - --userId \ - --secret +appwrite account update-verification \ + --user-id \ + --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 index 6b4f0b8007..b9dce0b974 100644 --- 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 @@ -1,5 +1,2 @@ -appwrite avatars getBrowser \ - --code aa \ - - - +appwrite avatars get-browser \ + --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 index 365568ba19..0a8317a9fb 100644 --- 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 @@ -1,5 +1,2 @@ -appwrite avatars getCreditCard \ - --code amex \ - - - +appwrite avatars get-credit-card \ + --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 index c658f1a483..c2f4c806ae 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite avatars getFavicon \ - --url https://example.com +appwrite avatars get-favicon \ + --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 index 9f11fef840..15a3daf85e 100644 --- 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 @@ -1,5 +1,2 @@ -appwrite avatars getFlag \ - --code af \ - - - +appwrite avatars get-flag \ + --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 index 7df150610c..942574acea 100644 --- 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 @@ -1,4 +1,2 @@ -appwrite avatars getImage \ - --url https://example.com \ - - +appwrite avatars get-image \ + --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 index b0b3da71c9..f9d5110590 100644 --- 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 @@ -1,5 +1 @@ -appwrite avatars getInitials \ - - - - +appwrite avatars get-initials 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 deleted file mode 100644 index 01e5085732..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/avatars/get-q-r.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite avatars getQR \ - --text \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-qr.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-qr.md new file mode 100644 index 0000000000..75fb094a08 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-qr.md @@ -0,0 +1,2 @@ +appwrite avatars get-qr \ + --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 index 3e55163966..5251dd6ac6 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite console getResource \ - --value \ - --type rules +appwrite console get-resource \ + --value \ + --type rules 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 index 6babbfb5af..ce4d65fa15 100644 --- 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 @@ -1,7 +1,5 @@ -appwrite databases createBooleanAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - - +appwrite databases create-boolean-attribute \ + --database-id \ + --collection-id \ + --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 index d97c424d16..89a754ce24 100644 --- 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 @@ -1,7 +1,4 @@ -appwrite databases createCollection \ - --databaseId \ - --collectionId \ - --name \ - - - +appwrite databases create-collection \ + --database-id \ + --collection-id \ + --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 index f6aaf54fa2..b445d0841a 100644 --- 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 @@ -1,7 +1,5 @@ -appwrite databases createDatetimeAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - - +appwrite databases create-datetime-attribute \ + --database-id \ + --collection-id \ + --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 index 513cfc4f33..a45335ad4e 100644 --- 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 @@ -1,6 +1,5 @@ -appwrite databases createDocument \ - --databaseId \ - --collectionId \ - --documentId \ - --data '{ "key": "value" }' \ - +appwrite databases create-document \ + --database-id \ + --collection-id \ + --document-id \ + --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 index e9e65b5c3c..3512b684a7 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite databases createDocuments \ - --databaseId \ - --collectionId \ - --documents one two three +appwrite databases create-documents \ + --database-id \ + --collection-id \ + --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 index 5c23f940de..e4e9a0ba18 100644 --- 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 @@ -1,7 +1,5 @@ -appwrite databases createEmailAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - - +appwrite databases create-email-attribute \ + --database-id \ + --collection-id \ + --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 index 5d3c614410..2d4c72be0f 100644 --- 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 @@ -1,8 +1,6 @@ -appwrite databases createEnumAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --elements one two three \ - --required false \ - - +appwrite databases create-enum-attribute \ + --database-id \ + --collection-id \ + --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 index 5a6ef4e4ef..0b9988b3a4 100644 --- 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 @@ -1,9 +1,5 @@ -appwrite databases createFloatAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - - - - +appwrite databases create-float-attribute \ + --database-id \ + --collection-id \ + --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 index 2dc95ea921..cd8fc1dc4f 100644 --- 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 @@ -1,8 +1,6 @@ -appwrite databases createIndex \ - --databaseId \ - --collectionId \ - --key '' \ - --type key \ - --attributes one two three \ - - +appwrite databases create-index \ + --database-id \ + --collection-id \ + --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 index 791f3770c9..4c2207e891 100644 --- 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 @@ -1,9 +1,5 @@ -appwrite databases createIntegerAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - - - - +appwrite databases create-integer-attribute \ + --database-id \ + --collection-id \ + --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 index 4f39d84bab..a1cd44e80c 100644 --- 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 @@ -1,7 +1,5 @@ -appwrite databases createIpAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - - +appwrite databases create-ip-attribute \ + --database-id \ + --collection-id \ + --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 index c7d8ae568a..700316239c 100644 --- 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 @@ -1,9 +1,5 @@ -appwrite databases createRelationshipAttribute \ - --databaseId \ - --collectionId \ - --relatedCollectionId \ - --type oneToOne \ - - - - +appwrite databases create-relationship-attribute \ + --database-id \ + --collection-id \ + --related-collection-id \ + --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 index 37b1db644a..ed464c59dc 100644 --- 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 @@ -1,9 +1,6 @@ -appwrite databases createStringAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --size 1 \ - --required false \ - - - +appwrite databases create-string-attribute \ + --database-id \ + --collection-id \ + --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 index 4406ed7879..6968e8c621 100644 --- 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 @@ -1,7 +1,5 @@ -appwrite databases createUrlAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - - +appwrite databases create-url-attribute \ + --database-id \ + --collection-id \ + --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 index 9e7523974f..47b0438352 100644 --- a/docs/examples/1.8.x/console-cli/examples/databases/create.md +++ b/docs/examples/1.8.x/console-cli/examples/databases/create.md @@ -1,4 +1,3 @@ appwrite databases create \ - --databaseId \ - --name \ - + --database-id \ + --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 index e6607ea833..0b9b8a6b75 100644 --- 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 @@ -1,7 +1,5 @@ -appwrite databases decrementDocumentAttribute \ - --databaseId \ - --collectionId \ - --documentId \ - --attribute '' \ - - +appwrite databases decrement-document-attribute \ + --database-id \ + --collection-id \ + --document-id \ + --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 index 88e7df985f..0d68358642 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite databases deleteAttribute \ - --databaseId \ - --collectionId \ - --key '' +appwrite databases delete-attribute \ + --database-id \ + --collection-id \ + --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 index 0db185a7d7..d120865c8d 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite databases deleteCollection \ - --databaseId \ - --collectionId +appwrite databases delete-collection \ + --database-id \ + --collection-id 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 index 3a96d35798..8e900198e7 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite databases deleteDocument \ - --databaseId \ - --collectionId \ - --documentId +appwrite databases delete-document \ + --database-id \ + --collection-id \ + --document-id 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 index 6f3463cbf9..b334ed7212 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite databases deleteDocuments \ - --databaseId \ - --collectionId \ - +appwrite databases delete-documents \ + --database-id \ + --collection-id 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 index 56485e7a78..2de11d36f3 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite databases deleteIndex \ - --databaseId \ - --collectionId \ - --key '' +appwrite databases delete-index \ + --database-id \ + --collection-id \ + --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 index a24a3a04d3..474377798c 100644 --- a/docs/examples/1.8.x/console-cli/examples/databases/delete.md +++ b/docs/examples/1.8.x/console-cli/examples/databases/delete.md @@ -1,2 +1,2 @@ appwrite databases delete \ - --databaseId + --database-id 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 index 821698011f..70cee2c6ad 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite databases getAttribute \ - --databaseId \ - --collectionId \ - --key '' +appwrite databases get-attribute \ + --database-id \ + --collection-id \ + --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 index b57e6c92a9..c9881e2738 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite databases getCollectionUsage \ - --databaseId \ - --collectionId \ - +appwrite databases get-collection-usage \ + --database-id \ + --collection-id 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 index e763b5bbfb..17cbdbef1f 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite databases getCollection \ - --databaseId \ - --collectionId +appwrite databases get-collection \ + --database-id \ + --collection-id 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 deleted file mode 100644 index 1001e9cd11..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/databases/get-database-usage.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite databases getDatabaseUsage \ - --databaseId \ - 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 index 35d9615503..beb44c14c1 100644 --- 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 @@ -1,5 +1,4 @@ -appwrite databases getDocument \ - --databaseId \ - --collectionId \ - --documentId \ - +appwrite databases get-document \ + --database-id \ + --collection-id \ + --document-id 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 index 0071834a8c..50b5961af4 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite databases getIndex \ - --databaseId \ - --collectionId \ - --key '' +appwrite databases get-index \ + --database-id \ + --collection-id \ + --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 index 95263455e9..e3c8748121 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite databases getUsage \ - --databaseId \ - +appwrite databases get-usage \ + --database-id 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 index 35480b64cc..83cec7dcbc 100644 --- a/docs/examples/1.8.x/console-cli/examples/databases/get.md +++ b/docs/examples/1.8.x/console-cli/examples/databases/get.md @@ -1,2 +1,2 @@ appwrite databases get \ - --databaseId + --database-id 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 index 8a5150eebd..d51e44db23 100644 --- 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 @@ -1,7 +1,5 @@ -appwrite databases incrementDocumentAttribute \ - --databaseId \ - --collectionId \ - --documentId \ - --attribute '' \ - - +appwrite databases increment-document-attribute \ + --database-id \ + --collection-id \ + --document-id \ + --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 index a2382feb3a..c531111eb6 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite databases listAttributes \ - --databaseId \ - --collectionId \ - +appwrite databases list-attributes \ + --database-id \ + --collection-id 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 index eadac47a6b..27f3a9bc5e 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite databases listCollectionLogs \ - --databaseId \ - --collectionId \ - +appwrite databases list-collection-logs \ + --database-id \ + --collection-id 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 index b05c330be2..55576eb401 100644 --- 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 @@ -1,4 +1,2 @@ -appwrite databases listCollections \ - --databaseId \ - - +appwrite databases list-collections \ + --database-id 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 index 63b5394647..9f8fb22eb8 100644 --- 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 @@ -1,5 +1,4 @@ -appwrite databases listDocumentLogs \ - --databaseId \ - --collectionId \ - --documentId \ - +appwrite databases list-document-logs \ + --database-id \ + --collection-id \ + --document-id 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 index 98e389579d..69e921c012 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite databases listDocuments \ - --databaseId \ - --collectionId \ - +appwrite databases list-documents \ + --database-id \ + --collection-id 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 index 50acb4d7ad..f12c1e9354 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite databases listIndexes \ - --databaseId \ - --collectionId \ - +appwrite databases list-indexes \ + --database-id \ + --collection-id 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 index 38547c7c3c..293df55327 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite databases listLogs \ - --databaseId \ - +appwrite databases list-logs \ + --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 index aad19fd2bd..6bff75fa89 100644 --- 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 @@ -1,2 +1 @@ -appwrite databases listUsage \ - +appwrite databases list-usage 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 deleted file mode 100644 index e909446e71..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/databases/list-usages.md +++ /dev/null @@ -1,2 +0,0 @@ -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 index e723bc32ec..6681edc994 100644 --- a/docs/examples/1.8.x/console-cli/examples/databases/list.md +++ b/docs/examples/1.8.x/console-cli/examples/databases/list.md @@ -1,3 +1 @@ -appwrite databases list \ - - +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 index f5adb497ec..578a5dc526 100644 --- 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 @@ -1,7 +1,6 @@ -appwrite databases updateBooleanAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - --default false \ - +appwrite databases update-boolean-attribute \ + --database-id \ + --collection-id \ + --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 index eab3617c80..0bad4850e4 100644 --- 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 @@ -1,7 +1,4 @@ -appwrite databases updateCollection \ - --databaseId \ - --collectionId \ - --name \ - - - +appwrite databases update-collection \ + --database-id \ + --collection-id \ + --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 index fe4a462664..53459e0218 100644 --- 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 @@ -1,7 +1,6 @@ -appwrite databases updateDatetimeAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - --default '' \ - +appwrite databases update-datetime-attribute \ + --database-id \ + --collection-id \ + --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 index a4ac55bf6b..29f14612a4 100644 --- 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 @@ -1,6 +1,4 @@ -appwrite databases updateDocument \ - --databaseId \ - --collectionId \ - --documentId \ - - +appwrite databases update-document \ + --database-id \ + --collection-id \ + --document-id 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 index 935f664440..f4f85eb79d 100644 --- 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 @@ -1,5 +1,3 @@ -appwrite databases updateDocuments \ - --databaseId \ - --collectionId \ - - +appwrite databases update-documents \ + --database-id \ + --collection-id 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 index 58510a6f8e..20ea219202 100644 --- 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 @@ -1,7 +1,6 @@ -appwrite databases updateEmailAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - --default email@example.com \ - +appwrite databases update-email-attribute \ + --database-id \ + --collection-id \ + --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 index 21d56d3e64..dfae8d27f3 100644 --- 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 @@ -1,8 +1,7 @@ -appwrite databases updateEnumAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --elements one two three \ - --required false \ - --default \ - +appwrite databases update-enum-attribute \ + --database-id \ + --collection-id \ + --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 index a9bba3eb5e..caeaa96f31 100644 --- 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 @@ -1,9 +1,6 @@ -appwrite databases updateFloatAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - --default null \ - - - +appwrite databases update-float-attribute \ + --database-id \ + --collection-id \ + --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 index 660cd4d148..2ab6e12104 100644 --- 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 @@ -1,9 +1,6 @@ -appwrite databases updateIntegerAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - --default null \ - - - +appwrite databases update-integer-attribute \ + --database-id \ + --collection-id \ + --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 index a400eadc1e..44b4010570 100644 --- 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 @@ -1,7 +1,6 @@ -appwrite databases updateIpAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - --default '' \ - +appwrite databases update-ip-attribute \ + --database-id \ + --collection-id \ + --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 index 6e2dbd927d..d3f27d78e2 100644 --- 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 @@ -1,6 +1,4 @@ -appwrite databases updateRelationshipAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - - +appwrite databases update-relationship-attribute \ + --database-id \ + --collection-id \ + --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 index 526ece0b72..0e0dd714bd 100644 --- 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 @@ -1,8 +1,6 @@ -appwrite databases updateStringAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - --default \ - - +appwrite databases update-string-attribute \ + --database-id \ + --collection-id \ + --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 index e6f401b8ca..76e6feb15b 100644 --- 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 @@ -1,7 +1,6 @@ -appwrite databases updateUrlAttribute \ - --databaseId \ - --collectionId \ - --key '' \ - --required false \ - --default https://example.com \ - +appwrite databases update-url-attribute \ + --database-id \ + --collection-id \ + --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 index a1e0a844e5..e3e1de755c 100644 --- a/docs/examples/1.8.x/console-cli/examples/databases/update.md +++ b/docs/examples/1.8.x/console-cli/examples/databases/update.md @@ -1,4 +1,3 @@ appwrite databases update \ - --databaseId \ - --name \ - + --database-id \ + --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 index 40932014ba..558ffeb5c4 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,5 @@ -appwrite databases upsertDocument \ - --databaseId \ - --collectionId \ - --documentId \ - --data '{ "key": "value" }' \ - +appwrite databases upsert-document \ + --database-id \ + --collection-id \ + --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 cb1677b14c..e58c202da0 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,4 @@ -appwrite databases upsertDocuments \ - --databaseId \ - --collectionId \ - --documents one two three +appwrite databases upsert-documents \ + --database-id \ + --collection-id \ + --documents one two three 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 index 6ac80bd73a..465951c3ce 100644 --- 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 @@ -1,6 +1,4 @@ -appwrite functions createDeployment \ - --functionId \ - --code 'path/to/file.png' \ - --activate false \ - - +appwrite functions create-deployment \ + --function-id \ + --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 index 4839155bd2..7d5c28bcd6 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite functions createDuplicateDeployment \ - --functionId \ - --deploymentId \ - +appwrite functions create-duplicate-deployment \ + --function-id \ + --deployment-id 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 index febe88c541..fd3b3dd62a 100644 --- 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 @@ -1,8 +1,2 @@ -appwrite functions createExecution \ - --functionId \ - - - - - - +appwrite functions create-execution \ + --function-id 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 index a6164a3d0b..f3c8487cf7 100644 --- 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 @@ -1,7 +1,6 @@ -appwrite functions createTemplateDeployment \ - --functionId \ - --repository \ - --owner \ - --rootDirectory \ - --version \ - +appwrite functions create-template-deployment \ + --function-id \ + --repository \ + --owner \ + --root-directory \ + --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 index f35f228d41..50edcaaa72 100644 --- 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 @@ -1,5 +1,4 @@ -appwrite functions createVariable \ - --functionId \ - --key \ - --value \ - +appwrite functions create-variable \ + --function-id \ + --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 index 89f4caca66..8e846222c8 100644 --- 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 @@ -1,5 +1,4 @@ -appwrite functions createVcsDeployment \ - --functionId \ - --type branch \ - --reference \ - +appwrite functions create-vcs-deployment \ + --function-id \ + --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 index ebca5741ed..bdca30d803 100644 --- a/docs/examples/1.8.x/console-cli/examples/functions/create.md +++ b/docs/examples/1.8.x/console-cli/examples/functions/create.md @@ -1,19 +1,4 @@ appwrite functions create \ - --functionId \ - --name \ - --runtime node-14.5 \ - - - - - - - - - - - - - - - + --function-id \ + --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 index 2c9a6aa04a..4f50b92780 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite functions deleteDeployment \ - --functionId \ - --deploymentId +appwrite functions delete-deployment \ + --function-id \ + --deployment-id 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 index 2926b5aaf1..a11c4cb7ed 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite functions deleteExecution \ - --functionId \ - --executionId +appwrite functions delete-execution \ + --function-id \ + --execution-id 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 index 835d125dc6..aebe85704f 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite functions deleteVariable \ - --functionId \ - --variableId +appwrite functions delete-variable \ + --function-id \ + --variable-id 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 index 0eea41c849..abf27334fc 100644 --- a/docs/examples/1.8.x/console-cli/examples/functions/delete.md +++ b/docs/examples/1.8.x/console-cli/examples/functions/delete.md @@ -1,2 +1,2 @@ appwrite functions delete \ - --functionId + --function-id 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 index 485b608623..b9bfcabf65 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite functions getDeploymentDownload \ - --functionId \ - --deploymentId \ - +appwrite functions get-deployment-download \ + --function-id \ + --deployment-id 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 index 3da1605fea..4a658074fd 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite functions getDeployment \ - --functionId \ - --deploymentId +appwrite functions get-deployment \ + --function-id \ + --deployment-id 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 index d593f07c43..ac2ad14278 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite functions getExecution \ - --functionId \ - --executionId +appwrite functions get-execution \ + --function-id \ + --execution-id 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 index 15c6068f35..2ab2afbcf4 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite functions getTemplate \ - --templateId +appwrite functions get-template \ + --template-id 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 index 469db0f171..a3f061d1f5 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite functions getUsage \ - --functionId \ - +appwrite functions get-usage \ + --function-id 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 index 241a91d936..06a3a496a3 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite functions getVariable \ - --functionId \ - --variableId +appwrite functions get-variable \ + --function-id \ + --variable-id 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 index f678ef7663..fafa87ec39 100644 --- a/docs/examples/1.8.x/console-cli/examples/functions/get.md +++ b/docs/examples/1.8.x/console-cli/examples/functions/get.md @@ -1,2 +1,2 @@ appwrite functions get \ - --functionId + --function-id 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 index 2befb86abc..5bb2c60192 100644 --- 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 @@ -1,4 +1,2 @@ -appwrite functions listDeployments \ - --functionId \ - - +appwrite functions list-deployments \ + --function-id 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 index 8d3136e6a4..a008947741 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite functions listExecutions \ - --functionId \ - +appwrite functions list-executions \ + --function-id 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 index 15dc019c44..a0430d6cc3 100644 --- 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 @@ -1 +1 @@ -appwrite functions listRuntimes +appwrite functions list-runtimes 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 index 1d64bc68e7..4fac74ec31 100644 --- 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 @@ -1 +1 @@ -appwrite functions listSpecifications +appwrite functions list-specifications 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 index b48bab53e1..22209fe198 100644 --- 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 @@ -1,5 +1 @@ -appwrite functions listTemplates \ - - - - +appwrite functions list-templates 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 index 8ae7855f45..de28c5c9d0 100644 --- 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 @@ -1,2 +1 @@ -appwrite functions listUsage \ - +appwrite functions list-usage 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 index 21bf2eb506..03e1162551 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite functions listVariables \ - --functionId +appwrite functions list-variables \ + --function-id 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 index 3b7551266e..2d9f0ba7ff 100644 --- a/docs/examples/1.8.x/console-cli/examples/functions/list.md +++ b/docs/examples/1.8.x/console-cli/examples/functions/list.md @@ -1,3 +1 @@ -appwrite functions list \ - - +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 index 06d2dcdcf0..6f0bc1e550 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite functions updateDeploymentStatus \ - --functionId \ - --deploymentId +appwrite functions update-deployment-status \ + --function-id \ + --deployment-id 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 index 652bfe809e..d3534b4e9b 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite functions updateFunctionDeployment \ - --functionId \ - --deploymentId +appwrite functions update-function-deployment \ + --function-id \ + --deployment-id 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 index a2b10491c6..c1d87f29fb 100644 --- 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 @@ -1,6 +1,4 @@ -appwrite functions updateVariable \ - --functionId \ - --variableId \ - --key \ - - +appwrite functions update-variable \ + --function-id \ + --variable-id \ + --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 index 7ac63e0cd1..c436ef054c 100644 --- a/docs/examples/1.8.x/console-cli/examples/functions/update.md +++ b/docs/examples/1.8.x/console-cli/examples/functions/update.md @@ -1,19 +1,3 @@ appwrite functions update \ - --functionId \ - --name \ - - - - - - - - - - - - - - - - + --function-id \ + --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 index f6127a175c..678fcc2e40 100644 --- a/docs/examples/1.8.x/console-cli/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/console-cli/examples/graphql/mutation.md @@ -1,2 +1,2 @@ appwrite graphql mutation \ - --query '{ "key": "value" }' + --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 index 1d84bcaa6a..157115a1fc 100644 --- a/docs/examples/1.8.x/console-cli/examples/graphql/query.md +++ b/docs/examples/1.8.x/console-cli/examples/graphql/query.md @@ -1,2 +1,2 @@ appwrite graphql query \ - --query '{ "key": "value" }' + --query '{ "key": "value" }' 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 \ - --tableId \ - --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 \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --relatedTableId \ - --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 \ - --tableId \ - --rowId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --rowId \ - --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 \ - --tableId \ - --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 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 \ - --tableId \ - --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 \ - --tableId \ - --rowId 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 \ - --tableId \ - 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 \ - --tableId 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 \ - --tableId \ - --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 \ - 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 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 \ - --tableId \ - --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 \ - --tableId \ - --rowId \ - 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 \ - --tableId \ - 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 \ - --tableId 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 \ - --tableId \ - --rowId \ - --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 \ - --tableId \ - 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 \ - 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 \ - --tableId \ - 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 \ - --tableId \ - --rowId \ - 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 \ - --tableId \ - 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 \ - --tableId \ - 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 \ - - 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 \ - --tableId \ - --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 \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --key '' \ - --elements one two three \ - --required false \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --rowId \ - - 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 \ - --tableId \ - - 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 \ - --tableId \ - --key '' \ - --required false \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --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 \ - --tableId \ - --rowId \ - - 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 \ - --tableId \ - --rows one two three 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 index 96dd7e78b2..2ef8b6f3d7 100644 --- 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 @@ -1 +1 @@ -appwrite health getAntivirus +appwrite health get-antivirus 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 index ad1111ccf0..b1ff13104e 100644 --- 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 @@ -1 +1 @@ -appwrite health getCache +appwrite health get-cache 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 index 4659415822..1765216107 100644 --- 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 @@ -1,2 +1 @@ -appwrite health getCertificate \ - +appwrite health get-certificate 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 deleted file mode 100644 index b0ea2d3eac..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/health/get-d-b.md +++ /dev/null @@ -1 +0,0 @@ -appwrite health getDB diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-db.md b/docs/examples/1.8.x/console-cli/examples/health/get-db.md new file mode 100644 index 0000000000..c5e9cb378e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-db.md @@ -0,0 +1 @@ +appwrite health get-db 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 index 724299e384..9704875bb5 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite health getFailedJobs \ - --name v1-database \ - +appwrite health get-failed-jobs \ + --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 index aa1773b35b..29e93a2b14 100644 --- 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 @@ -1 +1 @@ -appwrite health getPubSub +appwrite health get-pub-sub 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 index 7204c2c896..657b98880c 100644 --- 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 @@ -1,2 +1 @@ -appwrite health getQueueBuilds \ - +appwrite health get-queue-builds 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 index 203e8650cc..a7c1c64a9f 100644 --- 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 @@ -1,2 +1 @@ -appwrite health getQueueCertificates \ - +appwrite health get-queue-certificates 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 index f30b941cbc..17d15badfd 100644 --- 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 @@ -1,3 +1 @@ -appwrite health getQueueDatabases \ - - +appwrite health get-queue-databases 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 index 1d44146dc4..78ddc3223d 100644 --- 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 @@ -1,2 +1 @@ -appwrite health getQueueDeletes \ - +appwrite health get-queue-deletes 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 index 4aca467306..8109a8e8a2 100644 --- 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 @@ -1,2 +1 @@ -appwrite health getQueueFunctions \ - +appwrite health get-queue-functions 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 index 3f1386b73a..5ff48cc8ed 100644 --- 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 @@ -1,2 +1 @@ -appwrite health getQueueLogs \ - +appwrite health get-queue-logs 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 index a41f4c308b..e44b1b629f 100644 --- 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 @@ -1,2 +1 @@ -appwrite health getQueueMails \ - +appwrite health get-queue-mails 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 index 11b7ff832b..5249c73550 100644 --- 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 @@ -1,2 +1 @@ -appwrite health getQueueMessaging \ - +appwrite health get-queue-messaging 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 index 2f17bb56f4..11b07a101b 100644 --- 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 @@ -1,2 +1 @@ -appwrite health getQueueMigrations \ - +appwrite health get-queue-migrations 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 index 9cce963748..2e511862ca 100644 --- 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 @@ -1,2 +1 @@ -appwrite health getQueueStatsResources \ - +appwrite health get-queue-stats-resources 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 index d021a3faa1..1790e0fb1d 100644 --- 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 @@ -1,2 +1 @@ -appwrite health getQueueUsage \ - +appwrite health get-queue-usage 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 index 471175bbe4..e1753347b1 100644 --- 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 @@ -1,2 +1 @@ -appwrite health getQueueWebhooks \ - +appwrite health get-queue-webhooks 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 index b5df39fae0..512d135f0e 100644 --- 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 @@ -1 +1 @@ -appwrite health getStorageLocal +appwrite health get-storage-local 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 index eccd21acc3..170bcfc43d 100644 --- 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 @@ -1 +1 @@ -appwrite health getStorage +appwrite health get-storage 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 index 067e5daf9e..feb3901ef5 100644 --- 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 @@ -1 +1 @@ -appwrite health getTime +appwrite health get-time 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 index 5586d1566c..ac96ac14af 100644 --- 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 @@ -1 +1 @@ -appwrite locale listCodes +appwrite locale list-codes 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 index 775af5d9df..18267872c0 100644 --- 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 @@ -1 +1 @@ -appwrite locale listContinents +appwrite locale list-continents 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 deleted file mode 100644 index 43b7eff7ad..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/locale/list-countries-e-u.md +++ /dev/null @@ -1 +0,0 @@ -appwrite locale listCountriesEU diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-countries-eu.md b/docs/examples/1.8.x/console-cli/examples/locale/list-countries-eu.md new file mode 100644 index 0000000000..eba8886a54 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-countries-eu.md @@ -0,0 +1 @@ +appwrite locale list-countries-eu 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 index 072516bf71..ea27155238 100644 --- 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 @@ -1 +1 @@ -appwrite locale listCountriesPhones +appwrite locale list-countries-phones 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 index ee7101df68..652446136b 100644 --- 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 @@ -1 +1 @@ -appwrite locale listCountries +appwrite locale list-countries 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 index 01b1b3c4b2..bbc0f363fe 100644 --- 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 @@ -1 +1 @@ -appwrite locale listCurrencies +appwrite locale list-currencies 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 index d47622c570..a0cfe918af 100644 --- 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 @@ -1 +1 @@ -appwrite locale listLanguages +appwrite locale list-languages 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 index 8b369f403d..fd5aaa9927 100644 --- 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 @@ -1,9 +1,3 @@ -appwrite messaging createApnsProvider \ - --providerId \ - --name \ - - - - - - +appwrite messaging create-apns-provider \ + --provider-id \ + --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 index 2a8e03b7da..e8ffc11633 100644 --- 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 @@ -1,13 +1,4 @@ -appwrite messaging createEmail \ - --messageId \ - --subject \ - --content \ - - - - - - - - - +appwrite messaging create-email \ + --message-id \ + --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 index a19dcbe28c..487bb03981 100644 --- 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 @@ -1,5 +1,3 @@ -appwrite messaging createFcmProvider \ - --providerId \ - --name \ - - +appwrite messaging create-fcm-provider \ + --provider-id \ + --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 index 6b07359194..2616f0074c 100644 --- 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 @@ -1,11 +1,3 @@ -appwrite messaging createMailgunProvider \ - --providerId \ - --name \ - - - - - - - - +appwrite messaging create-mailgun-provider \ + --provider-id \ + --name diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-msg-91-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-msg-91-provider.md new file mode 100644 index 0000000000..d4f975d3c8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,3 @@ +appwrite messaging create-msg-91-provider \ + --provider-id \ + --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 deleted file mode 100644 index f687e36472..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/messaging/create-msg91provider.md +++ /dev/null @@ -1,7 +0,0 @@ -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 index 18d8ec5aec..d5740b9394 100644 --- 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 @@ -1,20 +1,2 @@ -appwrite messaging createPush \ - --messageId \ - - - - - - - - - - - - - - - - - - +appwrite messaging create-push \ + --message-id 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 index de8d059abb..2a478fdb29 100644 --- 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 @@ -1,9 +1,3 @@ -appwrite messaging createSendgridProvider \ - --providerId \ - --name \ - - - - - - +appwrite messaging create-sendgrid-provider \ + --provider-id \ + --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 index dfc9b27ff3..3633d06570 100644 --- 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 @@ -1,8 +1,3 @@ -appwrite messaging createSms \ - --messageId \ - --content \ - - - - - +appwrite messaging create-sms \ + --message-id \ + --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 index 13f04fe648..9a4178352d 100644 --- 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 @@ -1,15 +1,4 @@ -appwrite messaging createSmtpProvider \ - --providerId \ - --name \ - --host \ - - - - - - - - - - - +appwrite messaging create-smtp-provider \ + --provider-id \ + --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 index 5e65c36df7..5fe7682f73 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite messaging createSubscriber \ - --topicId \ - --subscriberId \ - --targetId +appwrite messaging create-subscriber \ + --topic-id \ + --subscriber-id \ + --target-id 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 index 783f7594fd..052028d6c5 100644 --- 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 @@ -1,7 +1,3 @@ -appwrite messaging createTelesignProvider \ - --providerId \ - --name \ - - - - +appwrite messaging create-telesign-provider \ + --provider-id \ + --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 index 77185c71de..6ff37b016d 100644 --- 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 @@ -1,7 +1,3 @@ -appwrite messaging createTextmagicProvider \ - --providerId \ - --name \ - - - - +appwrite messaging create-textmagic-provider \ + --provider-id \ + --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 index 1d57e1cee0..3a28bb163d 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite messaging createTopic \ - --topicId \ - --name \ - +appwrite messaging create-topic \ + --topic-id \ + --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 index 91fdaae96b..2b2f00dc44 100644 --- 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 @@ -1,7 +1,3 @@ -appwrite messaging createTwilioProvider \ - --providerId \ - --name \ - - - - +appwrite messaging create-twilio-provider \ + --provider-id \ + --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 index 1939d1c04b..56fb3e679f 100644 --- 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 @@ -1,7 +1,3 @@ -appwrite messaging createVonageProvider \ - --providerId \ - --name \ - - - - +appwrite messaging create-vonage-provider \ + --provider-id \ + --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 index a93885573c..75671a99e4 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite messaging deleteProvider \ - --providerId +appwrite messaging delete-provider \ + --provider-id 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 index c535154df6..d433e3a599 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite messaging deleteSubscriber \ - --topicId \ - --subscriberId +appwrite messaging delete-subscriber \ + --topic-id \ + --subscriber-id 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 index 1fa387c6ab..0c2887c076 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite messaging deleteTopic \ - --topicId +appwrite messaging delete-topic \ + --topic-id 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 index 82ff141b03..eb5d2a62f1 100644 --- a/docs/examples/1.8.x/console-cli/examples/messaging/delete.md +++ b/docs/examples/1.8.x/console-cli/examples/messaging/delete.md @@ -1,2 +1,2 @@ appwrite messaging delete \ - --messageId + --message-id 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 index 0144f79699..2de245efd1 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite messaging getMessage \ - --messageId +appwrite messaging get-message \ + --message-id 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 index 9da9f2d864..b115c52c2a 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite messaging getProvider \ - --providerId +appwrite messaging get-provider \ + --provider-id 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 index 02f8bc0e57..88c2ab60e2 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite messaging getSubscriber \ - --topicId \ - --subscriberId +appwrite messaging get-subscriber \ + --topic-id \ + --subscriber-id 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 index feb2dc66b6..7628bedf00 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite messaging getTopic \ - --topicId +appwrite messaging get-topic \ + --topic-id 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 index 91366f35f7..9cc6dc559d 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite messaging listMessageLogs \ - --messageId \ - +appwrite messaging list-message-logs \ + --message-id 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 index 6ab04b0fd2..1e8a726f9a 100644 --- 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 @@ -1,3 +1 @@ -appwrite messaging listMessages \ - - +appwrite messaging list-messages 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 index 0dee2e3f4b..95e514ec8a 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite messaging listProviderLogs \ - --providerId \ - +appwrite messaging list-provider-logs \ + --provider-id 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 index 0a2ce47a3f..d075be571c 100644 --- 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 @@ -1,3 +1 @@ -appwrite messaging listProviders \ - - +appwrite messaging list-providers 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 index 4a04ac4373..4858c6c7d9 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite messaging listSubscriberLogs \ - --subscriberId \ - +appwrite messaging list-subscriber-logs \ + --subscriber-id 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 index 2eed8bd3f0..c122c6845c 100644 --- 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 @@ -1,4 +1,2 @@ -appwrite messaging listSubscribers \ - --topicId \ - - +appwrite messaging list-subscribers \ + --topic-id 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 index 7efa50ee3b..e161e9338a 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite messaging listTargets \ - --messageId \ - +appwrite messaging list-targets \ + --message-id 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 index f23c10aba6..121f2795c1 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite messaging listTopicLogs \ - --topicId \ - +appwrite messaging list-topic-logs \ + --topic-id 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 index 1810a7bd7b..0337b3d197 100644 --- 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 @@ -1,3 +1 @@ -appwrite messaging listTopics \ - - +appwrite messaging list-topics 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 index 9e895a066a..7bd5db2624 100644 --- 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 @@ -1,9 +1,2 @@ -appwrite messaging updateApnsProvider \ - --providerId \ - - - - - - - +appwrite messaging update-apns-provider \ + --provider-id 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 index 934fd29213..7e318ad492 100644 --- 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 @@ -1,13 +1,2 @@ -appwrite messaging updateEmail \ - --messageId \ - - - - - - - - - - - +appwrite messaging update-email \ + --message-id 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 index 000022361f..4d41680639 100644 --- 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 @@ -1,5 +1,2 @@ -appwrite messaging updateFcmProvider \ - --providerId \ - - - +appwrite messaging update-fcm-provider \ + --provider-id 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 index f35c5e9157..9d07afead8 100644 --- 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 @@ -1,11 +1,2 @@ -appwrite messaging updateMailgunProvider \ - --providerId \ - - - - - - - - - +appwrite messaging update-mailgun-provider \ + --provider-id diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-msg-91-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-msg-91-provider.md new file mode 100644 index 0000000000..e4bc24b4ef --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,2 @@ +appwrite messaging update-msg-91-provider \ + --provider-id 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 deleted file mode 100644 index 8e2d604a19..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/messaging/update-msg91provider.md +++ /dev/null @@ -1,7 +0,0 @@ -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 index 1f4427cee7..c11d462943 100644 --- 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 @@ -1,20 +1,2 @@ -appwrite messaging updatePush \ - --messageId \ - - - - - - - - - - - - - - - - - - +appwrite messaging update-push \ + --message-id 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 index 7f2e97dbf7..77e9fcd2df 100644 --- 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 @@ -1,9 +1,2 @@ -appwrite messaging updateSendgridProvider \ - --providerId \ - - - - - - - +appwrite messaging update-sendgrid-provider \ + --provider-id 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 index a30ff43d0c..888df629d6 100644 --- 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 @@ -1,8 +1,2 @@ -appwrite messaging updateSms \ - --messageId \ - - - - - - +appwrite messaging update-sms \ + --message-id 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 index 4e0f7b6b8d..23bb89998f 100644 --- 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 @@ -1,15 +1,2 @@ -appwrite messaging updateSmtpProvider \ - --providerId \ - - - - - - - - - - - - - +appwrite messaging update-smtp-provider \ + --provider-id 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 index 0a92f2cacd..69eee1f57b 100644 --- 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 @@ -1,7 +1,2 @@ -appwrite messaging updateTelesignProvider \ - --providerId \ - - - - - +appwrite messaging update-telesign-provider \ + --provider-id 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 index 79160b2461..ff23b82155 100644 --- 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 @@ -1,7 +1,2 @@ -appwrite messaging updateTextmagicProvider \ - --providerId \ - - - - - +appwrite messaging update-textmagic-provider \ + --provider-id 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 index d10b0edde3..ea7bc458e3 100644 --- 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 @@ -1,4 +1,2 @@ -appwrite messaging updateTopic \ - --topicId \ - - +appwrite messaging update-topic \ + --topic-id 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 index c967d724af..25f2910d26 100644 --- 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 @@ -1,7 +1,2 @@ -appwrite messaging updateTwilioProvider \ - --providerId \ - - - - - +appwrite messaging update-twilio-provider \ + --provider-id 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 index 11f7963be2..7b87a9422b 100644 --- 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 @@ -1,7 +1,2 @@ -appwrite messaging updateVonageProvider \ - --providerId \ - - - - - +appwrite messaging update-vonage-provider \ + --provider-id 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 index 73e9ee62d8..34fee2f307 100644 --- 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 @@ -1,5 +1,5 @@ -appwrite migrations createAppwriteMigration \ - --resources one two three \ - --endpoint https://example.com \ - --projectId \ - --apiKey +appwrite migrations create-appwrite-migration \ + --resources one two three \ + --endpoint https://example.com \ + --project-id \ + --api-key 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 index 594bc85052..4b72b6f689 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite migrations createCsvMigration \ - --bucketId \ - --fileId \ - --resourceId [ID1:ID2] +appwrite migrations create-csv-migration \ + --bucket-id \ + --file-id \ + --resource-id [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 index 3dfb3aeac6..81337b4cf4 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite migrations createFirebaseMigration \ - --resources one two three \ - --serviceAccount +appwrite migrations create-firebase-migration \ + --resources one two three \ + --service-account 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 index d959897109..2bcba6ad8c 100644 --- 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 @@ -1,9 +1,8 @@ -appwrite migrations createNHostMigration \ - --resources one two three \ - --subdomain \ - --region \ - --adminSecret \ - --database \ - --username \ - --password \ - +appwrite migrations create-n-host-migration \ + --resources one two three \ + --subdomain \ + --region \ + --admin-secret \ + --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 index 0620f3ba2e..a186b17212 100644 --- 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 @@ -1,8 +1,7 @@ -appwrite migrations createSupabaseMigration \ - --resources one two three \ - --endpoint https://example.com \ - --apiKey \ - --databaseHost \ - --username \ - --password \ - +appwrite migrations create-supabase-migration \ + --resources one two three \ + --endpoint https://example.com \ + --api-key \ + --database-host \ + --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 index 9dac1aa3db..b7ad0f07ba 100644 --- a/docs/examples/1.8.x/console-cli/examples/migrations/delete.md +++ b/docs/examples/1.8.x/console-cli/examples/migrations/delete.md @@ -1,2 +1,2 @@ appwrite migrations delete \ - --migrationId + --migration-id 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 index 745e9fb98c..3f54fed2bc 100644 --- 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 @@ -1,5 +1,5 @@ -appwrite migrations getAppwriteReport \ - --resources one two three \ - --endpoint https://example.com \ - --projectID \ - --key +appwrite migrations get-appwrite-report \ + --resources one two three \ + --endpoint https://example.com \ + --project-id \ + --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 index 73c7e1ca14..33e7e732f4 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite migrations getFirebaseReport \ - --resources one two three \ - --serviceAccount +appwrite migrations get-firebase-report \ + --resources one two three \ + --service-account 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 index 6b7e2eaff2..2d1ed043ef 100644 --- 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 @@ -1,9 +1,8 @@ -appwrite migrations getNHostReport \ - --resources one two three \ - --subdomain \ - --region \ - --adminSecret \ - --database \ - --username \ - --password \ - +appwrite migrations get-n-host-report \ + --resources one two three \ + --subdomain \ + --region \ + --admin-secret \ + --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 index 9754f38e24..789c66a543 100644 --- 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 @@ -1,8 +1,7 @@ -appwrite migrations getSupabaseReport \ - --resources one two three \ - --endpoint https://example.com \ - --apiKey \ - --databaseHost \ - --username \ - --password \ - +appwrite migrations get-supabase-report \ + --resources one two three \ + --endpoint https://example.com \ + --api-key \ + --database-host \ + --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 index 8810646c7e..46959a3ef0 100644 --- a/docs/examples/1.8.x/console-cli/examples/migrations/get.md +++ b/docs/examples/1.8.x/console-cli/examples/migrations/get.md @@ -1,2 +1,2 @@ appwrite migrations get \ - --migrationId + --migration-id 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 index c120a61e80..659c9fd46f 100644 --- a/docs/examples/1.8.x/console-cli/examples/migrations/list.md +++ b/docs/examples/1.8.x/console-cli/examples/migrations/list.md @@ -1,3 +1 @@ -appwrite migrations list \ - - +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 index 518f86cee7..d656dd9956 100644 --- a/docs/examples/1.8.x/console-cli/examples/migrations/retry.md +++ b/docs/examples/1.8.x/console-cli/examples/migrations/retry.md @@ -1,2 +1,2 @@ appwrite migrations retry \ - --migrationId + --migration-id 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 index 253d6ddf75..113c0bafc9 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite project createVariable \ - --key \ - --value \ - +appwrite project create-variable \ + --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 index 7fdda874fd..a4213dca5d 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite project deleteVariable \ - --variableId +appwrite project delete-variable \ + --variable-id 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 index 9b4c296a8c..75cc4b99a3 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite project getUsage \ - --startDate '' \ - --endDate '' \ - +appwrite project get-usage \ + --start-date '' \ + --end-date '' 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 index b2d482586b..2833758541 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite project getVariable \ - --variableId +appwrite project get-variable \ + --variable-id 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 index bd26c7db6b..dc6251c497 100644 --- 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 @@ -1 +1 @@ -appwrite project listVariables +appwrite project list-variables 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 index 4365b64888..5f12a12be1 100644 --- 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 @@ -1,5 +1,3 @@ -appwrite project updateVariable \ - --variableId \ - --key \ - - +appwrite project update-variable \ + --variable-id \ + --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 index 8b9ec8969a..b90e0ca85c 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite projects createDevKey \ - --projectId \ - --name \ - --expire '' +appwrite projects create-dev-key \ + --project-id \ + --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 deleted file mode 100644 index d703d36b65..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/projects/create-j-w-t.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite projects createJWT \ - --projectId \ - --scopes one two three \ - diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-jwt.md b/docs/examples/1.8.x/console-cli/examples/projects/create-jwt.md new file mode 100644 index 0000000000..df708a53ed --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-jwt.md @@ -0,0 +1,3 @@ +appwrite projects create-jwt \ + --project-id \ + --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 index fb986dcebc..0650ccd1d2 100644 --- 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 @@ -1,5 +1,4 @@ -appwrite projects createKey \ - --projectId \ - --name \ - --scopes one two three \ - +appwrite projects create-key \ + --project-id \ + --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 index 8727d21d64..94f5234156 100644 --- 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 @@ -1,7 +1,4 @@ -appwrite projects createPlatform \ - --projectId \ - --type web \ - --name \ - - - +appwrite projects create-platform \ + --project-id \ + --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 index 66ce5880aa..c83aebfb30 100644 --- 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 @@ -1,11 +1,6 @@ -appwrite projects createSmtpTest \ - --projectId \ - --emails one two three \ - --senderName \ - --senderEmail email@example.com \ - --host '' \ - - - - - +appwrite projects create-smtp-test \ + --project-id \ + --emails one two three \ + --sender-name \ + --sender-email 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 index 03ecf4110d..0983d31497 100644 --- 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 @@ -1,9 +1,6 @@ -appwrite projects createWebhook \ - --projectId \ - --name \ - --events one two three \ - --url '' \ - --security false \ - - - +appwrite projects create-webhook \ + --project-id \ + --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 index 0504785503..5bdd1ffda1 100644 --- a/docs/examples/1.8.x/console-cli/examples/projects/create.md +++ b/docs/examples/1.8.x/console-cli/examples/projects/create.md @@ -1,14 +1,4 @@ appwrite projects create \ - --projectId '' \ - --name \ - --teamId \ - - - - - - - - - - + --project-id '' \ + --name \ + --team-id 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 index 2859a3309f..3e911eab69 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects deleteDevKey \ - --projectId \ - --keyId +appwrite projects delete-dev-key \ + --project-id \ + --key-id 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 index 01ce0fac68..81cf403c6d 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite projects deleteEmailTemplate \ - --projectId \ - --type verification \ - --locale af +appwrite projects delete-email-template \ + --project-id \ + --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 index 6baf05706e..eccb09b911 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects deleteKey \ - --projectId \ - --keyId +appwrite projects delete-key \ + --project-id \ + --key-id 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 index a85bd865ba..7f68e7d6f9 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects deletePlatform \ - --projectId \ - --platformId +appwrite projects delete-platform \ + --project-id \ + --platform-id 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 index 3afcf649c7..666de541d9 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite projects deleteSmsTemplate \ - --projectId \ - --type verification \ - --locale af +appwrite projects delete-sms-template \ + --project-id \ + --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 index a67301ef07..70e686556e 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects deleteWebhook \ - --projectId \ - --webhookId +appwrite projects delete-webhook \ + --project-id \ + --webhook-id 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 index a4ffc70c91..3127385598 100644 --- a/docs/examples/1.8.x/console-cli/examples/projects/delete.md +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete.md @@ -1,2 +1,2 @@ appwrite projects delete \ - --projectId + --project-id 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 index cfc37ed437..57b2c2275c 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects getDevKey \ - --projectId \ - --keyId +appwrite projects get-dev-key \ + --project-id \ + --key-id 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 index 6e4c21e52b..ea6d5422a8 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite projects getEmailTemplate \ - --projectId \ - --type verification \ - --locale af +appwrite projects get-email-template \ + --project-id \ + --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 index f69b51bbe2..cfd5013536 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects getKey \ - --projectId \ - --keyId +appwrite projects get-key \ + --project-id \ + --key-id 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 index 67648be035..62077309b6 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects getPlatform \ - --projectId \ - --platformId +appwrite projects get-platform \ + --project-id \ + --platform-id 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 index c655953c8e..bbb755b085 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite projects getSmsTemplate \ - --projectId \ - --type verification \ - --locale af +appwrite projects get-sms-template \ + --project-id \ + --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 index 890bf37069..d725bee7bf 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects getWebhook \ - --projectId \ - --webhookId +appwrite projects get-webhook \ + --project-id \ + --webhook-id 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 index 919321b81d..0665b37e0a 100644 --- a/docs/examples/1.8.x/console-cli/examples/projects/get.md +++ b/docs/examples/1.8.x/console-cli/examples/projects/get.md @@ -1,2 +1,2 @@ appwrite projects get \ - --projectId + --project-id 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 index d552cb3bca..f6f9a844c5 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite projects listDevKeys \ - --projectId \ - +appwrite projects list-dev-keys \ + --project-id 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 index cc37680b5b..aa70a5c5eb 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite projects listKeys \ - --projectId +appwrite projects list-keys \ + --project-id 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 index 5fc2ea4106..e7fbfb2831 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite projects listPlatforms \ - --projectId +appwrite projects list-platforms \ + --project-id 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 index dcf9953f80..ab4012a11a 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite projects listWebhooks \ - --projectId +appwrite projects list-webhooks \ + --project-id 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 index 0d3dd7a539..f84f712fb5 100644 --- a/docs/examples/1.8.x/console-cli/examples/projects/list.md +++ b/docs/examples/1.8.x/console-cli/examples/projects/list.md @@ -1,3 +1 @@ -appwrite projects list \ - - +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 index e5f63c59a3..bbbec4500d 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects updateApiStatusAll \ - --projectId \ - --status false +appwrite projects update-api-status-all \ + --project-id \ + --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 index 01120957af..7e269ba2ec 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite projects updateApiStatus \ - --projectId \ - --api rest \ - --status false +appwrite projects update-api-status \ + --project-id \ + --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 index ad6f8ac97c..07e458e731 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects updateAuthDuration \ - --projectId \ - --duration 0 +appwrite projects update-auth-duration \ + --project-id \ + --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 index 9d01fa5a1a..5e5d2addda 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects updateAuthLimit \ - --projectId \ - --limit 0 +appwrite projects update-auth-limit \ + --project-id \ + --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 index f477bba56d..b4160e3412 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects updateAuthPasswordDictionary \ - --projectId \ - --enabled false +appwrite projects update-auth-password-dictionary \ + --project-id \ + --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 index 8b9b90a32a..cffc917911 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects updateAuthPasswordHistory \ - --projectId \ - --limit 0 +appwrite projects update-auth-password-history \ + --project-id \ + --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 index 2a1294d17b..fc205c03ac 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects updateAuthSessionsLimit \ - --projectId \ - --limit 1 +appwrite projects update-auth-sessions-limit \ + --project-id \ + --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 index 848987b2f8..5f38dc9225 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite projects updateAuthStatus \ - --projectId \ - --method email-password \ - --status false +appwrite projects update-auth-status \ + --project-id \ + --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 index cc95030389..1e54db37cb 100644 --- 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 @@ -1,5 +1,5 @@ -appwrite projects updateDevKey \ - --projectId \ - --keyId \ - --name \ - --expire '' +appwrite projects update-dev-key \ + --project-id \ + --key-id \ + --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 index a3acd066ec..f8e4919a4a 100644 --- 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 @@ -1,9 +1,6 @@ -appwrite projects updateEmailTemplate \ - --projectId \ - --type verification \ - --locale af \ - --subject \ - --message \ - - - +appwrite projects update-email-template \ + --project-id \ + --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 index 6d3dc198da..8ac173b75e 100644 --- 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 @@ -1,6 +1,5 @@ -appwrite projects updateKey \ - --projectId \ - --keyId \ - --name \ - --scopes one two three \ - +appwrite projects update-key \ + --project-id \ + --key-id \ + --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 index 6c811ccfce..94582f48b7 100644 --- 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 @@ -1,5 +1,5 @@ -appwrite projects updateMembershipsPrivacy \ - --projectId \ - --userName false \ - --userEmail false \ - --mfa false +appwrite projects update-memberships-privacy \ + --project-id \ + --user-name false \ + --user-email 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 index 733cc16887..774887d6af 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects updateMockNumbers \ - --projectId \ - --numbers one two three +appwrite projects update-mock-numbers \ + --project-id \ + --numbers one two three diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-o-auth-2.md b/docs/examples/1.8.x/console-cli/examples/projects/update-o-auth-2.md new file mode 100644 index 0000000000..7f8364df6a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-o-auth-2.md @@ -0,0 +1,3 @@ +appwrite projects update-o-auth-2 \ + --project-id \ + --provider amazon 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 deleted file mode 100644 index 92f6718962..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/projects/update-o-auth2.md +++ /dev/null @@ -1,6 +0,0 @@ -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 index 21dca78369..7130decb07 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects updatePersonalDataCheck \ - --projectId \ - --enabled false +appwrite projects update-personal-data-check \ + --project-id \ + --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 index 05b1602ae9..170e8a6e68 100644 --- 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 @@ -1,7 +1,4 @@ -appwrite projects updatePlatform \ - --projectId \ - --platformId \ - --name \ - - - +appwrite projects update-platform \ + --project-id \ + --platform-id \ + --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 index 1ffb77e085..1d8fab29a7 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects updateServiceStatusAll \ - --projectId \ - --status false +appwrite projects update-service-status-all \ + --project-id \ + --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 index 03963a1214..ce589bcb41 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite projects updateServiceStatus \ - --projectId \ - --service account \ - --status false +appwrite projects update-service-status \ + --project-id \ + --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 index bd23b7417a..d25fa96000 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects updateSessionAlerts \ - --projectId \ - --alerts false +appwrite projects update-session-alerts \ + --project-id \ + --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 index 21e8511f64..17d635e5ac 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects updateSessionInvalidation \ - --projectId \ - --enabled false +appwrite projects update-session-invalidation \ + --project-id \ + --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 index fc8310eb25..5e10477f73 100644 --- 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 @@ -1,5 +1,5 @@ -appwrite projects updateSmsTemplate \ - --projectId \ - --type verification \ - --locale af \ - --message +appwrite projects update-sms-template \ + --project-id \ + --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 index 0afbe9cec9..f62059aa5c 100644 --- 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 @@ -1,11 +1,3 @@ -appwrite projects updateSmtp \ - --projectId \ - --enabled false \ - - - - - - - - +appwrite projects update-smtp \ + --project-id \ + --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 index 49214ad9f3..4cb0a981c0 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects updateTeam \ - --projectId \ - --teamId +appwrite projects update-team \ + --project-id \ + --team-id 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 index 6034ef01f6..708ff65663 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite projects updateWebhookSignature \ - --projectId \ - --webhookId +appwrite projects update-webhook-signature \ + --project-id \ + --webhook-id 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 index 51c536d74c..f505e6e520 100644 --- 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 @@ -1,10 +1,7 @@ -appwrite projects updateWebhook \ - --projectId \ - --webhookId \ - --name \ - --events one two three \ - --url '' \ - --security false \ - - - +appwrite projects update-webhook \ + --project-id \ + --webhook-id \ + --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 index d4df289636..e3c7ecaa88 100644 --- a/docs/examples/1.8.x/console-cli/examples/projects/update.md +++ b/docs/examples/1.8.x/console-cli/examples/projects/update.md @@ -1,12 +1,3 @@ appwrite projects update \ - --projectId \ - --name \ - - - - - - - - - + --project-id \ + --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 deleted file mode 100644 index 5746b94b1e..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/proxy/create-a-p-i-rule.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite proxy createAPIRule \ - --domain '' diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/create-api-rule.md b/docs/examples/1.8.x/console-cli/examples/proxy/create-api-rule.md new file mode 100644 index 0000000000..3bd7bb16fe --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/create-api-rule.md @@ -0,0 +1,2 @@ +appwrite proxy create-api-rule \ + --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 index 380650c208..2312f3afbb 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite proxy createFunctionRule \ - --domain '' \ - --functionId \ - +appwrite proxy create-function-rule \ + --domain '' \ + --function-id 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 index ec9098a748..763f9bc8b4 100644 --- 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 @@ -1,6 +1,6 @@ -appwrite proxy createRedirectRule \ - --domain '' \ - --url https://example.com \ - --statusCode 301 \ - --resourceId \ - --resourceType site +appwrite proxy create-redirect-rule \ + --domain '' \ + --url https://example.com \ + --status-code 301 \ + --resource-id \ + --resource-type 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 index eb41bd7158..fa7859b352 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite proxy createSiteRule \ - --domain '' \ - --siteId \ - +appwrite proxy create-site-rule \ + --domain '' \ + --site-id 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 index b11b6ca23e..c676893a1b 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite proxy deleteRule \ - --ruleId +appwrite proxy delete-rule \ + --rule-id 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 index 85d11a50b1..22ac1de7bf 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite proxy getRule \ - --ruleId +appwrite proxy get-rule \ + --rule-id 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 index bc654bac5c..ab530846d0 100644 --- 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 @@ -1,3 +1 @@ -appwrite proxy listRules \ - - +appwrite proxy list-rules 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 index 8200d15702..b381aa3353 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite proxy updateRuleVerification \ - --ruleId +appwrite proxy update-rule-verification \ + --rule-id 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 index a83d7f3cfe..dda0468278 100644 --- 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 @@ -1,7 +1,4 @@ -appwrite sites createDeployment \ - --siteId \ - --code 'path/to/file.png' \ - --activate false \ - - - +appwrite sites create-deployment \ + --site-id \ + --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 index bab63ca8a3..30cf7d5ac8 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite sites createDuplicateDeployment \ - --siteId \ - --deploymentId +appwrite sites create-duplicate-deployment \ + --site-id \ + --deployment-id 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 index 2aaaf445db..2eece41976 100644 --- 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 @@ -1,7 +1,6 @@ -appwrite sites createTemplateDeployment \ - --siteId \ - --repository \ - --owner \ - --rootDirectory \ - --version \ - +appwrite sites create-template-deployment \ + --site-id \ + --repository \ + --owner \ + --root-directory \ + --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 index b640321317..af1f470113 100644 --- 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 @@ -1,5 +1,4 @@ -appwrite sites createVariable \ - --siteId \ - --key \ - --value \ - +appwrite sites create-variable \ + --site-id \ + --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 index 85c96f93ec..ab9c444e06 100644 --- 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 @@ -1,5 +1,4 @@ -appwrite sites createVcsDeployment \ - --siteId \ - --type branch \ - --reference \ - +appwrite sites create-vcs-deployment \ + --site-id \ + --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 index bd7e86e70f..6806a106db 100644 --- a/docs/examples/1.8.x/console-cli/examples/sites/create.md +++ b/docs/examples/1.8.x/console-cli/examples/sites/create.md @@ -1,19 +1,5 @@ appwrite sites create \ - --siteId \ - --name \ - --framework analog \ - --buildRuntime node-14.5 \ - - - - - - - - - - - - - - + --site-id \ + --name \ + --framework analog \ + --build-runtime 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 index c1cbf49637..7f7fe2f89b 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite sites deleteDeployment \ - --siteId \ - --deploymentId +appwrite sites delete-deployment \ + --site-id \ + --deployment-id 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 index 6769be255c..3ea350396c 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite sites deleteLog \ - --siteId \ - --logId +appwrite sites delete-log \ + --site-id \ + --log-id 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 index 60d9ecf4eb..a7a32b93ba 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite sites deleteVariable \ - --siteId \ - --variableId +appwrite sites delete-variable \ + --site-id \ + --variable-id 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 index 9071454850..e03eca67f1 100644 --- a/docs/examples/1.8.x/console-cli/examples/sites/delete.md +++ b/docs/examples/1.8.x/console-cli/examples/sites/delete.md @@ -1,2 +1,2 @@ appwrite sites delete \ - --siteId + --site-id 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 index 1fae298796..e7af5c31b1 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite sites getDeploymentDownload \ - --siteId \ - --deploymentId \ - +appwrite sites get-deployment-download \ + --site-id \ + --deployment-id 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 index 93680ff70d..28fee04df8 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite sites getDeployment \ - --siteId \ - --deploymentId +appwrite sites get-deployment \ + --site-id \ + --deployment-id 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 index 7867aba05e..adba026759 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite sites getLog \ - --siteId \ - --logId +appwrite sites get-log \ + --site-id \ + --log-id 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 index e04dd2e120..64bfd67d19 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite sites getTemplate \ - --templateId +appwrite sites get-template \ + --template-id 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 index 6de7d6bde8..e1f88627e9 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite sites getUsage \ - --siteId \ - +appwrite sites get-usage \ + --site-id 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 index b60b577c38..2e96d63277 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite sites getVariable \ - --siteId \ - --variableId +appwrite sites get-variable \ + --site-id \ + --variable-id 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 index 7922efa5f0..db34c8212b 100644 --- a/docs/examples/1.8.x/console-cli/examples/sites/get.md +++ b/docs/examples/1.8.x/console-cli/examples/sites/get.md @@ -1,2 +1,2 @@ appwrite sites get \ - --siteId + --site-id 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 index 5ab2cdc104..0c5de0578e 100644 --- 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 @@ -1,4 +1,2 @@ -appwrite sites listDeployments \ - --siteId \ - - +appwrite sites list-deployments \ + --site-id 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 index 1d9b6b4b87..7a213b9ac5 100644 --- 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 @@ -1 +1 @@ -appwrite sites listFrameworks +appwrite sites list-frameworks 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 index f13864fe6b..565bcab9d4 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite sites listLogs \ - --siteId \ - +appwrite sites list-logs \ + --site-id 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 index dc1a16c9dc..e8f1a87eb5 100644 --- 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 @@ -1 +1 @@ -appwrite sites listSpecifications +appwrite sites list-specifications 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 index 9d93913d94..bde094fce8 100644 --- 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 @@ -1,5 +1 @@ -appwrite sites listTemplates \ - - - - +appwrite sites list-templates 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 index a6f43f61e7..b5b4171d34 100644 --- 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 @@ -1,2 +1 @@ -appwrite sites listUsage \ - +appwrite sites list-usage 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 index 13a258b054..419fe76f8f 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite sites listVariables \ - --siteId +appwrite sites list-variables \ + --site-id 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 index 0cad70e894..9d3b883c34 100644 --- a/docs/examples/1.8.x/console-cli/examples/sites/list.md +++ b/docs/examples/1.8.x/console-cli/examples/sites/list.md @@ -1,3 +1 @@ -appwrite sites list \ - - +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 index 7923b384f6..9220265d12 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite sites updateDeploymentStatus \ - --siteId \ - --deploymentId +appwrite sites update-deployment-status \ + --site-id \ + --deployment-id 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 index de877d8ae7..9db9e11ae0 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite sites updateSiteDeployment \ - --siteId \ - --deploymentId +appwrite sites update-site-deployment \ + --site-id \ + --deployment-id 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 index e968771056..e7df76a549 100644 --- 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 @@ -1,6 +1,4 @@ -appwrite sites updateVariable \ - --siteId \ - --variableId \ - --key \ - - +appwrite sites update-variable \ + --site-id \ + --variable-id \ + --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 index 192ee26e3e..6fab0af5fb 100644 --- a/docs/examples/1.8.x/console-cli/examples/sites/update.md +++ b/docs/examples/1.8.x/console-cli/examples/sites/update.md @@ -1,19 +1,4 @@ appwrite sites update \ - --siteId \ - --name \ - --framework analog \ - - - - - - - - - - - - - - - + --site-id \ + --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 index 878c10d253..2e26dc770f 100644 --- 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 @@ -1,11 +1,3 @@ -appwrite storage createBucket \ - --bucketId \ - --name \ - - - - - - - - +appwrite storage create-bucket \ + --bucket-id \ + --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 index 67bd4da2c0..82b4d0a1aa 100644 --- 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 @@ -1,5 +1,4 @@ -appwrite storage createFile \ - --bucketId \ - --fileId \ - --file 'path/to/file.png' \ - +appwrite storage create-file \ + --bucket-id \ + --file-id \ + --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 index e51797e12c..33e520cc15 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite storage deleteBucket \ - --bucketId +appwrite storage delete-bucket \ + --bucket-id 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 index 79c03e8288..a3006c2fea 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite storage deleteFile \ - --bucketId \ - --fileId +appwrite storage delete-file \ + --bucket-id \ + --file-id 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 index df3659c60a..794b0ec8cf 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite storage getBucketUsage \ - --bucketId \ - +appwrite storage get-bucket-usage \ + --bucket-id 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 index cf8725b35d..64042812f6 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite storage getBucket \ - --bucketId +appwrite storage get-bucket \ + --bucket-id 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 index 79f3368d87..12a74ea0a2 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite storage getFileDownload \ - --bucketId \ - --fileId \ - +appwrite storage get-file-download \ + --bucket-id \ + --file-id 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 index de437af65b..82f180efc8 100644 --- 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 @@ -1,15 +1,3 @@ -appwrite storage getFilePreview \ - --bucketId \ - --fileId \ - - - - - - - - - - - - +appwrite storage get-file-preview \ + --bucket-id \ + --file-id 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 index 689cf1233b..5ce6526fad 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite storage getFileView \ - --bucketId \ - --fileId \ - +appwrite storage get-file-view \ + --bucket-id \ + --file-id 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 index 641c20d2b0..8c139e602a 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite storage getFile \ - --bucketId \ - --fileId +appwrite storage get-file \ + --bucket-id \ + --file-id 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 index 29466e02f0..1d69ffd820 100644 --- 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 @@ -1,2 +1 @@ -appwrite storage getUsage \ - +appwrite storage get-usage 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 index a5cad1988f..1bffd0ebf8 100644 --- 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 @@ -1,3 +1 @@ -appwrite storage listBuckets \ - - +appwrite storage list-buckets 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 index 0e1c2f09c0..29dc20d3a1 100644 --- 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 @@ -1,4 +1,2 @@ -appwrite storage listFiles \ - --bucketId \ - - +appwrite storage list-files \ + --bucket-id 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 index b006a7bf74..12282f3b11 100644 --- 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 @@ -1,11 +1,3 @@ -appwrite storage updateBucket \ - --bucketId \ - --name \ - - - - - - - - +appwrite storage update-bucket \ + --bucket-id \ + --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 index 593ea658a0..86a3f3d10b 100644 --- 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 @@ -1,5 +1,3 @@ -appwrite storage updateFile \ - --bucketId \ - --fileId \ - - +appwrite storage update-file \ + --bucket-id \ + --file-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..b191215d67 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,5 @@ +appwrite tables-db create-boolean-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..7ccaf9e41f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,5 @@ +appwrite tables-db create-datetime-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..54f32b99db --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-email-column.md @@ -0,0 +1,5 @@ +appwrite tables-db create-email-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..4f3e9cea71 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-enum-column.md @@ -0,0 +1,6 @@ +appwrite tables-db create-enum-column \ + --database-id \ + --table-id \ + --key '' \ + --elements one two three \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..a365cefc8c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-float-column.md @@ -0,0 +1,5 @@ +appwrite tables-db create-float-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-index.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..7100907ff3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-index.md @@ -0,0 +1,6 @@ +appwrite tables-db create-index \ + --database-id \ + --table-id \ + --key '' \ + --type key \ + --columns one two three diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..2dc799b29f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-integer-column.md @@ -0,0 +1,5 @@ +appwrite tables-db create-integer-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..2b4601337e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-ip-column.md @@ -0,0 +1,5 @@ +appwrite tables-db create-ip-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..d7d58b6eb0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,5 @@ +appwrite tables-db create-relationship-column \ + --database-id \ + --table-id \ + --related-table-id \ + --type oneToOne diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-row.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..d15c5ec047 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-row.md @@ -0,0 +1,5 @@ +appwrite tables-db create-row \ + --database-id \ + --table-id \ + --row-id \ + --data '{ "key": "value" }' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..39eb34961c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-rows.md @@ -0,0 +1,4 @@ +appwrite tables-db create-rows \ + --database-id \ + --table-id \ + --rows one two three diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..a394ff59d0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-string-column.md @@ -0,0 +1,6 @@ +appwrite tables-db create-string-column \ + --database-id \ + --table-id \ + --key '' \ + --size 1 \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-table.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-table.md new file mode 100644 index 0000000000..1c5a22d7ef --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-table.md @@ -0,0 +1,4 @@ +appwrite tables-db create-table \ + --database-id \ + --table-id \ + --name diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..d9b9f2b36f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-url-column.md @@ -0,0 +1,5 @@ +appwrite tables-db create-url-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create.md new file mode 100644 index 0000000000..d10c5d663d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create.md @@ -0,0 +1,3 @@ +appwrite tables-db create \ + --database-id \ + --name diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..79e0a51de1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,5 @@ +appwrite tables-db decrement-row-column \ + --database-id \ + --table-id \ + --row-id \ + --column '' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..4689290543 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-column.md @@ -0,0 +1,4 @@ +appwrite tables-db delete-column \ + --database-id \ + --table-id \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..0729f87952 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-index.md @@ -0,0 +1,4 @@ +appwrite tables-db delete-index \ + --database-id \ + --table-id \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..03b3562f5f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-row.md @@ -0,0 +1,4 @@ +appwrite tables-db delete-row \ + --database-id \ + --table-id \ + --row-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..92cd143ad2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-rows.md @@ -0,0 +1,3 @@ +appwrite tables-db delete-rows \ + --database-id \ + --table-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..6ec9df4539 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-table.md @@ -0,0 +1,3 @@ +appwrite tables-db delete-table \ + --database-id \ + --table-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/delete.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete.md new file mode 100644 index 0000000000..52bf4cdde3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete.md @@ -0,0 +1,2 @@ +appwrite tables-db delete \ + --database-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..d209c45b22 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-column.md @@ -0,0 +1,4 @@ +appwrite tables-db get-column \ + --database-id \ + --table-id \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get-index.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..2035e78b65 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-index.md @@ -0,0 +1,4 @@ +appwrite tables-db get-index \ + --database-id \ + --table-id \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get-row.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..c8d06ea02f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-row.md @@ -0,0 +1,4 @@ +appwrite tables-db get-row \ + --database-id \ + --table-id \ + --row-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get-table-usage.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-table-usage.md new file mode 100644 index 0000000000..0e7782f5eb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-table-usage.md @@ -0,0 +1,3 @@ +appwrite tables-db get-table-usage \ + --database-id \ + --table-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get-table.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..9e5e038163 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-table.md @@ -0,0 +1,3 @@ +appwrite tables-db get-table \ + --database-id \ + --table-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get-usage.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-usage.md new file mode 100644 index 0000000000..ff421ce3f0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-usage.md @@ -0,0 +1,2 @@ +appwrite tables-db get-usage \ + --database-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get.md new file mode 100644 index 0000000000..1b125eccf0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get.md @@ -0,0 +1,2 @@ +appwrite tables-db get \ + --database-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..a15ab6917c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/increment-row-column.md @@ -0,0 +1,5 @@ +appwrite tables-db increment-row-column \ + --database-id \ + --table-id \ + --row-id \ + --column '' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..4c233d519a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-columns.md @@ -0,0 +1,3 @@ +appwrite tables-db list-columns \ + --database-id \ + --table-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..4139175a17 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-indexes.md @@ -0,0 +1,3 @@ +appwrite tables-db list-indexes \ + --database-id \ + --table-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-row-logs.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-row-logs.md new file mode 100644 index 0000000000..dfa2f98455 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-row-logs.md @@ -0,0 +1,4 @@ +appwrite tables-db list-row-logs \ + --database-id \ + --table-id \ + --row-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..904350ef20 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-rows.md @@ -0,0 +1,3 @@ +appwrite tables-db list-rows \ + --database-id \ + --table-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-table-logs.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-table-logs.md new file mode 100644 index 0000000000..a803bf4053 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-table-logs.md @@ -0,0 +1,3 @@ +appwrite tables-db list-table-logs \ + --database-id \ + --table-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..f7e7930841 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-tables.md @@ -0,0 +1,2 @@ +appwrite tables-db list-tables \ + --database-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-usage.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-usage.md new file mode 100644 index 0000000000..9e6b9802a4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-usage.md @@ -0,0 +1 @@ +appwrite tables-db list-usage diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list.md new file mode 100644 index 0000000000..22d7e017a7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list.md @@ -0,0 +1 @@ +appwrite tables-db list diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..318ddac301 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,6 @@ +appwrite tables-db update-boolean-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default false diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..b40a825368 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,6 @@ +appwrite tables-db update-datetime-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default '' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..cd8104b775 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-email-column.md @@ -0,0 +1,6 @@ +appwrite tables-db update-email-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default email@example.com diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..66bc3e2899 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-enum-column.md @@ -0,0 +1,7 @@ +appwrite tables-db update-enum-column \ + --database-id \ + --table-id \ + --key '' \ + --elements one two three \ + --required false \ + --default diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..a3c6e6b265 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-float-column.md @@ -0,0 +1,6 @@ +appwrite tables-db update-float-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default null diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..f651c5c142 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-integer-column.md @@ -0,0 +1,6 @@ +appwrite tables-db update-integer-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default null diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..9a1425c522 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-ip-column.md @@ -0,0 +1,6 @@ +appwrite tables-db update-ip-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default '' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..fb358a311b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,4 @@ +appwrite tables-db update-relationship-column \ + --database-id \ + --table-id \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-row.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..31d88664ab --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-row.md @@ -0,0 +1,4 @@ +appwrite tables-db update-row \ + --database-id \ + --table-id \ + --row-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..eca741f185 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-rows.md @@ -0,0 +1,3 @@ +appwrite tables-db update-rows \ + --database-id \ + --table-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..fadb277b02 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-string-column.md @@ -0,0 +1,6 @@ +appwrite tables-db update-string-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-table.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-table.md new file mode 100644 index 0000000000..92884dfb3e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-table.md @@ -0,0 +1,4 @@ +appwrite tables-db update-table \ + --database-id \ + --table-id \ + --name diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..e1bbdbb3b4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-url-column.md @@ -0,0 +1,6 @@ +appwrite tables-db update-url-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default https://example.com diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update.md new file mode 100644 index 0000000000..b8dbec193c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update.md @@ -0,0 +1,3 @@ +appwrite tables-db update \ + --database-id \ + --name diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..32c9fd62b2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/upsert-row.md @@ -0,0 +1,4 @@ +appwrite tables-db upsert-row \ + --database-id \ + --table-id \ + --row-id diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..85e0bc0ec9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/upsert-rows.md @@ -0,0 +1,4 @@ +appwrite tables-db upsert-rows \ + --database-id \ + --table-id \ + --rows one two three 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 index 0d0fc8df09..6e9d50a147 100644 --- 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 @@ -1,8 +1,3 @@ -appwrite teams createMembership \ - --teamId \ - --roles one two three \ - - - - - +appwrite teams create-membership \ + --team-id \ + --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 index e0f9a126f2..fb8bc3ade6 100644 --- a/docs/examples/1.8.x/console-cli/examples/teams/create.md +++ b/docs/examples/1.8.x/console-cli/examples/teams/create.md @@ -1,4 +1,3 @@ appwrite teams create \ - --teamId \ - --name \ - + --team-id \ + --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 index 58d0adbac7..c9f1596aa8 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite teams deleteMembership \ - --teamId \ - --membershipId +appwrite teams delete-membership \ + --team-id \ + --membership-id 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 index 5b018158cd..04d5e4eadd 100644 --- a/docs/examples/1.8.x/console-cli/examples/teams/delete.md +++ b/docs/examples/1.8.x/console-cli/examples/teams/delete.md @@ -1,2 +1,2 @@ appwrite teams delete \ - --teamId + --team-id 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 index 5e6af4c1a1..a832b2384d 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite teams getMembership \ - --teamId \ - --membershipId +appwrite teams get-membership \ + --team-id \ + --membership-id 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 index 2ab1f1dc01..a2d456a77c 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite teams getPrefs \ - --teamId +appwrite teams get-prefs \ + --team-id 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 index c8e75b7543..94f80a9ab7 100644 --- a/docs/examples/1.8.x/console-cli/examples/teams/get.md +++ b/docs/examples/1.8.x/console-cli/examples/teams/get.md @@ -1,2 +1,2 @@ appwrite teams get \ - --teamId + --team-id 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 index 66149350d8..cbdf32ad9e 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite teams listLogs \ - --teamId \ - +appwrite teams list-logs \ + --team-id 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 index 050ea961d2..6a1cbcae7e 100644 --- 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 @@ -1,4 +1,2 @@ -appwrite teams listMemberships \ - --teamId \ - - +appwrite teams list-memberships \ + --team-id 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 index dfffc4d4dd..90ab82f8a1 100644 --- a/docs/examples/1.8.x/console-cli/examples/teams/list.md +++ b/docs/examples/1.8.x/console-cli/examples/teams/list.md @@ -1,3 +1 @@ -appwrite teams list \ - - +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 index aa4acf9457..9c234f528e 100644 --- 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 @@ -1,5 +1,5 @@ -appwrite teams updateMembershipStatus \ - --teamId \ - --membershipId \ - --userId \ - --secret +appwrite teams update-membership-status \ + --team-id \ + --membership-id \ + --user-id \ + --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 index 6cfda92920..f16c776ac3 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite teams updateMembership \ - --teamId \ - --membershipId \ - --roles one two three +appwrite teams update-membership \ + --team-id \ + --membership-id \ + --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 index 8c73e00d7b..cc803fbc47 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite teams updateName \ - --teamId \ - --name +appwrite teams update-name \ + --team-id \ + --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 index b6fc5a8f6e..a8ce42646e 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite teams updatePrefs \ - --teamId \ - --prefs '{ "key": "value" }' +appwrite teams update-prefs \ + --team-id \ + --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 index 8de8d7ac6c..3890041d59 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite tokens createFileToken \ - --bucketId \ - --fileId \ - +appwrite tokens create-file-token \ + --bucket-id \ + --file-id 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 index c25ea4a4b4..93c99a924b 100644 --- a/docs/examples/1.8.x/console-cli/examples/tokens/delete.md +++ b/docs/examples/1.8.x/console-cli/examples/tokens/delete.md @@ -1,2 +1,2 @@ appwrite tokens delete \ - --tokenId + --token-id 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 index 2c48280b0d..617c112eac 100644 --- a/docs/examples/1.8.x/console-cli/examples/tokens/get.md +++ b/docs/examples/1.8.x/console-cli/examples/tokens/get.md @@ -1,2 +1,2 @@ appwrite tokens get \ - --tokenId + --token-id 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 index a808e545ca..95e0df3b02 100644 --- a/docs/examples/1.8.x/console-cli/examples/tokens/list.md +++ b/docs/examples/1.8.x/console-cli/examples/tokens/list.md @@ -1,4 +1,3 @@ appwrite tokens list \ - --bucketId \ - --fileId \ - + --bucket-id \ + --file-id 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 index 73f21609b6..ab86424adf 100644 --- a/docs/examples/1.8.x/console-cli/examples/tokens/update.md +++ b/docs/examples/1.8.x/console-cli/examples/tokens/update.md @@ -1,3 +1,2 @@ appwrite tokens update \ - --tokenId \ - + --token-id diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-argon-2-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-argon-2-user.md new file mode 100644 index 0000000000..fd2a7e4135 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-argon-2-user.md @@ -0,0 +1,4 @@ +appwrite users create-argon-2-user \ + --user-id \ + --email email@example.com \ + --password password 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 deleted file mode 100644 index b0c7494e20..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/users/create-argon2user.md +++ /dev/null @@ -1,5 +0,0 @@ -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 index b5686721b5..e05d9e83d8 100644 --- 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 @@ -1,5 +1,4 @@ -appwrite users createBcryptUser \ - --userId \ - --email email@example.com \ - --password password \ - +appwrite users create-bcrypt-user \ + --user-id \ + --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 deleted file mode 100644 index 220086bb1a..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/users/create-j-w-t.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite users createJWT \ - --userId \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-jwt.md b/docs/examples/1.8.x/console-cli/examples/users/create-jwt.md new file mode 100644 index 0000000000..508c0f64c5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-jwt.md @@ -0,0 +1,2 @@ +appwrite users create-jwt \ + --user-id 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 deleted file mode 100644 index ba37a78be2..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/users/create-m-d5user.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite users createMD5User \ - --userId \ - --email email@example.com \ - --password password \ - diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-md-5-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-md-5-user.md new file mode 100644 index 0000000000..f47b9499b1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-md-5-user.md @@ -0,0 +1,4 @@ +appwrite users create-md-5-user \ + --user-id \ + --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 index 4dbd98ff8a..c212872385 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite users createMfaRecoveryCodes \ - --userId +appwrite users create-mfa-recovery-codes \ + --user-id 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 deleted file mode 100644 index 9dc378dc99..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/users/create-p-h-pass-user.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite users createPHPassUser \ - --userId \ - --email email@example.com \ - --password password \ - diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-ph-pass-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-ph-pass-user.md new file mode 100644 index 0000000000..a40470516d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-ph-pass-user.md @@ -0,0 +1,4 @@ +appwrite users create-ph-pass-user \ + --user-id \ + --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 deleted file mode 100644 index 57483625e9..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/users/create-s-h-a-user.md +++ /dev/null @@ -1,6 +0,0 @@ -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 index 25fc60b6e1..df4d651abf 100644 --- 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 @@ -1,8 +1,7 @@ -appwrite users createScryptModifiedUser \ - --userId \ - --email email@example.com \ - --password password \ - --passwordSalt \ - --passwordSaltSeparator \ - --passwordSignerKey \ - +appwrite users create-scrypt-modified-user \ + --user-id \ + --email email@example.com \ + --password password \ + --password-salt \ + --password-salt-separator \ + --password-signer-key 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 index 3fc56b1ee3..2f911b5891 100644 --- 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 @@ -1,10 +1,9 @@ -appwrite users createScryptUser \ - --userId \ - --email email@example.com \ - --password password \ - --passwordSalt \ - --passwordCpu null \ - --passwordMemory null \ - --passwordParallel null \ - --passwordLength null \ - +appwrite users create-scrypt-user \ + --user-id \ + --email email@example.com \ + --password password \ + --password-salt \ + --password-cpu null \ + --password-memory null \ + --password-parallel null \ + --password-length 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 index c8938fa706..2644dce0ce 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite users createSession \ - --userId +appwrite users create-session \ + --user-id diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-sha-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-sha-user.md new file mode 100644 index 0000000000..6965698f55 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-sha-user.md @@ -0,0 +1,4 @@ +appwrite users create-sha-user \ + --user-id \ + --email email@example.com \ + --password password 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 index 8d9306b00e..d0775c9e4d 100644 --- 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 @@ -1,7 +1,5 @@ -appwrite users createTarget \ - --userId \ - --targetId \ - --providerType email \ - --identifier \ - - +appwrite users create-target \ + --user-id \ + --target-id \ + --provider-type 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 index 9962e72c73..30b7812af9 100644 --- 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 @@ -1,4 +1,2 @@ -appwrite users createToken \ - --userId \ - - +appwrite users create-token \ + --user-id 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 index e828f56ecb..1103eaf476 100644 --- a/docs/examples/1.8.x/console-cli/examples/users/create.md +++ b/docs/examples/1.8.x/console-cli/examples/users/create.md @@ -1,6 +1,2 @@ appwrite users create \ - --userId \ - - - - + --user-id 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 index f3d2d6d980..602a7d0cd8 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite users deleteIdentity \ - --identityId +appwrite users delete-identity \ + --identity-id 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 index edc67d0b9a..a0fcc704c3 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users deleteMfaAuthenticator \ - --userId \ - --type totp +appwrite users delete-mfa-authenticator \ + --user-id \ + --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 index 9f1fbdbfb3..f638b83303 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users deleteSession \ - --userId \ - --sessionId +appwrite users delete-session \ + --user-id \ + --session-id 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 index 4c683d270a..eb038cc504 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite users deleteSessions \ - --userId +appwrite users delete-sessions \ + --user-id 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 index e9780911fd..e6410dd1f0 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users deleteTarget \ - --userId \ - --targetId +appwrite users delete-target \ + --user-id \ + --target-id 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 index 293a5b040d..00f8f9c982 100644 --- a/docs/examples/1.8.x/console-cli/examples/users/delete.md +++ b/docs/examples/1.8.x/console-cli/examples/users/delete.md @@ -1,2 +1,2 @@ appwrite users delete \ - --userId + --user-id 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 index cefcce607a..cbb75820c5 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite users getMfaRecoveryCodes \ - --userId +appwrite users get-mfa-recovery-codes \ + --user-id 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 index 324aa4f508..45d01a6fc3 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite users getPrefs \ - --userId +appwrite users get-prefs \ + --user-id 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 index b80dbd9728..1be3c0efda 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users getTarget \ - --userId \ - --targetId +appwrite users get-target \ + --user-id \ + --target-id 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 index ad7895d3aa..a4d13e70b9 100644 --- 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 @@ -1,2 +1 @@ -appwrite users getUsage \ - +appwrite users get-usage 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 index 47002c5063..341844cfc9 100644 --- a/docs/examples/1.8.x/console-cli/examples/users/get.md +++ b/docs/examples/1.8.x/console-cli/examples/users/get.md @@ -1,2 +1,2 @@ appwrite users get \ - --userId + --user-id 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 index c6cd6d5e28..d4fa82f2a6 100644 --- 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 @@ -1,3 +1 @@ -appwrite users listIdentities \ - - +appwrite users list-identities 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 index 0b0bc1f50f..d2b95beef6 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite users listLogs \ - --userId \ - +appwrite users list-logs \ + --user-id 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 index 119f446ec9..f027e4a2e3 100644 --- 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 @@ -1,4 +1,2 @@ -appwrite users listMemberships \ - --userId \ - - +appwrite users list-memberships \ + --user-id 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 index e5d111b8ee..d2cadf5b6f 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite users listMfaFactors \ - --userId +appwrite users list-mfa-factors \ + --user-id 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 index cb85d15ff6..761447a6d1 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite users listSessions \ - --userId +appwrite users list-sessions \ + --user-id 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 index 9b5614bd32..26330e801f 100644 --- 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 @@ -1,3 +1,2 @@ -appwrite users listTargets \ - --userId \ - +appwrite users list-targets \ + --user-id 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 index e5fdb9e5c5..94057adff1 100644 --- a/docs/examples/1.8.x/console-cli/examples/users/list.md +++ b/docs/examples/1.8.x/console-cli/examples/users/list.md @@ -1,3 +1 @@ -appwrite users list \ - - +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 index 990436f38b..9f4788aae0 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users updateEmailVerification \ - --userId \ - --emailVerification false +appwrite users update-email-verification \ + --user-id \ + --email-verification 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 index cce20e9ebf..f02b79de5a 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users updateEmail \ - --userId \ - --email email@example.com +appwrite users update-email \ + --user-id \ + --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 index ca60c59683..5963768ffc 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users updateLabels \ - --userId \ - --labels one two three +appwrite users update-labels \ + --user-id \ + --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 index 63fb7f25eb..4f63119f5a 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite users updateMfaRecoveryCodes \ - --userId +appwrite users update-mfa-recovery-codes \ + --user-id 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 index 3ccdbd8fdf..1d36d9e1de 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users updateMfa \ - --userId \ - --mfa false +appwrite users update-mfa \ + --user-id \ + --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 index 9bf20eb117..2f0d0788a5 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users updateName \ - --userId \ - --name +appwrite users update-name \ + --user-id \ + --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 index c05197b3c2..ec320c23cd 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users updatePassword \ - --userId \ - --password '' +appwrite users update-password \ + --user-id \ + --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 index b88a282d48..2cf56b2a79 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users updatePhoneVerification \ - --userId \ - --phoneVerification false +appwrite users update-phone-verification \ + --user-id \ + --phone-verification 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 index 118c8e3557..d1b7db3531 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users updatePhone \ - --userId \ - --number +12065550100 +appwrite users update-phone \ + --user-id \ + --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 index f3fa995e4d..b4e27cdadf 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users updatePrefs \ - --userId \ - --prefs '{ "key": "value" }' +appwrite users update-prefs \ + --user-id \ + --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 index b587b70e9e..f7c1bb44e2 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite users updateStatus \ - --userId \ - --status false +appwrite users update-status \ + --user-id \ + --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 index d6541a0600..1fa4b7ab7b 100644 --- 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 @@ -1,6 +1,3 @@ -appwrite users updateTarget \ - --userId \ - --targetId \ - - - +appwrite users update-target \ + --user-id \ + --target-id 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 index d12a093d2d..d10eac8091 100644 --- 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 @@ -1,5 +1,4 @@ -appwrite vcs createRepositoryDetection \ - --installationId \ - --providerRepositoryId \ - --type runtime \ - +appwrite vcs create-repository-detection \ + --installation-id \ + --provider-repository-id \ + --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 index a4934d5ef5..fa9206cfa2 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite vcs createRepository \ - --installationId \ - --name \ - --private false +appwrite vcs create-repository \ + --installation-id \ + --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 index f7d3a92001..ae9fd335a8 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite vcs deleteInstallation \ - --installationId +appwrite vcs delete-installation \ + --installation-id 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 index df51853ea4..e589d60460 100644 --- 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 @@ -1,2 +1,2 @@ -appwrite vcs getInstallation \ - --installationId +appwrite vcs get-installation \ + --installation-id 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 index 3ba8d75c91..786d2201f1 100644 --- 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 @@ -1,5 +1,3 @@ -appwrite vcs getRepositoryContents \ - --installationId \ - --providerRepositoryId \ - - +appwrite vcs get-repository-contents \ + --installation-id \ + --provider-repository-id 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 index 9f88e18eef..10ab55500c 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite vcs getRepository \ - --installationId \ - --providerRepositoryId +appwrite vcs get-repository \ + --installation-id \ + --provider-repository-id 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 index a0af28dfbb..92e13bf0b8 100644 --- 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 @@ -1,3 +1 @@ -appwrite vcs listInstallations \ - - +appwrite vcs list-installations 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 index 15c3a643bb..7a3214074a 100644 --- 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 @@ -1,4 +1,3 @@ -appwrite vcs listRepositories \ - --installationId \ - --type runtime \ - +appwrite vcs list-repositories \ + --installation-id \ + --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 index ea2fbd29fb..c6036731b1 100644 --- 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 @@ -1,3 +1,3 @@ -appwrite vcs listRepositoryBranches \ - --installationId \ - --providerRepositoryId +appwrite vcs list-repository-branches \ + --installation-id \ + --provider-repository-id 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 index 417b59431d..f83891cb3e 100644 --- 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 @@ -1,4 +1,4 @@ -appwrite vcs updateExternalDeployments \ - --installationId \ - --repositoryId \ - --providerPullRequestId +appwrite vcs update-external-deployments \ + --installation-id \ + --repository-id \ + --provider-pull-request-id 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 index 36a503164b..d8766a4da9 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createEmailPasswordSession( - 'email@example.com', // email - 'password' // password -); +const result = await account.createEmailPasswordSession({ + email: 'email@example.com', + 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 index 9517000af3..12e7fb9365 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.createEmailToken( - '', // userId - 'email@example.com', // email - false // phrase (optional) -); +const result = await account.createEmailToken({ + userId: '', + email: 'email@example.com', + phrase: false // 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/console-web/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/console-web/examples/account/create-jwt.md 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-url-token.md similarity index 59% rename from docs/examples/1.8.x/console-web/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/console-web/examples/account/create-magic-url-token.md index 6b1891855e..7f3cd722ea 100644 --- 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-url-token.md @@ -6,11 +6,11 @@ const client = new Client() const account = new Account(client); -const result = await account.createMagicURLToken( - '', // userId - 'email@example.com', // email - 'https://example.com', // url (optional) - false // phrase (optional) -); +const result = await account.createMagicURLToken({ + userId: '', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false // 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 index 923eb1ee3c..7d3a01011f 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaAuthenticator( - AuthenticatorType.Totp // type -); +const result = await account.createMFAAuthenticator({ + type: AuthenticatorType.Totp +}); 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 index fd6af6ec19..3bea832ffd 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaChallenge( - AuthenticationFactor.Email // factor -); +const result = await account.createMFAChallenge({ + factor: AuthenticationFactor.Email +}); 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 index d7c122b79c..d5ec4aaffb 100644 --- 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 @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaRecoveryCodes(); +const result = await account.createMFARecoveryCodes(); console.log(result); 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-auth-2-session.md similarity index 58% rename from docs/examples/1.8.x/console-web/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/console-web/examples/account/create-o-auth-2-session.md index 9eb7cfab67..10270fc64f 100644 --- 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-auth-2-session.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Token( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +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/console-web/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/console-web/examples/account/create-o-auth-2-token.md similarity index 58% rename from docs/examples/1.8.x/console-web/examples/account/create-o-auth2session.md rename to docs/examples/1.8.x/console-web/examples/account/create-o-auth-2-token.md index a11bd9880b..15c0d5b440 100644 --- 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-auth-2-token.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Session( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +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/console-web/examples/account/create-phone-token.md b/docs/examples/1.8.x/console-web/examples/account/create-phone-token.md index 25216ca73c..192a83f6ad 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createPhoneToken( - '', // userId - '+12065550100' // phone -); +const result = await account.createPhoneToken({ + userId: '', + phone: '+12065550100' +}); 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 index ee35566f8a..d4add51faa 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.createPushTarget( - '', // targetId - '', // identifier - '' // providerId (optional) -); +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 index c2bb4422fa..e7699db34a 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createRecovery( - 'email@example.com', // email - 'https://example.com' // url -); +const result = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com' +}); 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 index 1c8d8a4480..74e8917612 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createSession( - '', // userId - '' // secret -); +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 index f6eacdce1f..bc873b5263 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createVerification( - 'https://example.com' // url -); +const result = await account.createVerification({ + url: 'https://example.com' +}); 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 index d220aed8d0..d379255361 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create.md +++ b/docs/examples/1.8.x/console-web/examples/account/create.md @@ -6,11 +6,11 @@ const client = new Client() const account = new Account(client); -const result = await account.create( - '', // userId - 'email@example.com', // email - '', // password - '' // name (optional) -); +const result = await account.create({ + userId: '', + email: 'email@example.com', + 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 index 6808b32a1d..c5bcd94525 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteIdentity( - '' // identityId -); +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 index 54610a810c..5d6cfd9a3a 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteMfaAuthenticator( - AuthenticatorType.Totp // type -); +const result = await account.deleteMFAAuthenticator({ + type: AuthenticatorType.Totp +}); 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 index f530b64dad..546813a3f6 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deletePushTarget( - '' // targetId -); +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 index 4eba0515e4..83bc337294 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteSession( - '' // sessionId -); +const result = await account.deleteSession({ + sessionId: '' +}); 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 index bee039c48d..a8c7810d78 100644 --- 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 @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const result = await account.getMfaRecoveryCodes(); +const result = await account.getMFARecoveryCodes(); 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 index d5da237783..803966f165 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.getSession( - '' // sessionId -); +const result = await account.getSession({ + sessionId: '' +}); 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 index 675e902c9f..a41b9012e7 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.listIdentities( - [] // queries (optional) -); +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 index 72a0ee12dd..9dd9339b7c 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.listLogs( - [] // queries (optional) -); +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 index 7cbc52ec71..078503a678 100644 --- 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 @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const result = await account.listMfaFactors(); +const result = await account.listMFAFactors(); 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 index df1c7f480a..f6631646aa 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateEmail( - 'email@example.com', // email - 'password' // password -); +const result = await account.updateEmail({ + email: 'email@example.com', + password: 'password' +}); 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-url-session.md similarity index 72% rename from docs/examples/1.8.x/console-web/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/console-web/examples/account/update-magic-url-session.md index e0ecd66740..7c58ca4db9 100644 --- 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-url-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMagicURLSession( - '', // userId - '' // secret -); +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 index b960675914..b6aa383de3 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaAuthenticator( - AuthenticatorType.Totp, // type - '' // otp -); +const result = await account.updateMFAAuthenticator({ + type: AuthenticatorType.Totp, + 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 index 5314959f25..d82e58326f 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaChallenge( - '', // challengeId - '' // otp -); +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 index 654d9fb0fa..d359a4ee3d 100644 --- 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 @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaRecoveryCodes(); +const result = await account.updateMFARecoveryCodes(); 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-mfa.md similarity index 82% rename from docs/examples/1.8.x/console-web/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/console-web/examples/account/update-mfa.md index b813b60bb4..f62374c57e 100644 --- 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-mfa.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMFA( - false // mfa -); +const result = await account.updateMFA({ + mfa: false +}); 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 index cd36ece113..c370197036 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateName( - '' // name -); +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 index 863c5f28b3..9e2d367dd2 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePassword( - '', // password - 'password' // oldPassword (optional) -); +const result = await account.updatePassword({ + password: '', + oldPassword: 'password' // 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 index d23c10bbda..8be5b8e43d 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhoneSession( - '', // userId - '' // secret -); +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 index 1a05386a9d..0b1b91374f 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhoneVerification( - '', // userId - '' // secret -); +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 index 380279d057..19bfd15360 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhone( - '+12065550100', // phone - 'password' // password -); +const result = await account.updatePhone({ + phone: '+12065550100', + 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 index 13d857468d..6f80801e52 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePrefs( - {} // prefs -); +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 index 566d754db7..b9c52b872c 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePushTarget( - '', // targetId - '' // identifier -); +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 index 53d75f95d2..17fe29b7b3 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.updateRecovery( - '', // userId - '', // secret - '' // password -); +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 index 207fc026d8..3f331b1064 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateSession( - '' // sessionId -); +const result = await account.updateSession({ + sessionId: '' +}); 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 index 4861ca2b81..8d254c1014 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateVerification( - '', // userId - '' // secret -); +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 index 98032043a5..868e3edbe4 100644 --- a/docs/examples/1.8.x/console-web/examples/assistant/chat.md +++ b/docs/examples/1.8.x/console-web/examples/assistant/chat.md @@ -6,8 +6,8 @@ const client = new Client() const assistant = new Assistant(client); -const result = await assistant.chat( - '' // prompt -); +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 index 65e7c826ff..954dd5dfef 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getBrowser( - Browser.AvantBrowser, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getBrowser({ + code: Browser.AvantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index bda5407b27..d81b6177c4 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getCreditCard( - CreditCard.AmericanExpress, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getCreditCard({ + code: CreditCard.AmericanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index b23e99a551..40daf096e7 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFavicon( - 'https://example.com' // url -); +const result = avatars.getFavicon({ + url: 'https://example.com' +}); 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 index f6c0814abd..36c746894c 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFlag( - Flag.Afghanistan, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getFlag({ + code: Flag.Afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index 209e1ea836..fc7fb40222 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getImage( - 'https://example.com', // url - 0, // width (optional) - 0 // height (optional) -); +const result = avatars.getImage({ + url: 'https://example.com', + width: 0, // optional + height: 0 // 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 index 6ec70b2143..117bc5046c 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getInitials( - '', // name (optional) - 0, // width (optional) - 0, // height (optional) - '' // background (optional) -); +const result = avatars.getInitials({ + name: '', // optional + width: 0, // optional + height: 0, // 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-qr.md similarity index 66% rename from docs/examples/1.8.x/console-web/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/console-web/examples/avatars/get-qr.md index a255cdc531..dc1bad5727 100644 --- 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-qr.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getQR( - '', // text - 1, // size (optional) - 0, // margin (optional) - false // download (optional) -); +const result = avatars.getQR({ + text: '', + size: 1, // optional + margin: 0, // optional + download: false // 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 index 94a4707081..eb687a827e 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const console = new Console(client); -const result = await console.getResource( - '', // value - ConsoleResourceType.Rules // type -); +const result = await console.getResource({ + value: '', + type: ConsoleResourceType.Rules +}); 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 index 5b161c6f51..4a5a080f29 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createBooleanAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - false, // default (optional) - false // array (optional) -); +const result = await databases.createBooleanAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: false, // optional + array: false // 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 index cd28cf8616..f3c2efaaee 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createCollection( - '', // databaseId - '', // collectionId - '', // name - ["read("any")"], // permissions (optional) - false, // documentSecurity (optional) - false // enabled (optional) -); +const result = await databases.createCollection({ + databaseId: '', + collectionId: '', + name: '', + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // 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 index c431105bdf..a881eeb14f 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createDatetimeAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); +const result = await databases.createDatetimeAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: '', // optional + array: false // 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 index 1b96d07899..b4c5200d74 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] // 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 index 09f3007208..901133ac0a 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createDocuments( - '', // databaseId - '', // collectionId - [] // documents -); +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 index f11c1a9649..cf998a388e 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createEmailAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - 'email@example.com', // default (optional) - false // array (optional) -); +const result = await databases.createEmailAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: 'email@example.com', // optional + array: false // 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 index d180b1b9f2..f9cacb3721 100644 --- 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 @@ -6,14 +6,14 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createEnumAttribute( - '', // databaseId - '', // collectionId - '', // key - [], // elements - false, // required - '', // default (optional) - false // array (optional) -); +const result = await databases.createEnumAttribute({ + databaseId: '', + collectionId: '', + key: '', + elements: [], + required: false, + default: '', // optional + array: false // 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 index 036d3fc201..00fb992d55 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const result = await databases.createFloatAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // 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 index 6a35f55349..82af4171f6 100644 --- 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 @@ -6,14 +6,14 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createIndex( - '', // databaseId - '', // collectionId - '', // key - IndexType.Key, // type - [], // attributes - [], // orders (optional) - [] // lengths (optional) -); +const result = await databases.createIndex({ + databaseId: '', + collectionId: '', + key: '', + type: IndexType.Key, + 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 index 25f474d0aa..a5a186b0bc 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const result = await databases.createIntegerAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // 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 index e8abc80f91..940f51f33e 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createIpAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); +const result = await databases.createIpAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: '', // optional + array: false // 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 index 358a2df5fc..6a0e39b402 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const result = await databases.createRelationshipAttribute({ + databaseId: '', + collectionId: '', + relatedCollectionId: '', + type: RelationshipType.OneToOne, + twoWay: false, // optional + key: '', // optional + twoWayKey: '', // optional + onDelete: RelationMutate.Cascade // 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 index ba94b0348b..5457b159ca 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const result = await databases.createStringAttribute({ + databaseId: '', + collectionId: '', + key: '', + size: 1, + required: false, + default: '', // optional + array: false, // optional + encrypt: false // 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 index da80e392d3..085af6c61c 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createUrlAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - 'https://example.com', // default (optional) - false // array (optional) -); +const result = await databases.createUrlAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: 'https://example.com', // optional + array: false // 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 index 6d709ddd56..ff1f739c57 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.create( - '', // databaseId - '', // name - false // enabled (optional) -); +const result = await databases.create({ + databaseId: '', + name: '', + enabled: false // 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 index f090f53b49..ec014643bb 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.decrementDocumentAttribute( - '', // databaseId - '', // collectionId - '', // documentId - '', // attribute - null, // value (optional) - null // min (optional) -); +const result = await databases.decrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, // optional + min: null // 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 index df12b0d2f0..6370b447c5 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteAttribute( - '', // databaseId - '', // collectionId - '' // key -); +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 index f490ae1096..ec9e8e3455 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteCollection( - '', // databaseId - '' // collectionId -); +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 index a56a4f23c5..11cf317147 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteDocument( - '', // databaseId - '', // collectionId - '' // documentId -); +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 index ec520c6cf9..45601a5985 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteDocuments( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +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 index cdd96a31f0..47e88ab3e9 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteIndex( - '', // databaseId - '', // collectionId - '' // key -); +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 index 3bd69657f9..4edf39c5d5 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/delete.md +++ b/docs/examples/1.8.x/console-web/examples/databases/delete.md @@ -6,8 +6,8 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.delete( - '' // databaseId -); +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 index 9dac2ad133..ba5c561a92 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getAttribute( - '', // databaseId - '', // collectionId - '' // key -); +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 index a2f736377a..c4fc5c264d 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; +import { Client, Databases, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getCollectionUsage( - '', // databaseId - '', // collectionId - DatabaseUsageRange.TwentyFourHours // range (optional) -); +const result = await databases.getCollectionUsage({ + databaseId: '', + collectionId: '', + range: UsageRange.TwentyFourHours // 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 index 56d29f05cb..4e31e9e7b1 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getCollection( - '', // databaseId - '' // collectionId -); +const result = await databases.getCollection({ + databaseId: '', + collectionId: '' +}); console.log(result); 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 deleted file mode 100644 index 13038ab755..0000000000 --- a/docs/examples/1.8.x/console-web/examples/databases/get-database-usage.md +++ /dev/null @@ -1,14 +0,0 @@ -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.getDatabaseUsage( - '', // databaseId - DatabaseUsageRange.TwentyFourHours // range (optional) -); - -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 index 0e90cf785e..00595b1033 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getDocument( - '', // databaseId - '', // collectionId - '', // documentId - [] // queries (optional) -); +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 index 4c8c3794af..73f61b8766 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getIndex( - '', // databaseId - '', // collectionId - '' // key -); +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 index a0dd3ce983..b4cdcbd849 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 @@ -1,4 +1,4 @@ -import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; +import { Client, Databases, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,8 +6,9 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getUsage( - DatabaseUsageRange.TwentyFourHours // range (optional) -); +const result = await databases.getUsage({ + databaseId: '', + range: UsageRange.TwentyFourHours // 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 index 5c72c5639c..a1c4573962 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/get.md +++ b/docs/examples/1.8.x/console-web/examples/databases/get.md @@ -6,8 +6,8 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.get( - '' // databaseId -); +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 index 62ebd6fe3c..2207e94563 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.incrementDocumentAttribute( - '', // databaseId - '', // collectionId - '', // documentId - '', // attribute - null, // value (optional) - null // max (optional) -); +const result = await databases.incrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, // optional + max: null // 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 index 0c2cd4092c..cebeaf2121 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listAttributes( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +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 index b2ef92d677..291b77f668 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listCollectionLogs( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +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 index f9a0511e3e..bb53f9875c 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listCollections( - '', // databaseId - [], // queries (optional) - '' // search (optional) -); +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 index ddb789b3f0..8de4b4eab5 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listDocumentLogs( - '', // databaseId - '', // collectionId - '', // documentId - [] // queries (optional) -); +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 index 3a77c05faa..dda036951c 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listDocuments( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +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 index fbbef1a9d8..6aa4d33299 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listIndexes( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +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 index 12ccccf87e..a7726312f6 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listLogs( - '', // databaseId - [] // queries (optional) -); +const result = await databases.listLogs({ + databaseId: '', + queries: [] // optional +}); console.log(result); 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 index 1be9949a84..ce6203cbb1 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; +import { Client, Databases, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,8 +6,8 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listUsage( - DatabaseUsageRange.TwentyFourHours // range (optional) -); +const result = await databases.listUsage({ + range: UsageRange.TwentyFourHours // 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 deleted file mode 100644 index 5832c387bd..0000000000 --- a/docs/examples/1.8.x/console-web/examples/databases/list-usages.md +++ /dev/null @@ -1,13 +0,0 @@ -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 index 58ec7209a3..79292dbacf 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/list.md +++ b/docs/examples/1.8.x/console-web/examples/databases/list.md @@ -6,9 +6,9 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.list( - [], // queries (optional) - '' // search (optional) -); +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 index 95207fd2ab..85b6138287 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateBooleanAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - false, // default - '' // newKey (optional) -); +const result = await databases.updateBooleanAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: false, + 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 index ced992baf4..83763e4509 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateCollection( - '', // databaseId - '', // collectionId - '', // name - ["read("any")"], // permissions (optional) - false, // documentSecurity (optional) - false // enabled (optional) -); +const result = await databases.updateCollection({ + databaseId: '', + collectionId: '', + name: '', + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // 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 index 7c413ee532..2f9a8e065a 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateDatetimeAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - '', // default - '' // newKey (optional) -); +const result = await databases.updateDatetimeAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + 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 index 85898ea2a7..168ad11bda 100644 --- 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); +const result = await databases.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: ["read("any")"] // 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 index 67be1e405c..7462502c81 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateDocuments( - '', // databaseId - '', // collectionId - {}, // data (optional) - [] // queries (optional) -); +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 index e54dba99bd..c5fa3de6e9 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateEmailAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - 'email@example.com', // default - '' // newKey (optional) -); +const result = await databases.updateEmailAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: 'email@example.com', + 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 index aa5330af04..65e0931eeb 100644 --- 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 @@ -6,14 +6,14 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateEnumAttribute( - '', // databaseId - '', // collectionId - '', // key - [], // elements - false, // required - '', // default - '' // newKey (optional) -); +const result = await databases.updateEnumAttribute({ + databaseId: '', + collectionId: '', + key: '', + elements: [], + required: false, + 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 index 344ddb8815..1526c98f03 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const result = await databases.updateFloatAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // 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 index 72565bd5f4..01b063006f 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const result = await databases.updateIntegerAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // 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 index ff6dded552..85506d6f1a 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateIpAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - '', // default - '' // newKey (optional) -); +const result = await databases.updateIpAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + 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 index acce3fd741..8a7340af4e 100644 --- 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateRelationshipAttribute( - '', // databaseId - '', // collectionId - '', // key - RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); +const result = await databases.updateRelationshipAttribute({ + databaseId: '', + collectionId: '', + key: '', + onDelete: RelationMutate.Cascade, // 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 index 05601bd4a2..aeb3753428 100644 --- 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 @@ -6,14 +6,14 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateStringAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - '', // default - 1, // size (optional) - '' // newKey (optional) -); +const result = await databases.updateStringAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: '', + size: 1, // 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 index 78b4d92a28..75171f0206 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateUrlAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - 'https://example.com', // default - '' // newKey (optional) -); +const result = await databases.updateUrlAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: 'https://example.com', + 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 index a29475b816..40cea93299 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.update( - '', // databaseId - '', // name - false // enabled (optional) -); +const result = await databases.update({ + databaseId: '', + name: '', + enabled: false // 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 index 3b89ed3aef..3f8705f7c8 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.upsertDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] // 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 2d12f7caec..b045516281 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 @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.upsertDocuments( - '', // databaseId - '', // collectionId - [] // documents -); +const result = await databases.upsertDocuments({ + databaseId: '', + collectionId: '', + documents: [] +}); 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 index 62309d5e98..ff9be3c80f 100644 --- 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 @@ -6,12 +6,12 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.createDeployment( - '', // functionId - document.getElementById('uploader').files[0], // code - false, // activate - '', // entrypoint (optional) - '' // commands (optional) -); +const result = await functions.createDeployment({ + functionId: '', + code: document.getElementById('uploader').files[0], + activate: false, + 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 index 1b48c27a6f..05da2af37b 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.createDuplicateDeployment( - '', // functionId - '', // deploymentId - '' // buildId (optional) -); +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 index 1886a831f2..d4015d46e1 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 @@ -6,14 +6,14 @@ const client = new Client() 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) -); +const result = await functions.createExecution({ + functionId: '', + body: '', // optional + async: false, // optional + path: '', // optional + method: ExecutionMethod.GET, // 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 index 98bf957eb1..8820ba3565 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.createTemplateDeployment( - '', // functionId - '', // repository - '', // owner - '', // rootDirectory - '', // version - false // activate (optional) -); +const result = await functions.createTemplateDeployment({ + functionId: '', + repository: '', + owner: '', + rootDirectory: '', + version: '', + activate: false // 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 index 0b562cb93d..28cfb8877f 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.createVariable( - '', // functionId - '', // key - '', // value - false // secret (optional) -); +const result = await functions.createVariable({ + functionId: '', + key: '', + value: '', + secret: false // 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 index 6a12653de4..33da9bfd70 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.createVcsDeployment( - '', // functionId - VCSDeploymentType.Branch, // type - '', // reference - false // activate (optional) -); +const result = await functions.createVcsDeployment({ + functionId: '', + type: VCSDeploymentType.Branch, + reference: '', + activate: false // 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 index 1d9915f978..b3ebbaf5a4 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/create.md +++ b/docs/examples/1.8.x/console-web/examples/functions/create.md @@ -6,25 +6,25 @@ const client = new Client() 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) -); +const result = await functions.create({ + functionId: '', + name: '', + runtime: .Node145, + execute: ["any"], // optional + events: [], // optional + schedule: '', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '', // optional + commands: '', // optional + scopes: [], // optional + installationId: '', // optional + providerRepositoryId: '', // optional + providerBranch: '', // optional + providerSilentMode: false, // 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 index 1bc26feab0..6558690f2f 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.deleteDeployment( - '', // functionId - '' // deploymentId -); +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 index 0816434637..2791eea9b6 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.deleteExecution( - '', // functionId - '' // executionId -); +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 index 878d15d235..369cdd6cff 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.deleteVariable( - '', // functionId - '' // variableId -); +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 index 86d616d267..6cad721da9 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/delete.md +++ b/docs/examples/1.8.x/console-web/examples/functions/delete.md @@ -6,8 +6,8 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.delete( - '' // functionId -); +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 index 1ad8fd30cd..82f8881929 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const functions = new Functions(client); -const result = functions.getDeploymentDownload( - '', // functionId - '', // deploymentId - DeploymentDownloadType.Source // type (optional) -); +const result = functions.getDeploymentDownload({ + functionId: '', + deploymentId: '', + type: DeploymentDownloadType.Source // 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 index 75cb11f741..483b3eb6a8 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getDeployment( - '', // functionId - '' // deploymentId -); +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 index 58ab917bbd..29a7357415 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getExecution( - '', // functionId - '' // executionId -); +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 index 13c95210ab..031f9536d3 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getTemplate( - '' // templateId -); +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 index bc010c3bd9..ffba26f4d9 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Functions, FunctionUsageRange } from "@appwrite.io/console"; +import { Client, Functions, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getUsage( - '', // functionId - FunctionUsageRange.TwentyFourHours // range (optional) -); +const result = await functions.getUsage({ + functionId: '', + range: UsageRange.TwentyFourHours // 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 index d80b2bccbf..d813d1250c 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getVariable( - '', // functionId - '' // variableId -); +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 index 9b852849eb..4a5126b29e 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/get.md +++ b/docs/examples/1.8.x/console-web/examples/functions/get.md @@ -6,8 +6,8 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.get( - '' // functionId -); +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 index b9f2ec0eaf..becb2cf9cd 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listDeployments( - '', // functionId - [], // queries (optional) - '' // search (optional) -); +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 index 7d8a6c7a98..f11089c16e 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listExecutions( - '', // functionId - [] // queries (optional) -); +const result = await functions.listExecutions({ + functionId: '', + queries: [] // optional +}); 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 index ab7f84b34d..e98df543b3 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listTemplates( - [], // runtimes (optional) - [], // useCases (optional) - 1, // limit (optional) - 0 // offset (optional) -); +const result = await functions.listTemplates({ + runtimes: [], // optional + useCases: [], // optional + limit: 1, // optional + offset: 0 // 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 index 14a880692b..42035ec8f1 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Functions, FunctionUsageRange } from "@appwrite.io/console"; +import { Client, Functions, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,8 +6,8 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listUsage( - FunctionUsageRange.TwentyFourHours // range (optional) -); +const result = await functions.listUsage({ + range: UsageRange.TwentyFourHours // 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 index 5651dbd1c5..c5fdc226d1 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listVariables( - '' // functionId -); +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 index 462214449d..67e9db30dc 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/list.md +++ b/docs/examples/1.8.x/console-web/examples/functions/list.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.list( - [], // queries (optional) - '' // search (optional) -); +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 index ba4f37fabf..e9da320ef7 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.updateDeploymentStatus( - '', // functionId - '' // deploymentId -); +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 index 2d714fb43c..c249a279cf 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.updateFunctionDeployment( - '', // functionId - '' // deploymentId -); +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 index a6be7c0dd2..6e1366ca0a 100644 --- 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 @@ -6,12 +6,12 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.updateVariable( - '', // functionId - '', // variableId - '', // key - '', // value (optional) - false // secret (optional) -); +const result = await functions.updateVariable({ + functionId: '', + variableId: '', + key: '', + value: '', // optional + secret: false // 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 index 66d3cd8e8f..377712bfb7 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/update.md +++ b/docs/examples/1.8.x/console-web/examples/functions/update.md @@ -6,25 +6,25 @@ const client = new Client() 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) -); +const result = await functions.update({ + functionId: '', + name: '', + runtime: .Node145, // optional + execute: ["any"], // optional + events: [], // optional + schedule: '', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '', // optional + commands: '', // optional + scopes: [], // optional + installationId: '', // optional + providerRepositoryId: '', // optional + providerBranch: '', // optional + providerSilentMode: false, // 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 index 5360139b07..24c30e25a6 100644 --- a/docs/examples/1.8.x/console-web/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/console-web/examples/graphql/mutation.md @@ -6,8 +6,8 @@ const client = new Client() const graphql = new Graphql(client); -const result = await graphql.mutation( - {} // query -); +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 index 15434872ab..f4b8ac9b3d 100644 --- a/docs/examples/1.8.x/console-web/examples/graphql/query.md +++ b/docs/examples/1.8.x/console-web/examples/graphql/query.md @@ -6,8 +6,8 @@ const client = new Client() const graphql = new Graphql(client); -const result = await graphql.query( - {} // query -); +const result = await graphql.query({ + query: {} +}); 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createBooleanColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createDatabase( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createDatetimeColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createEmailColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createEnumColumn( - '', // databaseId - '', // tableId - '', // key - [], // elements - false, // required - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createFloatColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createIndex( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createIntegerColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createIpColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createRelationshipColumn( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createRow( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createRows( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createStringColumn( - '', // databaseId - '', // tableId - '', // 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/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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createTable( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createUrlColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.decrementRowColumn( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteColumn( - '', // databaseId - '', // tableId - '' // key -); - -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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteIndex( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteRow( - '', // databaseId - '', // tableId - '' // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteRows( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteTable( - '', // databaseId - '' // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getDatabaseUsage( - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getDatabase( - '' // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getIndex( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getRow( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getTableUsage( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getTable( - '', // databaseId - '' // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.incrementRowColumn( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listColumns( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listDatabaseLogs( - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listDatabases( - [], // queries (optional) - '' // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listIndexes( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listRowLogs( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listRows( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listTableLogs( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listTables( - '', // databaseId - [], // queries (optional) - '' // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateBooleanColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateDatabase( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateDatetimeColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateEmailColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateEnumColumn( - '', // databaseId - '', // tableId - '', // key - [], // elements - false, // required - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateFloatColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateIntegerColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateIpColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateRelationshipColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateRow( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateRows( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateStringColumn( - '', // databaseId - '', // tableId - '', // key - false, // required - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateTable( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateUrlColumn( - '', // databaseId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.upsertRow( - '', // databaseId - '', // tableId - '', // 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://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject(''); // Your project ID - -const grids = new Grids(client); - -const result = await grids.upsertRows( - '', // databaseId - '', // tableId - [] // rows -); - -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 index 288c0f8732..ebff42e2fa 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getCertificate( - '' // domain (optional) -); +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-db.md similarity index 100% rename from docs/examples/1.8.x/console-web/examples/health/get-d-b.md rename to docs/examples/1.8.x/console-web/examples/health/get-db.md 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 index d96a5545aa..d0bac0cd6f 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const health = new Health(client); -const result = await health.getFailedJobs( - .V1Database, // name - null // threshold (optional) -); +const result = await health.getFailedJobs({ + name: .V1Database, + threshold: null // optional +}); 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 index dfbbfd91a6..a9edbe1c7f 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueBuilds( - null // threshold (optional) -); +const result = await health.getQueueBuilds({ + threshold: null // 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 index b0397f4422..fb4656723f 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueCertificates( - null // threshold (optional) -); +const result = await health.getQueueCertificates({ + threshold: null // 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 index 1b958a9c75..6209742ce7 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueDatabases( - '', // name (optional) - null // threshold (optional) -); +const result = await health.getQueueDatabases({ + name: '', // optional + threshold: null // 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 index 3f34bc2228..fcbb5b5e85 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueDeletes( - null // threshold (optional) -); +const result = await health.getQueueDeletes({ + threshold: null // 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 index 2ea3701462..c169fd946b 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueFunctions( - null // threshold (optional) -); +const result = await health.getQueueFunctions({ + threshold: null // 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 index 73bd18589a..e71d80895e 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueLogs( - null // threshold (optional) -); +const result = await health.getQueueLogs({ + threshold: null // 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 index a6d86c04c7..fcb82acfa3 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueMails( - null // threshold (optional) -); +const result = await health.getQueueMails({ + threshold: null // 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 index d25979713d..63d58e2363 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueMessaging( - null // threshold (optional) -); +const result = await health.getQueueMessaging({ + threshold: null // 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 index 3619c56028..3fa3110d7f 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueMigrations( - null // threshold (optional) -); +const result = await health.getQueueMigrations({ + threshold: null // 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 index cf1c3ee5df..198b1558e8 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueStatsResources( - null // threshold (optional) -); +const result = await health.getQueueStatsResources({ + threshold: null // 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 index f79fd3b5ad..e80c0d8bc1 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueUsage( - null // threshold (optional) -); +const result = await health.getQueueUsage({ + threshold: null // 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 index 72bcc44c9a..23a0169320 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueWebhooks( - null // threshold (optional) -); +const result = await health.getQueueWebhooks({ + threshold: null // optional +}); 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-eu.md similarity index 100% rename from docs/examples/1.8.x/console-web/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/console-web/examples/locale/list-countries-eu.md 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 index 9b238afc9e..4b65337d49 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const result = await messaging.createAPNSProvider({ + providerId: '', + name: '', + authKey: '', // optional + authKeyId: '', // optional + teamId: '', // optional + bundleId: '', // optional + sandbox: false, // optional + enabled: false // 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 index 108517c89d..fa84304cc6 100644 --- 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 @@ -6,19 +6,19 @@ const client = new Client() 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) -); +const result = await messaging.createEmail({ + messageId: '', + subject: '', + content: '', + topics: [], // optional + users: [], // optional + targets: [], // optional + cc: [], // optional + bcc: [], // optional + attachments: [], // optional + draft: false, // optional + html: false, // 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 index 9d67e89fd6..6586ffbc5e 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createFcmProvider( - '', // providerId - '', // name - {}, // serviceAccountJSON (optional) - false // enabled (optional) -); +const result = await messaging.createFCMProvider({ + providerId: '', + name: '', + serviceAccountJSON: {}, // optional + enabled: false // 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 index dc165af859..10c58cc7b6 100644 --- 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 @@ -6,17 +6,17 @@ const client = new Client() 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) -); +const result = await messaging.createMailgunProvider({ + providerId: '', + name: '', + apiKey: '', // optional + domain: '', // optional + isEuRegion: false, // optional + fromName: '', // optional + fromEmail: 'email@example.com', // optional + replyToName: '', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // 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-msg-91-provider.md similarity index 51% rename from docs/examples/1.8.x/console-web/examples/messaging/create-msg91provider.md rename to docs/examples/1.8.x/console-web/examples/messaging/create-msg-91-provider.md index cab468a089..7efa2df1be 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-msg91provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-msg-91-provider.md @@ -6,13 +6,13 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createMsg91Provider( - '', // providerId - '', // name - '', // templateId (optional) - '', // senderId (optional) - '', // authKey (optional) - false // enabled (optional) -); +const result = await messaging.createMsg91Provider({ + providerId: '', + name: '', + templateId: '', // optional + senderId: '', // optional + authKey: '', // optional + enabled: false // 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 index 79c3a20e83..f0f54aa72f 100644 --- 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 @@ -6,26 +6,26 @@ const client = new Client() 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) -); +const 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: null, // optional + draft: false, // optional + scheduledAt: '', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal // 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 index b93c84b258..51b6096e64 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const 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 +}); 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 index 7146ee4ac9..3130ee8835 100644 --- 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 @@ -6,14 +6,14 @@ const client = new Client() 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) -); +const result = await messaging.createSMS({ + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], // optional + users: [], // optional + targets: [], // optional + draft: false, // 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 index b4bcf14d0b..77033deae2 100644 --- 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 @@ -6,21 +6,21 @@ const client = new Client() 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) -); +const 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 +}); 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 index b1f7239413..2c2796a289 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>', // subscriberId - '<TARGET_ID>' // targetId -); +const result = await messaging.createSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>' +}); 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 index 355bc22f85..9e5d344964 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const result = await messaging.createTelesignProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // optional + enabled: false // 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 index d79cffc316..fc48d32d01 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const result = await messaging.createTextmagicProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // optional + enabled: false // 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 index 274714a63b..4fb72cbeb3 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createTopic( - '<TOPIC_ID>', // topicId - '<NAME>', // name - ["any"] // subscribe (optional) -); +const result = await messaging.createTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] // 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 index 9b8f440743..9997303d69 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const result = await messaging.createTwilioProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // optional + enabled: false // 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 index 6e115e8eb9..342922cb03 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const result = await messaging.createVonageProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + enabled: false // 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 index f71eb65f29..cb173c8077 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.deleteProvider( - '<PROVIDER_ID>' // providerId -); +const result = await messaging.deleteProvider({ + providerId: '<PROVIDER_ID>' +}); 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 index ace9670211..67c0865605 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.deleteSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>' // subscriberId -); +const result = await messaging.deleteSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +}); 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 index 8f8e5460d3..de14ac49f6 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.deleteTopic( - '<TOPIC_ID>' // topicId -); +const result = await messaging.deleteTopic({ + topicId: '<TOPIC_ID>' +}); 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 index 17324cca7e..8eaef5ce5f 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/delete.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/delete.md @@ -6,8 +6,8 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.delete( - '<MESSAGE_ID>' // messageId -); +const result = await messaging.delete({ + messageId: '<MESSAGE_ID>' +}); 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 index 3282adbe57..32b9306033 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.getMessage( - '<MESSAGE_ID>' // messageId -); +const result = await messaging.getMessage({ + messageId: '<MESSAGE_ID>' +}); 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 index 97ac5fd127..579018678d 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.getProvider( - '<PROVIDER_ID>' // providerId -); +const result = await messaging.getProvider({ + providerId: '<PROVIDER_ID>' +}); 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 index b718558d71..985fe87013 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.getSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>' // subscriberId -); +const result = await messaging.getSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +}); 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 index 802ec1fba4..9ec0a0d66d 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.getTopic( - '<TOPIC_ID>' // topicId -); +const result = await messaging.getTopic({ + topicId: '<TOPIC_ID>' +}); 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 index 8679b267ce..1ad57feadf 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listMessageLogs( - '<MESSAGE_ID>', // messageId - [] // queries (optional) -); +const result = await messaging.listMessageLogs({ + messageId: '<MESSAGE_ID>', + 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 index a537844f81..b003dc219e 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listMessages( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 2e4acb38cf..c40c50899e 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listProviderLogs( - '<PROVIDER_ID>', // providerId - [] // queries (optional) -); +const result = await messaging.listProviderLogs({ + providerId: '<PROVIDER_ID>', + 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 index 5c91f01bbc..f45da6437e 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listProviders( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index f722c9a9ed..34fea03b79 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listSubscriberLogs( - '<SUBSCRIBER_ID>', // subscriberId - [] // queries (optional) -); +const result = await messaging.listSubscriberLogs({ + subscriberId: '<SUBSCRIBER_ID>', + 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 index f120e9d96d..afe8374f9f 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listSubscribers( - '<TOPIC_ID>', // topicId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await messaging.listSubscribers({ + topicId: '<TOPIC_ID>', + 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 index 89baf87cb0..eb9ae44a0c 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listTargets( - '<MESSAGE_ID>', // messageId - [] // queries (optional) -); +const result = await messaging.listTargets({ + messageId: '<MESSAGE_ID>', + 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 index bc23a09a91..e44e2643e7 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listTopicLogs( - '<TOPIC_ID>', // topicId - [] // queries (optional) -); +const result = await messaging.listTopicLogs({ + topicId: '<TOPIC_ID>', + 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 index d23cca3171..f775eb8fe3 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listTopics( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index bc69c3ad1e..b48c5fe4ae 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const 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 +}); 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 index ba9bc7eb48..deda783ff3 100644 --- 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 @@ -6,19 +6,19 @@ const client = new Client() 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) -); +const 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 +}); 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 index d2e7382561..55e4ccbec2 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateFcmProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - {} // serviceAccountJSON (optional) -); +const result = await messaging.updateFCMProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // 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 index cc48ac52f3..4e5a9199f9 100644 --- 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 @@ -6,17 +6,17 @@ const client = new Client() 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) -); +const 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 +}); 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-msg-91-provider.md similarity index 50% rename from docs/examples/1.8.x/console-web/examples/messaging/update-msg91provider.md rename to docs/examples/1.8.x/console-web/examples/messaging/update-msg-91-provider.md index c2a6faec24..369443fc61 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-msg91provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-msg-91-provider.md @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const 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 +}); 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 index e479dcc425..5f5d6e5da2 100644 --- 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 @@ -6,26 +6,26 @@ const client = new Client() 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) -); +const 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: null, // optional + draft: false, // optional + scheduledAt: '', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal // 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 index efe8263718..46608a3bb3 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const 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 +}); 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 index 2c535a014e..f121f7e865 100644 --- 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 @@ -6,14 +6,14 @@ const client = new Client() 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) -); +const result = await messaging.updateSMS({ + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + content: '<CONTENT>', // optional + draft: false, // 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 index 0274337a7b..254c23e12b 100644 --- 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 @@ -6,21 +6,21 @@ const client = new Client() 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) -); +const 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 +}); 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 index 5d8bc1602d..1df2779ce1 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const result = await messaging.updateTelesignProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // 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 index 564ad4fc69..c739e0cd02 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const result = await messaging.updateTextmagicProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // 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 index e0edbae714..100f5ca73a 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateTopic( - '<TOPIC_ID>', // topicId - '<NAME>', // name (optional) - ["any"] // subscribe (optional) -); +const result = await messaging.updateTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', // optional + subscribe: ["any"] // 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 index 544a52e4fd..b09b23fb97 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const result = await messaging.updateTwilioProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // 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 index e831c03184..e998dbfbf5 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const result = await messaging.updateVonageProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // 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 index db9a4cd0e0..f53ab4aa3c 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.createAppwriteMigration( - [], // resources - 'https://example.com', // endpoint - '<PROJECT_ID>', // projectId - '<API_KEY>' // apiKey -); +const result = await migrations.createAppwriteMigration({ + resources: [], + endpoint: 'https://example.com', + projectId: '<PROJECT_ID>', + apiKey: '<API_KEY>' +}); 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 index 544f6c8ef6..b25193ed21 100644 --- 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 @@ -6,10 +6,11 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.createCsvMigration( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '[ID1:ID2]' // resourceId -); +const result = await migrations.createCsvMigration({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + resourceId: '[ID1:ID2]', + internalFile: false // optional +}); 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 index 20ce3a8b3c..a3722c3839 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.createFirebaseMigration( - [], // resources - '<SERVICE_ACCOUNT>' // serviceAccount -); +const result = await migrations.createFirebaseMigration({ + resources: [], + serviceAccount: '<SERVICE_ACCOUNT>' +}); 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 index 23b22ff371..cada06e2ed 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const result = await migrations.createNHostMigration({ + resources: [], + subdomain: '<SUBDOMAIN>', + region: '<REGION>', + adminSecret: '<ADMIN_SECRET>', + database: '<DATABASE>', + username: '<USERNAME>', + password: '<PASSWORD>', + port: null // 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 index 18c326ca7e..13e3da08ca 100644 --- 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 @@ -6,14 +6,14 @@ const client = new Client() 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) -); +const result = await migrations.createSupabaseMigration({ + resources: [], + endpoint: 'https://example.com', + apiKey: '<API_KEY>', + databaseHost: '<DATABASE_HOST>', + username: '<USERNAME>', + password: '<PASSWORD>', + port: null // 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 index bb013ddf27..9df30d4178 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/delete.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/delete.md @@ -6,8 +6,8 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.delete( - '<MIGRATION_ID>' // migrationId -); +const result = await migrations.delete({ + migrationId: '<MIGRATION_ID>' +}); 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 index a70b6a45fb..cdd5892a39 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.getAppwriteReport( - [], // resources - 'https://example.com', // endpoint - '<PROJECT_ID>', // projectID - '<KEY>' // key -); +const result = await migrations.getAppwriteReport({ + resources: [], + endpoint: 'https://example.com', + projectID: '<PROJECT_ID>', + 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 index bf1c85eeb6..4b8ea2118b 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.getFirebaseReport( - [], // resources - '<SERVICE_ACCOUNT>' // serviceAccount -); +const result = await migrations.getFirebaseReport({ + resources: [], + serviceAccount: '<SERVICE_ACCOUNT>' +}); 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 index a983088f0d..bc88499b85 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const result = await migrations.getNHostReport({ + resources: [], + subdomain: '<SUBDOMAIN>', + region: '<REGION>', + adminSecret: '<ADMIN_SECRET>', + database: '<DATABASE>', + username: '<USERNAME>', + password: '<PASSWORD>', + port: null // 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 index d6ea7a9712..d054124e8e 100644 --- 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 @@ -6,14 +6,14 @@ const client = new Client() 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) -); +const result = await migrations.getSupabaseReport({ + resources: [], + endpoint: 'https://example.com', + apiKey: '<API_KEY>', + databaseHost: '<DATABASE_HOST>', + username: '<USERNAME>', + password: '<PASSWORD>', + port: null // 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 index e2c67eb884..e007ac9c73 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/get.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/get.md @@ -6,8 +6,8 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.get( - '<MIGRATION_ID>' // migrationId -); +const result = await migrations.get({ + migrationId: '<MIGRATION_ID>' +}); 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 index a978e1843e..ea053a8e80 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/list.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/list.md @@ -6,9 +6,9 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index f489168d7e..31322a14e5 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/retry.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/retry.md @@ -6,8 +6,8 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.retry( - '<MIGRATION_ID>' // migrationId -); +const result = await migrations.retry({ + migrationId: '<MIGRATION_ID>' +}); 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 index aa7361ffc2..2c7fea32d1 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const project = new Project(client); -const result = await project.createVariable( - '<KEY>', // key - '<VALUE>', // value - false // secret (optional) -); +const result = await project.createVariable({ + key: '<KEY>', + value: '<VALUE>', + secret: false // 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 index 224691691d..4994eeebf3 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const project = new Project(client); -const result = await project.deleteVariable( - '<VARIABLE_ID>' // variableId -); +const result = await project.deleteVariable({ + variableId: '<VARIABLE_ID>' +}); 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 index 300311dd8f..dd548885a6 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const project = new Project(client); -const result = await project.getUsage( - '', // startDate - '', // endDate - ProjectUsageRange.OneHour // period (optional) -); +const result = await project.getUsage({ + startDate: '', + endDate: '', + period: ProjectUsageRange.OneHour // 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 index bc30baa325..45ab31e614 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const project = new Project(client); -const result = await project.getVariable( - '<VARIABLE_ID>' // variableId -); +const result = await project.getVariable({ + variableId: '<VARIABLE_ID>' +}); 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 index 9dcd62a7c2..646333278e 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const project = new Project(client); -const result = await project.updateVariable( - '<VARIABLE_ID>', // variableId - '<KEY>', // key - '<VALUE>', // value (optional) - false // secret (optional) -); +const result = await project.updateVariable({ + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // optional + secret: false // 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 index 28f89aea49..9f1ed21e6f 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.createDevKey( - '<PROJECT_ID>', // projectId - '<NAME>', // name - '' // expire -); +const result = await projects.createDevKey({ + projectId: '<PROJECT_ID>', + 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-jwt.md similarity index 69% rename from docs/examples/1.8.x/console-web/examples/projects/create-j-w-t.md rename to docs/examples/1.8.x/console-web/examples/projects/create-jwt.md index 7175e266ae..c880996399 100644 --- 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-jwt.md @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.createJWT( - '<PROJECT_ID>', // projectId - [], // scopes - 0 // duration (optional) -); +const result = await projects.createJWT({ + projectId: '<PROJECT_ID>', + scopes: [], + duration: 0 // 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 index 25bcc125ed..a1e53e5f78 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.createKey( - '<PROJECT_ID>', // projectId - '<NAME>', // name - [], // scopes - '' // expire (optional) -); +const result = await projects.createKey({ + projectId: '<PROJECT_ID>', + 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 index 7e23dd6f9e..28a520626a 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const result = await projects.createPlatform({ + projectId: '<PROJECT_ID>', + type: PlatformType.Web, + 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 index ab0e184432..aa4fc1e1fe 100644 --- 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 @@ -6,17 +6,17 @@ const client = new Client() 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) -); +const result = await projects.createSMTPTest({ + projectId: '<PROJECT_ID>', + emails: [], + senderName: '<SENDER_NAME>', + senderEmail: 'email@example.com', + host: '', + replyTo: 'email@example.com', // optional + port: null, // optional + username: '<USERNAME>', // optional + password: '<PASSWORD>', // optional + secure: SMTPSecure.Tls // 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 index 62fdac56cd..3f32d7247b 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const result = await projects.createWebhook({ + projectId: '<PROJECT_ID>', + name: '<NAME>', + events: [], + url: '', + security: false, + enabled: false, // optional + httpUser: '<HTTP_USER>', // optional + httpPass: '<HTTP_PASS>' // 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 index 58efd0b75f..44abc021ef 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/create.md +++ b/docs/examples/1.8.x/console-web/examples/projects/create.md @@ -6,20 +6,20 @@ const client = new Client() 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) -); +const result = await projects.create({ + projectId: '', + name: '<NAME>', + teamId: '<TEAM_ID>', + region: .Default, // optional + description: '<DESCRIPTION>', // optional + logo: '<LOGO>', // optional + url: 'https://example.com', // optional + legalName: '<LEGAL_NAME>', // optional + legalCountry: '<LEGAL_COUNTRY>', // optional + legalState: '<LEGAL_STATE>', // optional + legalCity: '<LEGAL_CITY>', // optional + legalAddress: '<LEGAL_ADDRESS>', // optional + legalTaxId: '<LEGAL_TAX_ID>' // 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 index fc2ca4f1a7..2e5c08ab06 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.deleteDevKey( - '<PROJECT_ID>', // projectId - '<KEY_ID>' // keyId -); +const result = await projects.deleteDevKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>' +}); 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 index 10e3d302ae..5c21e4797b 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.deleteEmailTemplate( - '<PROJECT_ID>', // projectId - EmailTemplateType.Verification, // type - EmailTemplateLocale.Af // locale -); +const result = await projects.deleteEmailTemplate({ + projectId: '<PROJECT_ID>', + type: EmailTemplateType.Verification, + locale: EmailTemplateLocale.Af +}); 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 index 7ea7dc6fdc..671413f0b5 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.deleteKey( - '<PROJECT_ID>', // projectId - '<KEY_ID>' // keyId -); +const result = await projects.deleteKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>' +}); 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 index 5c71747a64..8ed3e23afa 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.deletePlatform( - '<PROJECT_ID>', // projectId - '<PLATFORM_ID>' // platformId -); +const result = await projects.deletePlatform({ + projectId: '<PROJECT_ID>', + platformId: '<PLATFORM_ID>' +}); 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 index eef3cccae9..f89ae275e3 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.deleteSmsTemplate( - '<PROJECT_ID>', // projectId - SmsTemplateType.Verification, // type - SmsTemplateLocale.Af // locale -); +const result = await projects.deleteSMSTemplate({ + projectId: '<PROJECT_ID>', + type: SmsTemplateType.Verification, + locale: SmsTemplateLocale.Af +}); 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 index 24abaafc66..ec89642a3f 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.deleteWebhook( - '<PROJECT_ID>', // projectId - '<WEBHOOK_ID>' // webhookId -); +const result = await projects.deleteWebhook({ + projectId: '<PROJECT_ID>', + webhookId: '<WEBHOOK_ID>' +}); 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 index d868616db2..c6ccd67cd6 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/delete.md +++ b/docs/examples/1.8.x/console-web/examples/projects/delete.md @@ -6,8 +6,8 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.delete( - '<PROJECT_ID>' // projectId -); +const result = await projects.delete({ + projectId: '<PROJECT_ID>' +}); 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 index a9c38df45a..1e3ab57070 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.getDevKey( - '<PROJECT_ID>', // projectId - '<KEY_ID>' // keyId -); +const result = await projects.getDevKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>' +}); 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 index 1d27c8c682..3b812045c0 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.getEmailTemplate( - '<PROJECT_ID>', // projectId - EmailTemplateType.Verification, // type - EmailTemplateLocale.Af // locale -); +const result = await projects.getEmailTemplate({ + projectId: '<PROJECT_ID>', + type: EmailTemplateType.Verification, + locale: EmailTemplateLocale.Af +}); 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 index 79359e298b..a937d8c413 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.getKey( - '<PROJECT_ID>', // projectId - '<KEY_ID>' // keyId -); +const result = await projects.getKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>' +}); 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 index a17bcb122d..6d5ca40214 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.getPlatform( - '<PROJECT_ID>', // projectId - '<PLATFORM_ID>' // platformId -); +const result = await projects.getPlatform({ + projectId: '<PROJECT_ID>', + platformId: '<PLATFORM_ID>' +}); 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 index 0badf1cca4..f48722c2a5 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.getSmsTemplate( - '<PROJECT_ID>', // projectId - SmsTemplateType.Verification, // type - SmsTemplateLocale.Af // locale -); +const result = await projects.getSMSTemplate({ + projectId: '<PROJECT_ID>', + type: SmsTemplateType.Verification, + locale: SmsTemplateLocale.Af +}); 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 index 6b6530a04e..e8d00d2da6 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.getWebhook( - '<PROJECT_ID>', // projectId - '<WEBHOOK_ID>' // webhookId -); +const result = await projects.getWebhook({ + projectId: '<PROJECT_ID>', + webhookId: '<WEBHOOK_ID>' +}); 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 index dbec5dd543..f55a9677f9 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/get.md +++ b/docs/examples/1.8.x/console-web/examples/projects/get.md @@ -6,8 +6,8 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.get( - '<PROJECT_ID>' // projectId -); +const result = await projects.get({ + projectId: '<PROJECT_ID>' +}); 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 index d3b17706cd..ecdf02598f 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.listDevKeys( - '<PROJECT_ID>', // projectId - [] // queries (optional) -); +const result = await projects.listDevKeys({ + projectId: '<PROJECT_ID>', + 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 index 5701133ba4..3a47780c1c 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.listKeys( - '<PROJECT_ID>' // projectId -); +const result = await projects.listKeys({ + projectId: '<PROJECT_ID>' +}); 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 index 214092b6b3..475bc068ef 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.listPlatforms( - '<PROJECT_ID>' // projectId -); +const result = await projects.listPlatforms({ + projectId: '<PROJECT_ID>' +}); 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 index 11639bfccf..89cdf35b26 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.listWebhooks( - '<PROJECT_ID>' // projectId -); +const result = await projects.listWebhooks({ + projectId: '<PROJECT_ID>' +}); 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 index 0ade65189a..81dc422130 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/list.md +++ b/docs/examples/1.8.x/console-web/examples/projects/list.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index a51ed2df2b..02e0595130 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateApiStatusAll( - '<PROJECT_ID>', // projectId - false // status -); +const result = await projects.updateAPIStatusAll({ + projectId: '<PROJECT_ID>', + status: false +}); 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 index 9cc7dfe8ab..7ec06fee58 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateApiStatus( - '<PROJECT_ID>', // projectId - .Rest, // api - false // status -); +const result = await projects.updateAPIStatus({ + projectId: '<PROJECT_ID>', + api: .Rest, + status: false +}); 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 index d0d8c67b28..a8119d12d3 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateAuthDuration( - '<PROJECT_ID>', // projectId - 0 // duration -); +const result = await projects.updateAuthDuration({ + projectId: '<PROJECT_ID>', + duration: 0 +}); 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 index 80f73f871f..daed702834 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateAuthLimit( - '<PROJECT_ID>', // projectId - 0 // limit -); +const result = await projects.updateAuthLimit({ + projectId: '<PROJECT_ID>', + limit: 0 +}); 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 index 1e878c2246..06ab09316c 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateAuthPasswordDictionary( - '<PROJECT_ID>', // projectId - false // enabled -); +const result = await projects.updateAuthPasswordDictionary({ + projectId: '<PROJECT_ID>', + enabled: false +}); 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 index 26a3adcfde..76c246991f 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateAuthPasswordHistory( - '<PROJECT_ID>', // projectId - 0 // limit -); +const result = await projects.updateAuthPasswordHistory({ + projectId: '<PROJECT_ID>', + limit: 0 +}); 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 index c1b0e14e91..ca5aef7737 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateAuthSessionsLimit( - '<PROJECT_ID>', // projectId - 1 // limit -); +const result = await projects.updateAuthSessionsLimit({ + projectId: '<PROJECT_ID>', + limit: 1 +}); 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 index d4862282a6..75deb5ae5d 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateAuthStatus( - '<PROJECT_ID>', // projectId - AuthMethod.EmailPassword, // method - false // status -); +const result = await projects.updateAuthStatus({ + projectId: '<PROJECT_ID>', + method: AuthMethod.EmailPassword, + status: false +}); 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 index 9c00474262..3d84fbbc85 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateDevKey( - '<PROJECT_ID>', // projectId - '<KEY_ID>', // keyId - '<NAME>', // name - '' // expire -); +const result = await projects.updateDevKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', + 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 index 44467c4f8a..f26e8887a7 100644 --- 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 @@ -6,15 +6,15 @@ const client = new Client() 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) -); +const result = await projects.updateEmailTemplate({ + projectId: '<PROJECT_ID>', + type: EmailTemplateType.Verification, + locale: EmailTemplateLocale.Af, + subject: '<SUBJECT>', + message: '<MESSAGE>', + senderName: '<SENDER_NAME>', // optional + senderEmail: 'email@example.com', // optional + replyTo: 'email@example.com' // 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 index 492a0ac23d..8e32cbd990 100644 --- 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 @@ -6,12 +6,12 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateKey( - '<PROJECT_ID>', // projectId - '<KEY_ID>', // keyId - '<NAME>', // name - [], // scopes - '' // expire (optional) -); +const result = await projects.updateKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', + 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 index 31adcd3855..ca873e7ee1 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateMembershipsPrivacy( - '<PROJECT_ID>', // projectId - false, // userName - false, // userEmail - false // mfa -); +const result = await projects.updateMembershipsPrivacy({ + projectId: '<PROJECT_ID>', + userName: false, + userEmail: false, + mfa: false +}); 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 index 245a20c19b..918993be50 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateMockNumbers( - '<PROJECT_ID>', // projectId - [] // numbers -); +const result = await projects.updateMockNumbers({ + projectId: '<PROJECT_ID>', + 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-auth-2.md similarity index 57% rename from docs/examples/1.8.x/console-web/examples/projects/update-o-auth2.md rename to docs/examples/1.8.x/console-web/examples/projects/update-o-auth-2.md index 0671ee38bd..01ecf3a1b4 100644 --- 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-auth-2.md @@ -6,12 +6,12 @@ const client = new Client() 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) -); +const result = await projects.updateOAuth2({ + projectId: '<PROJECT_ID>', + provider: OAuthProvider.Amazon, + appId: '<APP_ID>', // optional + secret: '<SECRET>', // optional + enabled: false // 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 index fb0fcffc16..0fe0a35652 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updatePersonalDataCheck( - '<PROJECT_ID>', // projectId - false // enabled -); +const result = await projects.updatePersonalDataCheck({ + projectId: '<PROJECT_ID>', + enabled: false +}); 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 index 2f9cc0a4fd..996cace8b5 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const result = await projects.updatePlatform({ + projectId: '<PROJECT_ID>', + platformId: '<PLATFORM_ID>', + 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 index 672a1491bc..c4216fcbbc 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateServiceStatusAll( - '<PROJECT_ID>', // projectId - false // status -); +const result = await projects.updateServiceStatusAll({ + projectId: '<PROJECT_ID>', + status: false +}); 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 index 5d2189e339..e5b92683d2 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateServiceStatus( - '<PROJECT_ID>', // projectId - ApiService.Account, // service - false // status -); +const result = await projects.updateServiceStatus({ + projectId: '<PROJECT_ID>', + service: ApiService.Account, + status: false +}); 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 index 65aa353b2b..21e73494fa 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateSessionAlerts( - '<PROJECT_ID>', // projectId - false // alerts -); +const result = await projects.updateSessionAlerts({ + projectId: '<PROJECT_ID>', + alerts: false +}); 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 index b0e3ad3e0f..748ac72629 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateSessionInvalidation( - '<PROJECT_ID>', // projectId - false // enabled -); +const result = await projects.updateSessionInvalidation({ + projectId: '<PROJECT_ID>', + enabled: false +}); 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 index cc801a67c5..ab332c52e2 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateSmsTemplate( - '<PROJECT_ID>', // projectId - SmsTemplateType.Verification, // type - SmsTemplateLocale.Af, // locale - '<MESSAGE>' // message -); +const result = await projects.updateSMSTemplate({ + projectId: '<PROJECT_ID>', + type: SmsTemplateType.Verification, + locale: SmsTemplateLocale.Af, + 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 index 605ba0f5e3..cb5d73b0e9 100644 --- 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 @@ -6,17 +6,17 @@ const client = new Client() 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) -); +const result = await projects.updateSMTP({ + projectId: '<PROJECT_ID>', + enabled: false, + senderName: '<SENDER_NAME>', // optional + senderEmail: 'email@example.com', // optional + replyTo: 'email@example.com', // optional + host: '', // optional + port: null, // optional + username: '<USERNAME>', // optional + password: '<PASSWORD>', // optional + secure: SMTPSecure.Tls // 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 index b7c5d934e2..6c27714d6d 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateTeam( - '<PROJECT_ID>', // projectId - '<TEAM_ID>' // teamId -); +const result = await projects.updateTeam({ + projectId: '<PROJECT_ID>', + teamId: '<TEAM_ID>' +}); 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 index 593c6c0fce..6ea0ee6969 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateWebhookSignature( - '<PROJECT_ID>', // projectId - '<WEBHOOK_ID>' // webhookId -); +const result = await projects.updateWebhookSignature({ + projectId: '<PROJECT_ID>', + webhookId: '<WEBHOOK_ID>' +}); 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 index 18d10051e9..d3a1e4e60e 100644 --- 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 @@ -6,16 +6,16 @@ const client = new Client() 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) -); +const result = await projects.updateWebhook({ + projectId: '<PROJECT_ID>', + webhookId: '<WEBHOOK_ID>', + name: '<NAME>', + events: [], + url: '', + security: false, + enabled: false, // optional + httpUser: '<HTTP_USER>', // optional + httpPass: '<HTTP_PASS>' // 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 index 8b2d2823ca..3df8d6dc15 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update.md @@ -6,18 +6,18 @@ const client = new Client() 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) -); +const result = await projects.update({ + projectId: '<PROJECT_ID>', + name: '<NAME>', + description: '<DESCRIPTION>', // optional + logo: '<LOGO>', // optional + url: 'https://example.com', // optional + legalName: '<LEGAL_NAME>', // optional + legalCountry: '<LEGAL_COUNTRY>', // optional + legalState: '<LEGAL_STATE>', // optional + legalCity: '<LEGAL_CITY>', // optional + legalAddress: '<LEGAL_ADDRESS>', // optional + legalTaxId: '<LEGAL_TAX_ID>' // 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-api-rule.md similarity index 81% rename from docs/examples/1.8.x/console-web/examples/proxy/create-a-p-i-rule.md rename to docs/examples/1.8.x/console-web/examples/proxy/create-api-rule.md index e248ebea3d..593601da1f 100644 --- 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-api-rule.md @@ -6,8 +6,8 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.createAPIRule( - '' // domain -); +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 index 2bb0b83f08..168351723e 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.createFunctionRule( - '', // domain - '<FUNCTION_ID>', // functionId - '<BRANCH>' // branch (optional) -); +const result = await proxy.createFunctionRule({ + domain: '', + functionId: '<FUNCTION_ID>', + 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 index 294e496987..396d6dee58 100644 --- 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 @@ -6,12 +6,12 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.createRedirectRule( - '', // domain - 'https://example.com', // url - .MovedPermanently301, // statusCode - '<RESOURCE_ID>', // resourceId - ProxyResourceType.Site // resourceType -); +const result = await proxy.createRedirectRule({ + domain: '', + url: 'https://example.com', + statusCode: .MovedPermanently301, + resourceId: '<RESOURCE_ID>', + resourceType: ProxyResourceType.Site +}); 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 index 4ea806eceb..60b371a359 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.createSiteRule( - '', // domain - '<SITE_ID>', // siteId - '<BRANCH>' // branch (optional) -); +const result = await proxy.createSiteRule({ + domain: '', + siteId: '<SITE_ID>', + 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 index 783f06d95c..7417ab7ddd 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.deleteRule( - '<RULE_ID>' // ruleId -); +const result = await proxy.deleteRule({ + ruleId: '<RULE_ID>' +}); 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 index e69c8210ce..1033693196 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.getRule( - '<RULE_ID>' // ruleId -); +const result = await proxy.getRule({ + ruleId: '<RULE_ID>' +}); 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 index 8c07168292..43c7ed2128 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.listRules( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 349535cec8..4806b3072a 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.updateRuleVerification( - '<RULE_ID>' // ruleId -); +const result = await proxy.updateRuleVerification({ + ruleId: '<RULE_ID>' +}); 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 index 5bc597c20e..44dc68adb8 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const result = await sites.createDeployment({ + siteId: '<SITE_ID>', + code: document.getElementById('uploader').files[0], + activate: false, + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>' // 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 index 3b8347fbf6..43812cfb7c 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.createDuplicateDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.createDuplicateDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index 990d7cf98b..969a0b855c 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const result = await sites.createTemplateDeployment({ + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false // 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 index d605f2e4aa..2379e52496 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.createVariable( - '<SITE_ID>', // siteId - '<KEY>', // key - '<VALUE>', // value - false // secret (optional) -); +const result = await sites.createVariable({ + siteId: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // 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 index dd595db14d..cc1fd1d301 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.createVcsDeployment( - '<SITE_ID>', // siteId - VCSDeploymentType.Branch, // type - '<REFERENCE>', // reference - false // activate (optional) -); +const result = await sites.createVcsDeployment({ + siteId: '<SITE_ID>', + type: VCSDeploymentType.Branch, + reference: '<REFERENCE>', + activate: false // 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 index 7880ba361b..bd4e2d1f08 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/create.md +++ b/docs/examples/1.8.x/console-web/examples/sites/create.md @@ -6,25 +6,25 @@ const client = new Client() 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) -); +const 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 +}); 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 index 357b69c04e..dac0500b73 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.deleteDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.deleteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index 25defd1546..18d543775a 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.deleteLog( - '<SITE_ID>', // siteId - '<LOG_ID>' // logId -); +const result = await sites.deleteLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +}); 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 index f6201738d8..a0e6f6fbb0 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.deleteVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>' // variableId -); +const result = await sites.deleteVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +}); 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 index e3eff9cbb9..1a289f6ef6 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/delete.md +++ b/docs/examples/1.8.x/console-web/examples/sites/delete.md @@ -6,8 +6,8 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.delete( - '<SITE_ID>' // siteId -); +const result = await sites.delete({ + siteId: '<SITE_ID>' +}); 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 index 17707eded0..d66c9a682f 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const sites = new Sites(client); -const result = sites.getDeploymentDownload( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>', // deploymentId - DeploymentDownloadType.Source // type (optional) -); +const result = sites.getDeploymentDownload({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.Source // 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 index c3453446e8..dc2a77c29a 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.getDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.getDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index eb1cd654c9..18021449cf 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.getLog( - '<SITE_ID>', // siteId - '<LOG_ID>' // logId -); +const result = await sites.getLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +}); 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 index 4220390d95..1ddc6ec97f 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.getTemplate( - '<TEMPLATE_ID>' // templateId -); +const result = await sites.getTemplate({ + templateId: '<TEMPLATE_ID>' +}); 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 index 582a754e07..39158c8c28 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Sites, SiteUsageRange } from "@appwrite.io/console"; +import { Client, Sites, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.getUsage( - '<SITE_ID>', // siteId - SiteUsageRange.TwentyFourHours // range (optional) -); +const result = await sites.getUsage({ + siteId: '<SITE_ID>', + range: UsageRange.TwentyFourHours // 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 index c0d95326cc..a35bb511c1 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.getVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>' // variableId -); +const result = await sites.getVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +}); 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 index 102cade4c6..07016aab02 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/get.md +++ b/docs/examples/1.8.x/console-web/examples/sites/get.md @@ -6,8 +6,8 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.get( - '<SITE_ID>' // siteId -); +const result = await sites.get({ + siteId: '<SITE_ID>' +}); 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 index 8c0bd8ea2d..3de3554e99 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.listDeployments( - '<SITE_ID>', // siteId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await sites.listDeployments({ + siteId: '<SITE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +}); 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 index 458cc69b2b..e60203644a 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.listLogs( - '<SITE_ID>', // siteId - [] // queries (optional) -); +const result = await sites.listLogs({ + siteId: '<SITE_ID>', + queries: [] // optional +}); 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 index 58f46bbb4a..82266bfde7 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.listTemplates( - [], // frameworks (optional) - [], // useCases (optional) - 1, // limit (optional) - 0 // offset (optional) -); +const result = await sites.listTemplates({ + frameworks: [], // optional + useCases: [], // optional + limit: 1, // optional + offset: 0 // 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 index 7182d78880..1cd2cf7af1 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Sites, SiteUsageRange } from "@appwrite.io/console"; +import { Client, Sites, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,8 +6,8 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.listUsage( - SiteUsageRange.TwentyFourHours // range (optional) -); +const result = await sites.listUsage({ + range: UsageRange.TwentyFourHours // 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 index de62195aea..0b795d08af 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.listVariables( - '<SITE_ID>' // siteId -); +const result = await sites.listVariables({ + siteId: '<SITE_ID>' +}); 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 index fafe3cb229..b3d4f6865c 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/list.md +++ b/docs/examples/1.8.x/console-web/examples/sites/list.md @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 8205c863b0..4b9d2a87db 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.updateDeploymentStatus( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.updateDeploymentStatus({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index d63541702e..91118ec734 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.updateSiteDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.updateSiteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index 1ea9481737..9fe767db81 100644 --- 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 @@ -6,12 +6,12 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.updateVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>', // variableId - '<KEY>', // key - '<VALUE>', // value (optional) - false // secret (optional) -); +const result = await sites.updateVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // optional + secret: false // 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 index b20a19526d..68bd073c50 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/update.md +++ b/docs/examples/1.8.x/console-web/examples/sites/update.md @@ -6,25 +6,25 @@ const client = new Client() 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) -); +const 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 +}); 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 index a01bb0945f..7727d1c7bb 100644 --- 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 @@ -6,17 +6,17 @@ const client = new Client() 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) -); +const 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 +}); 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 index 8048772389..1dcab62ba4 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() 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) -); +const result = await storage.createFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: document.getElementById('uploader').files[0], + permissions: ["read("any")"] // 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 index 20084fd7e3..25d4d2023d 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.deleteBucket( - '<BUCKET_ID>' // bucketId -); +const result = await storage.deleteBucket({ + bucketId: '<BUCKET_ID>' +}); 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 index 41afa9e375..e8750be3c3 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.deleteFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>' // fileId -); +const result = await storage.deleteFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +}); 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 index 1007454c2e..5749effa41 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Storage, StorageUsageRange } from "@appwrite.io/console"; +import { Client, Storage, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.getBucketUsage( - '<BUCKET_ID>', // bucketId - StorageUsageRange.TwentyFourHours // range (optional) -); +const result = await storage.getBucketUsage({ + bucketId: '<BUCKET_ID>', + range: UsageRange.TwentyFourHours // 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 index ec77dd2bf5..7519b2b1c2 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.getBucket( - '<BUCKET_ID>' // bucketId -); +const result = await storage.getBucket({ + bucketId: '<BUCKET_ID>' +}); 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 index 8e98105ef3..876776f0f8 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileDownload( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<TOKEN>' // token (optional) -); +const result = storage.getFileDownload({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + 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 index b14a02769e..16bfe5feb8 100644 --- 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 @@ -6,21 +6,21 @@ const client = new Client() 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) -); +const 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 +}); 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 index 03db75f044..dca7ffae2f 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileView( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<TOKEN>' // token (optional) -); +const result = storage.getFileView({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + 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 index 76658edb0b..5f5370dcf3 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.getFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>' // fileId -); +const result = await storage.getFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +}); 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 index b57f8f8b03..1584361d18 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Storage, StorageUsageRange } from "@appwrite.io/console"; +import { Client, Storage, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,8 +6,8 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.getUsage( - StorageUsageRange.TwentyFourHours // range (optional) -); +const result = await storage.getUsage({ + range: UsageRange.TwentyFourHours // 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 index f82c01a879..548daed87b 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.listBuckets( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 9076b8997f..245c614b17 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.listFiles( - '<BUCKET_ID>', // bucketId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await storage.listFiles({ + bucketId: '<BUCKET_ID>', + 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 index d6c125a213..58ad29fe15 100644 --- 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 @@ -6,17 +6,17 @@ const client = new Client() 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) -); +const 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 +}); 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 index 79830f77d2..b73149db13 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.updateFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<NAME>', // name (optional) - ["read("any")"] // permissions (optional) -); +const result = await storage.updateFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', // optional + permissions: ["read("any")"] // optional +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..4622b821a5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, // optional + array: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..30dd10e3a2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..61ae3e1e85 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-email-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createEmailColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', // optional + array: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..0a5657148d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-enum-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', // optional + array: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..b8794dd697 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-float-column.md @@ -0,0 +1,20 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-index.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..7c11aa67b7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-index.md @@ -0,0 +1,19 @@ +import { Client, TablesDB, 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: IndexType.Key, + columns: [], + orders: [], // optional + lengths: [] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..0eaf240078 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-integer-column.md @@ -0,0 +1,20 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..4df6dcd7a8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-ip-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..e7c72e7e30 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,20 @@ +import { Client, TablesDB, 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.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 +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-row.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..135d3e7070 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..b827beb048 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..e162c976ba --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-string-column.md @@ -0,0 +1,20 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createStringColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', // optional + array: false, // optional + encrypt: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-table.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-table.md new file mode 100644 index 0000000000..aad0eceb73 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-table.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..2cee4674f9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-url-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createUrlColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', // optional + array: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create.md new file mode 100644 index 0000000000..91a89ce236 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..067afc7820 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.decrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + min: null // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..868cd6e277 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-column.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..451dcc8a94 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-index.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..9b7def4f00 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-row.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..16868a0c6e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..e3d453291d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-table.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/delete.md b/docs/examples/1.8.x/console-web/examples/tablesdb/delete.md new file mode 100644 index 0000000000..a567ad5035 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/delete.md @@ -0,0 +1,13 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.delete({ + databaseId: '<DATABASE_ID>' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/get-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..45d5c20531 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get-column.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.getColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/get-index.md b/docs/examples/1.8.x/console-web/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..576702638d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get-index.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.getIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/get-row.md b/docs/examples/1.8.x/console-web/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..f170078430 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get-row.md @@ -0,0 +1,16 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.getRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/get-table-usage.md b/docs/examples/1.8.x/console-web/examples/tablesdb/get-table-usage.md new file mode 100644 index 0000000000..6f5cff484c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get-table-usage.md @@ -0,0 +1,15 @@ +import { Client, TablesDB, UsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.getTableUsage({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + range: UsageRange.TwentyFourHours // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/get-table.md b/docs/examples/1.8.x/console-web/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..47ca8b7e04 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get-table.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.getTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/get-usage.md b/docs/examples/1.8.x/console-web/examples/tablesdb/get-usage.md new file mode 100644 index 0000000000..c4f34ee36e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get-usage.md @@ -0,0 +1,14 @@ +import { Client, TablesDB, UsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.getUsage({ + databaseId: '<DATABASE_ID>', + range: UsageRange.TwentyFourHours // optional +}); + +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/tablesdb/get.md similarity index 52% rename from docs/examples/1.8.x/console-web/examples/grids/delete-database.md rename to docs/examples/1.8.x/console-web/examples/tablesdb/get.md index b34b4adfdb..fc408caa56 100644 --- a/docs/examples/1.8.x/console-web/examples/grids/delete-database.md +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get.md @@ -1,13 +1,13 @@ -import { Client, Grids } from "@appwrite.io/console"; +import { Client, TablesDB } from "@appwrite.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 tablesDB = new TablesDB(client); -const result = await grids.deleteDatabase( - '<DATABASE_ID>' // databaseId -); +const result = await tablesDB.get({ + databaseId: '<DATABASE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..95694d49a4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/increment-row-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.incrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + max: null // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..ea20458266 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-columns.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.listColumns({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..dd00898f23 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-indexes.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.listIndexes({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-row-logs.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-row-logs.md new file mode 100644 index 0000000000..870023ee0e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-row-logs.md @@ -0,0 +1,16 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.listRowLogs({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..46159b3d42 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.listRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-table-logs.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-table-logs.md new file mode 100644 index 0000000000..102623e431 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-table-logs.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.listTableLogs({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..1d7c6d511f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-tables.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.listTables({ + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-usage.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-usage.md new file mode 100644 index 0000000000..875128dc53 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-usage.md @@ -0,0 +1,13 @@ +import { Client, TablesDB, UsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.listUsage({ + range: UsageRange.TwentyFourHours // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list.md new file mode 100644 index 0000000000..002a6f75e0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.list({ + queries: [], // optional + search: '<SEARCH>' // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..d91927dd5f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + newKey: '' // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..977c5106f9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..7f575a3d0c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-email-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateEmailColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..28dfc51ba6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-enum-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..2be0755220 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-float-column.md @@ -0,0 +1,20 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..3e752b7009 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-integer-column.md @@ -0,0 +1,20 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..c5f43af64e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-ip-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..88d6725507 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDB, 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate.Cascade, // optional + newKey: '' // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-row.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..5d6109c04c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // optional + permissions: ["read("any")"] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..0ce117efa3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-rows.md @@ -0,0 +1,16 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: {}, // optional + queries: [] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..b84185ca8f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-string-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateStringColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, // optional + newKey: '' // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-table.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-table.md new file mode 100644 index 0000000000..11eec2e343 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-table.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..e267e404de --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-url-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateUrlColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update.md new file mode 100644 index 0000000000..55809cb070 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..665f181d8b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.upsertRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // optional + permissions: ["read("any")"] // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..05e78e3efa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.upsertRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +}); + +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 index 18f6b0ab4d..50c4d06b6d 100644 --- 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 @@ -6,14 +6,14 @@ const client = new Client() 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) -); +const 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 +}); 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 index a33e71ad5f..027155b4eb 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/create.md +++ b/docs/examples/1.8.x/console-web/examples/teams/create.md @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.create( - '<TEAM_ID>', // teamId - '<NAME>', // name - [] // roles (optional) -); +const result = await teams.create({ + teamId: '<TEAM_ID>', + 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 index a63ed46749..43edacebde 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.deleteMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>' // membershipId -); +const result = await teams.deleteMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +}); 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 index e97cc05cc7..9ebc45b39a 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/delete.md +++ b/docs/examples/1.8.x/console-web/examples/teams/delete.md @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.delete( - '<TEAM_ID>' // teamId -); +const result = await teams.delete({ + teamId: '<TEAM_ID>' +}); 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 index bc31ee1470..a766060bc9 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.getMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>' // membershipId -); +const result = await teams.getMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +}); 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 index 394848c5c3..a044e8a4d7 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.getPrefs( - '<TEAM_ID>' // teamId -); +const result = await teams.getPrefs({ + teamId: '<TEAM_ID>' +}); 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 index 8c752a9828..2ec6271f0f 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/get.md +++ b/docs/examples/1.8.x/console-web/examples/teams/get.md @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.get( - '<TEAM_ID>' // teamId -); +const result = await teams.get({ + teamId: '<TEAM_ID>' +}); 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 index 004e627f0d..a077ae59ce 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.listLogs( - '<TEAM_ID>', // teamId - [] // queries (optional) -); +const result = await teams.listLogs({ + teamId: '<TEAM_ID>', + 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 index 22fb731175..a5cf9f0fbf 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.listMemberships( - '<TEAM_ID>', // teamId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await teams.listMemberships({ + teamId: '<TEAM_ID>', + 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 index c51dfaf389..5d7dbcd3d9 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/list.md +++ b/docs/examples/1.8.x/console-web/examples/teams/list.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index c8e608278e..ab6bc93d4f 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateMembershipStatus( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>', // membershipId - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await teams.updateMembershipStatus({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + 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 index d3e0164a17..9a94f51a96 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>', // membershipId - [] // roles -); +const result = await teams.updateMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + 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 index 43703d0c98..82d3d0fac2 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateName( - '<TEAM_ID>', // teamId - '<NAME>' // name -); +const result = await teams.updateName({ + teamId: '<TEAM_ID>', + 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 index e0acff0a30..1519f5398a 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updatePrefs( - '<TEAM_ID>', // teamId - {} // prefs -); +const result = await teams.updatePrefs({ + teamId: '<TEAM_ID>', + 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 index bac4863159..b762493708 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const tokens = new Tokens(client); -const result = await tokens.createFileToken( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '' // expire (optional) -); +const result = await tokens.createFileToken({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + 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 index 0a871d0fe4..8591dce076 100644 --- a/docs/examples/1.8.x/console-web/examples/tokens/delete.md +++ b/docs/examples/1.8.x/console-web/examples/tokens/delete.md @@ -6,8 +6,8 @@ const client = new Client() const tokens = new Tokens(client); -const result = await tokens.delete( - '<TOKEN_ID>' // tokenId -); +const result = await tokens.delete({ + tokenId: '<TOKEN_ID>' +}); 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 index ee83fb83c2..33916c1939 100644 --- a/docs/examples/1.8.x/console-web/examples/tokens/get.md +++ b/docs/examples/1.8.x/console-web/examples/tokens/get.md @@ -6,8 +6,8 @@ const client = new Client() const tokens = new Tokens(client); -const result = await tokens.get( - '<TOKEN_ID>' // tokenId -); +const result = await tokens.get({ + tokenId: '<TOKEN_ID>' +}); 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 index 33077e26dd..29b9a3d242 100644 --- a/docs/examples/1.8.x/console-web/examples/tokens/list.md +++ b/docs/examples/1.8.x/console-web/examples/tokens/list.md @@ -6,10 +6,10 @@ const client = new Client() const tokens = new Tokens(client); -const result = await tokens.list( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - [] // queries (optional) -); +const result = await tokens.list({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + 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 index ce3b80dd22..96d92348ef 100644 --- a/docs/examples/1.8.x/console-web/examples/tokens/update.md +++ b/docs/examples/1.8.x/console-web/examples/tokens/update.md @@ -6,9 +6,9 @@ const client = new Client() const tokens = new Tokens(client); -const result = await tokens.update( - '<TOKEN_ID>', // tokenId - '' // expire (optional) -); +const result = await tokens.update({ + tokenId: '<TOKEN_ID>', + expire: '' // 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-argon-2-user.md similarity index 62% rename from docs/examples/1.8.x/console-web/examples/users/create-m-d5user.md rename to docs/examples/1.8.x/console-web/examples/users/create-argon-2-user.md index 610f795ab0..58da25bcb0 100644 --- 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-argon-2-user.md @@ -6,11 +6,11 @@ const client = new Client() const users = new Users(client); -const result = await users.createMD5User( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const result = await users.createArgon2User({ + userId: '<USER_ID>', + email: 'email@example.com', + 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 index 9c51181890..f83290d10d 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() const users = new Users(client); -const result = await users.createBcryptUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const result = await users.createBcryptUser({ + userId: '<USER_ID>', + email: 'email@example.com', + 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-jwt.md similarity index 66% rename from docs/examples/1.8.x/console-web/examples/users/create-j-w-t.md rename to docs/examples/1.8.x/console-web/examples/users/create-jwt.md index 7d50fbce03..4bd160bc96 100644 --- 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-jwt.md @@ -6,10 +6,10 @@ const client = new Client() const users = new Users(client); -const result = await users.createJWT( - '<USER_ID>', // userId - '<SESSION_ID>', // sessionId (optional) - 0 // duration (optional) -); +const result = await users.createJWT({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', // optional + duration: 0 // 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-md-5-user.md similarity index 62% rename from docs/examples/1.8.x/console-web/examples/users/create-argon2user.md rename to docs/examples/1.8.x/console-web/examples/users/create-md-5-user.md index c190225d4b..a0bfb47a2d 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create-argon2user.md +++ b/docs/examples/1.8.x/console-web/examples/users/create-md-5-user.md @@ -6,11 +6,11 @@ const client = new Client() const users = new Users(client); -const result = await users.createArgon2User( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const result = await users.createMD5User({ + userId: '<USER_ID>', + email: 'email@example.com', + 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 index ea52af9cf8..f8669589af 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.createMfaRecoveryCodes( - '<USER_ID>' // userId -); +const result = await users.createMFARecoveryCodes({ + userId: '<USER_ID>' +}); 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-ph-pass-user.md similarity index 62% rename from docs/examples/1.8.x/console-web/examples/users/create-p-h-pass-user.md rename to docs/examples/1.8.x/console-web/examples/users/create-ph-pass-user.md index c9437c5c38..a42b8d7594 100644 --- 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-ph-pass-user.md @@ -6,11 +6,11 @@ const client = new Client() const users = new Users(client); -const result = await users.createPHPassUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const result = await users.createPHPassUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + 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 index c0a0435b67..b5a7ca3231 100644 --- 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 @@ -6,14 +6,14 @@ const client = new Client() 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) -); +const 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 +}); 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 index f1cb93637a..6727e2895f 100644 --- 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 @@ -6,16 +6,16 @@ const client = new Client() 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) -); +const result = await 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 +}); 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 index 5393c4408d..917fbaa341 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.createSession( - '<USER_ID>' // userId -); +const result = await users.createSession({ + userId: '<USER_ID>' +}); 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-sha-user.md similarity index 56% rename from docs/examples/1.8.x/console-web/examples/users/create-s-h-a-user.md rename to docs/examples/1.8.x/console-web/examples/users/create-sha-user.md index b70f09c133..8d593ce6b5 100644 --- 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-sha-user.md @@ -6,12 +6,12 @@ const client = new Client() 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) -); +const result = await users.createSHAUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: PasswordHash.Sha1, // optional + name: '<NAME>' // optional +}); 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 index 4c8eac9c45..814d6f780a 100644 --- 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 @@ -6,13 +6,13 @@ const client = new Client() 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) -); +const result = await users.createTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: MessagingProviderType.Email, + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', // 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 index 58e8c9f035..d1fa556e6f 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const users = new Users(client); -const result = await users.createToken( - '<USER_ID>', // userId - 4, // length (optional) - 60 // expire (optional) -); +const result = await users.createToken({ + userId: '<USER_ID>', + length: 4, // optional + expire: 60 // 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 index 131ef1290c..b61c814539 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create.md +++ b/docs/examples/1.8.x/console-web/examples/users/create.md @@ -6,12 +6,12 @@ const client = new Client() 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) -); +const result = await users.create({ + userId: '<USER_ID>', + email: 'email@example.com', // optional + phone: '+12065550100', // 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 index cf7425c843..9961f4a53f 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.deleteIdentity( - '<IDENTITY_ID>' // identityId -); +const result = await users.deleteIdentity({ + identityId: '<IDENTITY_ID>' +}); 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 index 023686ae26..eeba75ad32 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.deleteMfaAuthenticator( - '<USER_ID>', // userId - AuthenticatorType.Totp // type -); +const result = await users.deleteMFAAuthenticator({ + userId: '<USER_ID>', + type: AuthenticatorType.Totp +}); 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 index ca6880431b..08342e854e 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.deleteSession( - '<USER_ID>', // userId - '<SESSION_ID>' // sessionId -); +const result = await users.deleteSession({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>' +}); 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 index 1137a8b29b..0f4d5efe0f 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.deleteSessions( - '<USER_ID>' // userId -); +const result = await users.deleteSessions({ + userId: '<USER_ID>' +}); 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 index 386d8a90b5..44c65cda48 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.deleteTarget( - '<USER_ID>', // userId - '<TARGET_ID>' // targetId -); +const result = await users.deleteTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +}); 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 index 1d4b1d0e1c..dc702403f8 100644 --- a/docs/examples/1.8.x/console-web/examples/users/delete.md +++ b/docs/examples/1.8.x/console-web/examples/users/delete.md @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.delete( - '<USER_ID>' // userId -); +const result = await users.delete({ + userId: '<USER_ID>' +}); 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 index 02d17649c8..082a2f8485 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.getMfaRecoveryCodes( - '<USER_ID>' // userId -); +const result = await users.getMFARecoveryCodes({ + userId: '<USER_ID>' +}); 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 index b24f2bd3ae..61e575b12b 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.getPrefs( - '<USER_ID>' // userId -); +const result = await users.getPrefs({ + userId: '<USER_ID>' +}); 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 index cfa7d3d5cd..c5e209032c 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.getTarget( - '<USER_ID>', // userId - '<TARGET_ID>' // targetId -); +const result = await users.getTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +}); 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 index bd87faf10f..80c3a0ced3 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Users, UserUsageRange } from "@appwrite.io/console"; +import { Client, Users, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.getUsage( - UserUsageRange.TwentyFourHours // range (optional) -); +const result = await users.getUsage({ + range: UsageRange.TwentyFourHours // 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 index 77f5006890..0c6ead786b 100644 --- a/docs/examples/1.8.x/console-web/examples/users/get.md +++ b/docs/examples/1.8.x/console-web/examples/users/get.md @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.get( - '<USER_ID>' // userId -); +const result = await users.get({ + userId: '<USER_ID>' +}); 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 index 34b92900a7..4cf88ccb54 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.listIdentities( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 85e6cf5071..dfdaf1a068 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.listLogs( - '<USER_ID>', // userId - [] // queries (optional) -); +const result = await users.listLogs({ + userId: '<USER_ID>', + 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 index 01ce244361..e2b49223f8 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const users = new Users(client); -const result = await users.listMemberships( - '<USER_ID>', // userId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await users.listMemberships({ + userId: '<USER_ID>', + 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 index fe1dd23594..4301971574 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.listMfaFactors( - '<USER_ID>' // userId -); +const result = await users.listMFAFactors({ + userId: '<USER_ID>' +}); 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 index e3d5d6e51d..a506008fd7 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.listSessions( - '<USER_ID>' // userId -); +const result = await users.listSessions({ + userId: '<USER_ID>' +}); 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 index 58f4079aee..f3af0c4011 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.listTargets( - '<USER_ID>', // userId - [] // queries (optional) -); +const result = await users.listTargets({ + userId: '<USER_ID>', + 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 index d2189b9c93..de75f2dacb 100644 --- a/docs/examples/1.8.x/console-web/examples/users/list.md +++ b/docs/examples/1.8.x/console-web/examples/users/list.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 3fedd4b86f..f5af0085b7 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updateEmailVerification( - '<USER_ID>', // userId - false // emailVerification -); +const result = await users.updateEmailVerification({ + userId: '<USER_ID>', + emailVerification: false +}); 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 index 9922376778..ed5c83886b 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updateEmail( - '<USER_ID>', // userId - 'email@example.com' // email -); +const result = await users.updateEmail({ + userId: '<USER_ID>', + email: 'email@example.com' +}); 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 index 4fc268fc3c..e25ee6a6b0 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updateLabels( - '<USER_ID>', // userId - [] // labels -); +const result = await users.updateLabels({ + userId: '<USER_ID>', + 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 index 041cd9098b..f9eecac66d 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.updateMfaRecoveryCodes( - '<USER_ID>' // userId -); +const result = await users.updateMFARecoveryCodes({ + userId: '<USER_ID>' +}); 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 index af710ecd48..bbb33e8a42 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updateMfa( - '<USER_ID>', // userId - false // mfa -); +const result = await users.updateMFA({ + userId: '<USER_ID>', + mfa: false +}); 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 index b57cb33730..7433abca41 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updateName( - '<USER_ID>', // userId - '<NAME>' // name -); +const result = await users.updateName({ + userId: '<USER_ID>', + 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 index e9c7f9b51d..5c620e60f1 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updatePassword( - '<USER_ID>', // userId - '' // password -); +const result = await users.updatePassword({ + userId: '<USER_ID>', + 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 index a29e38591c..a163d34406 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updatePhoneVerification( - '<USER_ID>', // userId - false // phoneVerification -); +const result = await users.updatePhoneVerification({ + userId: '<USER_ID>', + phoneVerification: false +}); 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 index a87780161b..a8a31dcfc9 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updatePhone( - '<USER_ID>', // userId - '+12065550100' // number -); +const result = await users.updatePhone({ + userId: '<USER_ID>', + number: '+12065550100' +}); 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 index 7d9993bbb1..a08e27d10e 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updatePrefs( - '<USER_ID>', // userId - {} // prefs -); +const result = await users.updatePrefs({ + userId: '<USER_ID>', + 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 index 5e823e7a48..cdb393dd16 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updateStatus( - '<USER_ID>', // userId - false // status -); +const result = await users.updateStatus({ + userId: '<USER_ID>', + status: false +}); 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 index ed33fe9bb0..27f5611cee 100644 --- 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 @@ -6,12 +6,12 @@ const client = new Client() 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) -); +const result = await users.updateTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', // optional + providerId: '<PROVIDER_ID>', // 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 index 84de3ffb26..69b2ea1f44 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() 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) -); +const result = await vcs.createRepositoryDetection({ + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + type: VCSDetectionType.Runtime, + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>' // 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 index 1d08ac5b09..7e4e629099 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.createRepository( - '<INSTALLATION_ID>', // installationId - '<NAME>', // name - false // private -); +const result = await vcs.createRepository({ + installationId: '<INSTALLATION_ID>', + name: '<NAME>', + private: false +}); 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 index 3f760c09b6..9c49ac9cb5 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.deleteInstallation( - '<INSTALLATION_ID>' // installationId -); +const result = await vcs.deleteInstallation({ + installationId: '<INSTALLATION_ID>' +}); 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 index 4230f2bd9a..2942f5b56e 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.getInstallation( - '<INSTALLATION_ID>' // installationId -); +const result = await vcs.getInstallation({ + installationId: '<INSTALLATION_ID>' +}); 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 index 6d0cbd19ee..b33cadd448 100644 --- 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 @@ -6,11 +6,11 @@ const client = new Client() 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) -); +const result = await vcs.getRepositoryContents({ + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerReference: '<PROVIDER_REFERENCE>' // 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 index 516265a0c8..e42812e11e 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.getRepository( - '<INSTALLATION_ID>', // installationId - '<PROVIDER_REPOSITORY_ID>' // providerRepositoryId -); +const result = await vcs.getRepository({ + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>' +}); 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 index 1ba1e64615..5a90607262 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.listInstallations( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index f414ec316b..cae640097e 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.listRepositories( - '<INSTALLATION_ID>', // installationId - VCSDetectionType.Runtime, // type - '<SEARCH>' // search (optional) -); +const result = await vcs.listRepositories({ + installationId: '<INSTALLATION_ID>', + type: VCSDetectionType.Runtime, + 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 index ba6b86a053..d0103afa03 100644 --- 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 @@ -6,9 +6,9 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.listRepositoryBranches( - '<INSTALLATION_ID>', // installationId - '<PROVIDER_REPOSITORY_ID>' // providerRepositoryId -); +const result = await vcs.listRepositoryBranches({ + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>' +}); 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 index 31425cb883..2ebcada011 100644 --- 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 @@ -6,10 +6,10 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.updateExternalDeployments( - '<INSTALLATION_ID>', // installationId - '<REPOSITORY_ID>', // repositoryId - '<PROVIDER_PULL_REQUEST_ID>' // providerPullRequestId -); +const result = await vcs.updateExternalDeployments({ + installationId: '<INSTALLATION_ID>', + repositoryId: '<REPOSITORY_ID>', + providerPullRequestId: '<PROVIDER_PULL_REQUEST_ID>' +}); console.log(result); 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/server-dart/examples/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/server-dart/examples/account/create-magic-url-token.md 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 index 87797fa645..4dd2191ff2 100644 --- 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 @@ -7,6 +7,6 @@ Client client = Client() Account account = Account(client); -MfaType result = await account.createMfaAuthenticator( +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 index 62f3eaf2c2..5df3abadad 100644 --- 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 @@ -6,6 +6,6 @@ Client client = Client() Account account = Account(client); -MfaChallenge result = await account.createMfaChallenge( +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 index 5ebe0e9e92..1e8d478887 100644 --- 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 @@ -7,4 +7,4 @@ Client client = Client() Account account = Account(client); -MfaRecoveryCodes result = await account.createMfaRecoveryCodes(); +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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/server-dart/examples/account/create-o-auth-2-token.md 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 index efd5263e22..7f3f4ab1c8 100644 --- 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 @@ -7,6 +7,6 @@ Client client = Client() Account account = Account(client); -await account.deleteMfaAuthenticator( +await account.deleteMFAAuthenticator( type: AuthenticatorType.totp, ); 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 index b073d40238..5ff858fdaf 100644 --- 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 @@ -7,4 +7,4 @@ Client client = Client() Account account = Account(client); -MfaRecoveryCodes result = await account.getMfaRecoveryCodes(); +MfaRecoveryCodes result = await account.getMFARecoveryCodes(); 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 index 32b269fbd7..083b51d6c3 100644 --- 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 @@ -7,4 +7,4 @@ Client client = Client() Account account = Account(client); -MfaFactors result = await account.listMfaFactors(); +MfaFactors result = await account.listMFAFactors(); 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/server-dart/examples/account/update-magic-url-session.md 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 index 5a0f98f578..c475d30e19 100644 --- 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 @@ -7,7 +7,7 @@ Client client = Client() Account account = Account(client); -User result = await account.updateMfaAuthenticator( +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 index 749c4cd6a0..6cf3bb473e 100644 --- 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 @@ -7,7 +7,7 @@ Client client = Client() Account account = Account(client); -Session result = await account.updateMfaChallenge( +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 index 7e274f0ead..10fc77d2f2 100644 --- 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 @@ -7,4 +7,4 @@ Client client = Client() Account account = Account(client); -MfaRecoveryCodes result = await account.updateMfaRecoveryCodes(); +MfaRecoveryCodes result = await account.updateMFARecoveryCodes(); 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/server-dart/examples/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/server-dart/examples/avatars/get-qr.md 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 index c8ec38dab8..e46244874d 100644 --- 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 @@ -3,7 +3,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 - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setSession(''); // The user session to authenticate with Databases databases = Databases(client); 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 index 6e5134b03a..a2d2622629 100644 --- 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 @@ -3,7 +3,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 - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setSession(''); // The user session to authenticate with Databases databases = Databases(client); 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-db.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/health/get-d-b.md rename to docs/examples/1.8.x/server-dart/examples/health/get-db.md 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-eu.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/server-dart/examples/locale/list-countries-eu.md 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 index 82c1eb5da6..a4faf2dacf 100644 --- 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 @@ -7,7 +7,7 @@ Client client = Client() Messaging messaging = Messaging(client); -Provider result = await messaging.createApnsProvider( +Provider result = await messaging.createAPNSProvider( providerId: '<PROVIDER_ID>', name: '<NAME>', authKey: '<AUTH_KEY>', // (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 index 25c2cb8cfa..ce4f810d5d 100644 --- 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 @@ -7,7 +7,7 @@ Client client = Client() Messaging messaging = Messaging(client); -Provider result = await messaging.createFcmProvider( +Provider result = await messaging.createFCMProvider( providerId: '<PROVIDER_ID>', name: '<NAME>', serviceAccountJSON: {}, // (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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/messaging/create-msg91provider.md rename to docs/examples/1.8.x/server-dart/examples/messaging/create-msg-91-provider.md 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 index 04a715870f..ca90bc6011 100644 --- 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 @@ -7,7 +7,7 @@ Client client = Client() Messaging messaging = Messaging(client); -Message result = await messaging.createSms( +Message result = await messaging.createSMS( messageId: '<MESSAGE_ID>', content: '<CONTENT>', topics: [], // (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 index 6201987fbb..644d30faa7 100644 --- 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 @@ -7,7 +7,7 @@ Client client = Client() Messaging messaging = Messaging(client); -Provider result = await messaging.createSmtpProvider( +Provider result = await messaging.createSMTPProvider( providerId: '<PROVIDER_ID>', name: '<NAME>', host: '<HOST>', 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 index edc0a1f769..7f3bc8340e 100644 --- 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 @@ -7,7 +7,7 @@ Client client = Client() Messaging messaging = Messaging(client); -Provider result = await messaging.updateApnsProvider( +Provider result = await messaging.updateAPNSProvider( providerId: '<PROVIDER_ID>', name: '<NAME>', // (optional) enabled: false, // (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 index 1e2d8a8ca2..65afba1fe2 100644 --- 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 @@ -7,7 +7,7 @@ Client client = Client() Messaging messaging = Messaging(client); -Provider result = await messaging.updateFcmProvider( +Provider result = await messaging.updateFCMProvider( providerId: '<PROVIDER_ID>', name: '<NAME>', // (optional) enabled: false, // (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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/messaging/update-msg91provider.md rename to docs/examples/1.8.x/server-dart/examples/messaging/update-msg-91-provider.md 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 index f4356deed3..26e6649b57 100644 --- 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 @@ -7,7 +7,7 @@ Client client = Client() Messaging messaging = Messaging(client); -Message result = await messaging.updateSms( +Message result = await messaging.updateSMS( messageId: '<MESSAGE_ID>', topics: [], // (optional) users: [], // (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 index 16530c01c8..911fa14485 100644 --- 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 @@ -7,7 +7,7 @@ Client client = Client() Messaging messaging = Messaging(client); -Provider result = await messaging.updateSmtpProvider( +Provider result = await messaging.updateSMTPProvider( providerId: '<PROVIDER_ID>', name: '<NAME>', // (optional) host: '<HOST>', // (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/tablesdb/create-boolean-column.md similarity index 81% rename from docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-boolean-column.md index d462336207..aa7b7c592d 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-boolean-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnBoolean result = await grids.createBooleanColumn( +ColumnBoolean result = await tablesDB.createBooleanColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-datetime-column.md similarity index 81% rename from docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-datetime-column.md index 88365e0d0f..10284ddf9a 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-datetime-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnDatetime result = await grids.createDatetimeColumn( +ColumnDatetime result = await tablesDB.createDatetimeColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-email-column.md similarity index 82% rename from docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-email-column.md index 69d6c03d8f..ec36530e82 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-email-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnEmail result = await grids.createEmailColumn( +ColumnEmail result = await tablesDB.createEmailColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-enum-column.md similarity index 83% rename from docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-enum-column.md index a3a1e3ff60..594376d72f 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-enum-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnEnum result = await grids.createEnumColumn( +ColumnEnum result = await tablesDB.createEnumColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-float-column.md similarity index 83% rename from docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-float-column.md index eba5e98ccc..0b97073709 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-float-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnFloat result = await grids.createFloatColumn( +ColumnFloat result = await tablesDB.createFloatColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-index.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-index.md similarity index 83% rename from docs/examples/1.8.x/server-dart/examples/grids/create-index.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-index.md index 4926b9ec83..64fea75726 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-index.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-index.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnIndex result = await grids.createIndex( +ColumnIndex result = await tablesDB.createIndex( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-integer-column.md similarity index 83% rename from docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-integer-column.md index d5bfdf3144..d90dca56b7 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-integer-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnInteger result = await grids.createIntegerColumn( +ColumnInteger result = await tablesDB.createIntegerColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-ip-column.md similarity index 83% rename from docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-ip-column.md index 91b83fde8c..322776e64a 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-ip-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnIp result = await grids.createIpColumn( +ColumnIp result = await tablesDB.createIpColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-relationship-column.md similarity index 83% rename from docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-relationship-column.md index 99f0427a85..3b2ea3d141 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-relationship-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnRelationship result = await grids.createRelationshipColumn( +ColumnRelationship result = await tablesDB.createRelationshipColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', relatedTableId: '<RELATED_TABLE_ID>', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-row.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-row.md similarity index 84% rename from docs/examples/1.8.x/server-dart/examples/grids/create-row.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-row.md index 4db0893686..15e4f8ea8d 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-row.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-row.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Row result = await grids.createRow( +Row result = await tablesDB.createRow( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rowId: '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-rows.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-rows.md similarity index 80% rename from docs/examples/1.8.x/server-dart/examples/grids/create-rows.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-rows.md index 111d061c3e..c22fdba506 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-rows.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-rows.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -RowList result = await grids.createRows( +RowList result = await tablesDB.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/tablesdb/create-string-column.md similarity index 83% rename from docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-string-column.md index 74b9cb7fa6..6fd0e93a93 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-string-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnString result = await grids.createStringColumn( +ColumnString result = await tablesDB.createStringColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-table.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-table.md similarity index 85% rename from docs/examples/1.8.x/server-dart/examples/grids/create-table.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-table.md index 1bb7afadd3..c055e93fec 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-table.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-table.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Table result = await grids.createTable( +Table result = await tablesDB.createTable( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', name: '<NAME>', 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/tablesdb/create-url-column.md similarity index 83% rename from docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create-url-column.md index cc129fce97..05c8da80f8 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-url-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnUrl result = await grids.createUrlColumn( +ColumnUrl result = await tablesDB.createUrlColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-database.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create.md similarity index 81% rename from docs/examples/1.8.x/server-dart/examples/grids/update-database.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/create.md index d65a80185f..6991b910eb 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-database.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Database result = await grids.updateDatabase( +Database result = await tablesDB.create( databaseId: '<DATABASE_ID>', name: '<NAME>', enabled: 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/tablesdb/decrement-row-column.md similarity index 71% rename from docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/decrement-row-column.md index ad0744dbc6..8c376563d8 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/decrement-row-column.md @@ -3,11 +3,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 - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setSession(''); // The user session to authenticate with -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Row result = await grids.decrementRowColumn( +Row result = await tablesDB.decrementRowColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rowId: '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-column.md similarity index 83% rename from docs/examples/1.8.x/server-dart/examples/grids/delete-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/delete-column.md index e326064f4f..ebee29e4c7 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/delete-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -await grids.deleteColumn( +await tablesDB.deleteColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-index.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-index.md similarity index 83% rename from docs/examples/1.8.x/server-dart/examples/grids/delete-index.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/delete-index.md index 14dbccb979..2b73e25f0a 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/delete-index.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-index.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -await grids.deleteIndex( +await tablesDB.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/tablesdb/delete-row.md similarity index 84% rename from docs/examples/1.8.x/server-dart/examples/grids/delete-row.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/delete-row.md index 8a37455490..f3966c0930 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/delete-row.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-row.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -await grids.deleteRow( +await tablesDB.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/tablesdb/delete-rows.md similarity index 84% rename from docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/delete-rows.md index dd2214fc68..eb2aebb3e6 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-rows.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -await grids.deleteRows( +await tablesDB.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/tablesdb/delete-table.md similarity index 83% rename from docs/examples/1.8.x/server-dart/examples/grids/delete-table.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/delete-table.md index af29d31b87..d425cec160 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/delete-table.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-table.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -await grids.deleteTable( +await tablesDB.deleteTable( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', ); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-database.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete.md similarity index 83% rename from docs/examples/1.8.x/server-dart/examples/grids/delete-database.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/delete.md index 0738454382..565f4ef6c9 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/delete-database.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete.md @@ -5,8 +5,8 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -await grids.deleteDatabase( +await tablesDB.delete( databaseId: '<DATABASE_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/tablesdb/get-column.md similarity index 82% rename from docs/examples/1.8.x/server-dart/examples/grids/get-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/get-column.md index 4040124454..437d72e621 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/get-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); - result = await grids.getColumn( + result = await tablesDB.getColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-index.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-index.md similarity index 80% rename from docs/examples/1.8.x/server-dart/examples/grids/get-index.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/get-index.md index 6e66a55b37..ef5f9a0ed6 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/get-index.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-index.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnIndex result = await grids.getIndex( +ColumnIndex result = await tablesDB.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/tablesdb/get-row.md similarity index 84% rename from docs/examples/1.8.x/server-dart/examples/grids/get-row.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/get-row.md index da2a609d32..0af17b612a 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/get-row.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-row.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Row result = await grids.getRow( +Row result = await tablesDB.getRow( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rowId: '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-table.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-table.md similarity index 80% rename from docs/examples/1.8.x/server-dart/examples/grids/get-table.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/get-table.md index d38fca0455..c230f6a1df 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/get-table.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-table.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Table result = await grids.getTable( +Table result = await tablesDB.getTable( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', ); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-database.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/get.md similarity index 80% rename from docs/examples/1.8.x/server-dart/examples/grids/get-database.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/get.md index e8a674b1ab..d147fb1c3f 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/get-database.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/get.md @@ -5,8 +5,8 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Database result = await grids.getDatabase( +Database result = await tablesDB.get( databaseId: '<DATABASE_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/tablesdb/increment-row-column.md similarity index 71% rename from docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/increment-row-column.md index 14c041404c..bbe262e5c9 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/increment-row-column.md @@ -3,11 +3,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 - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setSession(''); // The user session to authenticate with -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Row result = await grids.incrementRowColumn( +Row result = await tablesDB.incrementRowColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rowId: '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-columns.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/list-columns.md similarity index 80% rename from docs/examples/1.8.x/server-dart/examples/grids/list-columns.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/list-columns.md index 222b5ba172..2665c0db2e 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/list-columns.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/list-columns.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnList result = await grids.listColumns( +ColumnList result = await tablesDB.listColumns( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', queries: [], // (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/tablesdb/list-indexes.md similarity index 79% rename from docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/list-indexes.md index 218c3e0ccc..5028923db7 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/list-indexes.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnIndexList result = await grids.listIndexes( +ColumnIndexList result = await tablesDB.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/tablesdb/list-rows.md similarity index 82% rename from docs/examples/1.8.x/server-dart/examples/grids/list-rows.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/list-rows.md index 49f2a7ef21..83bbe38fca 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/list-rows.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/list-rows.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -RowList result = await grids.listRows( +RowList result = await tablesDB.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/tablesdb/list-tables.md similarity index 81% rename from docs/examples/1.8.x/server-dart/examples/grids/list-tables.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/list-tables.md index 4f1e08b713..ede3f5cd53 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/list-tables.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/list-tables.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -TableList result = await grids.listTables( +TableList result = await tablesDB.listTables( databaseId: '<DATABASE_ID>', queries: [], // (optional) search: '<SEARCH>', // (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/tablesdb/list.md similarity index 80% rename from docs/examples/1.8.x/server-dart/examples/grids/list-databases.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/list.md index 14e2c78b63..e13187de67 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/list-databases.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/list.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -DatabaseList result = await grids.listDatabases( +DatabaseList result = await tablesDB.list( 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/tablesdb/update-boolean-column.md similarity index 81% rename from docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update-boolean-column.md index e9e5a1fe32..1e6c604a64 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-boolean-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnBoolean result = await grids.updateBooleanColumn( +ColumnBoolean result = await tablesDB.updateBooleanColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-datetime-column.md similarity index 80% rename from docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update-datetime-column.md index 6eb1bb6cbf..982d8d55f9 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-datetime-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnDatetime result = await grids.updateDatetimeColumn( +ColumnDatetime result = await tablesDB.updateDatetimeColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-email-column.md similarity index 82% rename from docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update-email-column.md index 0fabb3e6a3..e2f075191c 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-email-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnEmail result = await grids.updateEmailColumn( +ColumnEmail result = await tablesDB.updateEmailColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-enum-column.md similarity index 82% rename from docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update-enum-column.md index 5aa1613b75..b0ddd485bb 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-enum-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnEnum result = await grids.updateEnumColumn( +ColumnEnum result = await tablesDB.updateEnumColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-float-column.md similarity index 83% rename from docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update-float-column.md index 0326f3c6f8..7239b48882 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-float-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnFloat result = await grids.updateFloatColumn( +ColumnFloat result = await tablesDB.updateFloatColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-integer-column.md similarity index 82% rename from docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update-integer-column.md index 3572a064b3..bb98ad27e7 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-integer-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnInteger result = await grids.updateIntegerColumn( +ColumnInteger result = await tablesDB.updateIntegerColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-ip-column.md similarity index 82% rename from docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update-ip-column.md index a75ff07569..21c5f1bcd8 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-ip-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnIp result = await grids.updateIpColumn( +ColumnIp result = await tablesDB.updateIpColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-relationship-column.md similarity index 79% rename from docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update-relationship-column.md index 4ecb479124..95e09d38b2 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-relationship-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnRelationship result = await grids.updateRelationshipColumn( +ColumnRelationship result = await tablesDB.updateRelationshipColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-row.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-row.md similarity index 85% rename from docs/examples/1.8.x/server-dart/examples/grids/update-row.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update-row.md index f11cf400cb..d66c24f505 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-row.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-row.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Row result = await grids.updateRow( +Row result = await tablesDB.updateRow( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rowId: '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-rows.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-rows.md similarity index 82% rename from docs/examples/1.8.x/server-dart/examples/grids/update-rows.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update-rows.md index 6dd4db1d3c..a0973b47d1 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-rows.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-rows.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -RowList result = await grids.updateRows( +RowList result = await tablesDB.updateRows( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', data: {}, // (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/tablesdb/update-string-column.md similarity index 82% rename from docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update-string-column.md index 2bc58912cb..bd390dfd4d 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-string-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnString result = await grids.updateStringColumn( +ColumnString result = await tablesDB.updateStringColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-table.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-table.md similarity index 85% rename from docs/examples/1.8.x/server-dart/examples/grids/update-table.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update-table.md index c5c497eddf..fd6646a01b 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-table.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-table.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Table result = await grids.updateTable( +Table result = await tablesDB.updateTable( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', name: '<NAME>', 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/tablesdb/update-url-column.md similarity index 82% rename from docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update-url-column.md index 79359f5436..fcfdfcd1d9 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-url-column.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -ColumnUrl result = await grids.updateUrlColumn( +ColumnUrl result = await tablesDB.updateUrlColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-database.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update.md similarity index 81% rename from docs/examples/1.8.x/server-dart/examples/grids/create-database.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/update.md index d77e3747c9..81d3379911 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-database.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Database result = await grids.createDatabase( +Database result = await tablesDB.update( databaseId: '<DATABASE_ID>', name: '<NAME>', enabled: false, // (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/tablesdb/upsert-row.md similarity index 85% rename from docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/upsert-row.md index e8a697664e..fbe4d2928a 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/upsert-row.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -Row result = await grids.upsertRow( +Row result = await tablesDB.upsertRow( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rowId: '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/upsert-rows.md similarity index 80% rename from docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md rename to docs/examples/1.8.x/server-dart/examples/tablesdb/upsert-rows.md index b12d6960f0..031aa50bea 100644 --- a/docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/upsert-rows.md @@ -5,9 +5,9 @@ Client client = Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -Grids grids = Grids(client); +TablesDB tablesDB = TablesDB(client); -RowList result = await grids.upsertRows( +RowList result = await tablesDB.upsertRows( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rows: [], 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-argon-2-user.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/users/create-argon2user.md rename to docs/examples/1.8.x/server-dart/examples/users/create-argon-2-user.md 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/users/create-j-w-t.md rename to docs/examples/1.8.x/server-dart/examples/users/create-jwt.md 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-md-5-user.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/users/create-m-d5user.md rename to docs/examples/1.8.x/server-dart/examples/users/create-md-5-user.md 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 index c2b9562e4e..12a7e32f5a 100644 --- 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 @@ -7,6 +7,6 @@ Client client = Client() Users users = Users(client); -MfaRecoveryCodes result = await users.createMfaRecoveryCodes( +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-ph-pass-user.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/users/create-p-h-pass-user.md rename to docs/examples/1.8.x/server-dart/examples/users/create-ph-pass-user.md 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-sha-user.md similarity index 100% rename from docs/examples/1.8.x/server-dart/examples/users/create-s-h-a-user.md rename to docs/examples/1.8.x/server-dart/examples/users/create-sha-user.md 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 index eed7dbd41b..b5dcc6af55 100644 --- 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 @@ -7,7 +7,7 @@ Client client = Client() Users users = Users(client); -await users.deleteMfaAuthenticator( +await users.deleteMFAAuthenticator( userId: '<USER_ID>', type: AuthenticatorType.totp, ); 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 index cf66c67610..e16158bfda 100644 --- 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 @@ -7,6 +7,6 @@ Client client = Client() Users users = Users(client); -MfaRecoveryCodes result = await users.getMfaRecoveryCodes( +MfaRecoveryCodes result = await users.getMFARecoveryCodes( userId: '<USER_ID>', ); 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 index 7134ee5dab..290109d2ae 100644 --- 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 @@ -7,6 +7,6 @@ Client client = Client() Users users = Users(client); -MfaFactors result = await users.listMfaFactors( +MfaFactors result = await users.listMFAFactors( userId: '<USER_ID>', ); 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 index 3b7d81f57c..a2340ff8c1 100644 --- 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 @@ -7,6 +7,6 @@ Client client = Client() Users users = Users(client); -MfaRecoveryCodes result = await users.updateMfaRecoveryCodes( +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 index f26b105534..7d3b71d9c4 100644 --- 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 @@ -7,7 +7,7 @@ Client client = Client() Users users = Users(client); -User result = await users.updateMfa( +User result = await users.updateMFA( userId: '<USER_ID>', mfa: false, ); 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 index d08a92d2c3..ab71bc3f7a 100644 --- 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 @@ -6,7 +6,7 @@ const client = new Client() const account = new Account(client); -const response = await account.createEmailPasswordSession( - 'email@example.com', // email - 'password' // password -); +const response = await account.createEmailPasswordSession({ + email: 'email@example.com', + 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 index 384a3fbbea..daab356a86 100644 --- 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 @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const response = await account.createEmailToken( - '<USER_ID>', // userId - 'email@example.com', // email - false // phrase (optional) -); +const response = await account.createEmailToken({ + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false // 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-deno/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/server-deno/examples/account/create-jwt.md 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-url-token.md similarity index 58% rename from docs/examples/1.8.x/server-deno/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/server-deno/examples/account/create-magic-url-token.md index 29e552a819..266aa8b3d3 100644 --- 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-url-token.md @@ -6,9 +6,9 @@ const client = new Client() 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) -); +const response = 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-deno/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-authenticator.md index 52c193a848..0e496e0042 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.createMfaAuthenticator( - AuthenticatorType.Totp // type -); +const response = await account.createMFAAuthenticator({ + type: AuthenticatorType.Totp +}); 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 index 296e36dec4..a36e286960 100644 --- 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 @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const response = await account.createMfaChallenge( - AuthenticationFactor.Email // factor -); +const response = await account.createMFAChallenge({ + factor: AuthenticationFactor.Email +}); 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 index cfd9aa2ba8..5a8f6a3683 100644 --- 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 @@ -7,4 +7,4 @@ const client = new Client() const account = new Account(client); -const response = await account.createMfaRecoveryCodes(); +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-auth-2-token.md similarity index 59% rename from docs/examples/1.8.x/server-deno/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/server-deno/examples/account/create-o-auth-2-token.md index 24e43a9d9c..bc1f5fce9f 100644 --- 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-auth-2-token.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Token( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +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-deno/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-deno/examples/account/create-phone-token.md index 77e4adcb9c..f31ddee329 100644 --- 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 @@ -6,7 +6,7 @@ const client = new Client() const account = new Account(client); -const response = await account.createPhoneToken( - '<USER_ID>', // userId - '+12065550100' // phone -); +const response = await account.createPhoneToken({ + userId: '<USER_ID>', + phone: '+12065550100' +}); 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 index a3d92d866e..cd08f64683 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.createRecovery( - 'email@example.com', // email - 'https://example.com' // url -); +const response = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com' +}); 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 index 888493a21a..ff238a88af 100644 --- 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 @@ -6,7 +6,7 @@ const client = new Client() const account = new Account(client); -const response = await account.createSession( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const response = await account.createSession({ + userId: '<USER_ID>', + 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 index 438feee807..002c3f6407 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.createVerification( - 'https://example.com' // url -); +const response = await account.createVerification({ + url: 'https://example.com' +}); 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 index c410a0f7c7..025dad8d8a 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/create.md +++ b/docs/examples/1.8.x/server-deno/examples/account/create.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const response = await account.create( - '<USER_ID>', // userId - 'email@example.com', // email - '', // password - '<NAME>' // name (optional) -); +const response = await account.create({ + userId: '<USER_ID>', + email: 'email@example.com', + 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 index 359c7a3cfa..26490a5e7f 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.deleteIdentity( - '<IDENTITY_ID>' // identityId -); +const response = await account.deleteIdentity({ + identityId: '<IDENTITY_ID>' +}); 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 index f4b164b43d..777347de98 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.deleteMfaAuthenticator( - AuthenticatorType.Totp // type -); +const response = await account.deleteMFAAuthenticator({ + type: AuthenticatorType.Totp +}); 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 index a0b7d19687..8472e579a4 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.deleteSession( - '<SESSION_ID>' // sessionId -); +const response = await account.deleteSession({ + sessionId: '<SESSION_ID>' +}); 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 index 73fc143978..6f631ac783 100644 --- 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 @@ -7,4 +7,4 @@ const client = new Client() const account = new Account(client); -const response = await account.getMfaRecoveryCodes(); +const response = await account.getMFARecoveryCodes(); 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 index c380b72ed5..05d1782593 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.getSession( - '<SESSION_ID>' // sessionId -); +const response = await account.getSession({ + sessionId: '<SESSION_ID>' +}); 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 index 1c612f9737..cbcac73f91 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.listIdentities( - [] // queries (optional) -); +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 index 28ab351f5a..6e7ce67c42 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.listLogs( - [] // queries (optional) -); +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 index 35fb7497de..0eb3d5db71 100644 --- 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 @@ -7,4 +7,4 @@ const client = new Client() const account = new Account(client); -const response = await account.listMfaFactors(); +const response = await account.listMFAFactors(); 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 index 0753cff9fd..746309ebcf 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updateEmail( - 'email@example.com', // email - 'password' // password -); +const response = await account.updateEmail({ + email: 'email@example.com', + password: 'password' +}); 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-url-session.md similarity index 71% rename from docs/examples/1.8.x/server-deno/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/server-deno/examples/account/update-magic-url-session.md index a83c1d91a4..b40824b1bf 100644 --- 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-url-session.md @@ -6,7 +6,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updateMagicURLSession( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const response = await account.updateMagicURLSession({ + userId: '<USER_ID>', + 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 index 6b95818e06..1049f6a200 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updateMfaAuthenticator( - AuthenticatorType.Totp, // type - '<OTP>' // otp -); +const response = await account.updateMFAAuthenticator({ + type: AuthenticatorType.Totp, + 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 index 61a7b44fd0..9ee0825c47 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updateMfaChallenge( - '<CHALLENGE_ID>', // challengeId - '<OTP>' // otp -); +const response = await account.updateMFAChallenge({ + challengeId: '<CHALLENGE_ID>', + 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 index 2030e1c551..eae8560014 100644 --- 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 @@ -7,4 +7,4 @@ const client = new Client() const account = new Account(client); -const response = await account.updateMfaRecoveryCodes(); +const response = await account.updateMFARecoveryCodes(); 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-mfa.md similarity index 84% rename from docs/examples/1.8.x/server-deno/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/server-deno/examples/account/update-mfa.md index 24611aa43a..ab496cd391 100644 --- 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-mfa.md @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.updateMFA( - false // mfa -); +const response = await account.updateMFA({ + mfa: false +}); 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 index a02591b3b5..c62bcf1a60 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.updateName( - '<NAME>' // name -); +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 index 088bea88ac..1bd388a1f8 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updatePassword( - '', // password - 'password' // oldPassword (optional) -); +const response = await account.updatePassword({ + password: '', + oldPassword: 'password' // 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 index 4710a451a8..4a86183e79 100644 --- 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 @@ -6,7 +6,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updatePhoneSession( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const response = await account.updatePhoneSession({ + userId: '<USER_ID>', + 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 index 3b150c8c4a..30f9b40d0a 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updatePhoneVerification( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const response = await account.updatePhoneVerification({ + userId: '<USER_ID>', + 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 index 9c1923c217..821c279189 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updatePhone( - '+12065550100', // phone - 'password' // password -); +const response = await account.updatePhone({ + phone: '+12065550100', + 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 index 4b37a64fe7..f7bb254503 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.updatePrefs( - {} // prefs -); +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 index 5d0d80f956..031b6a3c90 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const account = new Account(client); -const response = await account.updateRecovery( - '<USER_ID>', // userId - '<SECRET>', // secret - '' // password -); +const response = await account.updateRecovery({ + userId: '<USER_ID>', + 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 index cb36b9491e..cccd5d2cbf 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.updateSession( - '<SESSION_ID>' // sessionId -); +const response = await account.updateSession({ + sessionId: '<SESSION_ID>' +}); 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 index 96370858cd..1ef9050479 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updateVerification( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const response = await account.updateVerification({ + userId: '<USER_ID>', + 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 index 5443200b39..fbef7eef36 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getBrowser( - Browser.AvantBrowser, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getBrowser({ + code: Browser.AvantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index 8bcc67e08c..c4323c3264 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getCreditCard( - CreditCard.AmericanExpress, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getCreditCard({ + code: CreditCard.AmericanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index cca313a9a2..5a1a0020c2 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFavicon( - 'https://example.com' // url -); +const result = avatars.getFavicon({ + url: 'https://example.com' +}); 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 index 6837438c10..7032c4870c 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFlag( - Flag.Afghanistan, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getFlag({ + code: Flag.Afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index 2960daba8d..d4012ed847 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getImage( - 'https://example.com', // url - 0, // width (optional) - 0 // height (optional) -); +const result = avatars.getImage({ + url: 'https://example.com', + width: 0, // optional + height: 0 // 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 index 10eb2d80b8..c08699715f 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getInitials( - '<NAME>', // name (optional) - 0, // width (optional) - 0, // height (optional) - '' // background (optional) -); +const result = avatars.getInitials({ + name: '<NAME>', // optional + width: 0, // optional + height: 0, // 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-qr.md similarity index 70% rename from docs/examples/1.8.x/server-deno/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/server-deno/examples/avatars/get-qr.md index d9ccc0dbca..096014b587 100644 --- 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-qr.md @@ -7,9 +7,9 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getQR( - '<TEXT>', // text - 1, // size (optional) - 0, // margin (optional) - false // download (optional) -); +const result = avatars.getQR({ + text: '<TEXT>', + size: 1, // optional + margin: 0, // optional + download: false // 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 index b216c2ead3..fbcdde43d5 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/databases/create-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/create-collection.md index c7e8026758..9b2776a83e 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-datetime-attribute.md index 664da19de2..80dec8c45c 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createDatetimeAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); +const response = 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-deno/examples/databases/create-document.md b/docs/examples/1.8.x/server-deno/examples/databases/create-document.md index be8a1bdac9..784b7dd530 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 @@ -7,10 +7,10 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const response = 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-deno/examples/databases/create-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md index 26c9796cf0..71011dad3f 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 @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // documents -); +const response = await databases.createDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 6c667ed38a..6206a74f3e 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-enum-attribute.md index 6fdd2773c8..b8555bf3b6 100644 --- 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 @@ -7,12 +7,12 @@ const client = new Client() 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) -); +const response = 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-deno/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-float-attribute.md index c5991d49f6..3cec0ee168 100644 --- 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 @@ -7,13 +7,13 @@ const client = new Client() 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) -); +const response = await databases.createFloatAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<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-deno/examples/databases/create-index.md b/docs/examples/1.8.x/server-deno/examples/databases/create-index.md index 3ab3c7a3aa..b2be093e11 100644 --- 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 @@ -7,12 +7,12 @@ const client = new Client() 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) -); +const response = 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-deno/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-integer-attribute.md index 4a306cd50d..37ba43aa73 100644 --- 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 @@ -7,13 +7,13 @@ const client = new Client() 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) -); +const response = await databases.createIntegerAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<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-deno/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-ip-attribute.md index c043b25207..047622d7a9 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createIpAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); +const response = 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-deno/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-relationship-attribute.md index d96ee59a4d..39c73d0ae0 100644 --- 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 @@ -7,13 +7,13 @@ const client = new Client() 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) -); +const response = 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-deno/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-string-attribute.md index 5f8e955541..17d4aa1dbf 100644 --- 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 @@ -7,13 +7,13 @@ const client = new Client() 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) -); +const response = 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-deno/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-url-attribute.md index 4639f75f5b..f60423cdba 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/databases/create.md b/docs/examples/1.8.x/server-deno/examples/databases/create.md index 86795eb750..63e547105c 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.create( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); +const response = await databases.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // 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 index 0142188185..52d71921f6 100644 --- 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 @@ -3,15 +3,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 + .setSession(''); // The user session to authenticate with 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) -); +const response = await databases.decrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: null, // optional + min: null // 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 index f7ad6b105a..d41c512994 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.deleteAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const response = await databases.deleteAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 828d48a7bc..d2a2b7096d 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.deleteCollection( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId -); +const response = await databases.deleteCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +}); 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 index 47d5df49f1..6efe03f05b 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.deleteDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId -); +const response = await databases.deleteDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>' +}); 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 index 4768ed426b..b63a960a3f 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.deleteDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const response = await databases.deleteDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index eee1613a87..c2f2969683 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.deleteIndex( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const response = await databases.deleteIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 39b3f5395e..e14a83ce1f 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete.md @@ -7,6 +7,6 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.delete( - '<DATABASE_ID>' // databaseId -); +const response = await databases.delete({ + databaseId: '<DATABASE_ID>' +}); 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 index f2b801b5f1..efe21550a1 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.getAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const response = await databases.getAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index b94f4fd5ff..0745ad9f34 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.getCollection( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId -); +const response = await databases.getCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +}); 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 index 5cb02c4de3..fb8415895d 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.getDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - [] // queries (optional) -); +const response = await databases.getDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + 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 index 6c3a3dec1a..235eed6ff2 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.getIndex( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const response = await databases.getIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 403e467e04..0891f72562 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/get.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/get.md @@ -7,6 +7,6 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.get( - '<DATABASE_ID>' // databaseId -); +const response = await databases.get({ + databaseId: '<DATABASE_ID>' +}); 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 index 9202a94bb9..c32c48498f 100644 --- 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 @@ -3,15 +3,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 + .setSession(''); // The user session to authenticate with 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) -); +const response = await databases.incrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: null, // optional + max: null // 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 index 2171ffe4ad..39de5d4e41 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.listAttributes( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const response = await databases.listAttributes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 408ea2d601..264be3c2fd 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.listCollections( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await databases.listCollections({ + databaseId: '<DATABASE_ID>', + 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 index 528e979517..5c3899882a 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.listDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const response = await databases.listDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 88af3b7f28..628a434fae 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.listIndexes( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const response = await databases.listIndexes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index dcae151617..4ba17dd9e5 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/list.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/list.md @@ -7,7 +7,7 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index fe1b80073a..28e4718978 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateBooleanAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - false, // default - '' // newKey (optional) -); +const response = 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-deno/examples/databases/update-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/update-collection.md index 47f1c02783..89b2d0e5f9 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-datetime-attribute.md index ad18d93865..9e9116b58d 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateDatetimeAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default - '' // newKey (optional) -); +const response = await databases.updateDatetimeAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + 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 index 31cce5ed1c..2a59177970 100644 --- 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 @@ -7,10 +7,10 @@ const client = new Client() 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) -); +const response = 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-deno/examples/databases/update-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/update-documents.md index 1eef7794fb..15c4a90c97 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - {}, // data (optional) - [] // queries (optional) -); +const response = await databases.updateDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 116fadc6c7..ff6cf2196d 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-enum-attribute.md index 663e44b530..60f84fd5ea 100644 --- 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 @@ -7,12 +7,12 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateEnumAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default - '' // newKey (optional) -); +const response = 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-deno/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-float-attribute.md index d9eab5aac5..3a6640732e 100644 --- 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 @@ -7,13 +7,13 @@ const client = new Client() 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) -); +const response = await databases.updateFloatAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // 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 index 369b49d574..679eeaa28e 100644 --- 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 @@ -7,13 +7,13 @@ const client = new Client() 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) -); +const response = await databases.updateIntegerAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // 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 index 049a527993..d4145f481b 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateIpAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default - '' // newKey (optional) -); +const response = await databases.updateIpAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + 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 index 7fae26b535..3c9e9acb46 100644 --- 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 @@ -7,10 +7,10 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateRelationshipAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); +const response = 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-deno/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-string-attribute.md index ec91d3367e..ec0dd8bf1e 100644 --- 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 @@ -7,12 +7,12 @@ const client = new Client() 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) -); +const response = 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-deno/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-url-attribute.md index 32f44b7eaf..f59ae750a8 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/databases/update.md b/docs/examples/1.8.x/server-deno/examples/databases/update.md index b87ad82ec0..9df4fca32c 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.update( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); +const response = await databases.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // 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 index f05100e3df..27eb1e19c1 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 @@ -7,10 +7,10 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.upsertDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const response = 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-deno/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md index 0cd804bfb6..ea6fea6e89 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 @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.upsertDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // documents -); +const response = await databases.upsertDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [] +}); 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 index a134a382fa..4f27138d81 100644 --- 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 @@ -7,10 +7,10 @@ const client = new Client() 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) -); +const response = await functions.createDeployment({ + functionId: '<FUNCTION_ID>', + code: InputFile.fromPath('/path/to/file.png', 'file.png'), + activate: false, + 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 index e22d1da72a..b8c7e43fce 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.createDuplicateDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>', // deploymentId - '<BUILD_ID>' // buildId (optional) -); +const response = await functions.createDuplicateDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>' // 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 index 58c6c494b1..651a5c9024 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 @@ -7,12 +7,12 @@ const client = new Client() 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) - '<SCHEDULED_AT>' // scheduledAt (optional) -); +const response = await functions.createExecution({ + functionId: '<FUNCTION_ID>', + body: '<BODY>', // optional + async: false, // optional + path: '<PATH>', // optional + method: ExecutionMethod.GET, // optional + headers: {}, // optional + scheduledAt: '<SCHEDULED_AT>' // 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 index 69503da6a9..6e8b932852 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/functions/create-variable.md b/docs/examples/1.8.x/server-deno/examples/functions/create-variable.md index 28648901ee..4e871c6f61 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.createVariable( - '<FUNCTION_ID>', // functionId - '<KEY>', // key - '<VALUE>', // value - false // secret (optional) -); +const response = await functions.createVariable({ + functionId: '<FUNCTION_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // 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 index d501b0ee26..7a108248f0 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.createVcsDeployment( - '<FUNCTION_ID>', // functionId - VCSDeploymentType.Branch, // type - '<REFERENCE>', // reference - false // activate (optional) -); +const response = await functions.createVcsDeployment({ + functionId: '<FUNCTION_ID>', + type: VCSDeploymentType.Branch, + reference: '<REFERENCE>', + activate: false // 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 index 32265deb0b..4681bd6a83 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/create.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/create.md @@ -7,23 +7,23 @@ const client = new Client() 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) -); +const response = 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-deno/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/delete-deployment.md index 179bbaf303..11c2e9238a 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.deleteDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await functions.deleteDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index 4ab7c37785..95185ab894 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.deleteExecution( - '<FUNCTION_ID>', // functionId - '<EXECUTION_ID>' // executionId -); +const response = await functions.deleteExecution({ + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +}); 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 index 39a9428ed3..d3387fd256 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.deleteVariable( - '<FUNCTION_ID>', // functionId - '<VARIABLE_ID>' // variableId -); +const response = await functions.deleteVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +}); 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 index 94d58c33dd..9270762a4a 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/delete.md @@ -7,6 +7,6 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.delete( - '<FUNCTION_ID>' // functionId -); +const response = await functions.delete({ + functionId: '<FUNCTION_ID>' +}); 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 index d153036c9a..34971111a0 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const functions = new Functions(client); -const result = functions.getDeploymentDownload( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>', // deploymentId - DeploymentDownloadType.Source // type (optional) -); +const result = functions.getDeploymentDownload({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.Source // 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 index 339b99d4f1..e125fa598d 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.getDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await functions.getDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index adeff0256a..d52b60ea8e 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.getExecution( - '<FUNCTION_ID>', // functionId - '<EXECUTION_ID>' // executionId -); +const response = await functions.getExecution({ + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +}); 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 index cbbdd2f847..e5916c7615 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.getVariable( - '<FUNCTION_ID>', // functionId - '<VARIABLE_ID>' // variableId -); +const response = await functions.getVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +}); 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 index 8fec17ed15..c4678f0b08 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/get.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/get.md @@ -7,6 +7,6 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.get( - '<FUNCTION_ID>' // functionId -); +const response = await functions.get({ + functionId: '<FUNCTION_ID>' +}); 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 index 849fe232b8..6d1718da39 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.listDeployments( - '<FUNCTION_ID>', // functionId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await functions.listDeployments({ + functionId: '<FUNCTION_ID>', + 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 index cd597fb7a5..101d4ec55e 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.listExecutions( - '<FUNCTION_ID>', // functionId - [] // queries (optional) -); +const response = await functions.listExecutions({ + functionId: '<FUNCTION_ID>', + queries: [] // optional +}); 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 index 173d5aa9ef..6bc904b605 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.listVariables( - '<FUNCTION_ID>' // functionId -); +const response = await functions.listVariables({ + functionId: '<FUNCTION_ID>' +}); 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 index ecc43d1a7c..bb0475d0bc 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/list.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/list.md @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 4c7e8052c1..d6b6cddec0 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.updateDeploymentStatus( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await functions.updateDeploymentStatus({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index 55196c148d..1e0b5542a5 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.updateFunctionDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await functions.updateFunctionDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index 3da706d5f4..cff5cc43f4 100644 --- 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 @@ -7,10 +7,10 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.updateVariable( - '<FUNCTION_ID>', // functionId - '<VARIABLE_ID>', // variableId - '<KEY>', // key - '<VALUE>', // value (optional) - false // secret (optional) -); +const response = 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-deno/examples/functions/update.md b/docs/examples/1.8.x/server-deno/examples/functions/update.md index 399af05841..0a743693f7 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/update.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/update.md @@ -7,23 +7,23 @@ const client = new Client() 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) -); +const response = 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-deno/examples/graphql/mutation.md b/docs/examples/1.8.x/server-deno/examples/graphql/mutation.md index 200120f1e8..67716b21df 100644 --- a/docs/examples/1.8.x/server-deno/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/server-deno/examples/graphql/mutation.md @@ -7,6 +7,6 @@ const client = new Client() const graphql = new Graphql(client); -const response = await graphql.mutation( - {} // query -); +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 index bb0116278c..e80f795851 100644 --- a/docs/examples/1.8.x/server-deno/examples/graphql/query.md +++ b/docs/examples/1.8.x/server-deno/examples/graphql/query.md @@ -7,6 +7,6 @@ const client = new Client() const graphql = new Graphql(client); -const response = await graphql.query( - {} // query -); +const response = await graphql.query({ + query: {} +}); 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-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-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/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-deno/examples/health/get-certificate.md b/docs/examples/1.8.x/server-deno/examples/health/get-certificate.md index 828e53dd7b..388fce9f2c 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getCertificate( - '' // domain (optional) -); +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-db.md similarity index 100% rename from docs/examples/1.8.x/server-deno/examples/health/get-d-b.md rename to docs/examples/1.8.x/server-deno/examples/health/get-db.md 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 index 5e40f762e4..a8202355ad 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const health = new Health(client); -const response = await health.getFailedJobs( - .V1Database, // name - null // threshold (optional) -); +const response = await health.getFailedJobs({ + name: .V1Database, + threshold: null // optional +}); 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 index f6b9388bb3..d247f48e2e 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueBuilds( - null // threshold (optional) -); +const response = await health.getQueueBuilds({ + threshold: null // 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 index e783fa52b3..c43cffb5dd 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueCertificates( - null // threshold (optional) -); +const response = await health.getQueueCertificates({ + threshold: null // 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 index e33c7a2929..9c126dc611 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueDatabases( - '<NAME>', // name (optional) - null // threshold (optional) -); +const response = await health.getQueueDatabases({ + name: '<NAME>', // optional + threshold: null // 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 index ea7da5b587..240cfe34fc 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueDeletes( - null // threshold (optional) -); +const response = await health.getQueueDeletes({ + threshold: null // 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 index e075a65602..333b5abc09 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueFunctions( - null // threshold (optional) -); +const response = await health.getQueueFunctions({ + threshold: null // 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 index eb7ffb028a..787768506a 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueLogs( - null // threshold (optional) -); +const response = await health.getQueueLogs({ + threshold: null // 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 index d9f61bc088..3ec4b390a3 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueMails( - null // threshold (optional) -); +const response = await health.getQueueMails({ + threshold: null // 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 index 8bc76398d9..6d5bf48cc8 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueMessaging( - null // threshold (optional) -); +const response = await health.getQueueMessaging({ + threshold: null // 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 index e6f7bf543c..520b92de2d 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueMigrations( - null // threshold (optional) -); +const response = await health.getQueueMigrations({ + threshold: null // 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 index ecc7ebd322..8f22c23211 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueStatsResources( - null // threshold (optional) -); +const response = await health.getQueueStatsResources({ + threshold: null // 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 index 46aa4db5be..69ab874051 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueUsage( - null // threshold (optional) -); +const response = await health.getQueueUsage({ + threshold: null // 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 index 75a1c1f833..0e14d7cd16 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueWebhooks( - null // threshold (optional) -); +const response = await health.getQueueWebhooks({ + threshold: null // optional +}); 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-eu.md similarity index 100% rename from docs/examples/1.8.x/server-deno/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/server-deno/examples/locale/list-countries-eu.md 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 index e2c33feff8..b32386b2a5 100644 --- 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 @@ -7,13 +7,13 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/create-email.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-email.md index 8db2879f9c..8ba3db8ddf 100644 --- 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 @@ -7,17 +7,17 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-fcm-provider.md index 3f443d6bf5..bea200d78b 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createFcmProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - {}, // serviceAccountJSON (optional) - false // enabled (optional) -); +const response = await messaging.createFCMProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: {}, // optional + enabled: false // 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 index 32f7c94f21..2eaa888ecd 100644 --- 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 @@ -7,15 +7,15 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-msg-91-provider.md similarity index 54% rename from docs/examples/1.8.x/server-deno/examples/messaging/create-msg91provider.md rename to docs/examples/1.8.x/server-deno/examples/messaging/create-msg-91-provider.md index 57e94188b9..b9f3238080 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-msg91provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-msg-91-provider.md @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/create-push.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-push.md index 7523c2978f..efa40ce1e7 100644 --- 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 @@ -7,24 +7,24 @@ const client = new Client() 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) -); +const response = 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: null, // 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-deno/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-sendgrid-provider.md index 15fe7b8c7b..10ce45e381 100644 --- 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 @@ -7,13 +7,13 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-sms.md index 264203a8be..bf81ff9bcd 100644 --- 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 @@ -7,12 +7,12 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-smtp-provider.md index 2d6d33c62a..06307b3026 100644 --- 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 @@ -7,19 +7,19 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-subscriber.md index 8be79f3f9e..671c6ea089 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>', // subscriberId - '<TARGET_ID>' // targetId -); +const response = await messaging.createSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>' +}); 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 index 2bb95c4e2d..0c9376b2a6 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-textmagic-provider.md index 4657493664..1bf61f9f1d 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-topic.md index c2ca3a4ed2..a15699b1d7 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createTopic( - '<TOPIC_ID>', // topicId - '<NAME>', // name - ["any"] // subscribe (optional) -); +const response = await messaging.createTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] // 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 index aa7bbf6a18..cd889f01f1 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-vonage-provider.md index 5fe734fb0c..e03b0b6e55 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/delete-provider.md index 7bc99ef3b5..2e0855a00c 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.deleteProvider( - '<PROVIDER_ID>' // providerId -); +const response = await messaging.deleteProvider({ + providerId: '<PROVIDER_ID>' +}); 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 index 147456887d..c48c9de4cf 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.deleteSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>' // subscriberId -); +const response = await messaging.deleteSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +}); 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 index aa1359cf28..5dd1317339 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.deleteTopic( - '<TOPIC_ID>' // topicId -); +const response = await messaging.deleteTopic({ + topicId: '<TOPIC_ID>' +}); 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 index 0442da1e8b..8b4357fd2b 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/delete.md @@ -7,6 +7,6 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.delete( - '<MESSAGE_ID>' // messageId -); +const response = await messaging.delete({ + messageId: '<MESSAGE_ID>' +}); 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 index 9565a611ae..f0e4c5b8d9 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.getMessage( - '<MESSAGE_ID>' // messageId -); +const response = await messaging.getMessage({ + messageId: '<MESSAGE_ID>' +}); 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 index 8e5d426418..18ce92a49b 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.getProvider( - '<PROVIDER_ID>' // providerId -); +const response = await messaging.getProvider({ + providerId: '<PROVIDER_ID>' +}); 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 index e9377a532f..4916e27700 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.getSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>' // subscriberId -); +const response = await messaging.getSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +}); 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 index 35f1853ada..baf1f39d11 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.getTopic( - '<TOPIC_ID>' // topicId -); +const response = await messaging.getTopic({ + topicId: '<TOPIC_ID>' +}); 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 index f39a90037a..b470dbcec4 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listMessageLogs( - '<MESSAGE_ID>', // messageId - [] // queries (optional) -); +const response = await messaging.listMessageLogs({ + messageId: '<MESSAGE_ID>', + 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 index 50b1a10f4b..a1bd90ae29 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listMessages( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index c4b20a8306..9784ff30c3 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listProviderLogs( - '<PROVIDER_ID>', // providerId - [] // queries (optional) -); +const response = await messaging.listProviderLogs({ + providerId: '<PROVIDER_ID>', + 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 index 7c877c25de..150de6fed8 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listProviders( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 0d14f85777..ccc575ca10 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listSubscriberLogs( - '<SUBSCRIBER_ID>', // subscriberId - [] // queries (optional) -); +const response = await messaging.listSubscriberLogs({ + subscriberId: '<SUBSCRIBER_ID>', + 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 index 384bb8fe4f..68614ec71d 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listSubscribers( - '<TOPIC_ID>', // topicId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await messaging.listSubscribers({ + topicId: '<TOPIC_ID>', + 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 index 5ce2082236..6d269b72e8 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listTargets( - '<MESSAGE_ID>', // messageId - [] // queries (optional) -); +const response = await messaging.listTargets({ + messageId: '<MESSAGE_ID>', + 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 index d2c771d480..70b287a806 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listTopicLogs( - '<TOPIC_ID>', // topicId - [] // queries (optional) -); +const response = await messaging.listTopicLogs({ + topicId: '<TOPIC_ID>', + 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 index 1d0ec43066..073b78e843 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listTopics( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 71bd038edb..160786f480 100644 --- 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 @@ -7,13 +7,13 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/update-email.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-email.md index c8b0558250..0f281cd795 100644 --- 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 @@ -7,17 +7,17 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-fcm-provider.md index eb71dddd1a..b76e03736d 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateFcmProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - {} // serviceAccountJSON (optional) -); +const response = await messaging.updateFCMProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // 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 index f80d6a4b1d..b4f88e8695 100644 --- 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 @@ -7,15 +7,15 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-msg-91-provider.md similarity index 53% rename from docs/examples/1.8.x/server-deno/examples/messaging/update-msg91provider.md rename to docs/examples/1.8.x/server-deno/examples/messaging/update-msg-91-provider.md index 36943f2fa0..5cf61cb872 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-msg91provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-msg-91-provider.md @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/update-push.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-push.md index c7f068604b..fb776fd489 100644 --- 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 @@ -7,24 +7,24 @@ const client = new Client() 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) -); +const response = 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: null, // 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-deno/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-sendgrid-provider.md index 0ec96db2f8..edf82f6807 100644 --- 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 @@ -7,13 +7,13 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-sms.md index 9c1dc4a5dc..9d7f3a3c2f 100644 --- 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 @@ -7,12 +7,12 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-smtp-provider.md index 9d59bb3646..6fc0021a3a 100644 --- 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 @@ -7,19 +7,19 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-telesign-provider.md index 052d394f05..defb10e246 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-textmagic-provider.md index 2163792f83..c859643999 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-topic.md index 5f7f77901b..7dc9337de8 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateTopic( - '<TOPIC_ID>', // topicId - '<NAME>', // name (optional) - ["any"] // subscribe (optional) -); +const response = await messaging.updateTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', // optional + subscribe: ["any"] // 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 index 5abdd65a9c..75940f5618 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-vonage-provider.md index c8fa90d9ab..fea4465c18 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-deployment.md index f674553a10..81a0527633 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = await sites.createDeployment({ + siteId: '<SITE_ID>', + code: InputFile.fromPath('/path/to/file.png', '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-deno/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-duplicate-deployment.md index 317e80b312..515257170c 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.createDuplicateDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await sites.createDuplicateDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index 4ef245bd16..e9b569d5f5 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/sites/create-variable.md b/docs/examples/1.8.x/server-deno/examples/sites/create-variable.md index 7b07a088ce..ab5e143454 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.createVariable( - '<SITE_ID>', // siteId - '<KEY>', // key - '<VALUE>', // value - false // secret (optional) -); +const response = await sites.createVariable({ + siteId: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // 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 index 5c49808811..7c7b7cca53 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.createVcsDeployment( - '<SITE_ID>', // siteId - VCSDeploymentType.Branch, // type - '<REFERENCE>', // reference - false // activate (optional) -); +const response = await sites.createVcsDeployment({ + siteId: '<SITE_ID>', + type: VCSDeploymentType.Branch, + reference: '<REFERENCE>', + activate: false // 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 index 420b36290b..7161da53a3 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/create.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/create.md @@ -7,23 +7,23 @@ const client = new Client() 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) -); +const response = 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-deno/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/delete-deployment.md index cd97673387..4164f478c0 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.deleteDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await sites.deleteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index 0b70eb30b6..f70a8fb93d 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.deleteLog( - '<SITE_ID>', // siteId - '<LOG_ID>' // logId -); +const response = await sites.deleteLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +}); 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 index 0bbc2e33dc..226b2f14bc 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.deleteVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>' // variableId -); +const response = await sites.deleteVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +}); 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 index af5dbed3f2..2af4f53986 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/delete.md @@ -7,6 +7,6 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.delete( - '<SITE_ID>' // siteId -); +const response = await sites.delete({ + siteId: '<SITE_ID>' +}); 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 index 4c3ceca8ae..40731b1d6a 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const sites = new Sites(client); -const result = sites.getDeploymentDownload( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>', // deploymentId - DeploymentDownloadType.Source // type (optional) -); +const result = sites.getDeploymentDownload({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.Source // 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 index 4e614b0de9..ed23bd15fb 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.getDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await sites.getDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index 9495030fa3..30cd601868 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.getLog( - '<SITE_ID>', // siteId - '<LOG_ID>' // logId -); +const response = await sites.getLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +}); 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 index 12ab553026..e070d2e1e6 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.getVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>' // variableId -); +const response = await sites.getVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +}); 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 index 769f426d1e..80cc792ed0 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/get.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/get.md @@ -7,6 +7,6 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.get( - '<SITE_ID>' // siteId -); +const response = await sites.get({ + siteId: '<SITE_ID>' +}); 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 index 09cc52194f..013b62126e 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.listDeployments( - '<SITE_ID>', // siteId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await sites.listDeployments({ + siteId: '<SITE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +}); 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 index 3249903c07..6ab920a96e 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.listLogs( - '<SITE_ID>', // siteId - [] // queries (optional) -); +const response = await sites.listLogs({ + siteId: '<SITE_ID>', + queries: [] // optional +}); 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 index 0aac319816..ed7176289f 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.listVariables( - '<SITE_ID>' // siteId -); +const response = await sites.listVariables({ + siteId: '<SITE_ID>' +}); 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 index f21433d794..87f9ef3bdf 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/list.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/list.md @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 83fe6f85a0..e634de99b8 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.updateDeploymentStatus( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await sites.updateDeploymentStatus({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index 1d9d697d39..c6ee03bfb4 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.updateSiteDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await sites.updateSiteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index 6776af7a65..5bc179dd3e 100644 --- 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 @@ -7,10 +7,10 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.updateVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>', // variableId - '<KEY>', // key - '<VALUE>', // value (optional) - false // secret (optional) -); +const response = 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-deno/examples/sites/update.md b/docs/examples/1.8.x/server-deno/examples/sites/update.md index ba7d195cd3..1f5235cca2 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/update.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/update.md @@ -7,23 +7,23 @@ const client = new Client() 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) -); +const response = 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-deno/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-deno/examples/storage/create-bucket.md index e7d3e9006a..1f996b1369 100644 --- 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 @@ -7,15 +7,15 @@ const client = new Client() 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) -); +const response = 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-deno/examples/storage/create-file.md b/docs/examples/1.8.x/server-deno/examples/storage/create-file.md index d8912c6c1e..4b6c1fd78a 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() 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) -); +const response = await storage.createFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: InputFile.fromPath('/path/to/file.png', 'file.png'), + permissions: ["read("any")"] // 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 index f0d71467d4..d5f2e365f8 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.deleteBucket( - '<BUCKET_ID>' // bucketId -); +const response = await storage.deleteBucket({ + bucketId: '<BUCKET_ID>' +}); 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 index 2a1f95ed18..3f9f2ac566 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.deleteFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>' // fileId -); +const response = await storage.deleteFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +}); 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 index a695021b72..ffb191326d 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.getBucket( - '<BUCKET_ID>' // bucketId -); +const response = await storage.getBucket({ + bucketId: '<BUCKET_ID>' +}); 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 index df11f40b80..fa1b465c59 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileDownload( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<TOKEN>' // token (optional) -); +const result = storage.getFileDownload({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + 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 index 6457c7831b..884a84a95f 100644 --- 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 @@ -7,19 +7,19 @@ const client = new Client() 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) -); +const 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 +}); 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 index 5a1dbac86a..86a357a23c 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileView( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<TOKEN>' // token (optional) -); +const result = storage.getFileView({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + 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 index 5479dc569d..604696a08c 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.getFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>' // fileId -); +const response = await storage.getFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +}); 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 index 9286bd488c..56bba163c6 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.listBuckets( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 316875cf51..e2ea466b9b 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.listFiles( - '<BUCKET_ID>', // bucketId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await storage.listFiles({ + bucketId: '<BUCKET_ID>', + 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 index 1e70f16ef3..b0adba1ef3 100644 --- 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 @@ -7,15 +7,15 @@ const client = new Client() 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) -); +const response = 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-deno/examples/storage/update-file.md b/docs/examples/1.8.x/server-deno/examples/storage/update-file.md index 683b0b7304..1a28c98c3f 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.updateFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<NAME>', // name (optional) - ["read("any")"] // permissions (optional) -); +const response = 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-deno/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..7407b583a6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..f139666946 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.createDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..a004a895e0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-email-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..1f40abd73b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-enum-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..5d555a73bd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-float-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.createFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<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-deno/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..0e164ed29e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-index.md @@ -0,0 +1,18 @@ +import { Client, TablesDB, 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 tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..297b096234 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-integer-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.createIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<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-deno/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..95b20b8803 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-ip-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.createIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..27952f7ea6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDB, 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 tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..dadb5ecfb0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-row.md @@ -0,0 +1,16 @@ +import { Client, TablesDB } from "https://deno.land/x/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 tablesDB = new TablesDB(client); + +const response = await tablesDB.createRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..a3fafcfe94 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-rows.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.createRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..ff0816a946 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-string-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-table.md new file mode 100644 index 0000000000..5dcaac40f6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-table.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..f019bab896 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-url-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/create.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create.md new file mode 100644 index 0000000000..5971eb18c7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..68c2fa458f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/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 tablesDB = new TablesDB(client); + +const response = await tablesDB.decrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + min: null // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..63b567aacf --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-column.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.deleteColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..15a98fbe0f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-index.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.deleteIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..2f63a91387 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-row.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/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 tablesDB = new TablesDB(client); + +const response = await tablesDB.deleteRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..310b189c96 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-rows.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.deleteRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..3f36527998 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-table.md @@ -0,0 +1,13 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.deleteTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-database.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete.md similarity index 53% rename from docs/examples/1.8.x/server-deno/examples/grids/delete-database.md rename to docs/examples/1.8.x/server-deno/examples/tablesdb/delete.md index aad02459e4..12249aba90 100644 --- a/docs/examples/1.8.x/server-deno/examples/grids/delete-database.md +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete.md @@ -1,12 +1,12 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.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 tablesDB = new TablesDB(client); -const response = await grids.deleteDatabase( - '<DATABASE_ID>' // databaseId -); +const response = await tablesDB.delete({ + databaseId: '<DATABASE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..16bb38a760 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-column.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.getColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..47e7a61251 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-index.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.getIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..c662df22d8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-row.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "https://deno.land/x/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 tablesDB = new TablesDB(client); + +const response = await tablesDB.getRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [] // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..6a46bbde35 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-table.md @@ -0,0 +1,13 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.getTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-database.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/get.md similarity index 54% rename from docs/examples/1.8.x/server-deno/examples/grids/get-database.md rename to docs/examples/1.8.x/server-deno/examples/tablesdb/get.md index c1fecfeff7..4304258d6c 100644 --- a/docs/examples/1.8.x/server-deno/examples/grids/get-database.md +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/get.md @@ -1,12 +1,12 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.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 tablesDB = new TablesDB(client); -const response = await grids.getDatabase( - '<DATABASE_ID>' // databaseId -); +const response = await tablesDB.get({ + databaseId: '<DATABASE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..a57683e91e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/increment-row-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/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 tablesDB = new TablesDB(client); + +const response = await tablesDB.incrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + max: null // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..2a1cbe23d5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-columns.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.listColumns({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..7a0af70d2b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-indexes.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.listIndexes({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..2a0949993f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-rows.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/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 tablesDB = new TablesDB(client); + +const response = await tablesDB.listRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..0ffd1b9593 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-tables.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.listTables({ + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>' // 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/tablesdb/list.md similarity index 50% rename from docs/examples/1.8.x/server-deno/examples/grids/get-table.md rename to docs/examples/1.8.x/server-deno/examples/tablesdb/list.md index 5b9c36ab44..529bd64318 100644 --- a/docs/examples/1.8.x/server-deno/examples/grids/get-table.md +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/list.md @@ -1,13 +1,13 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.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 tablesDB = new TablesDB(client); -const response = await grids.getTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); +const response = await tablesDB.list({ + queries: [], // optional + search: '<SEARCH>' // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..ebc0bfb01e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.updateBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..a2672c8a12 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.updateDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..18fc845316 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-email-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..e282ec8e42 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-enum-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.updateEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..6ee1c5a955 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-float-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.updateFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..1d9968362a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-integer-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.updateIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..d69e0f1ab6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-ip-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.updateIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..3f361e091e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,16 @@ +import { Client, TablesDB, 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 tablesDB = new TablesDB(client); + +const response = await tablesDB.updateRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate.Cascade, // optional + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..53848c7300 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-row.md @@ -0,0 +1,16 @@ +import { Client, TablesDB } from "https://deno.land/x/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 tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..2a3e3f106d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.updateRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: {}, // optional + queries: [] // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..ff532ae23c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-string-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-table.md new file mode 100644 index 0000000000..c0453f66d3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-table.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..a594499053 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-url-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/update.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update.md new file mode 100644 index 0000000000..f309641f7f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..701e1a272f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/upsert-row.md @@ -0,0 +1,16 @@ +import { Client, TablesDB } from "https://deno.land/x/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 tablesDB = new TablesDB(client); + +const response = await tablesDB.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-deno/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..a5fa731fdc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/upsert-rows.md @@ -0,0 +1,14 @@ +import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new TablesDB(client); + +const response = await tablesDB.upsertRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +}); 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 index d8e855f852..27e4ec722a 100644 --- 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 @@ -7,12 +7,12 @@ const client = new Client() 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) -); +const response = 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-deno/examples/teams/create.md b/docs/examples/1.8.x/server-deno/examples/teams/create.md index 495f26e006..0c921292b5 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/create.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/create.md @@ -7,8 +7,8 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.create( - '<TEAM_ID>', // teamId - '<NAME>', // name - [] // roles (optional) -); +const response = await teams.create({ + teamId: '<TEAM_ID>', + 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 index a5b03875d5..51fcd0c99d 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.deleteMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>' // membershipId -); +const response = await teams.deleteMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +}); 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 index 556fbb5ea5..e300ad5d69 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/delete.md @@ -7,6 +7,6 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.delete( - '<TEAM_ID>' // teamId -); +const response = await teams.delete({ + teamId: '<TEAM_ID>' +}); 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 index 75283bffc7..73b6a240c6 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.getMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>' // membershipId -); +const response = await teams.getMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +}); 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 index 442d8b139a..d2cdd8af10 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.getPrefs( - '<TEAM_ID>' // teamId -); +const response = await teams.getPrefs({ + teamId: '<TEAM_ID>' +}); 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 index 2e5803ca7b..41c81bc2ee 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/get.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/get.md @@ -7,6 +7,6 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.get( - '<TEAM_ID>' // teamId -); +const response = await teams.get({ + teamId: '<TEAM_ID>' +}); 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 index 0b7e6638e6..f781fffc48 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.listMemberships( - '<TEAM_ID>', // teamId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await teams.listMemberships({ + teamId: '<TEAM_ID>', + 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 index 6c08b5c80a..4bb0c41b98 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/list.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/list.md @@ -7,7 +7,7 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 48fc9cd8be..22ac429361 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.updateMembershipStatus( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>', // membershipId - '<USER_ID>', // userId - '<SECRET>' // secret -); +const response = await teams.updateMembershipStatus({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + 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 index be8651d724..3524cc5b4e 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.updateMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>', // membershipId - [] // roles -); +const response = await teams.updateMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + 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 index 6e2144b897..b7d7e0f837 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.updateName( - '<TEAM_ID>', // teamId - '<NAME>' // name -); +const response = await teams.updateName({ + teamId: '<TEAM_ID>', + 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 index dea8a368c4..5c7eaecf72 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.updatePrefs( - '<TEAM_ID>', // teamId - {} // prefs -); +const response = await teams.updatePrefs({ + teamId: '<TEAM_ID>', + 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 index 7c24738cb5..e0d5b4d7c2 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const tokens = new Tokens(client); -const response = await tokens.createFileToken( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '' // expire (optional) -); +const response = await tokens.createFileToken({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + 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 index b5e3adfa35..6c41ea5c0a 100644 --- a/docs/examples/1.8.x/server-deno/examples/tokens/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/tokens/delete.md @@ -7,6 +7,6 @@ const client = new Client() const tokens = new Tokens(client); -const response = await tokens.delete( - '<TOKEN_ID>' // tokenId -); +const response = await tokens.delete({ + tokenId: '<TOKEN_ID>' +}); 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 index 2bb827d870..a7bf23a1c8 100644 --- a/docs/examples/1.8.x/server-deno/examples/tokens/get.md +++ b/docs/examples/1.8.x/server-deno/examples/tokens/get.md @@ -7,6 +7,6 @@ const client = new Client() const tokens = new Tokens(client); -const response = await tokens.get( - '<TOKEN_ID>' // tokenId -); +const response = await tokens.get({ + tokenId: '<TOKEN_ID>' +}); 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 index 7208a53553..a33ac66191 100644 --- a/docs/examples/1.8.x/server-deno/examples/tokens/list.md +++ b/docs/examples/1.8.x/server-deno/examples/tokens/list.md @@ -7,8 +7,8 @@ const client = new Client() const tokens = new Tokens(client); -const response = await tokens.list( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - [] // queries (optional) -); +const response = await tokens.list({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + 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 index 4464a0ccf8..0524e05dc7 100644 --- a/docs/examples/1.8.x/server-deno/examples/tokens/update.md +++ b/docs/examples/1.8.x/server-deno/examples/tokens/update.md @@ -7,7 +7,7 @@ const client = new Client() const tokens = new Tokens(client); -const response = await tokens.update( - '<TOKEN_ID>', // tokenId - '' // expire (optional) -); +const response = await tokens.update({ + tokenId: '<TOKEN_ID>', + expire: '' // 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-argon-2-user.md similarity index 65% rename from docs/examples/1.8.x/server-deno/examples/users/create-m-d5user.md rename to docs/examples/1.8.x/server-deno/examples/users/create-argon-2-user.md index 8cc63cedbd..b08fbb9acd 100644 --- 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-argon-2-user.md @@ -7,9 +7,9 @@ const client = new Client() const users = new Users(client); -const response = await users.createMD5User( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const response = await users.createArgon2User({ + userId: '<USER_ID>', + email: 'email@example.com', + 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 index ddfb7f3b12..6501c0279a 100644 --- 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 @@ -7,9 +7,9 @@ const client = new Client() const users = new Users(client); -const response = await users.createBcryptUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const response = await users.createBcryptUser({ + userId: '<USER_ID>', + email: 'email@example.com', + 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-jwt.md similarity index 69% rename from docs/examples/1.8.x/server-deno/examples/users/create-j-w-t.md rename to docs/examples/1.8.x/server-deno/examples/users/create-jwt.md index 4c433aebdd..6cd2f3d62f 100644 --- 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-jwt.md @@ -7,8 +7,8 @@ const client = new Client() const users = new Users(client); -const response = await users.createJWT( - '<USER_ID>', // userId - '<SESSION_ID>', // sessionId (optional) - 0 // duration (optional) -); +const response = await users.createJWT({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', // optional + duration: 0 // 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-md-5-user.md similarity index 65% rename from docs/examples/1.8.x/server-deno/examples/users/create-argon2user.md rename to docs/examples/1.8.x/server-deno/examples/users/create-md-5-user.md index 7a6e0fb144..4af161f795 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create-argon2user.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create-md-5-user.md @@ -7,9 +7,9 @@ const client = new Client() const users = new Users(client); -const response = await users.createArgon2User( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const response = await users.createMD5User({ + userId: '<USER_ID>', + email: 'email@example.com', + 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 index 98ba71a845..fe8a4af08e 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.createMfaRecoveryCodes( - '<USER_ID>' // userId -); +const response = await users.createMFARecoveryCodes({ + userId: '<USER_ID>' +}); 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-ph-pass-user.md similarity index 65% rename from docs/examples/1.8.x/server-deno/examples/users/create-p-h-pass-user.md rename to docs/examples/1.8.x/server-deno/examples/users/create-ph-pass-user.md index 750b299074..d1f159a423 100644 --- 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-ph-pass-user.md @@ -7,9 +7,9 @@ const client = new Client() const users = new Users(client); -const response = await users.createPHPassUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const response = await users.createPHPassUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + 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 index 0d6a65b8b4..e382a4a4ff 100644 --- 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 @@ -7,12 +7,12 @@ const client = new Client() 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) -); +const response = 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-deno/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-user.md index 87f2dbb09e..7a6c8749c6 100644 --- 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 @@ -7,14 +7,14 @@ const client = new Client() 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) -); +const response = await 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 +}); 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 index 37d6948942..962d391185 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.createSession( - '<USER_ID>' // userId -); +const response = await users.createSession({ + userId: '<USER_ID>' +}); 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-sha-user.md similarity index 60% rename from docs/examples/1.8.x/server-deno/examples/users/create-s-h-a-user.md rename to docs/examples/1.8.x/server-deno/examples/users/create-sha-user.md index e243a1d6ee..325da0e6cd 100644 --- 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-sha-user.md @@ -7,10 +7,10 @@ const client = new Client() 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) -); +const response = 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-deno/examples/users/create-target.md b/docs/examples/1.8.x/server-deno/examples/users/create-target.md index a36072a5de..861c25afbd 100644 --- 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 @@ -7,11 +7,11 @@ const client = new Client() 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) -); +const response = 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-deno/examples/users/create-token.md b/docs/examples/1.8.x/server-deno/examples/users/create-token.md index 91885e15f3..b84d0959ec 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const users = new Users(client); -const response = await users.createToken( - '<USER_ID>', // userId - 4, // length (optional) - 60 // expire (optional) -); +const response = await users.createToken({ + userId: '<USER_ID>', + length: 4, // optional + expire: 60 // 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 index e0eb5856d1..7da9b9ad3e 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create.md @@ -7,10 +7,10 @@ const client = new Client() 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) -); +const response = 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-deno/examples/users/delete-identity.md b/docs/examples/1.8.x/server-deno/examples/users/delete-identity.md index 7aea654645..83efe6a3c5 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.deleteIdentity( - '<IDENTITY_ID>' // identityId -); +const response = await users.deleteIdentity({ + identityId: '<IDENTITY_ID>' +}); 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 index 2d7595005e..5097cffdd7 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.deleteMfaAuthenticator( - '<USER_ID>', // userId - AuthenticatorType.Totp // type -); +const response = await users.deleteMFAAuthenticator({ + userId: '<USER_ID>', + type: AuthenticatorType.Totp +}); 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 index 0ce82fe50f..1d4adc8063 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.deleteSession( - '<USER_ID>', // userId - '<SESSION_ID>' // sessionId -); +const response = await users.deleteSession({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>' +}); 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 index f80300b205..ec4453111e 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.deleteSessions( - '<USER_ID>' // userId -); +const response = await users.deleteSessions({ + userId: '<USER_ID>' +}); 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 index 9080a962e6..953ade1e02 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.deleteTarget( - '<USER_ID>', // userId - '<TARGET_ID>' // targetId -); +const response = await users.deleteTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +}); 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 index 7ac1bf1d3a..5ab1f18726 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/users/delete.md @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.delete( - '<USER_ID>' // userId -); +const response = await users.delete({ + userId: '<USER_ID>' +}); 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 index f78c0bf1b0..c2e4752a71 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.getMfaRecoveryCodes( - '<USER_ID>' // userId -); +const response = await users.getMFARecoveryCodes({ + userId: '<USER_ID>' +}); 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 index ef1be1e18b..d252ffe223 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.getPrefs( - '<USER_ID>' // userId -); +const response = await users.getPrefs({ + userId: '<USER_ID>' +}); 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 index 301ee6e7ed..7586fae9ad 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.getTarget( - '<USER_ID>', // userId - '<TARGET_ID>' // targetId -); +const response = await users.getTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +}); 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 index 8e41ed6350..c3e58635a1 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/get.md +++ b/docs/examples/1.8.x/server-deno/examples/users/get.md @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.get( - '<USER_ID>' // userId -); +const response = await users.get({ + userId: '<USER_ID>' +}); 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 index 6ac439547b..f91100759c 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.listIdentities( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 983ffba299..a039a745f9 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.listLogs( - '<USER_ID>', // userId - [] // queries (optional) -); +const response = await users.listLogs({ + userId: '<USER_ID>', + 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 index afdd4d4f2d..538a635a12 100644 --- 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 @@ -7,8 +7,8 @@ const client = new Client() const users = new Users(client); -const response = await users.listMemberships( - '<USER_ID>', // userId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await users.listMemberships({ + userId: '<USER_ID>', + 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 index 34b65afac3..c4130118ba 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.listMfaFactors( - '<USER_ID>' // userId -); +const response = await users.listMFAFactors({ + userId: '<USER_ID>' +}); 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 index 314f277d7a..46f4e5c40d 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.listSessions( - '<USER_ID>' // userId -); +const response = await users.listSessions({ + userId: '<USER_ID>' +}); 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 index 9ed2dda4ce..9eee79fd34 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.listTargets( - '<USER_ID>', // userId - [] // queries (optional) -); +const response = await users.listTargets({ + userId: '<USER_ID>', + 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 index 488fbdc09c..df734633ce 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/list.md +++ b/docs/examples/1.8.x/server-deno/examples/users/list.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 3243f21c6f..df2fd03fd0 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updateEmailVerification( - '<USER_ID>', // userId - false // emailVerification -); +const response = await users.updateEmailVerification({ + userId: '<USER_ID>', + emailVerification: false +}); 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 index f609cab463..fbf34cabdd 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updateEmail( - '<USER_ID>', // userId - 'email@example.com' // email -); +const response = await users.updateEmail({ + userId: '<USER_ID>', + email: 'email@example.com' +}); 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 index 5a23298179..18cdca2933 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updateLabels( - '<USER_ID>', // userId - [] // labels -); +const response = await users.updateLabels({ + userId: '<USER_ID>', + 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 index a74577e9cc..ce1b875b03 100644 --- 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 @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.updateMfaRecoveryCodes( - '<USER_ID>' // userId -); +const response = await users.updateMFARecoveryCodes({ + userId: '<USER_ID>' +}); 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 index 717f8d6ab7..235357f818 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updateMfa( - '<USER_ID>', // userId - false // mfa -); +const response = await users.updateMFA({ + userId: '<USER_ID>', + mfa: false +}); 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 index 35fc853e3f..304e833506 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updateName( - '<USER_ID>', // userId - '<NAME>' // name -); +const response = await users.updateName({ + userId: '<USER_ID>', + 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 index 8366b5c4c2..8eecca408c 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updatePassword( - '<USER_ID>', // userId - '' // password -); +const response = await users.updatePassword({ + userId: '<USER_ID>', + 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 index 088fd1eb57..713cdac8d7 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updatePhoneVerification( - '<USER_ID>', // userId - false // phoneVerification -); +const response = await users.updatePhoneVerification({ + userId: '<USER_ID>', + phoneVerification: false +}); 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 index a8e47a62b8..1c3926bc79 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updatePhone( - '<USER_ID>', // userId - '+12065550100' // number -); +const response = await users.updatePhone({ + userId: '<USER_ID>', + number: '+12065550100' +}); 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 index cb8919a98f..555f9b4e23 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updatePrefs( - '<USER_ID>', // userId - {} // prefs -); +const response = await users.updatePrefs({ + userId: '<USER_ID>', + 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 index 1c672a4d25..b6b692e3e1 100644 --- 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 @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updateStatus( - '<USER_ID>', // userId - false // status -); +const response = await users.updateStatus({ + userId: '<USER_ID>', + status: false +}); 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 index 4524748c55..ebc039bca0 100644 --- 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 @@ -7,10 +7,10 @@ const client = new Client() 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) -); +const response = 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-dotnet/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/server-dotnet/examples/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/server-dotnet/examples/account/create-magic-url-token.md 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 index bc54970469..9076fcd069 100644 --- 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 @@ -10,6 +10,6 @@ Client client = new Client() Account account = new Account(client); -MfaType result = await account.CreateMfaAuthenticator( +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 index 734133f2bd..32497b4ec3 100644 --- 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 @@ -9,6 +9,6 @@ Client client = new Client() Account account = new Account(client); -MfaChallenge result = await account.CreateMfaChallenge( +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 index 1922a45c0a..406fd4493f 100644 --- 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 @@ -9,4 +9,4 @@ Client client = new Client() Account account = new Account(client); -MfaRecoveryCodes result = await account.CreateMfaRecoveryCodes(); +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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/server-dotnet/examples/account/create-o-auth-2-token.md 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 index 2b27cb6ad8..c695de2956 100644 --- 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 @@ -10,6 +10,6 @@ Client client = new Client() Account account = new Account(client); -await account.DeleteMfaAuthenticator( +await account.DeleteMFAAuthenticator( type: AuthenticatorType.Totp ); \ No newline at end of file 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 index cc39db191d..2e5468ad98 100644 --- 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 @@ -9,4 +9,4 @@ Client client = new Client() Account account = new Account(client); -MfaRecoveryCodes result = await account.GetMfaRecoveryCodes(); +MfaRecoveryCodes result = await account.GetMFARecoveryCodes(); 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 index 291534920f..f284f6f227 100644 --- 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 @@ -9,4 +9,4 @@ Client client = new Client() Account account = new Account(client); -MfaFactors result = await account.ListMfaFactors(); +MfaFactors result = await account.ListMFAFactors(); 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/server-dotnet/examples/account/update-magic-url-session.md 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 index 051653d19a..f5dd5c502f 100644 --- 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 @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -User result = await account.UpdateMfaAuthenticator( +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 index d273505839..f9a9db465b 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Account account = new Account(client); -Session result = await account.UpdateMfaChallenge( +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 index 7daaf93213..bfc6c876f2 100644 --- 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 @@ -9,4 +9,4 @@ Client client = new Client() Account account = new Account(client); -MfaRecoveryCodes result = await account.UpdateMfaRecoveryCodes(); +MfaRecoveryCodes result = await account.UpdateMFARecoveryCodes(); 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/server-dotnet/examples/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/server-dotnet/examples/avatars/get-qr.md 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 index c327458f61..2e48d4578e 100644 --- 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 @@ -5,7 +5,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 - .SetKey("<YOUR_API_KEY>"); // Your secret API key + .SetSession(""); // The user session to authenticate with Databases databases = new Databases(client); 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 index be52584aaf..923c8d63e2 100644 --- 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 @@ -5,7 +5,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 - .SetKey("<YOUR_API_KEY>"); // Your secret API key + .SetSession(""); // The user session to authenticate with Databases databases = new Databases(client); 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-db.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/health/get-d-b.md rename to docs/examples/1.8.x/server-dotnet/examples/health/get-db.md 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-eu.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-eu.md 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 index 9cc37a17e0..74bfe5ec2f 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateApnsProvider( +Provider result = await messaging.CreateAPNSProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", authKey: "<AUTH_KEY>", // optional 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 index 15fdace2d3..0b72bb3fea 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateFcmProvider( +Provider result = await messaging.CreateFCMProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", serviceAccountJSON: [object], // optional 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/messaging/create-msg91provider.md rename to docs/examples/1.8.x/server-dotnet/examples/messaging/create-msg-91-provider.md 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 index 06e9e69e65..f67a43164f 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Message result = await messaging.CreateSms( +Message result = await messaging.CreateSMS( messageId: "<MESSAGE_ID>", content: "<CONTENT>", topics: new List<string>(), // optional 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 index 16b091f98e..d29826dd4a 100644 --- 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 @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateSmtpProvider( +Provider result = await messaging.CreateSMTPProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", host: "<HOST>", 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 index f06e134d02..24cd49da16 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateApnsProvider( +Provider result = await messaging.UpdateAPNSProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // optional 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 index 0006fedf54..df1ce204f6 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateFcmProvider( +Provider result = await messaging.UpdateFCMProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // optional 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/messaging/update-msg91provider.md rename to docs/examples/1.8.x/server-dotnet/examples/messaging/update-msg-91-provider.md 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 index 475d29923d..3216fcff03 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Message result = await messaging.UpdateSms( +Message result = await messaging.UpdateSMS( messageId: "<MESSAGE_ID>", topics: new List<string>(), // optional users: new List<string>(), // optional 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 index 4e7ab6dfeb..29553887ff 100644 --- 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 @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateSmtpProvider( +Provider result = await messaging.UpdateSMTPProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional host: "<HOST>", // optional 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/tablesdb/create-boolean-column.md similarity index 81% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-boolean-column.md index e173d1189b..ff7b647fe6 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-boolean-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnBoolean result = await grids.CreateBooleanColumn( +ColumnBoolean result = await tablesDB.CreateBooleanColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-datetime-column.md similarity index 80% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-datetime-column.md index b4e730fc6d..c03ba36156 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-datetime-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnDatetime result = await grids.CreateDatetimeColumn( +ColumnDatetime result = await tablesDB.CreateDatetimeColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-email-column.md similarity index 82% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-email-column.md index bb2cad7dbd..309db62820 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-email-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnEmail result = await grids.CreateEmailColumn( +ColumnEmail result = await tablesDB.CreateEmailColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-enum-column.md similarity index 83% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-enum-column.md index 4ce99366ad..632bbef52b 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-enum-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnEnum result = await grids.CreateEnumColumn( +ColumnEnum result = await tablesDB.CreateEnumColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-float-column.md similarity index 83% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-float-column.md index 3ecd76c367..e7da5323f3 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-float-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnFloat result = await grids.CreateFloatColumn( +ColumnFloat result = await tablesDB.CreateFloatColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-index.md similarity index 85% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-index.md index 854ed47e81..3b19981ec6 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-index.md @@ -8,9 +8,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnIndex result = await grids.CreateIndex( +ColumnIndex result = await tablesDB.CreateIndex( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-integer-column.md similarity index 82% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-integer-column.md index ef13d5569c..7bdb971aca 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-integer-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnInteger result = await grids.CreateIntegerColumn( +ColumnInteger result = await tablesDB.CreateIntegerColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-ip-column.md similarity index 82% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-ip-column.md index bfaa594d49..9359b28983 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-ip-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnIp result = await grids.CreateIpColumn( +ColumnIp result = await tablesDB.CreateIpColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-relationship-column.md similarity index 84% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-relationship-column.md index 614f5d4fec..95b34d0265 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-relationship-column.md @@ -8,9 +8,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnRelationship result = await grids.CreateRelationshipColumn( +ColumnRelationship result = await tablesDB.CreateRelationshipColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", relatedTableId: "<RELATED_TABLE_ID>", diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-row.md similarity index 84% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-row.md index 235c9b5c4e..ec6255a11a 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-row.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetSession(""); // The user session to authenticate with -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -Row result = await grids.CreateRow( +Row result = await tablesDB.CreateRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-rows.md similarity index 81% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-rows.md index 42ee3ef6a2..c23e795a84 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-rows.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -RowList result = await grids.CreateRows( +RowList result = await tablesDB.CreateRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rows: new List<object>() 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/tablesdb/create-string-column.md similarity index 83% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-string-column.md index ca00dcf32e..ab77d4da61 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-string-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnString result = await grids.CreateStringColumn( +ColumnString result = await tablesDB.CreateStringColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-table.md similarity index 84% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-table.md index 50fdfa878e..7085b9a0f7 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-table.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -Table result = await grids.CreateTable( +Table result = await tablesDB.CreateTable( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", name: "<NAME>", 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/tablesdb/create-url-column.md similarity index 83% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-url-column.md index 8a4f69bd26..bfae1ccd7e 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-url-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnUrl result = await grids.CreateUrlColumn( +ColumnUrl result = await tablesDB.CreateUrlColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create.md similarity index 81% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/create.md index cd3b0a236d..105d838d5f 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -Database result = await grids.UpdateDatabase( +Database result = await tablesDB.Create( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false // optional 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/tablesdb/decrement-row-column.md similarity index 71% rename from docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/decrement-row-column.md index b17e902e45..66d98b65b9 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/decrement-row-column.md @@ -5,11 +5,11 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key + .SetSession(""); // The user session to authenticate with -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -Row result = await grids.DecrementRowColumn( +Row result = await tablesDB.DecrementRowColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-column.md similarity index 83% rename from docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-column.md index 24f23546ba..4cc43f20e7 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -await grids.DeleteColumn( +await tablesDB.DeleteColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "" diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-index.md similarity index 83% rename from docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-index.md index 5a037e2a96..46c899b7ee 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-index.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -await grids.DeleteIndex( +await tablesDB.DeleteIndex( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "" diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-row.md similarity index 84% rename from docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-row.md index 13972747a8..86d7fbf392 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-row.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetSession(""); // The user session to authenticate with -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -await grids.DeleteRow( +await tablesDB.DeleteRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>" diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-rows.md similarity index 85% rename from docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-rows.md index 4ddd11b6d1..13d5758fdb 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-rows.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -await grids.DeleteRows( +await tablesDB.DeleteRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", queries: new List<string>() // optional diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-table.md similarity index 83% rename from docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-table.md index 9741ac2c2e..4f772f3fb7 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-table.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -await grids.DeleteTable( +await tablesDB.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/delete-database.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete.md similarity index 83% rename from docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete.md index 38f28a001a..55395b0230 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete.md @@ -7,8 +7,8 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -await grids.DeleteDatabase( +await tablesDB.Delete( databaseId: "<DATABASE_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/tablesdb/get-column.md similarity index 82% rename from docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-column.md index 2c6d7a3944..70089aa019 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); - result = await grids.GetColumn( + result = await tablesDB.GetColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "" diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-index.md similarity index 80% rename from docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-index.md index ff99a21ed0..b48ac846b8 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-index.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnIndex result = await grids.GetIndex( +ColumnIndex result = await tablesDB.GetIndex( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "" diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-row.md similarity index 84% rename from docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-row.md index c75e0e50d5..99d79ac3dd 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-row.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetSession(""); // The user session to authenticate with -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -Row result = await grids.GetRow( +Row result = await tablesDB.GetRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-table.md similarity index 80% rename from docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-table.md index 7fcecc6170..82311e8f55 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-table.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -Table result = await grids.GetTable( +Table result = await tablesDB.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/get-database.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get.md similarity index 79% rename from docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/get.md index 5aebe5104d..ace26de4fe 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get.md @@ -7,8 +7,8 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -Database result = await grids.GetDatabase( +Database result = await tablesDB.Get( databaseId: "<DATABASE_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/tablesdb/increment-row-column.md similarity index 71% rename from docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/increment-row-column.md index 3e6d044905..48eabc34d4 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/increment-row-column.md @@ -5,11 +5,11 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key + .SetSession(""); // The user session to authenticate with -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -Row result = await grids.IncrementRowColumn( +Row result = await tablesDB.IncrementRowColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-columns.md similarity index 81% rename from docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-columns.md index e8478c1d23..345ac00bf5 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-columns.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnList result = await grids.ListColumns( +ColumnList result = await tablesDB.ListColumns( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", queries: new List<string>() // optional diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-indexes.md similarity index 80% rename from docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-indexes.md index b6f3737b43..6074787f38 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-indexes.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnIndexList result = await grids.ListIndexes( +ColumnIndexList result = await tablesDB.ListIndexes( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", queries: new List<string>() // optional diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-rows.md similarity index 82% rename from docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-rows.md index a1a64fe256..d3f860e869 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-rows.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetSession(""); // The user session to authenticate with -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -RowList result = await grids.ListRows( +RowList result = await tablesDB.ListRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", queries: new List<string>() // optional diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-tables.md similarity index 81% rename from docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-tables.md index 85f431b7ef..9e94dc84ee 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-tables.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -TableList result = await grids.ListTables( +TableList result = await tablesDB.ListTables( databaseId: "<DATABASE_ID>", queries: new List<string>(), // optional search: "<SEARCH>" // optional diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list.md similarity index 81% rename from docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/list.md index f37deb8ef2..8b320eeb00 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -DatabaseList result = await grids.ListDatabases( +DatabaseList result = await tablesDB.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/grids/update-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-boolean-column.md similarity index 80% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-boolean-column.md index ff2376e403..b6c6d58438 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-boolean-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnBoolean result = await grids.UpdateBooleanColumn( +ColumnBoolean result = await tablesDB.UpdateBooleanColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-datetime-column.md similarity index 80% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-datetime-column.md index 7b630922e8..8236b6af7c 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-datetime-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnDatetime result = await grids.UpdateDatetimeColumn( +ColumnDatetime result = await tablesDB.UpdateDatetimeColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-email-column.md similarity index 82% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-email-column.md index 9ce04025ca..88567783a2 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-email-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnEmail result = await grids.UpdateEmailColumn( +ColumnEmail result = await tablesDB.UpdateEmailColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-enum-column.md similarity index 83% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-enum-column.md index b29b3615de..58c3c65d7b 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-enum-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnEnum result = await grids.UpdateEnumColumn( +ColumnEnum result = await tablesDB.UpdateEnumColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-float-column.md similarity index 82% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-float-column.md index 96db20a2c5..057a076733 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-float-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnFloat result = await grids.UpdateFloatColumn( +ColumnFloat result = await tablesDB.UpdateFloatColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-integer-column.md similarity index 82% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-integer-column.md index 87e6b0fee2..2cc3b3614e 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-integer-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnInteger result = await grids.UpdateIntegerColumn( +ColumnInteger result = await tablesDB.UpdateIntegerColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-ip-column.md similarity index 82% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-ip-column.md index 789c6c98e6..7e6d64f03c 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-ip-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnIp result = await grids.UpdateIpColumn( +ColumnIp result = await tablesDB.UpdateIpColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-relationship-column.md similarity index 80% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-relationship-column.md index a1d30a43a2..9a0a36b690 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-relationship-column.md @@ -8,9 +8,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnRelationship result = await grids.UpdateRelationshipColumn( +ColumnRelationship result = await tablesDB.UpdateRelationshipColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-row.md similarity index 84% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-row.md index 2dc2b23d32..5eb5acdbd2 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-row.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetSession(""); // The user session to authenticate with -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -Row result = await grids.UpdateRow( +Row result = await tablesDB.UpdateRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-rows.md similarity index 83% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-rows.md index c0103c9639..401464d66a 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-rows.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -RowList result = await grids.UpdateRows( +RowList result = await tablesDB.UpdateRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", data: [object], // optional 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/tablesdb/update-string-column.md similarity index 82% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-string-column.md index 2277142eb8..df5308ddb3 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-string-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnString result = await grids.UpdateStringColumn( +ColumnString result = await tablesDB.UpdateStringColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-table.md similarity index 84% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-table.md index 76362573a5..b2d52b755c 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-table.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -Table result = await grids.UpdateTable( +Table result = await tablesDB.UpdateTable( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", name: "<NAME>", 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/tablesdb/update-url-column.md similarity index 82% rename from docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-url-column.md index 8054b60e3f..d342fc9476 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-url-column.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -ColumnUrl result = await grids.UpdateUrlColumn( +ColumnUrl result = await tablesDB.UpdateUrlColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update.md similarity index 81% rename from docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/update.md index 7006f00d01..920866bad4 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -Database result = await grids.CreateDatabase( +Database result = await tablesDB.Update( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false // optional diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-row.md similarity index 84% rename from docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-row.md index 7f517a2f09..e1f68a7dfb 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-row.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetSession(""); // The user session to authenticate with -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -Row result = await grids.UpsertRow( +Row result = await tablesDB.UpsertRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-rows.md similarity index 81% rename from docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md rename to docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-rows.md index 1cb3b54d0b..199dc2ba85 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-rows.md @@ -7,9 +7,9 @@ Client client = new Client() .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -RowList result = await grids.UpsertRows( +RowList result = await tablesDB.UpsertRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rows: new List<object>() 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-argon-2-user.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/users/create-argon2user.md rename to docs/examples/1.8.x/server-dotnet/examples/users/create-argon-2-user.md 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/users/create-j-w-t.md rename to docs/examples/1.8.x/server-dotnet/examples/users/create-jwt.md 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-md-5-user.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/users/create-m-d5user.md rename to docs/examples/1.8.x/server-dotnet/examples/users/create-md-5-user.md 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 index 9b43dc02af..d0c0d95ad8 100644 --- 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 @@ -9,6 +9,6 @@ Client client = new Client() Users users = new Users(client); -MfaRecoveryCodes result = await users.CreateMfaRecoveryCodes( +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-ph-pass-user.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/users/create-p-h-pass-user.md rename to docs/examples/1.8.x/server-dotnet/examples/users/create-ph-pass-user.md 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-sha-user.md similarity index 100% rename from docs/examples/1.8.x/server-dotnet/examples/users/create-s-h-a-user.md rename to docs/examples/1.8.x/server-dotnet/examples/users/create-sha-user.md 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 index bb33dbf9e4..b4cec73ae9 100644 --- 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 @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -await users.DeleteMfaAuthenticator( +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/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/users/get-mfa-recovery-codes.md index 213c3473a8..ce9453119f 100644 --- 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 @@ -9,6 +9,6 @@ Client client = new Client() Users users = new Users(client); -MfaRecoveryCodes result = await users.GetMfaRecoveryCodes( +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/list-mfa-factors.md b/docs/examples/1.8.x/server-dotnet/examples/users/list-mfa-factors.md index 54f68ae516..956949d0a9 100644 --- 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 @@ -9,6 +9,6 @@ Client client = new Client() Users users = new Users(client); -MfaFactors result = await users.ListMfaFactors( +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/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-mfa-recovery-codes.md index 35be70777a..ac14ccf932 100644 --- 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 @@ -9,6 +9,6 @@ Client client = new Client() Users users = new Users(client); -MfaRecoveryCodes result = await users.UpdateMfaRecoveryCodes( +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 index d009df1759..1114982333 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.UpdateMfa( +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-go/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-go/examples/account/create-anonymous-session.md index ff8aea9751..c2f23a5b2c 100644 --- 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 @@ -6,19 +6,11 @@ import ( "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 := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") +) - service := account.New(client) - response, error := service.CreateAnonymousSession( - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateAnonymousSession()) 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 index 18d8dbc184..66a55b953e 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") +) - service := account.New(client) - response, error := service.CreateEmailPasswordSession( - "email@example.com", - "password", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateEmailPasswordSession( + "email@example.com", + "password", +) 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 index c057af5b9d..b2a1aac498 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") +) - service := account.New(client) - response, error := service.CreateEmailToken( - "<USER_ID>", - "email@example.com", - account.WithCreateEmailTokenPhrase(false), - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateEmailToken( + "<USER_ID>", + "email@example.com", + account.WithCreateEmailTokenPhrase(false), +) 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 deleted file mode 100644 index 665f365e20..0000000000 --- a/docs/examples/1.8.x/server-go/examples/account/create-j-w-t.md +++ /dev/null @@ -1,24 +0,0 @@ -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-jwt.md b/docs/examples/1.8.x/server-go/examples/account/create-jwt.md new file mode 100644 index 0000000000..153c70d9fc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-jwt.md @@ -0,0 +1,16 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") +) + +service := account.New(client) + +response, error := service.CreateJWT()) 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 deleted file mode 100644 index cad88c183d..0000000000 --- a/docs/examples/1.8.x/server-go/examples/account/create-magic-u-r-l-token.md +++ /dev/null @@ -1,28 +0,0 @@ -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-magic-url-token.md b/docs/examples/1.8.x/server-go/examples/account/create-magic-url-token.md new file mode 100644 index 0000000000..b36a2d99b1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-magic-url-token.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") +) + +service := account.New(client) + +response, error := service.CreateMagicURLToken( + "<USER_ID>", + "email@example.com", + account.WithCreateMagicURLTokenUrl("https://example.com"), + account.WithCreateMagicURLTokenPhrase(false), +) 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 index 336a91d944..c0124d6cf9 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.CreateMfaAuthenticator( - "totp", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateMFAAuthenticator( + "totp", +) 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 index 4e17eb5ad9..0ae3262568 100644 --- 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 @@ -6,20 +6,13 @@ import ( "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 := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") +) - service := account.New(client) - response, error := service.CreateMfaChallenge( - "email", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateMFAChallenge( + "email", +) 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 index 714d6106a0..332102ea64 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.CreateMfaRecoveryCodes( - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateMFARecoveryCodes()) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-o-auth-2-token.md b/docs/examples/1.8.x/server-go/examples/account/create-o-auth-2-token.md new file mode 100644 index 0000000000..19b9258f00 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-o-auth-2-token.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<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{}{}), +) 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 deleted file mode 100644 index 56a2acdbf1..0000000000 --- a/docs/examples/1.8.x/server-go/examples/account/create-o-auth2token.md +++ /dev/null @@ -1,28 +0,0 @@ -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 index b6c2ec7db7..97737e5646 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") +) - service := account.New(client) - response, error := service.CreatePhoneToken( - "<USER_ID>", - "+12065550100", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreatePhoneToken( + "<USER_ID>", + "+12065550100", +) 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 index 699cdb222e..68fd7f788d 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.CreatePhoneVerification( - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreatePhoneVerification()) 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 index 923d2819a6..5e78d01980 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.CreateRecovery( - "email@example.com", - "https://example.com", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateRecovery( + "email@example.com", + "https://example.com", +) 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 index f5949241ff..fb0b9cbfe4 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") +) - service := account.New(client) - response, error := service.CreateSession( - "<USER_ID>", - "<SECRET>", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateSession( + "<USER_ID>", + "<SECRET>", +) 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 index b3c7fd8004..14a1b946f3 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.CreateVerification( - "https://example.com", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateVerification( + "https://example.com", +) 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 index dc4fdfe8f6..5e04847860 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create.md +++ b/docs/examples/1.8.x/server-go/examples/account/create.md @@ -6,23 +6,16 @@ import ( "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 := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") +) - service := account.New(client) - response, error := service.Create( - "<USER_ID>", - "email@example.com", - "", - account.WithCreateName("<NAME>"), - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Create( + "<USER_ID>", + "email@example.com", + "", + account.WithCreateName("<NAME>"), +) 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 index 2155249894..a513991ad6 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.DeleteIdentity( - "<IDENTITY_ID>", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteIdentity( + "<IDENTITY_ID>", +) 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 index 6eb956bdec..33b7e51af7 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.DeleteMfaAuthenticator( - "totp", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteMFAAuthenticator( + "totp", +) 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 index 3a1a9514bb..0a7bb5a856 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.DeleteSession( - "<SESSION_ID>", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteSession( + "<SESSION_ID>", +) 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 index 718d149241..87c9881e06 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.DeleteSessions( - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteSessions()) 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 index fd07fe36d9..ee955116f3 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.GetMfaRecoveryCodes( - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetMFARecoveryCodes()) 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 index 911b5786ce..c4511438ab 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.GetPrefs( - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetPrefs()) 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 index dc42c3c12d..9005de9cf6 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.GetSession( - "<SESSION_ID>", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetSession( + "<SESSION_ID>", +) 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 index 80fe2da7c0..280492c77e 100644 --- a/docs/examples/1.8.x/server-go/examples/account/get.md +++ b/docs/examples/1.8.x/server-go/examples/account/get.md @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.Get( - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get()) 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 index 3bfa0a7b60..8114ff9e2f 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.ListIdentities( - account.WithListIdentitiesQueries([]interface{}{}), - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListIdentities( + account.WithListIdentitiesQueries([]interface{}{}), +) 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 index 67ee6de1c2..d72597e8d2 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.ListLogs( - account.WithListLogsQueries([]interface{}{}), - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListLogs( + account.WithListLogsQueries([]interface{}{}), +) 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 index 26fb516fed..f6f90f625f 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.ListMfaFactors( - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListMFAFactors()) 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 index 96b8c10d4c..c8a408586b 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.ListSessions( - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListSessions()) 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 index 7467080416..6defd00964 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateEmail( - "email@example.com", - "password", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateEmail( + "email@example.com", + "password", +) 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 deleted file mode 100644 index 139eea3afd..0000000000 --- a/docs/examples/1.8.x/server-go/examples/account/update-m-f-a.md +++ /dev/null @@ -1,26 +0,0 @@ -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 deleted file mode 100644 index 4cda48878b..0000000000 --- a/docs/examples/1.8.x/server-go/examples/account/update-magic-u-r-l-session.md +++ /dev/null @@ -1,26 +0,0 @@ -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-magic-url-session.md b/docs/examples/1.8.x/server-go/examples/account/update-magic-url-session.md new file mode 100644 index 0000000000..9f799c511f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-magic-url-session.md @@ -0,0 +1,19 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") +) + +service := account.New(client) + +response, error := service.UpdateMagicURLSession( + "<USER_ID>", + "<SECRET>", +) 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 index ce4ebaffe7..4999034576 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateMfaAuthenticator( - "totp", - "<OTP>", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMFAAuthenticator( + "totp", + "<OTP>", +) 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 index d2bb0c92ec..a9dd94eab6 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateMfaChallenge( - "<CHALLENGE_ID>", - "<OTP>", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMFAChallenge( + "<CHALLENGE_ID>", + "<OTP>", +) 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 index 9902b143f5..fc47d3b023 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateMfaRecoveryCodes( - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMFARecoveryCodes()) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-mfa.md b/docs/examples/1.8.x/server-go/examples/account/update-mfa.md new file mode 100644 index 0000000000..1808eed84b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-mfa.md @@ -0,0 +1,19 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) + +service := account.New(client) + +response, error := service.UpdateMFA( + false, +) 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 index 972873a17a..1cf5aa2a22 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateName( - "<NAME>", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateName( + "<NAME>", +) 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 index aedcd0ccbc..f574679217 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdatePassword( - "", - account.WithUpdatePasswordOldPassword("password"), - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePassword( + "", + account.WithUpdatePasswordOldPassword("password"), +) 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 index c937d9cd0d..5af46b840b 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") +) - service := account.New(client) - response, error := service.UpdatePhoneSession( - "<USER_ID>", - "<SECRET>", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePhoneSession( + "<USER_ID>", + "<SECRET>", +) 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 index 462d98db9a..cb5a93934e 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdatePhoneVerification( - "<USER_ID>", - "<SECRET>", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePhoneVerification( + "<USER_ID>", + "<SECRET>", +) 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 index 163ecedd22..ac21bd321f 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdatePhone( - "+12065550100", - "password", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePhone( + "+12065550100", + "password", +) 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 index ed566ba519..94c223ff31 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdatePrefs( - map[string]interface{}{}, - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePrefs( + map[string]interface{}{}, +) 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 index 0d7820bfb9..e21e5ccfdc 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateRecovery( - "<USER_ID>", - "<SECRET>", - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateRecovery( + "<USER_ID>", + "<SECRET>", + "", +) 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 index 61029a7157..4984b9ef85 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateSession( - "<SESSION_ID>", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateSession( + "<SESSION_ID>", +) 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 index 05f6449a72..e3c5d66a1d 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateStatus( - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateStatus()) 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 index 1c781659e4..b31751746a 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateVerification( - "<USER_ID>", - "<SECRET>", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateVerification( + "<USER_ID>", + "<SECRET>", +) 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 index 98f405d6dd..6b238c9f1f 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := avatars.New(client) - response, error := service.GetBrowser( - "aa", - avatars.WithGetBrowserWidth(0), - avatars.WithGetBrowserHeight(0), - avatars.WithGetBrowserQuality(-1), - ) +service := avatars.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetBrowser( + "aa", + avatars.WithGetBrowserWidth(0), + avatars.WithGetBrowserHeight(0), + avatars.WithGetBrowserQuality(-1), +) 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 index efdfdbd5dc..4ca6feb2d9 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := avatars.New(client) - response, error := service.GetCreditCard( - "amex", - avatars.WithGetCreditCardWidth(0), - avatars.WithGetCreditCardHeight(0), - avatars.WithGetCreditCardQuality(-1), - ) +service := avatars.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetCreditCard( + "amex", + avatars.WithGetCreditCardWidth(0), + avatars.WithGetCreditCardHeight(0), + avatars.WithGetCreditCardQuality(-1), +) 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 index 35ea339097..dafc8dd7e9 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := avatars.New(client) - response, error := service.GetFavicon( - "https://example.com", - ) +service := avatars.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetFavicon( + "https://example.com", +) 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 index 3af30f3cc3..ad46317c2c 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := avatars.New(client) - response, error := service.GetFlag( - "af", - avatars.WithGetFlagWidth(0), - avatars.WithGetFlagHeight(0), - avatars.WithGetFlagQuality(-1), - ) +service := avatars.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetFlag( + "af", + avatars.WithGetFlagWidth(0), + avatars.WithGetFlagHeight(0), + avatars.WithGetFlagQuality(-1), +) 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 index f4e0324c9d..7e9a20f2f7 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := avatars.New(client) - response, error := service.GetImage( - "https://example.com", - avatars.WithGetImageWidth(0), - avatars.WithGetImageHeight(0), - ) +service := avatars.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetImage( + "https://example.com", + avatars.WithGetImageWidth(0), + avatars.WithGetImageHeight(0), +) 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 index a7519012e2..84ddfc080a 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := avatars.New(client) - response, error := service.GetInitials( - avatars.WithGetInitialsName("<NAME>"), - avatars.WithGetInitialsWidth(0), - avatars.WithGetInitialsHeight(0), - avatars.WithGetInitialsBackground(""), - ) +service := avatars.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetInitials( + avatars.WithGetInitialsName("<NAME>"), + avatars.WithGetInitialsWidth(0), + avatars.WithGetInitialsHeight(0), + avatars.WithGetInitialsBackground(""), +) 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 deleted file mode 100644 index edd84269e3..0000000000 --- a/docs/examples/1.8.x/server-go/examples/avatars/get-q-r.md +++ /dev/null @@ -1,29 +0,0 @@ -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/avatars/get-qr.md b/docs/examples/1.8.x/server-go/examples/avatars/get-qr.md new file mode 100644 index 0000000000..97efa7400e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-qr.md @@ -0,0 +1,22 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) + +service := avatars.New(client) + +response, error := service.GetQR( + "<TEXT>", + avatars.WithGetQRSize(1), + avatars.WithGetQRMargin(0), + avatars.WithGetQRDownload(false), +) 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 index 43b7aff721..db87ed2d2d 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.CreateBooleanAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - false, - databases.WithCreateBooleanAttributeDefault(false), - databases.WithCreateBooleanAttributeArray(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateBooleanAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateBooleanAttributeDefault(false), + databases.WithCreateBooleanAttributeArray(false), +) 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 index f72c4b360d..4e4e9f764c 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + databases.WithCreateCollectionPermissions(interface{}{"read("any")"}), + databases.WithCreateCollectionDocumentSecurity(false), + databases.WithCreateCollectionEnabled(false), +) 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 index 7d0de22c7d..d1b5785b2e 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.CreateDatetimeAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - false, - databases.WithCreateDatetimeAttributeDefault(""), - databases.WithCreateDatetimeAttributeArray(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDatetimeAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateDatetimeAttributeDefault(""), + databases.WithCreateDatetimeAttributeArray(false), +) 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..78f0eac32c 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 @@ -6,25 +6,18 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := databases.New(client) - response, error := service.CreateDocument( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "<DOCUMENT_ID>", - map[string]interface{}{}, - databases.WithCreateDocumentPermissions(interface{}{"read("any")"}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + map[string]interface{}{}, + databases.WithCreateDocumentPermissions(interface{}{"read("any")"}), +) 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..8bd0a5761a 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.CreateDocuments( - "<DATABASE_ID>", - "<COLLECTION_ID>", - []interface{}{}, - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + []interface{}{}, +) 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 index 7fa28adfb0..24ceeab4ad 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.CreateEmailAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - false, - databases.WithCreateEmailAttributeDefault("email@example.com"), - databases.WithCreateEmailAttributeArray(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateEmailAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateEmailAttributeDefault("email@example.com"), + databases.WithCreateEmailAttributeArray(false), +) 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 index 4921e2120b..49c576a62d 100644 --- 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 @@ -6,27 +6,20 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.CreateEnumAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - []interface{}{}, - false, - databases.WithCreateEnumAttributeDefault("<DEFAULT>"), - databases.WithCreateEnumAttributeArray(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateEnumAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + []interface{}{}, + false, + databases.WithCreateEnumAttributeDefault("<DEFAULT>"), + databases.WithCreateEnumAttributeArray(false), +) 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 index b933bab5e5..2a039e802e 100644 --- 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 @@ -6,28 +6,21 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateFloatAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateFloatAttributeMin(0), + databases.WithCreateFloatAttributeMax(0), + databases.WithCreateFloatAttributeDefault(0), + databases.WithCreateFloatAttributeArray(false), +) 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 index 0513490178..e2b11982d4 100644 --- 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 @@ -6,27 +6,20 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.CreateIndex( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - "key", - []interface{}{}, - databases.WithCreateIndexOrders([]interface{}{}), - databases.WithCreateIndexLengths([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + "key", + []interface{}{}, + databases.WithCreateIndexOrders([]interface{}{}), + databases.WithCreateIndexLengths([]interface{}{}), +) 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 index d84771dee7..ad93ff053c 100644 --- 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 @@ -6,28 +6,21 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateIntegerAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateIntegerAttributeMin(0), + databases.WithCreateIntegerAttributeMax(0), + databases.WithCreateIntegerAttributeDefault(0), + databases.WithCreateIntegerAttributeArray(false), +) 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 index 136a7e96e8..47df16ced4 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.CreateIpAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - false, - databases.WithCreateIpAttributeDefault(""), - databases.WithCreateIpAttributeArray(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateIpAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateIpAttributeDefault(""), + databases.WithCreateIpAttributeArray(false), +) 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 index 7fa8c9fad9..f63779ff75 100644 --- 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 @@ -6,28 +6,21 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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"), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateRelationshipAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<RELATED_COLLECTION_ID>", + "oneToOne", + databases.WithCreateRelationshipAttributeTwoWay(false), + databases.WithCreateRelationshipAttributeKey(""), + databases.WithCreateRelationshipAttributeTwoWayKey(""), + databases.WithCreateRelationshipAttributeOnDelete("cascade"), +) 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 index 25d3c1066a..4082041aaf 100644 --- 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 @@ -6,28 +6,21 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateStringAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + 1, + false, + databases.WithCreateStringAttributeDefault("<DEFAULT>"), + databases.WithCreateStringAttributeArray(false), + databases.WithCreateStringAttributeEncrypt(false), +) 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 index dd77c93207..5b367e0cac 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.CreateUrlAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - false, - databases.WithCreateUrlAttributeDefault("https://example.com"), - databases.WithCreateUrlAttributeArray(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateUrlAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateUrlAttributeDefault("https://example.com"), + databases.WithCreateUrlAttributeArray(false), +) 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 index f51a5d70f3..57c8e106ed 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create.md @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.Create( - "<DATABASE_ID>", - "<NAME>", - databases.WithCreateEnabled(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Create( + "<DATABASE_ID>", + "<NAME>", + databases.WithCreateEnabled(false), +) 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 index 1d9c094030..af463743b5 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := databases.New(client) - response, error := service.DecrementDocumentAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "<DOCUMENT_ID>", - "", - databases.WithDecrementDocumentAttributeValue(0), - databases.WithDecrementDocumentAttributeMin(0), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DecrementDocumentAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "", + databases.WithDecrementDocumentAttributeValue(0), + databases.WithDecrementDocumentAttributeMin(0), +) 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 index c34c83a6a5..9640983294 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.DeleteAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", +) 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 index 01e7710c26..df3031640b 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.DeleteCollection( - "<DATABASE_ID>", - "<COLLECTION_ID>", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", +) 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 index 1fc4092ac6..6e9b58a56d 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := databases.New(client) - response, error := service.DeleteDocument( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "<DOCUMENT_ID>", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", +) 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 index fe018b1bbf..43e0d4cb36 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.DeleteDocuments( - "<DATABASE_ID>", - "<COLLECTION_ID>", - databases.WithDeleteDocumentsQueries([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithDeleteDocumentsQueries([]interface{}{}), +) 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 index 07bbb6f80c..229c50ca36 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.DeleteIndex( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", +) 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 index 60995b66f0..eb7999ccb2 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/delete.md +++ b/docs/examples/1.8.x/server-go/examples/databases/delete.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.Delete( - "<DATABASE_ID>", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "<DATABASE_ID>", +) 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 index 560f34c018..e1c5d10d3c 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.GetAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", +) 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 index 75de4c6882..2827eec74d 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.GetCollection( - "<DATABASE_ID>", - "<COLLECTION_ID>", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", +) 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 index 8bdd26c351..5e63077aac 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := databases.New(client) - response, error := service.GetDocument( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "<DOCUMENT_ID>", - databases.WithGetDocumentQueries([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + databases.WithGetDocumentQueries([]interface{}{}), +) 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 index ef38678361..54d5705211 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.GetIndex( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", +) 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 index 0d1eb87a29..c92506cf57 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/get.md +++ b/docs/examples/1.8.x/server-go/examples/databases/get.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.Get( - "<DATABASE_ID>", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get( + "<DATABASE_ID>", +) 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 index fa63e9c8df..d2e91ee4c1 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := databases.New(client) - response, error := service.IncrementDocumentAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "<DOCUMENT_ID>", - "", - databases.WithIncrementDocumentAttributeValue(0), - databases.WithIncrementDocumentAttributeMax(0), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.IncrementDocumentAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "", + databases.WithIncrementDocumentAttributeValue(0), + databases.WithIncrementDocumentAttributeMax(0), +) 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 index e4748c6f90..061e43bb05 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.ListAttributes( - "<DATABASE_ID>", - "<COLLECTION_ID>", - databases.WithListAttributesQueries([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListAttributes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithListAttributesQueries([]interface{}{}), +) 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 index 91716dc40e..2926768f0b 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.ListCollections( - "<DATABASE_ID>", - databases.WithListCollectionsQueries([]interface{}{}), - databases.WithListCollectionsSearch("<SEARCH>"), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListCollections( + "<DATABASE_ID>", + databases.WithListCollectionsQueries([]interface{}{}), + databases.WithListCollectionsSearch("<SEARCH>"), +) 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 index 91d0408efc..0aaef36c59 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := databases.New(client) - response, error := service.ListDocuments( - "<DATABASE_ID>", - "<COLLECTION_ID>", - databases.WithListDocumentsQueries([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithListDocumentsQueries([]interface{}{}), +) 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 index a5af8d2847..c26fbc8e7f 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.ListIndexes( - "<DATABASE_ID>", - "<COLLECTION_ID>", - databases.WithListIndexesQueries([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListIndexes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithListIndexesQueries([]interface{}{}), +) 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 index f377c11df0..657d3b6b78 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/list.md +++ b/docs/examples/1.8.x/server-go/examples/databases/list.md @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.List( - databases.WithListQueries([]interface{}{}), - databases.WithListSearch("<SEARCH>"), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.List( + databases.WithListQueries([]interface{}{}), + databases.WithListSearch("<SEARCH>"), +) 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 index 87e16a0e01..bf854b0440 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.UpdateBooleanAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - false, - false, - databases.WithUpdateBooleanAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateBooleanAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + false, + databases.WithUpdateBooleanAttributeNewKey(""), +) 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 index 07077ff0c0..4bafd5eb2c 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + databases.WithUpdateCollectionPermissions(interface{}{"read("any")"}), + databases.WithUpdateCollectionDocumentSecurity(false), + databases.WithUpdateCollectionEnabled(false), +) 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 index 24017ff8b4..d78d1b879c 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.UpdateDatetimeAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - false, - "", - databases.WithUpdateDatetimeAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateDatetimeAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "", + databases.WithUpdateDatetimeAttributeNewKey(""), +) 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 index b36c9694db..90c0947536 100644 --- 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 @@ -6,25 +6,18 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := databases.New(client) - response, error := service.UpdateDocument( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "<DOCUMENT_ID>", - databases.WithUpdateDocumentData(map[string]interface{}{}), - databases.WithUpdateDocumentPermissions(interface{}{"read("any")"}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + databases.WithUpdateDocumentData(map[string]interface{}{}), + databases.WithUpdateDocumentPermissions(interface{}{"read("any")"}), +) 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 index e1b2a95bc9..7caee918e4 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.UpdateDocuments( - "<DATABASE_ID>", - "<COLLECTION_ID>", - databases.WithUpdateDocumentsData(map[string]interface{}{}), - databases.WithUpdateDocumentsQueries([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithUpdateDocumentsData(map[string]interface{}{}), + databases.WithUpdateDocumentsQueries([]interface{}{}), +) 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 index e58ac912be..728bbd7ac9 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.UpdateEmailAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - false, - "email@example.com", - databases.WithUpdateEmailAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateEmailAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "email@example.com", + databases.WithUpdateEmailAttributeNewKey(""), +) 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 index ea6ef4b5f8..86a5ea087e 100644 --- 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 @@ -6,27 +6,20 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.UpdateEnumAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - []interface{}{}, - false, - "<DEFAULT>", - databases.WithUpdateEnumAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateEnumAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + []interface{}{}, + false, + "<DEFAULT>", + databases.WithUpdateEnumAttributeNewKey(""), +) 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 index db0915a5e2..9dd04e7731 100644 --- 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 @@ -6,28 +6,21 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.UpdateFloatAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - false, - 0, - databases.WithUpdateFloatAttributeMin(0), - databases.WithUpdateFloatAttributeMax(0), - databases.WithUpdateFloatAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateFloatAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + 0, + databases.WithUpdateFloatAttributeMin(0), + databases.WithUpdateFloatAttributeMax(0), + databases.WithUpdateFloatAttributeNewKey(""), +) 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 index ac956b61bc..b9d8bf162d 100644 --- 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 @@ -6,28 +6,21 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.UpdateIntegerAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - false, - 0, - databases.WithUpdateIntegerAttributeMin(0), - databases.WithUpdateIntegerAttributeMax(0), - databases.WithUpdateIntegerAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateIntegerAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + 0, + databases.WithUpdateIntegerAttributeMin(0), + databases.WithUpdateIntegerAttributeMax(0), + databases.WithUpdateIntegerAttributeNewKey(""), +) 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 index faaefd7180..fd1cfcc52d 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.UpdateIpAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - false, - "", - databases.WithUpdateIpAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateIpAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "", + databases.WithUpdateIpAttributeNewKey(""), +) 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 index db8057a728..0c9ee73f8b 100644 --- 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 @@ -6,25 +6,18 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.UpdateRelationshipAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - databases.WithUpdateRelationshipAttributeOnDelete("cascade"), - databases.WithUpdateRelationshipAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateRelationshipAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + databases.WithUpdateRelationshipAttributeOnDelete("cascade"), + databases.WithUpdateRelationshipAttributeNewKey(""), +) 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 index f9876a2305..0d131001fc 100644 --- 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 @@ -6,27 +6,20 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.UpdateStringAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - false, - "<DEFAULT>", - databases.WithUpdateStringAttributeSize(1), - databases.WithUpdateStringAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateStringAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "<DEFAULT>", + databases.WithUpdateStringAttributeSize(1), + databases.WithUpdateStringAttributeNewKey(""), +) 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 index d97cf205ef..56dfbf03e3 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.UpdateUrlAttribute( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "", - false, - "https://example.com", - databases.WithUpdateUrlAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateUrlAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "https://example.com", + databases.WithUpdateUrlAttributeNewKey(""), +) 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 index c7fd49fcec..49d85eba08 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update.md @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.Update( - "<DATABASE_ID>", - "<NAME>", - databases.WithUpdateEnabled(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Update( + "<DATABASE_ID>", + "<NAME>", + databases.WithUpdateEnabled(false), +) 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..00cf8ad408 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 @@ -6,25 +6,18 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := databases.New(client) - response, error := service.UpsertDocument( - "<DATABASE_ID>", - "<COLLECTION_ID>", - "<DOCUMENT_ID>", - map[string]interface{}{}, - databases.WithUpsertDocumentPermissions(interface{}{"read("any")"}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpsertDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + map[string]interface{}{}, + databases.WithUpsertDocumentPermissions(interface{}{"read("any")"}), +) 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..a81ee4446e 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := databases.New(client) - response, error := service.UpsertDocuments( - "<DATABASE_ID>", - "<COLLECTION_ID>", - []interface{}{}, - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpsertDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + []interface{}{}, +) 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 index 53cdbf2038..86eda6f07b 100644 --- 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 @@ -6,25 +6,18 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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>"), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDeployment( + "<FUNCTION_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + false, + functions.WithCreateDeploymentEntrypoint("<ENTRYPOINT>"), + functions.WithCreateDeploymentCommands("<COMMANDS>"), +) 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 index 367ebd723d..8c01a9e305 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.CreateDuplicateDeployment( - "<FUNCTION_ID>", - "<DEPLOYMENT_ID>", - functions.WithCreateDuplicateDeploymentBuildId("<BUILD_ID>"), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDuplicateDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + functions.WithCreateDuplicateDeploymentBuildId("<BUILD_ID>"), +) 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..1f723b8027 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 @@ -6,27 +6,20 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - 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("<SCHEDULED_AT>"), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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("<SCHEDULED_AT>"), +) 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 index 87940ce5d4..14f694ba4a 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.CreateTemplateDeployment( - "<FUNCTION_ID>", - "<REPOSITORY>", - "<OWNER>", - "<ROOT_DIRECTORY>", - "<VERSION>", - functions.WithCreateTemplateDeploymentActivate(false), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTemplateDeployment( + "<FUNCTION_ID>", + "<REPOSITORY>", + "<OWNER>", + "<ROOT_DIRECTORY>", + "<VERSION>", + functions.WithCreateTemplateDeploymentActivate(false), +) 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 index 68e4b7728e..84b68b834e 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.CreateVariable( - "<FUNCTION_ID>", - "<KEY>", - "<VALUE>", - functions.WithCreateVariableSecret(false), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateVariable( + "<FUNCTION_ID>", + "<KEY>", + "<VALUE>", + functions.WithCreateVariableSecret(false), +) 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 index 76d98acd56..5ccb045569 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.CreateVcsDeployment( - "<FUNCTION_ID>", - "branch", - "<REFERENCE>", - functions.WithCreateVcsDeploymentActivate(false), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateVcsDeployment( + "<FUNCTION_ID>", + "branch", + "<REFERENCE>", + functions.WithCreateVcsDeploymentActivate(false), +) 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 index 63dc01c556..5bacf3ce34 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/create.md +++ b/docs/examples/1.8.x/server-go/examples/functions/create.md @@ -6,38 +6,31 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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(""), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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(""), +) 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 index 1763878c91..297c433652 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.DeleteDeployment( - "<FUNCTION_ID>", - "<DEPLOYMENT_ID>", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", +) 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 index 045f24ff1d..493488cfbc 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.DeleteExecution( - "<FUNCTION_ID>", - "<EXECUTION_ID>", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteExecution( + "<FUNCTION_ID>", + "<EXECUTION_ID>", +) 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 index cbc3cdd57e..049afed8a2 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.DeleteVariable( - "<FUNCTION_ID>", - "<VARIABLE_ID>", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", +) 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 index 87bddcc6f3..fe2a02d87c 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/delete.md +++ b/docs/examples/1.8.x/server-go/examples/functions/delete.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.Delete( - "<FUNCTION_ID>", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "<FUNCTION_ID>", +) 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 index 226537bc68..26f14512b3 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.GetDeploymentDownload( - "<FUNCTION_ID>", - "<DEPLOYMENT_ID>", - functions.WithGetDeploymentDownloadType("source"), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetDeploymentDownload( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + functions.WithGetDeploymentDownloadType("source"), +) 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 index d94d1a187a..f05bfd737a 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.GetDeployment( - "<FUNCTION_ID>", - "<DEPLOYMENT_ID>", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", +) 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 index 739af771ee..5fa2a32edf 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := functions.New(client) - response, error := service.GetExecution( - "<FUNCTION_ID>", - "<EXECUTION_ID>", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetExecution( + "<FUNCTION_ID>", + "<EXECUTION_ID>", +) 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 index f96c84ced3..78916740aa 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.GetVariable( - "<FUNCTION_ID>", - "<VARIABLE_ID>", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", +) 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 index bfa5333e41..91e21e4eec 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/get.md +++ b/docs/examples/1.8.x/server-go/examples/functions/get.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.Get( - "<FUNCTION_ID>", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get( + "<FUNCTION_ID>", +) 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 index 8d040ce546..af00c765c8 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.ListDeployments( - "<FUNCTION_ID>", - functions.WithListDeploymentsQueries([]interface{}{}), - functions.WithListDeploymentsSearch("<SEARCH>"), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListDeployments( + "<FUNCTION_ID>", + functions.WithListDeploymentsQueries([]interface{}{}), + functions.WithListDeploymentsSearch("<SEARCH>"), +) 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 index aa7e551c90..8cb902f353 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := functions.New(client) - response, error := service.ListExecutions( - "<FUNCTION_ID>", - functions.WithListExecutionsQueries([]interface{}{}), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListExecutions( + "<FUNCTION_ID>", + functions.WithListExecutionsQueries([]interface{}{}), +) 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 index 4e251247d3..c40a08f149 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.ListRuntimes( - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListRuntimes()) 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 index 9b554b1cde..c0a29fc3ea 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.ListSpecifications( - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListSpecifications()) 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 index 68df7f8aa2..e71f01704b 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.ListVariables( - "<FUNCTION_ID>", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListVariables( + "<FUNCTION_ID>", +) 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 index bff9229c08..8d7b5c9bf0 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/list.md +++ b/docs/examples/1.8.x/server-go/examples/functions/list.md @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.List( - functions.WithListQueries([]interface{}{}), - functions.WithListSearch("<SEARCH>"), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.List( + functions.WithListQueries([]interface{}{}), + functions.WithListSearch("<SEARCH>"), +) 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 index 75dce2fe74..f29be75500 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.UpdateDeploymentStatus( - "<FUNCTION_ID>", - "<DEPLOYMENT_ID>", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateDeploymentStatus( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", +) 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 index e8a1c8b2af..9e85be96b4 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.UpdateFunctionDeployment( - "<FUNCTION_ID>", - "<DEPLOYMENT_ID>", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateFunctionDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", +) 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 index 658540d027..aad017d81c 100644 --- 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 @@ -6,25 +6,18 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := functions.New(client) - response, error := service.UpdateVariable( - "<FUNCTION_ID>", - "<VARIABLE_ID>", - "<KEY>", - functions.WithUpdateVariableValue("<VALUE>"), - functions.WithUpdateVariableSecret(false), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + "<KEY>", + functions.WithUpdateVariableValue("<VALUE>"), + functions.WithUpdateVariableSecret(false), +) 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 index 7c2771efc8..1e652489f0 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/update.md +++ b/docs/examples/1.8.x/server-go/examples/functions/update.md @@ -6,38 +6,31 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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(""), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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(""), +) 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 index 12ac4aeae1..04d9d58fe7 100644 --- a/docs/examples/1.8.x/server-go/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/server-go/examples/graphql/mutation.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := graphql.New(client) - response, error := service.Mutation( - map[string]interface{}{}, - ) +service := graphql.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Mutation( + map[string]interface{}{}, +) 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 index ff67e5e30f..05699ad881 100644 --- a/docs/examples/1.8.x/server-go/examples/graphql/query.md +++ b/docs/examples/1.8.x/server-go/examples/graphql/query.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := graphql.New(client) - response, error := service.Query( - map[string]interface{}{}, - ) +service := graphql.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Query( + map[string]interface{}{}, +) 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-go/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-go/examples/health/get-antivirus.md index ee880a756c..0d7ffcecb5 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetAntivirus( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetAntivirus()) 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 index 976a5b5a50..1d4dd1aa68 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetCache( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetCache()) 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 index 03cbbc190e..3590e97c0e 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetCertificate( - health.WithGetCertificateDomain(""), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetCertificate( + health.WithGetCertificateDomain(""), +) 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 deleted file mode 100644 index 2ab86d11c0..0000000000 --- a/docs/examples/1.8.x/server-go/examples/health/get-d-b.md +++ /dev/null @@ -1,25 +0,0 @@ -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-db.md b/docs/examples/1.8.x/server-go/examples/health/get-db.md new file mode 100644 index 0000000000..293e8666cd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-db.md @@ -0,0 +1,17 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := health.New(client) + +response, error := service.GetDB()) 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 index 59d8baffca..7dfcc5edc8 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetFailedJobs( - "v1-database", - health.WithGetFailedJobsThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetFailedJobs( + "v1-database", + health.WithGetFailedJobsThreshold(0), +) 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 index 451c47c806..998de3891a 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetPubSub( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetPubSub()) 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 index e3a16fb1ae..4f41ee574b 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetQueueBuilds( - health.WithGetQueueBuildsThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueBuilds( + health.WithGetQueueBuildsThreshold(0), +) 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 index 42505bfc25..1cb06f49e6 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetQueueCertificates( - health.WithGetQueueCertificatesThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueCertificates( + health.WithGetQueueCertificatesThreshold(0), +) 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 index 1f1d3669fa..51ad2d8e0f 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetQueueDatabases( - health.WithGetQueueDatabasesName("<NAME>"), - health.WithGetQueueDatabasesThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueDatabases( + health.WithGetQueueDatabasesName("<NAME>"), + health.WithGetQueueDatabasesThreshold(0), +) 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 index 83c40caa4c..97ac4d2a0b 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetQueueDeletes( - health.WithGetQueueDeletesThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueDeletes( + health.WithGetQueueDeletesThreshold(0), +) 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 index d79f07e313..56c7517b44 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetQueueFunctions( - health.WithGetQueueFunctionsThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueFunctions( + health.WithGetQueueFunctionsThreshold(0), +) 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 index b67123f8f8..76952a3167 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetQueueLogs( - health.WithGetQueueLogsThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueLogs( + health.WithGetQueueLogsThreshold(0), +) 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 index efbdfe48bb..3d85dda4f3 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetQueueMails( - health.WithGetQueueMailsThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueMails( + health.WithGetQueueMailsThreshold(0), +) 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 index 65c167fc18..db8a90345d 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetQueueMessaging( - health.WithGetQueueMessagingThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueMessaging( + health.WithGetQueueMessagingThreshold(0), +) 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 index 8a009960b1..ae5c524662 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetQueueMigrations( - health.WithGetQueueMigrationsThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueMigrations( + health.WithGetQueueMigrationsThreshold(0), +) 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 index ba3c71317a..28de62a3e1 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetQueueStatsResources( - health.WithGetQueueStatsResourcesThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueStatsResources( + health.WithGetQueueStatsResourcesThreshold(0), +) 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 index cdc175887f..e081c077a6 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetQueueUsage( - health.WithGetQueueUsageThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueUsage( + health.WithGetQueueUsageThreshold(0), +) 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 index 06791aa229..85acb5207d 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetQueueWebhooks( - health.WithGetQueueWebhooksThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueWebhooks( + health.WithGetQueueWebhooksThreshold(0), +) 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 index 4e88e0a555..41b5dfaab0 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetStorageLocal( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetStorageLocal()) 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 index 3ec9ed8f6d..33ad742e2c 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetStorage( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetStorage()) 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 index 323746e93d..f995ad9ddc 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.GetTime( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetTime()) 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 index 50443c9430..da7e86a80d 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get.md +++ b/docs/examples/1.8.x/server-go/examples/health/get.md @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := health.New(client) - response, error := service.Get( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get()) 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 index 801df85bb4..87a4513d51 100644 --- a/docs/examples/1.8.x/server-go/examples/locale/get.md +++ b/docs/examples/1.8.x/server-go/examples/locale/get.md @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := locale.New(client) - response, error := service.Get( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get()) 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 index 6625746b8a..b204a13b07 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := locale.New(client) - response, error := service.ListCodes( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListCodes()) 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 index f6e05db3c5..4db9555f5e 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := locale.New(client) - response, error := service.ListContinents( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListContinents()) 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 deleted file mode 100644 index 9f85161f1e..0000000000 --- a/docs/examples/1.8.x/server-go/examples/locale/list-countries-e-u.md +++ /dev/null @@ -1,25 +0,0 @@ -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-eu.md b/docs/examples/1.8.x/server-go/examples/locale/list-countries-eu.md new file mode 100644 index 0000000000..e46c9235c9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-countries-eu.md @@ -0,0 +1,17 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) + +service := locale.New(client) + +response, error := service.ListCountriesEU()) 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 index e7438be997..301d94db2a 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := locale.New(client) - response, error := service.ListCountriesPhones( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListCountriesPhones()) 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 index 5f00e6bca5..b598adbbe0 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := locale.New(client) - response, error := service.ListCountries( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListCountries()) 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 index 6971eb12ec..5046497987 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := locale.New(client) - response, error := service.ListCurrencies( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListCurrencies()) 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 index 23bb409a61..2737401b59 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := locale.New(client) - response, error := service.ListLanguages( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListLanguages()) 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 index 36a5b747ce..ae9a95eba4 100644 --- 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 @@ -6,28 +6,21 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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), +) 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 index 9915ae1398..2c9a09a396 100644 --- 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 @@ -6,32 +6,25 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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(""), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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(""), +) 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 index 266b11ce5f..dd6733bc0d 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.CreateFcmProvider( - "<PROVIDER_ID>", - "<NAME>", - messaging.WithCreateFcmProviderServiceAccountJSON(map[string]interface{}{}), - messaging.WithCreateFcmProviderEnabled(false), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateFCMProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateFCMProviderServiceAccountJSON(map[string]interface{}{}), + messaging.WithCreateFCMProviderEnabled(false), +) 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 index 655cdbf4c3..cbeefd4ebf 100644 --- 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 @@ -6,30 +6,23 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-msg-91-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-msg-91-provider.md new file mode 100644 index 0000000000..3cc3f90cdf --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), +) 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 deleted file mode 100644 index 85c17ff242..0000000000 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-msg91provider.md +++ /dev/null @@ -1,31 +0,0 @@ -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 index 86bd58bab6..fe2371bacd 100644 --- 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 @@ -6,39 +6,32 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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"), +) 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 index 5bc3bd3e9b..c2a6787711 100644 --- 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 @@ -6,28 +6,21 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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), +) 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 index 0afa78f5f6..cb7d62e49c 100644 --- 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 @@ -6,27 +6,20 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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(""), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateSMS( + "<MESSAGE_ID>", + "<CONTENT>", + messaging.WithCreateSMSTopics([]interface{}{}), + messaging.WithCreateSMSUsers([]interface{}{}), + messaging.WithCreateSMSTargets([]interface{}{}), + messaging.WithCreateSMSDraft(false), + messaging.WithCreateSMSScheduledAt(""), +) 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 index 9d84f98a9f..c469aa57e8 100644 --- 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 @@ -6,34 +6,27 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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), +) 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 index 71a46d1cb2..ebc0f6bb39 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithJWT("<YOUR_JWT>") +) - service := messaging.New(client) - response, error := service.CreateSubscriber( - "<TOPIC_ID>", - "<SUBSCRIBER_ID>", - "<TARGET_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + "<TARGET_ID>", +) 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 index e5afce8a43..4605ad3713 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTelesignProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTelesignProviderFrom("+12065550100"), + messaging.WithCreateTelesignProviderCustomerId("<CUSTOMER_ID>"), + messaging.WithCreateTelesignProviderApiKey("<API_KEY>"), + messaging.WithCreateTelesignProviderEnabled(false), +) 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 index 8e36b21dd3..2101fab661 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTextmagicProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTextmagicProviderFrom("+12065550100"), + messaging.WithCreateTextmagicProviderUsername("<USERNAME>"), + messaging.WithCreateTextmagicProviderApiKey("<API_KEY>"), + messaging.WithCreateTextmagicProviderEnabled(false), +) 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 index 9ded515cf2..71814b8d86 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.CreateTopic( - "<TOPIC_ID>", - "<NAME>", - messaging.WithCreateTopicSubscribe(interface{}{"any"}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTopic( + "<TOPIC_ID>", + "<NAME>", + messaging.WithCreateTopicSubscribe(interface{}{"any"}), +) 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 index 1a5d4c79b3..931a2538fa 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTwilioProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTwilioProviderFrom("+12065550100"), + messaging.WithCreateTwilioProviderAccountSid("<ACCOUNT_SID>"), + messaging.WithCreateTwilioProviderAuthToken("<AUTH_TOKEN>"), + messaging.WithCreateTwilioProviderEnabled(false), +) 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 index 10d72a2a5b..6ef3576137 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateVonageProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateVonageProviderFrom("+12065550100"), + messaging.WithCreateVonageProviderApiKey("<API_KEY>"), + messaging.WithCreateVonageProviderApiSecret("<API_SECRET>"), + messaging.WithCreateVonageProviderEnabled(false), +) 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 index 1b492df4a2..f2a07bbb3c 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.DeleteProvider( - "<PROVIDER_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteProvider( + "<PROVIDER_ID>", +) 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 index 8bdbc6c26b..dd8b9889ae 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithJWT("<YOUR_JWT>") +) - service := messaging.New(client) - response, error := service.DeleteSubscriber( - "<TOPIC_ID>", - "<SUBSCRIBER_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", +) 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 index 4bfc03f504..7ebf870539 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.DeleteTopic( - "<TOPIC_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteTopic( + "<TOPIC_ID>", +) 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 index da0cc65cec..f8400c6993 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/delete.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/delete.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.Delete( - "<MESSAGE_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "<MESSAGE_ID>", +) 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 index 0273ce7373..ff1b8fa05b 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.GetMessage( - "<MESSAGE_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetMessage( + "<MESSAGE_ID>", +) 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 index f3736147ea..34781802bf 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.GetProvider( - "<PROVIDER_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetProvider( + "<PROVIDER_ID>", +) 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 index da46b98e6e..7774204ca6 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.GetSubscriber( - "<TOPIC_ID>", - "<SUBSCRIBER_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", +) 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 index 005acefe3d..2f258be446 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.GetTopic( - "<TOPIC_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetTopic( + "<TOPIC_ID>", +) 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 index 2af8b23fc8..aeb6c12f98 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.ListMessageLogs( - "<MESSAGE_ID>", - messaging.WithListMessageLogsQueries([]interface{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListMessageLogs( + "<MESSAGE_ID>", + messaging.WithListMessageLogsQueries([]interface{}{}), +) 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 index afc5646f02..595072eb74 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.ListMessages( - messaging.WithListMessagesQueries([]interface{}{}), - messaging.WithListMessagesSearch("<SEARCH>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListMessages( + messaging.WithListMessagesQueries([]interface{}{}), + messaging.WithListMessagesSearch("<SEARCH>"), +) 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 index 665916c968..8f6ddc07b4 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.ListProviderLogs( - "<PROVIDER_ID>", - messaging.WithListProviderLogsQueries([]interface{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListProviderLogs( + "<PROVIDER_ID>", + messaging.WithListProviderLogsQueries([]interface{}{}), +) 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 index 20c23231b2..2fbde76d7a 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.ListProviders( - messaging.WithListProvidersQueries([]interface{}{}), - messaging.WithListProvidersSearch("<SEARCH>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListProviders( + messaging.WithListProvidersQueries([]interface{}{}), + messaging.WithListProvidersSearch("<SEARCH>"), +) 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 index b794781ad1..d08a1706b4 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.ListSubscriberLogs( - "<SUBSCRIBER_ID>", - messaging.WithListSubscriberLogsQueries([]interface{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListSubscriberLogs( + "<SUBSCRIBER_ID>", + messaging.WithListSubscriberLogsQueries([]interface{}{}), +) 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 index 98c63eb0b6..40fb7c1f07 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.ListSubscribers( - "<TOPIC_ID>", - messaging.WithListSubscribersQueries([]interface{}{}), - messaging.WithListSubscribersSearch("<SEARCH>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListSubscribers( + "<TOPIC_ID>", + messaging.WithListSubscribersQueries([]interface{}{}), + messaging.WithListSubscribersSearch("<SEARCH>"), +) 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 index 3df399eab3..16d9828499 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.ListTargets( - "<MESSAGE_ID>", - messaging.WithListTargetsQueries([]interface{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListTargets( + "<MESSAGE_ID>", + messaging.WithListTargetsQueries([]interface{}{}), +) 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 index d972c202ed..e147de400a 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.ListTopicLogs( - "<TOPIC_ID>", - messaging.WithListTopicLogsQueries([]interface{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListTopicLogs( + "<TOPIC_ID>", + messaging.WithListTopicLogsQueries([]interface{}{}), +) 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 index ca9dba1528..e507de7da8 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.ListTopics( - messaging.WithListTopicsQueries([]interface{}{}), - messaging.WithListTopicsSearch("<SEARCH>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListTopics( + messaging.WithListTopicsQueries([]interface{}{}), + messaging.WithListTopicsSearch("<SEARCH>"), +) 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 index 74e4fa56f8..f8c12e88ad 100644 --- 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 @@ -6,28 +6,21 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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), +) 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 index 7dd06e3ea2..91d6ad900f 100644 --- 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 @@ -6,32 +6,25 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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{}{}), +) 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 index c70327a022..28fd91534b 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.UpdateFcmProvider( - "<PROVIDER_ID>", - messaging.WithUpdateFcmProviderName("<NAME>"), - messaging.WithUpdateFcmProviderEnabled(false), - messaging.WithUpdateFcmProviderServiceAccountJSON(map[string]interface{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateFCMProvider( + "<PROVIDER_ID>", + messaging.WithUpdateFCMProviderName("<NAME>"), + messaging.WithUpdateFCMProviderEnabled(false), + messaging.WithUpdateFCMProviderServiceAccountJSON(map[string]interface{}{}), +) 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 index 80f078b056..d5f17b3d25 100644 --- 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 @@ -6,30 +6,23 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-msg-91-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-msg-91-provider.md new file mode 100644 index 0000000000..825d2d4940 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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>"), +) 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 deleted file mode 100644 index 70dbad455b..0000000000 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-msg91provider.md +++ /dev/null @@ -1,31 +0,0 @@ -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 index e68bd77311..190627fa43 100644 --- 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 @@ -6,39 +6,32 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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"), +) 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 index 9c442e26e5..4a9f822c58 100644 --- 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 @@ -6,28 +6,21 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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>"), +) 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 index f62798e298..988de20082 100644 --- 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 @@ -6,27 +6,20 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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(""), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateSMS( + "<MESSAGE_ID>", + messaging.WithUpdateSMSTopics([]interface{}{}), + messaging.WithUpdateSMSUsers([]interface{}{}), + messaging.WithUpdateSMSTargets([]interface{}{}), + messaging.WithUpdateSMSContent("<CONTENT>"), + messaging.WithUpdateSMSDraft(false), + messaging.WithUpdateSMSScheduledAt(""), +) 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 index ccfb91b1b9..1519750183 100644 --- 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 @@ -6,34 +6,27 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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), +) 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 index 77549380c8..d00c6b6eb1 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateTelesignProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTelesignProviderName("<NAME>"), + messaging.WithUpdateTelesignProviderEnabled(false), + messaging.WithUpdateTelesignProviderCustomerId("<CUSTOMER_ID>"), + messaging.WithUpdateTelesignProviderApiKey("<API_KEY>"), + messaging.WithUpdateTelesignProviderFrom("<FROM>"), +) 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 index 55350f7a1e..38e1bed245 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateTextmagicProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTextmagicProviderName("<NAME>"), + messaging.WithUpdateTextmagicProviderEnabled(false), + messaging.WithUpdateTextmagicProviderUsername("<USERNAME>"), + messaging.WithUpdateTextmagicProviderApiKey("<API_KEY>"), + messaging.WithUpdateTextmagicProviderFrom("<FROM>"), +) 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 index a83b5e4852..f7c0044bc3 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := messaging.New(client) - response, error := service.UpdateTopic( - "<TOPIC_ID>", - messaging.WithUpdateTopicName("<NAME>"), - messaging.WithUpdateTopicSubscribe(interface{}{"any"}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateTopic( + "<TOPIC_ID>", + messaging.WithUpdateTopicName("<NAME>"), + messaging.WithUpdateTopicSubscribe(interface{}{"any"}), +) 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 index 61b95dabf1..644d6d87d5 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateTwilioProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTwilioProviderName("<NAME>"), + messaging.WithUpdateTwilioProviderEnabled(false), + messaging.WithUpdateTwilioProviderAccountSid("<ACCOUNT_SID>"), + messaging.WithUpdateTwilioProviderAuthToken("<AUTH_TOKEN>"), + messaging.WithUpdateTwilioProviderFrom("<FROM>"), +) 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 index 4cfc03c2b5..01ebeb3334 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateVonageProvider( + "<PROVIDER_ID>", + messaging.WithUpdateVonageProviderName("<NAME>"), + messaging.WithUpdateVonageProviderEnabled(false), + messaging.WithUpdateVonageProviderApiKey("<API_KEY>"), + messaging.WithUpdateVonageProviderApiSecret("<API_SECRET>"), + messaging.WithUpdateVonageProviderFrom("<FROM>"), +) 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 index 5a13b3e152..1c85372388 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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>"), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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>"), +) 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 index 84b4932b36..177dc48b57 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.CreateDuplicateDeployment( - "<SITE_ID>", - "<DEPLOYMENT_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDuplicateDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", +) 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 index b67f65f6c9..483d3e79ff 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.CreateTemplateDeployment( - "<SITE_ID>", - "<REPOSITORY>", - "<OWNER>", - "<ROOT_DIRECTORY>", - "<VERSION>", - sites.WithCreateTemplateDeploymentActivate(false), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTemplateDeployment( + "<SITE_ID>", + "<REPOSITORY>", + "<OWNER>", + "<ROOT_DIRECTORY>", + "<VERSION>", + sites.WithCreateTemplateDeploymentActivate(false), +) 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 index 05148190e9..7681f0d561 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.CreateVariable( - "<SITE_ID>", - "<KEY>", - "<VALUE>", - sites.WithCreateVariableSecret(false), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateVariable( + "<SITE_ID>", + "<KEY>", + "<VALUE>", + sites.WithCreateVariableSecret(false), +) 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 index c13edc5900..2e39147d6b 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.CreateVcsDeployment( - "<SITE_ID>", - "branch", - "<REFERENCE>", - sites.WithCreateVcsDeploymentActivate(false), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateVcsDeployment( + "<SITE_ID>", + "branch", + "<REFERENCE>", + sites.WithCreateVcsDeploymentActivate(false), +) 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 index f87a3068a2..e011baf92c 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/create.md +++ b/docs/examples/1.8.x/server-go/examples/sites/create.md @@ -6,38 +6,31 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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(""), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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(""), +) 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 index 5e5de1a888..36d313344a 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.DeleteDeployment( - "<SITE_ID>", - "<DEPLOYMENT_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", +) 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 index fe3add16fe..34a77611f2 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.DeleteLog( - "<SITE_ID>", - "<LOG_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteLog( + "<SITE_ID>", + "<LOG_ID>", +) 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 index 389d454c4c..00e6c5c4f7 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.DeleteVariable( - "<SITE_ID>", - "<VARIABLE_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteVariable( + "<SITE_ID>", + "<VARIABLE_ID>", +) 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 index 184276dc4b..4a93cdb12c 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/delete.md +++ b/docs/examples/1.8.x/server-go/examples/sites/delete.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.Delete( - "<SITE_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "<SITE_ID>", +) 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 index a90d358073..b3f1101bc0 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.GetDeploymentDownload( - "<SITE_ID>", - "<DEPLOYMENT_ID>", - sites.WithGetDeploymentDownloadType("source"), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetDeploymentDownload( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + sites.WithGetDeploymentDownloadType("source"), +) 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 index 17d066e8fe..28f4917467 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.GetDeployment( - "<SITE_ID>", - "<DEPLOYMENT_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", +) 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 index ca0031546d..1d5aacb2f0 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.GetLog( - "<SITE_ID>", - "<LOG_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetLog( + "<SITE_ID>", + "<LOG_ID>", +) 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 index 55f8ddf6ca..91f1a0d1ea 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.GetVariable( - "<SITE_ID>", - "<VARIABLE_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetVariable( + "<SITE_ID>", + "<VARIABLE_ID>", +) 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 index e876766da8..9c1f38da3d 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/get.md +++ b/docs/examples/1.8.x/server-go/examples/sites/get.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.Get( - "<SITE_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get( + "<SITE_ID>", +) 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 index b6ab37ea79..b4dafaf145 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.ListDeployments( - "<SITE_ID>", - sites.WithListDeploymentsQueries([]interface{}{}), - sites.WithListDeploymentsSearch("<SEARCH>"), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListDeployments( + "<SITE_ID>", + sites.WithListDeploymentsQueries([]interface{}{}), + sites.WithListDeploymentsSearch("<SEARCH>"), +) 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 index dae9a1814d..d876ac1acf 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.ListFrameworks( - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListFrameworks()) 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 index 1c756cdbb6..64b6009adc 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.ListLogs( - "<SITE_ID>", - sites.WithListLogsQueries([]interface{}{}), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListLogs( + "<SITE_ID>", + sites.WithListLogsQueries([]interface{}{}), +) 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 index 96d74c7fc3..f3a46b225f 100644 --- 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 @@ -6,20 +6,12 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.ListSpecifications( - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListSpecifications()) 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 index c6d329736d..18d1e48033 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.ListVariables( - "<SITE_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListVariables( + "<SITE_ID>", +) 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 index e43442226a..83fea84293 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/list.md +++ b/docs/examples/1.8.x/server-go/examples/sites/list.md @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.List( - sites.WithListQueries([]interface{}{}), - sites.WithListSearch("<SEARCH>"), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.List( + sites.WithListQueries([]interface{}{}), + sites.WithListSearch("<SEARCH>"), +) 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 index 3c8cd3201d..29dad9b1f6 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.UpdateDeploymentStatus( - "<SITE_ID>", - "<DEPLOYMENT_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateDeploymentStatus( + "<SITE_ID>", + "<DEPLOYMENT_ID>", +) 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 index 806fbb35a6..176d641073 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.UpdateSiteDeployment( - "<SITE_ID>", - "<DEPLOYMENT_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateSiteDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", +) 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 index c2f0506b44..99879be702 100644 --- 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 @@ -6,25 +6,18 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := sites.New(client) - response, error := service.UpdateVariable( - "<SITE_ID>", - "<VARIABLE_ID>", - "<KEY>", - sites.WithUpdateVariableValue("<VALUE>"), - sites.WithUpdateVariableSecret(false), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + "<KEY>", + sites.WithUpdateVariableValue("<VALUE>"), + sites.WithUpdateVariableSecret(false), +) 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 index 3dd53e283a..fee0eb8bf6 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/update.md +++ b/docs/examples/1.8.x/server-go/examples/sites/update.md @@ -6,38 +6,31 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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(""), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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(""), +) 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 index a2679d9894..64e3c40191 100644 --- 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 @@ -6,30 +6,23 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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), +) 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 index 4d87231490..b195c66a8f 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - 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")"}), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateFile( + "<BUCKET_ID>", + "<FILE_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + storage.WithCreateFilePermissions(interface{}{"read("any")"}), +) 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 index 28832a1187..8142212a9f 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := storage.New(client) - response, error := service.DeleteBucket( - "<BUCKET_ID>", - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteBucket( + "<BUCKET_ID>", +) 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 index e616054107..af3f921c56 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := storage.New(client) - response, error := service.DeleteFile( - "<BUCKET_ID>", - "<FILE_ID>", - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteFile( + "<BUCKET_ID>", + "<FILE_ID>", +) 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 index acb722546e..c52ebbe004 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := storage.New(client) - response, error := service.GetBucket( - "<BUCKET_ID>", - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetBucket( + "<BUCKET_ID>", +) 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 index c0a1724eac..bc1d7333be 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := storage.New(client) - response, error := service.GetFileDownload( - "<BUCKET_ID>", - "<FILE_ID>", - storage.WithGetFileDownloadToken("<TOKEN>"), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetFileDownload( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithGetFileDownloadToken("<TOKEN>"), +) 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 index 5d7d75a4f8..956fbd191d 100644 --- 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 @@ -6,34 +6,27 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - 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>"), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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>"), +) 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 index ca59105821..a2189750be 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := storage.New(client) - response, error := service.GetFileView( - "<BUCKET_ID>", - "<FILE_ID>", - storage.WithGetFileViewToken("<TOKEN>"), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetFileView( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithGetFileViewToken("<TOKEN>"), +) 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 index b33170e93c..383d4052da 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := storage.New(client) - response, error := service.GetFile( - "<BUCKET_ID>", - "<FILE_ID>", - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetFile( + "<BUCKET_ID>", + "<FILE_ID>", +) 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 index 79f4c4b3e4..3d10e6ab7f 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := storage.New(client) - response, error := service.ListBuckets( - storage.WithListBucketsQueries([]interface{}{}), - storage.WithListBucketsSearch("<SEARCH>"), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListBuckets( + storage.WithListBucketsQueries([]interface{}{}), + storage.WithListBucketsSearch("<SEARCH>"), +) 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 index 2c2652a97e..62a09b3f20 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := storage.New(client) - response, error := service.ListFiles( - "<BUCKET_ID>", - storage.WithListFilesQueries([]interface{}{}), - storage.WithListFilesSearch("<SEARCH>"), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListFiles( + "<BUCKET_ID>", + storage.WithListFilesQueries([]interface{}{}), + storage.WithListFilesSearch("<SEARCH>"), +) 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 index ac28e5b649..bb5f7aa76d 100644 --- 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 @@ -6,30 +6,23 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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), +) 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 index d6887a82c1..79a75bab4c 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := storage.New(client) - response, error := service.UpdateFile( - "<BUCKET_ID>", - "<FILE_ID>", - storage.WithUpdateFileName("<NAME>"), - storage.WithUpdateFilePermissions(interface{}{"read("any")"}), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateFile( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithUpdateFileName("<NAME>"), + storage.WithUpdateFilePermissions(interface{}{"read("any")"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..6b35615487 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.CreateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateBooleanColumnDefault(false), + tablesdb.WithCreateBooleanColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..24a8aa7567 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.CreateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateDatetimeColumnDefault(""), + tablesdb.WithCreateDatetimeColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..918b3785c4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-email-column.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.CreateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateEmailColumnDefault("email@example.com"), + tablesdb.WithCreateEmailColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..9eaef4be4c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-enum-column.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.CreateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + tablesdb.WithCreateEnumColumnDefault("<DEFAULT>"), + tablesdb.WithCreateEnumColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..f630565e39 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-float-column.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.CreateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateFloatColumnMin(0), + tablesdb.WithCreateFloatColumnMax(0), + tablesdb.WithCreateFloatColumnDefault(0), + tablesdb.WithCreateFloatColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..fb292b9914 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-index.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.CreateIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + "key", + []interface{}{}, + tablesdb.WithCreateIndexOrders([]interface{}{}), + tablesdb.WithCreateIndexLengths([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..a56f5eec8b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-integer-column.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.CreateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateIntegerColumnMin(0), + tablesdb.WithCreateIntegerColumnMax(0), + tablesdb.WithCreateIntegerColumnDefault(0), + tablesdb.WithCreateIntegerColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..358b4cfa4b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-ip-column.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.CreateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateIpColumnDefault(""), + tablesdb.WithCreateIpColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..0423509787 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.CreateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<RELATED_TABLE_ID>", + "oneToOne", + tablesdb.WithCreateRelationshipColumnTwoWay(false), + tablesdb.WithCreateRelationshipColumnKey(""), + tablesdb.WithCreateRelationshipColumnTwoWayKey(""), + tablesdb.WithCreateRelationshipColumnOnDelete("cascade"), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..2441fa3dd8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-row.md @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) + +service := tablesdb.New(client) + +response, error := service.CreateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + map[string]interface{}{}, + tablesdb.WithCreateRowPermissions(interface{}{"read("any")"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..2d83be06df --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-rows.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.CreateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..b31f583806 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-string-column.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.CreateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + 1, + false, + tablesdb.WithCreateStringColumnDefault("<DEFAULT>"), + tablesdb.WithCreateStringColumnArray(false), + tablesdb.WithCreateStringColumnEncrypt(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-table.md new file mode 100644 index 0000000000..c454c08d6e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-table.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.CreateTable( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + tablesdb.WithCreateTablePermissions(interface{}{"read("any")"}), + tablesdb.WithCreateTableRowSecurity(false), + tablesdb.WithCreateTableEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..55abd16818 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-url-column.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.CreateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateUrlColumnDefault("https://example.com"), + tablesdb.WithCreateUrlColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create.md new file mode 100644 index 0000000000..d09b6aeab8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.Create( + "<DATABASE_ID>", + "<NAME>", + tablesdb.WithCreateEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..cd8d6c8983 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) + +service := tablesdb.New(client) + +response, error := service.DecrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + tablesdb.WithDecrementRowColumnValue(0), + tablesdb.WithDecrementRowColumnMin(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..475f4a4e8c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-column.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.DeleteColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..2c3b7759af --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-index.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.DeleteIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..8571a54c6c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-row.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) + +service := tablesdb.New(client) + +response, error := service.DeleteRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..364a4c942f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-rows.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.DeleteRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithDeleteRowsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..9274fc61b5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-table.md @@ -0,0 +1,20 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.DeleteTable( + "<DATABASE_ID>", + "<TABLE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete.md new file mode 100644 index 0000000000..fb00bf0666 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete.md @@ -0,0 +1,19 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.Delete( + "<DATABASE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..2cb626f921 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get-column.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.GetColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..a289d5efeb --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get-index.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.GetIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..3a555f07c5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get-row.md @@ -0,0 +1,22 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) + +service := tablesdb.New(client) + +response, error := service.GetRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tablesdb.WithGetRowQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..eb42f82c16 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get-table.md @@ -0,0 +1,20 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.GetTable( + "<DATABASE_ID>", + "<TABLE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get.md new file mode 100644 index 0000000000..9bf18901b6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get.md @@ -0,0 +1,19 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.Get( + "<DATABASE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..d072099cc6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/increment-row-column.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) + +service := tablesdb.New(client) + +response, error := service.IncrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + tablesdb.WithIncrementRowColumnValue(0), + tablesdb.WithIncrementRowColumnMax(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..c6646c0f1d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list-columns.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.ListColumns( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithListColumnsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..bc13bb7488 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list-indexes.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.ListIndexes( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithListIndexesQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..34a7b6fb98 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list-rows.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) + +service := tablesdb.New(client) + +response, error := service.ListRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithListRowsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..2029c538ee --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list-tables.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.ListTables( + "<DATABASE_ID>", + tablesdb.WithListTablesQueries([]interface{}{}), + tablesdb.WithListTablesSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list.md new file mode 100644 index 0000000000..99f35ae06d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list.md @@ -0,0 +1,20 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.List( + tablesdb.WithListQueries([]interface{}{}), + tablesdb.WithListSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..9b0bdd302e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.UpdateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + false, + tablesdb.WithUpdateBooleanColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..9c406cae6c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.UpdateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + tablesdb.WithUpdateDatetimeColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..74483f31e3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-email-column.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.UpdateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "email@example.com", + tablesdb.WithUpdateEmailColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..f215172565 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-enum-column.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.UpdateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + "<DEFAULT>", + tablesdb.WithUpdateEnumColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..9daf2c2236 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-float-column.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.UpdateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + tablesdb.WithUpdateFloatColumnMin(0), + tablesdb.WithUpdateFloatColumnMax(0), + tablesdb.WithUpdateFloatColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..86a113522c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-integer-column.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.UpdateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + tablesdb.WithUpdateIntegerColumnMin(0), + tablesdb.WithUpdateIntegerColumnMax(0), + tablesdb.WithUpdateIntegerColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..1c4bdb4f96 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-ip-column.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.UpdateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + tablesdb.WithUpdateIpColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..ed923a2d33 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.UpdateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + tablesdb.WithUpdateRelationshipColumnOnDelete("cascade"), + tablesdb.WithUpdateRelationshipColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..1e819bb589 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-row.md @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) + +service := tablesdb.New(client) + +response, error := service.UpdateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tablesdb.WithUpdateRowData(map[string]interface{}{}), + tablesdb.WithUpdateRowPermissions(interface{}{"read("any")"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..3541dce134 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-rows.md @@ -0,0 +1,22 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.UpdateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithUpdateRowsData(map[string]interface{}{}), + tablesdb.WithUpdateRowsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..4366602bd8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-string-column.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.UpdateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "<DEFAULT>", + tablesdb.WithUpdateStringColumnSize(1), + tablesdb.WithUpdateStringColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-table.md new file mode 100644 index 0000000000..4eb692ac14 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-table.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.UpdateTable( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + tablesdb.WithUpdateTablePermissions(interface{}{"read("any")"}), + tablesdb.WithUpdateTableRowSecurity(false), + tablesdb.WithUpdateTableEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..998d0e773f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-url-column.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.UpdateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "https://example.com", + tablesdb.WithUpdateUrlColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update.md new file mode 100644 index 0000000000..3ad3a0c2f5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.Update( + "<DATABASE_ID>", + "<NAME>", + tablesdb.WithUpdateEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..9fec778142 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-row.md @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) + +service := tablesdb.New(client) + +response, error := service.UpsertRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tablesdb.WithUpsertRowData(map[string]interface{}{}), + tablesdb.WithUpsertRowPermissions(interface{}{"read("any")"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..5ded736cd0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-rows.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := tablesdb.New(client) + +response, error := service.UpsertRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, +) 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 index e6cfb8b9c8..b8a71c188e 100644 --- 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 @@ -6,27 +6,20 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - 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>"), - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +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>"), +) 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 index 773da7afcd..0a0fa5aae6 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/create.md +++ b/docs/examples/1.8.x/server-go/examples/teams/create.md @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := teams.New(client) - response, error := service.Create( - "<TEAM_ID>", - "<NAME>", - teams.WithCreateRoles([]interface{}{}), - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Create( + "<TEAM_ID>", + "<NAME>", + teams.WithCreateRoles([]interface{}{}), +) 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 index 5ffee885fb..1d9e19832d 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := teams.New(client) - response, error := service.DeleteMembership( - "<TEAM_ID>", - "<MEMBERSHIP_ID>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", +) 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 index c66c7056bd..8cf9892daa 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/delete.md +++ b/docs/examples/1.8.x/server-go/examples/teams/delete.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := teams.New(client) - response, error := service.Delete( - "<TEAM_ID>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "<TEAM_ID>", +) 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 index 466ab72059..47d63bbb2b 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := teams.New(client) - response, error := service.GetMembership( - "<TEAM_ID>", - "<MEMBERSHIP_ID>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", +) 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 index d8400e420a..fd487d2c79 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := teams.New(client) - response, error := service.GetPrefs( - "<TEAM_ID>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetPrefs( + "<TEAM_ID>", +) 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 index 0f503c7f5b..64dfb9b633 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/get.md +++ b/docs/examples/1.8.x/server-go/examples/teams/get.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := teams.New(client) - response, error := service.Get( - "<TEAM_ID>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get( + "<TEAM_ID>", +) 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 index 90b2babcb0..0e7ea18fd3 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := teams.New(client) - response, error := service.ListMemberships( - "<TEAM_ID>", - teams.WithListMembershipsQueries([]interface{}{}), - teams.WithListMembershipsSearch("<SEARCH>"), - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListMemberships( + "<TEAM_ID>", + teams.WithListMembershipsQueries([]interface{}{}), + teams.WithListMembershipsSearch("<SEARCH>"), +) 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 index e70ca11587..579546fcc2 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/list.md +++ b/docs/examples/1.8.x/server-go/examples/teams/list.md @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := teams.New(client) - response, error := service.List( - teams.WithListQueries([]interface{}{}), - teams.WithListSearch("<SEARCH>"), - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.List( + teams.WithListQueries([]interface{}{}), + teams.WithListSearch("<SEARCH>"), +) 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 index c9e1215971..72bb53e065 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := teams.New(client) - response, error := service.UpdateMembershipStatus( - "<TEAM_ID>", - "<MEMBERSHIP_ID>", - "<USER_ID>", - "<SECRET>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMembershipStatus( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + "<USER_ID>", + "<SECRET>", +) 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 index 8721a5ed6d..4bfde07218 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := teams.New(client) - response, error := service.UpdateMembership( - "<TEAM_ID>", - "<MEMBERSHIP_ID>", - []interface{}{}, - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + []interface{}{}, +) 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 index 0d75a7bb32..02fba6b4bd 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := teams.New(client) - response, error := service.UpdateName( - "<TEAM_ID>", - "<NAME>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateName( + "<TEAM_ID>", + "<NAME>", +) 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 index e9631d5bf3..a5f44c079f 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithSession("") +) - service := teams.New(client) - response, error := service.UpdatePrefs( - "<TEAM_ID>", - map[string]interface{}{}, - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePrefs( + "<TEAM_ID>", + map[string]interface{}{}, +) 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 index 3109062d9e..b05e5f7e4d 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := tokens.New(client) - response, error := service.CreateFileToken( - "<BUCKET_ID>", - "<FILE_ID>", - tokens.WithCreateFileTokenExpire(""), - ) +service := tokens.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateFileToken( + "<BUCKET_ID>", + "<FILE_ID>", + tokens.WithCreateFileTokenExpire(""), +) 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 index a376bab09b..807ba41025 100644 --- a/docs/examples/1.8.x/server-go/examples/tokens/delete.md +++ b/docs/examples/1.8.x/server-go/examples/tokens/delete.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := tokens.New(client) - response, error := service.Delete( - "<TOKEN_ID>", - ) +service := tokens.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "<TOKEN_ID>", +) 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 index 4c01f68669..277e46210a 100644 --- a/docs/examples/1.8.x/server-go/examples/tokens/get.md +++ b/docs/examples/1.8.x/server-go/examples/tokens/get.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := tokens.New(client) - response, error := service.Get( - "<TOKEN_ID>", - ) +service := tokens.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get( + "<TOKEN_ID>", +) 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 index 99876af081..7686f065e7 100644 --- a/docs/examples/1.8.x/server-go/examples/tokens/list.md +++ b/docs/examples/1.8.x/server-go/examples/tokens/list.md @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := tokens.New(client) - response, error := service.List( - "<BUCKET_ID>", - "<FILE_ID>", - tokens.WithListQueries([]interface{}{}), - ) +service := tokens.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.List( + "<BUCKET_ID>", + "<FILE_ID>", + tokens.WithListQueries([]interface{}{}), +) 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 index eaba8eaafb..b4bbc5476f 100644 --- a/docs/examples/1.8.x/server-go/examples/tokens/update.md +++ b/docs/examples/1.8.x/server-go/examples/tokens/update.md @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := tokens.New(client) - response, error := service.Update( - "<TOKEN_ID>", - tokens.WithUpdateExpire(""), - ) +service := tokens.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Update( + "<TOKEN_ID>", + tokens.WithUpdateExpire(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-argon-2-user.md b/docs/examples/1.8.x/server-go/examples/users/create-argon-2-user.md new file mode 100644 index 0000000000..f5b651a1e8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-argon-2-user.md @@ -0,0 +1,22 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := users.New(client) + +response, error := service.CreateArgon2User( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateArgon2UserName("<NAME>"), +) 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 deleted file mode 100644 index 28565ff01c..0000000000 --- a/docs/examples/1.8.x/server-go/examples/users/create-argon2user.md +++ /dev/null @@ -1,29 +0,0 @@ -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 index fedf00327e..b021f96ff5 100644 --- 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 @@ -6,24 +6,17 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.CreateBcryptUser( - "<USER_ID>", - "email@example.com", - "password", - users.WithCreateBcryptUserName("<NAME>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateBcryptUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateBcryptUserName("<NAME>"), +) 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 deleted file mode 100644 index c335ab4ea1..0000000000 --- a/docs/examples/1.8.x/server-go/examples/users/create-j-w-t.md +++ /dev/null @@ -1,28 +0,0 @@ -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-jwt.md b/docs/examples/1.8.x/server-go/examples/users/create-jwt.md new file mode 100644 index 0000000000..426f832ba0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-jwt.md @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := users.New(client) + +response, error := service.CreateJWT( + "<USER_ID>", + users.WithCreateJWTSessionId("<SESSION_ID>"), + users.WithCreateJWTDuration(0), +) 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 deleted file mode 100644 index 369aab7ac7..0000000000 --- a/docs/examples/1.8.x/server-go/examples/users/create-m-d5user.md +++ /dev/null @@ -1,29 +0,0 @@ -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-md-5-user.md b/docs/examples/1.8.x/server-go/examples/users/create-md-5-user.md new file mode 100644 index 0000000000..0da3f6877e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-md-5-user.md @@ -0,0 +1,22 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := users.New(client) + +response, error := service.CreateMD5User( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateMD5UserName("<NAME>"), +) 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 index 1c2097e571..4808f63329 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.CreateMfaRecoveryCodes( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateMFARecoveryCodes( + "<USER_ID>", +) 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 deleted file mode 100644 index 2a09bec811..0000000000 --- a/docs/examples/1.8.x/server-go/examples/users/create-p-h-pass-user.md +++ /dev/null @@ -1,29 +0,0 @@ -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-ph-pass-user.md b/docs/examples/1.8.x/server-go/examples/users/create-ph-pass-user.md new file mode 100644 index 0000000000..28e77e3749 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-ph-pass-user.md @@ -0,0 +1,22 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := users.New(client) + +response, error := service.CreatePHPassUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreatePHPassUserName("<NAME>"), +) 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 deleted file mode 100644 index 2bc05f91f9..0000000000 --- a/docs/examples/1.8.x/server-go/examples/users/create-s-h-a-user.md +++ /dev/null @@ -1,30 +0,0 @@ -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 index f815121290..51cc11bfa3 100644 --- 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 @@ -6,27 +6,20 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateScryptModifiedUser( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + "<PASSWORD_SALT_SEPARATOR>", + "<PASSWORD_SIGNER_KEY>", + users.WithCreateScryptModifiedUserName("<NAME>"), +) 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 index f2fde655d2..a64fcfbb29 100644 --- 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 @@ -6,29 +6,22 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateScryptUser( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + 0, + 0, + 0, + 0, + users.WithCreateScryptUserName("<NAME>"), +) 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 index b868319613..7bbd39de91 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.CreateSession( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateSession( + "<USER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-sha-user.md b/docs/examples/1.8.x/server-go/examples/users/create-sha-user.md new file mode 100644 index 0000000000..721159851b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-sha-user.md @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) + +service := users.New(client) + +response, error := service.CreateSHAUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateSHAUserPasswordVersion("sha1"), + users.WithCreateSHAUserName("<NAME>"), +) 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 index 71c449c603..8d4f2841b1 100644 --- 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 @@ -6,26 +6,19 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.CreateTarget( - "<USER_ID>", - "<TARGET_ID>", - "email", - "<IDENTIFIER>", - users.WithCreateTargetProviderId("<PROVIDER_ID>"), - users.WithCreateTargetName("<NAME>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTarget( + "<USER_ID>", + "<TARGET_ID>", + "email", + "<IDENTIFIER>", + users.WithCreateTargetProviderId("<PROVIDER_ID>"), + users.WithCreateTargetName("<NAME>"), +) 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 index d50c7efc28..44d96c1f70 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.CreateToken( - "<USER_ID>", - users.WithCreateTokenLength(4), - users.WithCreateTokenExpire(60), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateToken( + "<USER_ID>", + users.WithCreateTokenLength(4), + users.WithCreateTokenExpire(60), +) 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 index 7cd8920bb2..b4d1afca6b 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create.md +++ b/docs/examples/1.8.x/server-go/examples/users/create.md @@ -6,25 +6,18 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_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>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Create( + "<USER_ID>", + users.WithCreateEmail("email@example.com"), + users.WithCreatePhone("+12065550100"), + users.WithCreatePassword(""), + users.WithCreateName("<NAME>"), +) 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 index f35a7917cc..14baa6607d 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.DeleteIdentity( - "<IDENTITY_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteIdentity( + "<IDENTITY_ID>", +) 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 index bb845b90c1..d32a5c3e31 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.DeleteMfaAuthenticator( - "<USER_ID>", - "totp", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteMFAAuthenticator( + "<USER_ID>", + "totp", +) 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 index 62f4bd5a89..3162ae92b4 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.DeleteSession( - "<USER_ID>", - "<SESSION_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteSession( + "<USER_ID>", + "<SESSION_ID>", +) 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 index 235b2b1e9e..8d0bbfc155 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.DeleteSessions( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteSessions( + "<USER_ID>", +) 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 index ce942a9ead..2fa4ae910a 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.DeleteTarget( - "<USER_ID>", - "<TARGET_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteTarget( + "<USER_ID>", + "<TARGET_ID>", +) 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 index 1654957c95..72a4122b0f 100644 --- a/docs/examples/1.8.x/server-go/examples/users/delete.md +++ b/docs/examples/1.8.x/server-go/examples/users/delete.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.Delete( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "<USER_ID>", +) 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 index 8b16231be7..ff24b6ff9c 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.GetMfaRecoveryCodes( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetMFARecoveryCodes( + "<USER_ID>", +) 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 index 4d3298fab8..e4a05d1ce3 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.GetPrefs( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetPrefs( + "<USER_ID>", +) 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 index 481052d75d..b4b99c7ef7 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.GetTarget( - "<USER_ID>", - "<TARGET_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetTarget( + "<USER_ID>", + "<TARGET_ID>", +) 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 index a4da4b741d..85a8440dee 100644 --- a/docs/examples/1.8.x/server-go/examples/users/get.md +++ b/docs/examples/1.8.x/server-go/examples/users/get.md @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.Get( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get( + "<USER_ID>", +) 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 index a9916f5fa3..047b2165f7 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.ListIdentities( - users.WithListIdentitiesQueries([]interface{}{}), - users.WithListIdentitiesSearch("<SEARCH>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListIdentities( + users.WithListIdentitiesQueries([]interface{}{}), + users.WithListIdentitiesSearch("<SEARCH>"), +) 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 index bb36dc531c..56f3397939 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.ListLogs( - "<USER_ID>", - users.WithListLogsQueries([]interface{}{}), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListLogs( + "<USER_ID>", + users.WithListLogsQueries([]interface{}{}), +) 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 index 1591603971..fd2f1329fd 100644 --- 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 @@ -6,23 +6,16 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.ListMemberships( - "<USER_ID>", - users.WithListMembershipsQueries([]interface{}{}), - users.WithListMembershipsSearch("<SEARCH>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListMemberships( + "<USER_ID>", + users.WithListMembershipsQueries([]interface{}{}), + users.WithListMembershipsSearch("<SEARCH>"), +) 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 index 8709b21ae7..9a3c32631d 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.ListMfaFactors( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListMFAFactors( + "<USER_ID>", +) 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 index be4202400c..6b55a9a5fb 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.ListSessions( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListSessions( + "<USER_ID>", +) 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 index ed78ade5a8..ac5ba41c97 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.ListTargets( - "<USER_ID>", - users.WithListTargetsQueries([]interface{}{}), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListTargets( + "<USER_ID>", + users.WithListTargetsQueries([]interface{}{}), +) 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 index c74a59a7e2..cffc9793f0 100644 --- a/docs/examples/1.8.x/server-go/examples/users/list.md +++ b/docs/examples/1.8.x/server-go/examples/users/list.md @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.List( - users.WithListQueries([]interface{}{}), - users.WithListSearch("<SEARCH>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.List( + users.WithListQueries([]interface{}{}), + users.WithListSearch("<SEARCH>"), +) 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 index 411cd831c5..c2326b4c91 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.UpdateEmailVerification( - "<USER_ID>", - false, - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateEmailVerification( + "<USER_ID>", + false, +) 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 index 1e01350731..ac3938a637 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.UpdateEmail( - "<USER_ID>", - "email@example.com", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateEmail( + "<USER_ID>", + "email@example.com", +) 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 index 0b735cdef5..01c37f53ac 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.UpdateLabels( - "<USER_ID>", - []interface{}{}, - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateLabels( + "<USER_ID>", + []interface{}{}, +) 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 index d495b752de..f79ac5c575 100644 --- 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 @@ -6,21 +6,14 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.UpdateMfaRecoveryCodes( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMFARecoveryCodes( + "<USER_ID>", +) 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 index cfcddbf5e1..9cff007fe0 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.UpdateMfa( - "<USER_ID>", - false, - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMFA( + "<USER_ID>", + false, +) 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 index da9f3d5ac7..73255e25bc 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.UpdateName( - "<USER_ID>", - "<NAME>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateName( + "<USER_ID>", + "<NAME>", +) 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 index d09f5bb92c..5aa6e9ef6e 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.UpdatePassword( - "<USER_ID>", - "", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePassword( + "<USER_ID>", + "", +) 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 index fdf01898ea..e90febf7d6 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.UpdatePhoneVerification( - "<USER_ID>", - false, - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePhoneVerification( + "<USER_ID>", + false, +) 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 index f4f5b5d01d..602a012a2d 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.UpdatePhone( - "<USER_ID>", - "+12065550100", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePhone( + "<USER_ID>", + "+12065550100", +) 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 index 75cb55b868..dd607f3c42 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.UpdatePrefs( - "<USER_ID>", - map[string]interface{}{}, - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePrefs( + "<USER_ID>", + map[string]interface{}{}, +) 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 index 964ed3bf92..f93dde9c39 100644 --- 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 @@ -6,22 +6,15 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.UpdateStatus( - "<USER_ID>", - false, - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateStatus( + "<USER_ID>", + false, +) 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 index 2c1ab3b71e..82f3d65de4 100644 --- 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 @@ -6,25 +6,18 @@ import ( "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 - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithKey("<YOUR_API_KEY>") +) - service := users.New(client) - response, error := service.UpdateTarget( - "<USER_ID>", - "<TARGET_ID>", - users.WithUpdateTargetIdentifier("<IDENTIFIER>"), - users.WithUpdateTargetProviderId("<PROVIDER_ID>"), - users.WithUpdateTargetName("<NAME>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateTarget( + "<USER_ID>", + "<TARGET_ID>", + users.WithUpdateTargetIdentifier("<IDENTIFIER>"), + users.WithUpdateTargetProviderId("<PROVIDER_ID>"), + users.WithUpdateTargetName("<NAME>"), +) 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/server-graphql/examples/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/server-graphql/examples/account/create-magic-url-token.md 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 index 6b29292494..8605340168 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountCreateMfaAuthenticator( + accountCreateMFAAuthenticator( type: "totp" ) { secret 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 index eb5cba127d..aff5a10123 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountCreateMfaChallenge( + accountCreateMFAChallenge( factor: "email" ) { _id 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 index f39b7d080d..4cb6d36d42 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountCreateMfaRecoveryCodes { + accountCreateMFARecoveryCodes { recoveryCodes } } 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 index fc5486623a..03e876e3f9 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountDeleteMfaAuthenticator( + accountDeleteMFAAuthenticator( type: "totp" ) { status 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/server-graphql/examples/account/update-magic-url-session.md 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 index 9cfe9150be..b3021b70b8 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountUpdateMfaAuthenticator( + accountUpdateMFAAuthenticator( type: "totp", otp: "<OTP>" ) { 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 index 0bcec2157f..bf389f1eff 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountUpdateMfaChallenge( + accountUpdateMFAChallenge( challengeId: "<CHALLENGE_ID>", otp: "<OTP>" ) { 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 index e706d2b9d7..dc46be71ad 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - accountUpdateMfaRecoveryCodes { + accountUpdateMFARecoveryCodes { recoveryCodes } } 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/server-graphql/examples/account/update-mfa.md diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-qr.md similarity index 100% rename from docs/examples/1.8.x/client-graphql/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/server-graphql/examples/avatars/get-qr.md 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 index c48e024e7c..6058ddc8be 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/create.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create.md @@ -9,5 +9,6 @@ mutation { _createdAt _updatedAt enabled + type } } 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 index 88d286dc8a..bbb7bc6156 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/update.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update.md @@ -9,5 +9,6 @@ mutation { _createdAt _updatedAt enabled + type } } 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..ff0ecbe739 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 @@ -13,6 +13,7 @@ mutation { _updatedAt _permissions functionId + deploymentId trigger status requestMethod 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/health/get-db.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/server-graphql/examples/health/get-db.md diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-column.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-countries-eu.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/grids/get-column.md rename to docs/examples/1.8.x/server-graphql/examples/locale/list-countries-eu.md 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 index 425b3bb8dc..7e2f1480e9 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - messagingCreateApnsProvider( + messagingCreateAPNSProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", authKey: "<AUTH_KEY>", 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 index 0aa48a9e2f..b2e524536f 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - messagingCreateFcmProvider( + messagingCreateFCMProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", serviceAccountJSON: "{}", 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/messaging/create-msg91provider.md rename to docs/examples/1.8.x/server-graphql/examples/messaging/create-msg-91-provider.md 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 index 99af83b154..1adeff586f 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - messagingCreateSms( + messagingCreateSMS( messageId: "<MESSAGE_ID>", content: "<CONTENT>", topics: [], 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 index b7b24bc1a5..ea16765677 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - messagingCreateSmtpProvider( + messagingCreateSMTPProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", host: "<HOST>", 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 index b3d6e8745e..c1eb27aaeb 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - messagingUpdateApnsProvider( + messagingUpdateAPNSProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", enabled: false, 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 index a0b3f9e3da..db3be401ee 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - messagingUpdateFcmProvider( + messagingUpdateFCMProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", enabled: false, 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/messaging/update-msg91provider.md rename to docs/examples/1.8.x/server-graphql/examples/messaging/update-msg-91-provider.md 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 index 7b45f09abc..e056cd6d8a 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - messagingUpdateSms( + messagingUpdateSMS( messageId: "<MESSAGE_ID>", topics: [], users: [], 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 index a091685655..dada7d3fb3 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - messagingUpdateSmtpProvider( + messagingUpdateSMTPProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", host: "<HOST>", 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/tablesdb/create-boolean-column.md similarity index 90% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-boolean-column.md index bd7abcb175..e137c6bd3d 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-boolean-column.md @@ -1,5 +1,5 @@ mutation { - gridsCreateBooleanColumn( + tablesDBCreateBooleanColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-datetime-column.md similarity index 90% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-datetime-column.md index aa14c43156..bad8c08bd4 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-datetime-column.md @@ -1,5 +1,5 @@ mutation { - gridsCreateDatetimeColumn( + tablesDBCreateDatetimeColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-email-column.md similarity index 91% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-email-column.md index c9bc913726..76d286f934 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-email-column.md @@ -1,5 +1,5 @@ mutation { - gridsCreateEmailColumn( + tablesDBCreateEmailColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-enum-column.md similarity index 92% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-enum-column.md index 8ace10f9ac..7a7b2d3950 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-enum-column.md @@ -1,5 +1,5 @@ mutation { - gridsCreateEnumColumn( + tablesDBCreateEnumColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-float-column.md similarity index 92% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-float-column.md index 92031d03ca..46cb266032 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-float-column.md @@ -1,5 +1,5 @@ mutation { - gridsCreateFloatColumn( + tablesDBCreateFloatColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-index.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-index.md similarity index 93% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-index.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-index.md index cc338ddad2..530ac45773 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-index.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-index.md @@ -1,5 +1,5 @@ mutation { - gridsCreateIndex( + tablesDBCreateIndex( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-integer-column.md similarity index 91% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-integer-column.md index 735d47c8ac..96e232a16d 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-integer-column.md @@ -1,5 +1,5 @@ mutation { - gridsCreateIntegerColumn( + tablesDBCreateIntegerColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-ip-column.md similarity index 92% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-ip-column.md index 241d308f09..5e48bbe805 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-ip-column.md @@ -1,5 +1,5 @@ mutation { - gridsCreateIpColumn( + tablesDBCreateIpColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-relationship-column.md similarity index 92% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-relationship-column.md index 2c08478e09..9ecd70ab55 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-relationship-column.md @@ -1,5 +1,5 @@ mutation { - gridsCreateRelationshipColumn( + tablesDBCreateRelationshipColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", relatedTableId: "<RELATED_TABLE_ID>", diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/create-row.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-row.md similarity index 93% rename from docs/examples/1.8.x/client-graphql/examples/grids/create-row.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-row.md index cffb7361f2..621e46a64e 100644 --- a/docs/examples/1.8.x/client-graphql/examples/grids/create-row.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-row.md @@ -1,5 +1,5 @@ mutation { - gridsCreateRow( + tablesDBCreateRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-rows.md similarity index 93% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-rows.md index cd134ec201..25dc9a367d 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-rows.md @@ -1,5 +1,5 @@ mutation { - gridsCreateRows( + tablesDBCreateRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rows: [] 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/tablesdb/create-string-column.md similarity index 92% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-string-column.md index 57b42c6010..453e692aae 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-string-column.md @@ -1,5 +1,5 @@ mutation { - gridsCreateStringColumn( + tablesDBCreateStringColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-table.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-table.md similarity index 95% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-table.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-table.md index 77335ad867..61203b9359 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-table.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-table.md @@ -1,5 +1,5 @@ mutation { - gridsCreateTable( + tablesDBCreateTable( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", name: "<NAME>", 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/tablesdb/create-url-column.md similarity index 92% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create-url-column.md index 07ca9ab869..0fdbba66c2 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-url-column.md @@ -1,5 +1,5 @@ mutation { - gridsCreateUrlColumn( + tablesDBCreateUrlColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-database.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create.md similarity index 85% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-database.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/create.md index 02c045b9cd..5e3490229b 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-database.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateDatabase( + tablesDBCreate( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false @@ -9,5 +9,6 @@ mutation { _createdAt _updatedAt enabled + type } } diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..398ec19901 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,19 @@ +mutation { + tablesDBDecrementRowColumn( + 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/tablesdb/delete-column.md similarity index 82% rename from docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-column.md index 0ad25321b5..5e7011bc6a 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-column.md @@ -1,5 +1,5 @@ mutation { - gridsDeleteColumn( + tablesDBDeleteColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "" diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-index.md similarity index 83% rename from docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-index.md index 0921aa0aef..3d58300005 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-index.md @@ -1,5 +1,5 @@ mutation { - gridsDeleteIndex( + tablesDBDeleteIndex( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "" diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-row.md similarity index 85% rename from docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-row.md index 40dcbdc219..1a08b0f60d 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-row.md @@ -1,5 +1,5 @@ mutation { - gridsDeleteRow( + tablesDBDeleteRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>" diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-rows.md similarity index 93% rename from docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-rows.md index 69559934a4..dfa7c13779 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-rows.md @@ -1,5 +1,5 @@ mutation { - gridsDeleteRows( + tablesDBDeleteRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", queries: [] diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-table.md similarity index 81% rename from docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-table.md index a145be50d9..9894ba4cc5 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-table.md @@ -1,5 +1,5 @@ mutation { - gridsDeleteTable( + tablesDBDeleteTable( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>" ) { diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete.md similarity index 75% rename from docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/delete.md index a3e3d1a5bf..4c6bd3e645 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete.md @@ -1,5 +1,5 @@ mutation { - gridsDeleteDatabase( + tablesDBDelete( databaseId: "<DATABASE_ID>" ) { status diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-database.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/get-column.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/grids/get-database.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/get-column.md diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-index.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/get-index.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/grids/get-index.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/get-index.md diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-table.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/get-row.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/grids/get-table.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/get-row.md diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-columns.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/get-table.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/grids/list-columns.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/get-table.md diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-databases.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/get.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/grids/list-databases.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/get.md diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..b7ff87f387 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/increment-row-column.md @@ -0,0 +1,19 @@ +mutation { + tablesDBIncrementRowColumn( + 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-indexes.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/list-columns.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/grids/list-indexes.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/list-columns.md diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-rows.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/list-indexes.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/grids/list-rows.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/list-indexes.md diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-tables.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/list-rows.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/grids/list-tables.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/list-rows.md 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/tablesdb/list-tables.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/health/get-d-b.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/list-tables.md 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/tablesdb/list.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/list.md 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/tablesdb/update-boolean-column.md similarity index 90% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update-boolean-column.md index 67c8495471..11fb782eeb 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-boolean-column.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateBooleanColumn( + tablesDBUpdateBooleanColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-datetime-column.md similarity index 90% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update-datetime-column.md index 5e19393c67..5e7cf0b761 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-datetime-column.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateDatetimeColumn( + tablesDBUpdateDatetimeColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-email-column.md similarity index 91% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update-email-column.md index caa6153896..16274b798d 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-email-column.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateEmailColumn( + tablesDBUpdateEmailColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-enum-column.md similarity index 92% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update-enum-column.md index c3d90f4e23..a14745bad9 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-enum-column.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateEnumColumn( + tablesDBUpdateEnumColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-float-column.md similarity index 92% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update-float-column.md index a6b700ce73..6320721bd0 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-float-column.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateFloatColumn( + tablesDBUpdateFloatColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-integer-column.md similarity index 91% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update-integer-column.md index fcc53102d1..57d7b27fec 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-integer-column.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateIntegerColumn( + tablesDBUpdateIntegerColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-ip-column.md similarity index 92% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update-ip-column.md index f867063151..c14f286718 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-ip-column.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateIpColumn( + tablesDBUpdateIpColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-relationship-column.md similarity index 91% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update-relationship-column.md index e24311b53a..95ebb86fdd 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-relationship-column.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateRelationshipColumn( + tablesDBUpdateRelationshipColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/update-row.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-row.md similarity index 93% rename from docs/examples/1.8.x/client-graphql/examples/grids/update-row.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update-row.md index 2bb105e8c0..5a5b288ab8 100644 --- a/docs/examples/1.8.x/client-graphql/examples/grids/update-row.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-row.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateRow( + tablesDBUpdateRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-rows.md similarity index 93% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update-rows.md index 99df9b0b99..4816748352 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-rows.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateRows( + tablesDBUpdateRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", 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/tablesdb/update-string-column.md similarity index 92% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update-string-column.md index c98f49a807..cbbebf632a 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-string-column.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateStringColumn( + tablesDBUpdateStringColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-table.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-table.md similarity index 95% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-table.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update-table.md index cea6d5cfff..b19a3603b2 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-table.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-table.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateTable( + tablesDBUpdateTable( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", name: "<NAME>", 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/tablesdb/update-url-column.md similarity index 92% rename from docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update-url-column.md index c64d93882d..a823846347 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-url-column.md @@ -1,5 +1,5 @@ mutation { - gridsUpdateUrlColumn( + tablesDBUpdateUrlColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-database.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update.md similarity index 85% rename from docs/examples/1.8.x/server-graphql/examples/grids/create-database.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/update.md index 41d37ebdee..9c77c69735 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-database.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update.md @@ -1,5 +1,5 @@ mutation { - gridsCreateDatabase( + tablesDBUpdate( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false @@ -9,5 +9,6 @@ mutation { _createdAt _updatedAt enabled + type } } diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/upsert-row.md similarity index 93% rename from docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/upsert-row.md index f8e0606109..cc3b63de4a 100644 --- a/docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/upsert-row.md @@ -1,5 +1,5 @@ mutation { - gridsUpsertRow( + tablesDBUpsertRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/upsert-rows.md similarity index 93% rename from docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md rename to docs/examples/1.8.x/server-graphql/examples/tablesdb/upsert-rows.md index d456e9883d..f4e01c0af7 100644 --- a/docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/upsert-rows.md @@ -1,5 +1,5 @@ mutation { - gridsUpsertRows( + tablesDBUpsertRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rows: [] 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-argon-2-user.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/users/create-argon2user.md rename to docs/examples/1.8.x/server-graphql/examples/users/create-argon-2-user.md 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/users/create-j-w-t.md rename to docs/examples/1.8.x/server-graphql/examples/users/create-jwt.md 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-md-5-user.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/users/create-m-d5user.md rename to docs/examples/1.8.x/server-graphql/examples/users/create-md-5-user.md 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 index 7c4f1c5575..5c329f5e0b 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - usersCreateMfaRecoveryCodes( + 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-ph-pass-user.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/users/create-p-h-pass-user.md rename to docs/examples/1.8.x/server-graphql/examples/users/create-ph-pass-user.md 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-sha-user.md similarity index 100% rename from docs/examples/1.8.x/server-graphql/examples/users/create-s-h-a-user.md rename to docs/examples/1.8.x/server-graphql/examples/users/create-sha-user.md 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 index 43f73404f0..2e7ea73733 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - usersDeleteMfaAuthenticator( + usersDeleteMFAAuthenticator( userId: "<USER_ID>", type: "totp" ) { 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 index dbef2bd345..8881b1ad96 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - usersUpdateMfaRecoveryCodes( + 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 index ac09ea19a4..8c8f0a3787 100644 --- 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 @@ -1,5 +1,5 @@ mutation { - usersUpdateMfa( + usersUpdateMFA( userId: "<USER_ID>", mfa: false ) { 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/account/create-j-w-t.md rename to docs/examples/1.8.x/server-kotlin/java/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/server-kotlin/java/account/create-magic-url-token.md 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 index ee37e48794..d38ddd3b44 100644 --- 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 @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -account.createMfaAuthenticator( +account.createMFAAuthenticator( AuthenticatorType.TOTP, // type new CoroutineCallback<>((result, error) -> { if (error != null) { 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 index 4a07e26e49..5c048cbace 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Account account = new Account(client); -account.createMfaChallenge( +account.createMFAChallenge( AuthenticationFactor.EMAIL, // factor new CoroutineCallback<>((result, error) -> { if (error != null) { 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 index eb76cdca9b..6a47a17729 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Account account = new Account(client); -account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { +account.createMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; 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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/account/create-o-auth2token.md rename to docs/examples/1.8.x/server-kotlin/java/account/create-o-auth-2-token.md 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 index 06835f6680..20a6acda53 100644 --- 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 @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -account.deleteMfaAuthenticator( +account.deleteMFAAuthenticator( AuthenticatorType.TOTP, // type new CoroutineCallback<>((result, error) -> { if (error != null) { 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 index c818c3ea74..813a0a62c0 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Account account = new Account(client); -account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { +account.getMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; 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 index d9f90a4127..0bdc378b08 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Account account = new Account(client); -account.listMfaFactors(new CoroutineCallback<>((result, error) -> { +account.listMFAFactors(new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/server-kotlin/java/account/update-magic-url-session.md 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 index 947c85a244..87e3852ccd 100644 --- 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 @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -account.updateMfaAuthenticator( +account.updateMFAAuthenticator( AuthenticatorType.TOTP, // type "<OTP>", // otp new CoroutineCallback<>((result, error) -> { 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 index b9b0ae9db5..5e1bebe629 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Account account = new Account(client); -account.updateMfaChallenge( +account.updateMFAChallenge( "<CHALLENGE_ID>", // challengeId "<OTP>", // otp new CoroutineCallback<>((result, error) -> { 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 index 4b3e52700b..7c303ddc64 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Account account = new Account(client); -account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { +account.updateMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/account/update-m-f-a.md rename to docs/examples/1.8.x/server-kotlin/java/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/avatars/get-q-r.md rename to docs/examples/1.8.x/server-kotlin/java/avatars/get-qr.md 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 index 34b74726ff..a44cc51260 100644 --- 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 @@ -5,7 +5,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 - .setKey("<YOUR_API_KEY>"); // Your secret API key + .setSession(""); // The user session to authenticate with Databases databases = new Databases(client); 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 index ca9c357f19..b5b5054e25 100644 --- 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 @@ -5,7 +5,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 - .setKey("<YOUR_API_KEY>"); // Your secret API key + .setSession(""); // The user session to authenticate with Databases databases = new Databases(client); 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-db.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/health/get-d-b.md rename to docs/examples/1.8.x/server-kotlin/java/health/get-db.md 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-eu.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/locale/list-countries-e-u.md rename to docs/examples/1.8.x/server-kotlin/java/locale/list-countries-eu.md 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 index 0f6618079f..acae476a17 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.createApnsProvider( +messaging.createAPNSProvider( "<PROVIDER_ID>", // providerId "<NAME>", // name "<AUTH_KEY>", // authKey (optional) 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 index 636a1bdd39..0d67e28cf0 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.createFcmProvider( +messaging.createFCMProvider( "<PROVIDER_ID>", // providerId "<NAME>", // name mapOf( "a" to "b" ), // serviceAccountJSON (optional) 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/messaging/create-msg91provider.md rename to docs/examples/1.8.x/server-kotlin/java/messaging/create-msg-91-provider.md 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 index 9e3e3bdf5d..ca40cc33a8 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.createSms( +messaging.createSMS( "<MESSAGE_ID>", // messageId "<CONTENT>", // content listOf(), // topics (optional) 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 index ebd153c29c..1f1a0f998f 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.createSmtpProvider( +messaging.createSMTPProvider( "<PROVIDER_ID>", // providerId "<NAME>", // name "<HOST>", // host 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 index 737a142495..c5da5ba819 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.updateApnsProvider( +messaging.updateAPNSProvider( "<PROVIDER_ID>", // providerId "<NAME>", // name (optional) false, // enabled (optional) 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 index 68c56ef18e..dd92f9321f 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.updateFcmProvider( +messaging.updateFCMProvider( "<PROVIDER_ID>", // providerId "<NAME>", // name (optional) false, // enabled (optional) 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/messaging/update-msg91provider.md rename to docs/examples/1.8.x/server-kotlin/java/messaging/update-msg-91-provider.md 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 index c55cfdfddb..c59505b68a 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.updateSms( +messaging.updateSMS( "<MESSAGE_ID>", // messageId listOf(), // topics (optional) listOf(), // users (optional) 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 index 3f39661024..36f120033a 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.updateSmtpProvider( +messaging.updateSMTPProvider( "<PROVIDER_ID>", // providerId "<NAME>", // name (optional) "<HOST>", // host (optional) 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/tablesdb/create-boolean-column.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-boolean-column.md index 2981fc8cf4..14a96a1489 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-boolean-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createBooleanColumn( +tablesDB.createBooleanColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/create-datetime-column.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-datetime-column.md index 7389ea9a94..6dd28b36c8 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-datetime-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createDatetimeColumn( +tablesDB.createDatetimeColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/create-email-column.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-email-column.md index be481047e1..e9f3d36892 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-email-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createEmailColumn( +tablesDB.createEmailColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/create-enum-column.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-enum-column.md index 33c6b63e27..bc31bbe79e 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-enum-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createEnumColumn( +tablesDB.createEnumColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/create-float-column.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-float-column.md index d66f1b5c60..51312d037a 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-float-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createFloatColumn( +tablesDB.createFloatColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-index.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-index.md similarity index 87% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-index.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-index.md index 670310bb66..991bd3429b 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-index.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-index.md @@ -1,6 +1,6 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; import io.appwrite.enums.IndexType; Client client = new Client() @@ -8,9 +8,9 @@ Client client = new Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createIndex( +tablesDB.createIndex( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/create-integer-column.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-integer-column.md index 342654ef1a..1e0a3633a5 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-integer-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createIntegerColumn( +tablesDB.createIntegerColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/create-ip-column.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-ip-column.md index d72e7dd59d..a963cc10a5 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-ip-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createIpColumn( +tablesDB.createIpColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/create-relationship-column.md similarity index 87% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-relationship-column.md index 2d1c5fb22a..956c1fa516 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-relationship-column.md @@ -1,6 +1,6 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; import io.appwrite.enums.RelationshipType; Client client = new Client() @@ -8,9 +8,9 @@ Client client = new Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createRelationshipColumn( +tablesDB.createRelationshipColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<RELATED_TABLE_ID>", // relatedTableId diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-row.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-row.md similarity index 87% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-row.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-row.md index 6b954814c0..4145022015 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-row.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; 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); +TablesDB tablesDB = new TablesDB(client); -grids.createRow( +tablesDB.createRow( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<ROW_ID>", // rowId diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-rows.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-rows.md index a55855d8f5..21bdd21879 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createRows( +tablesDB.createRows( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId listOf(), // rows 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/tablesdb/create-string-column.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-string-column.md index b819afb4b4..3596340004 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-string-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createStringColumn( +tablesDB.createStringColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-table.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-table.md similarity index 87% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-table.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-table.md index aa98b81de6..5bd3b6d0d9 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-table.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createTable( +tablesDB.createTable( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<NAME>", // name 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/tablesdb/create-url-column.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create-url-column.md index d8761440b3..20c10e6296 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-url-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createUrlColumn( +tablesDB.createUrlColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-database.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-database.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/create.md index da9bd7d04b..112e8e6d51 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-database.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateDatabase( +tablesDB.create( "<DATABASE_ID>", // databaseId "<NAME>", // name false, // enabled (optional) 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/tablesdb/decrement-row-column.md similarity index 77% rename from docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/decrement-row-column.md index 407ea83f81..b9f250f48f 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/decrement-row-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key + .setSession(""); // The user session to authenticate with -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.decrementRowColumn( +tablesDB.decrementRowColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<ROW_ID>", // rowId diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-column.md similarity index 84% rename from docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-column.md index cc3c40fba7..25d94d2fd0 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.deleteColumn( +tablesDB.deleteColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-index.md similarity index 84% rename from docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-index.md index 43449e908f..aa40dd07d8 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-index.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.deleteIndex( +tablesDB.deleteIndex( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-row.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-row.md index cb812bac12..fd66525a8d 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; 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); +TablesDB tablesDB = new TablesDB(client); -grids.deleteRow( +tablesDB.deleteRow( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<ROW_ID>", // rowId diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-rows.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-rows.md index 2425af9e8c..43b772e1a3 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.deleteRows( +tablesDB.deleteRows( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId listOf(), // queries (optional) diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-table.md similarity index 84% rename from docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-table.md index dbbb4781ba..dcd6daa930 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.deleteTable( +tablesDB.deleteTable( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete.md similarity index 84% rename from docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/delete.md index fca41e75ea..ea30c34411 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.deleteDatabase( +tablesDB.delete( "<DATABASE_ID>", // databaseId new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-column.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/get-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/get-column.md index 1d630f17d7..42ed7760a9 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/get-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.getColumn( +tablesDB.getColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-index.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-index.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/get-index.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/get-index.md index 14163c34a9..d14579d24a 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/get-index.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-index.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.getIndex( +tablesDB.getIndex( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-row.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-row.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/get-row.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/get-row.md index e9d89c92b8..03cf3fb234 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/get-row.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; 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); +TablesDB tablesDB = new TablesDB(client); -grids.getRow( +tablesDB.getRow( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<ROW_ID>", // rowId diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-table.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-table.md similarity index 84% rename from docs/examples/1.8.x/server-kotlin/java/grids/get-table.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/get-table.md index 39d090219b..44862492df 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/get-table.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.getTable( +tablesDB.getTable( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-database.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get.md similarity index 84% rename from docs/examples/1.8.x/server-kotlin/java/grids/get-database.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/get.md index bc7eea4dbb..6480d62d46 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/get-database.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.getDatabase( +tablesDB.get( "<DATABASE_ID>", // databaseId new CoroutineCallback<>((result, error) -> { if (error != null) { 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/tablesdb/increment-row-column.md similarity index 77% rename from docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/increment-row-column.md index aaccf0a1a3..db48d05c37 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/increment-row-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key + .setSession(""); // The user session to authenticate with -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.incrementRowColumn( +tablesDB.incrementRowColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<ROW_ID>", // rowId diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-columns.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/list-columns.md index f95ca925a6..f0e70d3dd4 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-columns.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.listColumns( +tablesDB.listColumns( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId listOf(), // queries (optional) diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-indexes.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/list-indexes.md index aa5b11a8c2..1e5d1f9e11 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-indexes.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.listIndexes( +tablesDB.listIndexes( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId listOf(), // queries (optional) diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-rows.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/list-rows.md index ccf3d74a25..52cf2a1670 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; 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); +TablesDB tablesDB = new TablesDB(client); -grids.listRows( +tablesDB.listRows( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId listOf(), // queries (optional) diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-tables.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/list-tables.md index 0a60dbeebe..5e98cb60af 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-tables.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.listTables( +tablesDB.listTables( "<DATABASE_ID>", // databaseId listOf(), // queries (optional) "<SEARCH>", // search (optional) diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/list.md index 97f7263dd4..34dc9dae01 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.listDatabases( +tablesDB.list( listOf(), // queries (optional) "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { 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/tablesdb/update-boolean-column.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update-boolean-column.md index e3d6b71b70..d31932f235 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-boolean-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateBooleanColumn( +tablesDB.updateBooleanColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/update-datetime-column.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update-datetime-column.md index ede33229ad..b9fb3b23a3 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-datetime-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateDatetimeColumn( +tablesDB.updateDatetimeColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/update-email-column.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update-email-column.md index 48803eb4f4..ed6b93b196 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-email-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateEmailColumn( +tablesDB.updateEmailColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/update-enum-column.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update-enum-column.md index 63dc238d2e..5a8036aebc 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-enum-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateEnumColumn( +tablesDB.updateEnumColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/update-float-column.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update-float-column.md index 9833f5ec8b..0487c06bf5 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-float-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateFloatColumn( +tablesDB.updateFloatColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/update-integer-column.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update-integer-column.md index 059b1328d5..a9ed33a926 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-integer-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateIntegerColumn( +tablesDB.updateIntegerColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/update-ip-column.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update-ip-column.md index 8e31214981..32509547c3 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-ip-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateIpColumn( +tablesDB.updateIpColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key 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/tablesdb/update-relationship-column.md similarity index 84% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update-relationship-column.md index b90b21b164..45aea8ae41 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-relationship-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateRelationshipColumn( +tablesDB.updateRelationshipColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-row.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-row.md similarity index 87% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-row.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update-row.md index 5f95afb5f5..bedc816f14 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-row.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; 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); +TablesDB tablesDB = new TablesDB(client); -grids.updateRow( +tablesDB.updateRow( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<ROW_ID>", // rowId diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-rows.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update-rows.md index 67c9a1be89..169b57c3e5 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateRows( +tablesDB.updateRows( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId mapOf( "a" to "b" ), // data (optional) 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/tablesdb/update-string-column.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update-string-column.md index 13e266abc0..36a2ed5990 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-string-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateStringColumn( +tablesDB.updateStringColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-table.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-table.md similarity index 87% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-table.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update-table.md index 24dfc05e49..e593a04641 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-table.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateTable( +tablesDB.updateTable( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<NAME>", // name 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/tablesdb/update-url-column.md similarity index 86% rename from docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update-url-column.md index 5217121225..d2273b9ef6 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-url-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.updateUrlColumn( +tablesDB.updateUrlColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-database.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/create-database.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/update.md index 4c6155962e..3b1da0c107 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-database.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.createDatabase( +tablesDB.update( "<DATABASE_ID>", // databaseId "<NAME>", // name false, // enabled (optional) diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-row.md similarity index 87% rename from docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-row.md index 8f1b8670df..d6155fcd1b 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; 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); +TablesDB tablesDB = new TablesDB(client); -grids.upsertRow( +tablesDB.upsertRow( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<ROW_ID>", // rowId diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-rows.md similarity index 85% rename from docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md rename to docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-rows.md index 2081f0f19f..da15f6a0db 100644 --- a/docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key -Grids grids = new Grids(client); +TablesDB tablesDB = new TablesDB(client); -grids.upsertRows( +tablesDB.upsertRows( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId listOf(), // rows 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-argon-2-user.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/users/create-argon2user.md rename to docs/examples/1.8.x/server-kotlin/java/users/create-argon-2-user.md 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/users/create-j-w-t.md rename to docs/examples/1.8.x/server-kotlin/java/users/create-jwt.md 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-md-5-user.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/users/create-m-d5user.md rename to docs/examples/1.8.x/server-kotlin/java/users/create-md-5-user.md 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 index 62afec2a1f..167c92cbbd 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Users users = new Users(client); -users.createMfaRecoveryCodes( +users.createMFARecoveryCodes( "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { 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-ph-pass-user.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/users/create-p-h-pass-user.md rename to docs/examples/1.8.x/server-kotlin/java/users/create-ph-pass-user.md 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-sha-user.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/java/users/create-s-h-a-user.md rename to docs/examples/1.8.x/server-kotlin/java/users/create-sha-user.md 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 index 7ed33d6d82..c27b39ef53 100644 --- 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 @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -users.deleteMfaAuthenticator( +users.deleteMFAAuthenticator( "<USER_ID>", // userId AuthenticatorType.TOTP, // type new CoroutineCallback<>((result, error) -> { 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 index 940dafee90..e617355701 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Users users = new Users(client); -users.getMfaRecoveryCodes( +users.getMFARecoveryCodes( "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { 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 index a377214d19..c26f463b68 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Users users = new Users(client); -users.listMfaFactors( +users.listMFAFactors( "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { 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 index 439561012f..98522b6219 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Users users = new Users(client); -users.updateMfaRecoveryCodes( +users.updateMFARecoveryCodes( "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { 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 index 76a198f513..dbcded6d93 100644 --- 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 @@ -9,7 +9,7 @@ Client client = new Client() Users users = new Users(client); -users.updateMfa( +users.updateMFA( "<USER_ID>", // userId false, // mfa new CoroutineCallback<>((result, error) -> { 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/account/create-j-w-t.md rename to docs/examples/1.8.x/server-kotlin/kotlin/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/server-kotlin/kotlin/account/create-magic-url-token.md 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 index 803579da03..fed90b4a7b 100644 --- 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 @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) -val response = account.createMfaAuthenticator( +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 index a3fbe25d75..7213142a45 100644 --- 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 @@ -9,6 +9,6 @@ val client = Client() val account = Account(client) -val response = account.createMfaChallenge( +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 index c21a382fcc..c01499b04b 100644 --- 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 @@ -9,4 +9,4 @@ val client = Client() val account = Account(client) -val response = account.createMfaRecoveryCodes() +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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/account/create-o-auth2token.md rename to docs/examples/1.8.x/server-kotlin/kotlin/account/create-o-auth-2-token.md 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 index 2068077f46..9b06f8cd99 100644 --- 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 @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) -val response = account.deleteMfaAuthenticator( +val response = account.deleteMFAAuthenticator( type = AuthenticatorType.TOTP ) 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 index 027c211230..96567f4ca5 100644 --- 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 @@ -9,4 +9,4 @@ val client = Client() val account = Account(client) -val response = account.getMfaRecoveryCodes() +val response = account.getMFARecoveryCodes() 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 index ce47dcd752..0f073df3e9 100644 --- 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 @@ -9,4 +9,4 @@ val client = Client() val account = Account(client) -val response = account.listMfaFactors() +val response = account.listMFAFactors() 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/server-kotlin/kotlin/account/update-magic-url-session.md 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 index 521d133f6f..99764f2f0d 100644 --- 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 @@ -10,7 +10,7 @@ val client = Client() val account = Account(client) -val response = account.updateMfaAuthenticator( +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 index 6b978b765e..de90873650 100644 --- 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 @@ -9,7 +9,7 @@ val client = Client() val account = Account(client) -val response = account.updateMfaChallenge( +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 index 31da824bbf..05f6476e0f 100644 --- 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 @@ -9,4 +9,4 @@ val client = Client() val account = Account(client) -val response = account.updateMfaRecoveryCodes() +val response = account.updateMFARecoveryCodes() 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/account/update-m-f-a.md rename to docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-q-r.md rename to docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-qr.md 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 index 05204d76c6..d0226c0bdb 100644 --- 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 @@ -5,7 +5,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 - .setKey("<YOUR_API_KEY>") // Your secret API key + .setSession("") // The user session to authenticate with val databases = Databases(client) 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 index 40c1224ae7..b56ed91d75 100644 --- 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 @@ -5,7 +5,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 - .setKey("<YOUR_API_KEY>") // Your secret API key + .setSession("") // The user session to authenticate with val databases = Databases(client) 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-db.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/health/get-d-b.md rename to docs/examples/1.8.x/server-kotlin/kotlin/health/get-db.md 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-eu.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-e-u.md rename to docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-eu.md 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 index a19cbe2725..5104edf3e2 100644 --- 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 @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.createApnsProvider( +val response = messaging.createAPNSProvider( providerId = "<PROVIDER_ID>", name = "<NAME>", authKey = "<AUTH_KEY>", // 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 index c1a077ca5c..b1a2ef8314 100644 --- 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 @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.createFcmProvider( +val response = messaging.createFCMProvider( providerId = "<PROVIDER_ID>", name = "<NAME>", serviceAccountJSON = mapOf( "a" to "b" ), // 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-msg91provider.md rename to docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-msg-91-provider.md 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 index 49185290c3..54c06eb3e2 100644 --- 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 @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.createSms( +val response = messaging.createSMS( messageId = "<MESSAGE_ID>", content = "<CONTENT>", topics = listOf(), // 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 index ae3b6678e4..ce50130e80 100644 --- 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 @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.createSmtpProvider( +val response = messaging.createSMTPProvider( providerId = "<PROVIDER_ID>", name = "<NAME>", host = "<HOST>", 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 index d0d5a07848..29b436e41d 100644 --- 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 @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.updateApnsProvider( +val response = messaging.updateAPNSProvider( providerId = "<PROVIDER_ID>", name = "<NAME>", // optional enabled = false, // 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 index 477e7188d8..84e5635fb2 100644 --- 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 @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.updateFcmProvider( +val response = messaging.updateFCMProvider( providerId = "<PROVIDER_ID>", name = "<NAME>", // optional enabled = false, // 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-msg91provider.md rename to docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-msg-91-provider.md 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 index 3d08b8a16c..534e9addfc 100644 --- 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 @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.updateSms( +val response = messaging.updateSMS( messageId = "<MESSAGE_ID>", topics = listOf(), // optional users = listOf(), // 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 index cb745865ec..7652e53166 100644 --- 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 @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.updateSmtpProvider( +val response = messaging.updateSMTPProvider( providerId = "<PROVIDER_ID>", name = "<NAME>", // optional host = "<HOST>", // 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/tablesdb/create-boolean-column.md similarity index 79% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-boolean-column.md index 5966655e1e..fac14d916f 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-boolean-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.createBooleanColumn( +val response = tablesDB.createBooleanColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/create-datetime-column.md similarity index 79% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-datetime-column.md index f3b11b5018..e40d8e4729 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-datetime-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.createDatetimeColumn( +val response = tablesDB.createDatetimeColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/create-email-column.md similarity index 80% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-email-column.md index a70dd3ac45..e93e0b8907 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-email-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.createEmailColumn( +val response = tablesDB.createEmailColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/create-enum-column.md similarity index 81% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-enum-column.md index 3858155479..1d19a589e0 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-enum-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.createEnumColumn( +val response = tablesDB.createEnumColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/create-float-column.md similarity index 81% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-float-column.md index d7b4c0155d..3c24b0d9fa 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-float-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.createFloatColumn( +val response = tablesDB.createFloatColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-index.md similarity index 83% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-index.md index df16a35cc2..2492f71537 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-index.md @@ -1,6 +1,6 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB import io.appwrite.enums.IndexType val client = Client() @@ -8,9 +8,9 @@ val client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -val grids = Grids(client) +val tablesDB = TablesDB(client) -val response = grids.createIndex( +val response = tablesDB.createIndex( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/create-integer-column.md similarity index 81% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-integer-column.md index db8bde2d72..90c558c4dd 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-integer-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.createIntegerColumn( +val response = tablesDB.createIntegerColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/create-ip-column.md similarity index 80% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-ip-column.md index f3ab36bd0c..81412c7ac0 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-ip-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.createIpColumn( +val response = tablesDB.createIpColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/create-relationship-column.md similarity index 83% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-relationship-column.md index 9ba4cafbb7..fbdf36532f 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-relationship-column.md @@ -1,6 +1,6 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB import io.appwrite.enums.RelationshipType val client = Client() @@ -8,9 +8,9 @@ val client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -val grids = Grids(client) +val tablesDB = TablesDB(client) -val response = grids.createRelationshipColumn( +val response = tablesDB.createRelationshipColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", relatedTableId = "<RELATED_TABLE_ID>", diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-row.md similarity index 81% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-row.md index 0c3d2531c5..6a5b188166 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB 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 tablesDB = TablesDB(client) -val response = grids.createRow( +val response = tablesDB.createRow( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", rowId = "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-rows.md similarity index 77% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-rows.md index 9c7da7c93b..1da47b5c18 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.createRows( +val response = tablesDB.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/tablesdb/create-string-column.md similarity index 81% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-string-column.md index f6793c817b..5b5d88db3c 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-string-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.createStringColumn( +val response = tablesDB.createStringColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-table.md similarity index 82% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-table.md index 55de471725..88b50d22ad 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.createTable( +val response = tablesDB.createTable( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", name = "<NAME>", 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/tablesdb/create-url-column.md similarity index 80% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-url-column.md index 33311e29ca..a0351e4f37 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-url-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.createUrlColumn( +val response = tablesDB.createUrlColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create.md similarity index 78% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create.md index ae8aacc343..4b025b853e 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.updateDatabase( +val response = tablesDB.create( databaseId = "<DATABASE_ID>", name = "<NAME>", enabled = 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/tablesdb/decrement-row-column.md similarity index 69% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/decrement-row-column.md index 9a450f66f3..e284ec3980 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/decrement-row-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key + .setSession("") // The user session to authenticate with -val grids = Grids(client) +val tablesDB = TablesDB(client) -val response = grids.decrementRowColumn( +val response = tablesDB.decrementRowColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", rowId = "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-column.md similarity index 77% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-column.md index 09636dae09..05d341d1b3 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.deleteColumn( +val response = tablesDB.deleteColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "" diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-index.md similarity index 77% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-index.md index d3037ca6b0..b5f2330d60 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-index.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.deleteIndex( +val response = tablesDB.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/tablesdb/delete-row.md similarity index 78% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-row.md index 25b60e0e2d..f24b9353e0 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB 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 tablesDB = TablesDB(client) -val response = grids.deleteRow( +val response = tablesDB.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/tablesdb/delete-rows.md similarity index 78% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-rows.md index c3aa106eac..c915a5c55a 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.deleteRows( +val response = tablesDB.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/tablesdb/delete-table.md similarity index 76% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-table.md index f0208d4345..dce8e583ab 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.deleteTable( +val response = tablesDB.deleteTable( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>" ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete.md similarity index 76% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete.md index f872453a99..3e335fa264 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete.md @@ -1,14 +1,14 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.deleteDatabase( +val response = tablesDB.delete( databaseId = "<DATABASE_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/tablesdb/get-column.md similarity index 77% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-column.md index 92890a7dc3..c4cf24dd1f 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.getColumn( +val response = tablesDB.getColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "" diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-index.md similarity index 77% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-index.md index 7c0b2dc8cb..4db254740a 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-index.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.getIndex( +val response = tablesDB.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/tablesdb/get-row.md similarity index 80% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-row.md index b217814b27..ec54631646 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB 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 tablesDB = TablesDB(client) -val response = grids.getRow( +val response = tablesDB.getRow( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", rowId = "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-table.md similarity index 77% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-table.md index d8a4cd243e..65afae84b3 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.getTable( +val response = tablesDB.getTable( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>" ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get.md similarity index 76% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get.md index fd91ab0ad3..e58da26fdb 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get.md @@ -1,14 +1,14 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.getDatabase( +val response = tablesDB.get( databaseId = "<DATABASE_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/tablesdb/increment-row-column.md similarity index 69% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/increment-row-column.md index adbe5c287e..cac151e41b 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/increment-row-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key + .setSession("") // The user session to authenticate with -val grids = Grids(client) +val tablesDB = TablesDB(client) -val response = grids.incrementRowColumn( +val response = tablesDB.incrementRowColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", rowId = "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-columns.md similarity index 78% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-columns.md index b033eb423d..85a9aabb28 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-columns.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.listColumns( +val response = tablesDB.listColumns( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", queries = listOf() // 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/tablesdb/list-indexes.md similarity index 78% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-indexes.md index 84bbcbd232..db5aad4e80 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-indexes.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.listIndexes( +val response = tablesDB.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/tablesdb/list-rows.md similarity index 79% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-rows.md index ea54280ff3..b0f5df476b 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB 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 tablesDB = TablesDB(client) -val response = grids.listRows( +val response = tablesDB.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/tablesdb/list-tables.md similarity index 79% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-tables.md index 6bb5a588b2..1e8eb8f7c7 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-tables.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.listTables( +val response = tablesDB.listTables( databaseId = "<DATABASE_ID>", queries = listOf(), // optional search = "<SEARCH>" // 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/tablesdb/list.md similarity index 78% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list.md index c713568269..58b48a09ed 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.listDatabases( +val response = tablesDB.list( 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/tablesdb/update-boolean-column.md similarity index 79% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-boolean-column.md index b9360ec99e..43ab43bfea 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-boolean-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.updateBooleanColumn( +val response = tablesDB.updateBooleanColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/update-datetime-column.md similarity index 79% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-datetime-column.md index 50282217d7..077cff7169 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-datetime-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.updateDatetimeColumn( +val response = tablesDB.updateDatetimeColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/update-email-column.md similarity index 80% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-email-column.md index a9c2996800..5becaa681d 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-email-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.updateEmailColumn( +val response = tablesDB.updateEmailColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/update-enum-column.md similarity index 80% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-enum-column.md index c23eef358b..4351703edb 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-enum-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.updateEnumColumn( +val response = tablesDB.updateEnumColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/update-float-column.md similarity index 81% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-float-column.md index 1054c34fbd..6d40c3f3a1 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-float-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.updateFloatColumn( +val response = tablesDB.updateFloatColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/update-integer-column.md similarity index 80% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-integer-column.md index 288c74b4fe..9d6bfaa635 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-integer-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.updateIntegerColumn( +val response = tablesDB.updateIntegerColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/update-ip-column.md similarity index 79% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-ip-column.md index cbc358a3b6..fd04b98a13 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-ip-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.updateIpColumn( +val response = tablesDB.updateIpColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", 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/tablesdb/update-relationship-column.md similarity index 78% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-relationship-column.md index 99df537cfe..f69defd8ec 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-relationship-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.updateRelationshipColumn( +val response = tablesDB.updateRelationshipColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-row.md similarity index 82% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-row.md index ae18af353a..9c5248f4e8 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB 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 tablesDB = TablesDB(client) -val response = grids.updateRow( +val response = tablesDB.updateRow( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", rowId = "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-rows.md similarity index 80% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-rows.md index 3682cd0724..c285d5b4fb 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.updateRows( +val response = tablesDB.updateRows( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", data = mapOf( "a" to "b" ), // 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/tablesdb/update-string-column.md similarity index 80% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-string-column.md index 8f7a213260..acdd3ad5f9 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-string-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.updateStringColumn( +val response = tablesDB.updateStringColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-table.md similarity index 82% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-table.md index 99232d858f..52389087e7 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.updateTable( +val response = tablesDB.updateTable( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", name = "<NAME>", 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/tablesdb/update-url-column.md similarity index 80% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-url-column.md index 65d299dba8..fbe68c9a62 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-url-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.updateUrlColumn( +val response = tablesDB.updateUrlColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update.md similarity index 78% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update.md index bc9999ff18..48d1a8e300 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.createDatabase( +val response = tablesDB.update( databaseId = "<DATABASE_ID>", name = "<NAME>", enabled = false // 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/tablesdb/upsert-row.md similarity index 82% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/upsert-row.md index cbf0f38c8d..3fcbc61617 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/upsert-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB 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 tablesDB = TablesDB(client) -val response = grids.upsertRow( +val response = tablesDB.upsertRow( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", rowId = "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/upsert-rows.md similarity index 77% rename from docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md rename to docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/upsert-rows.md index c767b66803..7059c6018b 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/upsert-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://<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 tablesDB = TablesDB(client) -val response = grids.upsertRows( +val response = tablesDB.upsertRows( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", rows = listOf() 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-argon-2-user.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/users/create-argon2user.md rename to docs/examples/1.8.x/server-kotlin/kotlin/users/create-argon-2-user.md 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/users/create-j-w-t.md rename to docs/examples/1.8.x/server-kotlin/kotlin/users/create-jwt.md 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-md-5-user.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/users/create-m-d5user.md rename to docs/examples/1.8.x/server-kotlin/kotlin/users/create-md-5-user.md 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 index 2d1dbf0a1d..7a0b1c61da 100644 --- 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 @@ -9,6 +9,6 @@ val client = Client() val users = Users(client) -val response = users.createMfaRecoveryCodes( +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-ph-pass-user.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/users/create-p-h-pass-user.md rename to docs/examples/1.8.x/server-kotlin/kotlin/users/create-ph-pass-user.md 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-sha-user.md similarity index 100% rename from docs/examples/1.8.x/server-kotlin/kotlin/users/create-s-h-a-user.md rename to docs/examples/1.8.x/server-kotlin/kotlin/users/create-sha-user.md 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 index 22085b2f72..a7c80893bf 100644 --- 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 @@ -10,7 +10,7 @@ val client = Client() val users = Users(client) -val response = users.deleteMfaAuthenticator( +val response = users.deleteMFAAuthenticator( userId = "<USER_ID>", type = AuthenticatorType.TOTP ) 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 index e0c45dc258..1ad9197585 100644 --- 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 @@ -9,6 +9,6 @@ val client = Client() val users = Users(client) -val response = users.getMfaRecoveryCodes( +val response = users.getMFARecoveryCodes( userId = "<USER_ID>" ) 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 index 4eb6721ce5..9d0791cf13 100644 --- 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 @@ -9,6 +9,6 @@ val client = Client() val users = Users(client) -val response = users.listMfaFactors( +val response = users.listMFAFactors( userId = "<USER_ID>" ) 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 index 74602c0f7e..80b92b4565 100644 --- 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 @@ -9,6 +9,6 @@ val client = Client() val users = Users(client) -val response = users.updateMfaRecoveryCodes( +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 index 0148d582b8..d2f448e086 100644 --- 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 @@ -9,7 +9,7 @@ val client = Client() val users = Users(client) -val response = users.updateMfa( +val response = users.updateMFA( userId = "<USER_ID>", mfa = false ) 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 index 6c940f5435..f173d2117a 100644 --- 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 @@ -6,7 +6,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createEmailPasswordSession( - 'email@example.com', // email - 'password' // password -); +const result = await account.createEmailPasswordSession({ + email: 'email@example.com', + 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 index b6be71d45c..eb071b9e08 100644 --- 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 @@ -6,8 +6,8 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createEmailToken( - '<USER_ID>', // userId - 'email@example.com', // email - false // phrase (optional) -); +const result = await account.createEmailToken({ + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false // 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-nodejs/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/server-nodejs/examples/account/create-jwt.md 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-url-token.md similarity index 56% rename from docs/examples/1.8.x/server-nodejs/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/server-nodejs/examples/account/create-magic-url-token.md index 6dbdc3d9fb..59f7d10c53 100644 --- 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-url-token.md @@ -6,9 +6,9 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-authenticator.md index e52658b533..8dd6a599c0 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createMfaAuthenticator( - sdk.AuthenticatorType.Totp // type -); +const result = await account.createMFAAuthenticator({ + type: sdk.AuthenticatorType.Totp +}); 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 index 79d5e89eed..4195f46892 100644 --- 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 @@ -6,6 +6,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createMfaChallenge( - sdk.AuthenticationFactor.Email // factor -); +const result = await account.createMFAChallenge({ + factor: sdk.AuthenticationFactor.Email +}); 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 index 42b3c8c6f5..1392f44399 100644 --- 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 @@ -7,4 +7,4 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createMfaRecoveryCodes(); +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-auth-2-token.md similarity index 53% rename from docs/examples/1.8.x/server-nodejs/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/server-nodejs/examples/account/create-o-auth-2-token.md index adae095105..cc4f31552a 100644 --- 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-auth-2-token.md @@ -6,9 +6,9 @@ const client = new sdk.Client() 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) -); +const result = await account.createOAuth2Token({ + provider: sdk.OAuthProvider.Amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // 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 index aca0bd2d8a..fe88e77b47 100644 --- 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 @@ -6,7 +6,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createPhoneToken( - '<USER_ID>', // userId - '+12065550100' // phone -); +const result = await account.createPhoneToken({ + userId: '<USER_ID>', + phone: '+12065550100' +}); 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 index 660942affb..eab8af6de2 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createRecovery( - 'email@example.com', // email - 'https://example.com' // url -); +const result = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com' +}); 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 index 8c6b910089..448f9017b5 100644 --- 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 @@ -6,7 +6,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createSession( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await account.createSession({ + userId: '<USER_ID>', + 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 index 1f1db27e8a..02b9e78ddb 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createVerification( - 'https://example.com' // url -); +const result = await account.createVerification({ + url: 'https://example.com' +}); 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 index 85e3d2fcca..7ba2d427d1 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/create.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create.md @@ -6,9 +6,9 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.create( - '<USER_ID>', // userId - 'email@example.com', // email - '', // password - '<NAME>' // name (optional) -); +const result = await account.create({ + userId: '<USER_ID>', + email: 'email@example.com', + 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 index 0424ab247e..222d4bf260 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.deleteIdentity( - '<IDENTITY_ID>' // identityId -); +const result = await account.deleteIdentity({ + identityId: '<IDENTITY_ID>' +}); 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 index 5979c3a6d7..f3d8093ca2 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.deleteMfaAuthenticator( - sdk.AuthenticatorType.Totp // type -); +const result = await account.deleteMFAAuthenticator({ + type: sdk.AuthenticatorType.Totp +}); 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 index 4276ccad24..82e1bd6787 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.deleteSession( - '<SESSION_ID>' // sessionId -); +const result = await account.deleteSession({ + sessionId: '<SESSION_ID>' +}); 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 index 27f902424e..6461e6b586 100644 --- 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 @@ -7,4 +7,4 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.getMfaRecoveryCodes(); +const result = await account.getMFARecoveryCodes(); 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 index 63b6f0893a..edf3836851 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.getSession( - '<SESSION_ID>' // sessionId -); +const result = await account.getSession({ + sessionId: '<SESSION_ID>' +}); 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 index c49894c8c0..b124065db7 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.listIdentities( - [] // queries (optional) -); +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 index 4260a72e30..ca47edda5e 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.listLogs( - [] // queries (optional) -); +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 index a993e31aa8..97f7f5fbc7 100644 --- 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 @@ -7,4 +7,4 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.listMfaFactors(); +const result = await account.listMFAFactors(); 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 index 6111f0e52a..58fea36be5 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateEmail( - 'email@example.com', // email - 'password' // password -); +const result = await account.updateEmail({ + email: 'email@example.com', + password: 'password' +}); 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-url-session.md similarity index 70% rename from docs/examples/1.8.x/server-nodejs/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/server-nodejs/examples/account/update-magic-url-session.md index 3e059d88d9..d67d481bf8 100644 --- 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-url-session.md @@ -6,7 +6,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateMagicURLSession( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await account.updateMagicURLSession({ + userId: '<USER_ID>', + 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 index 7b24dc8712..18e15754bc 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateMfaAuthenticator( - sdk.AuthenticatorType.Totp, // type - '<OTP>' // otp -); +const result = await account.updateMFAAuthenticator({ + type: sdk.AuthenticatorType.Totp, + 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 index 4d30999129..4903e1e298 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateMfaChallenge( - '<CHALLENGE_ID>', // challengeId - '<OTP>' // otp -); +const result = await account.updateMFAChallenge({ + challengeId: '<CHALLENGE_ID>', + 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 index 9db82175c9..fd5c1fd56d 100644 --- 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 @@ -7,4 +7,4 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateMfaRecoveryCodes(); +const result = await account.updateMFARecoveryCodes(); 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-mfa.md similarity index 83% rename from docs/examples/1.8.x/server-nodejs/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/server-nodejs/examples/account/update-mfa.md index 58629cda3b..378c23fc0c 100644 --- 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-mfa.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateMFA( - false // mfa -); +const result = await account.updateMFA({ + mfa: false +}); 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 index f47d215288..f812116e7a 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateName( - '<NAME>' // name -); +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 index aa9d67aede..e7e8437f5b 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updatePassword( - '', // password - 'password' // oldPassword (optional) -); +const result = await account.updatePassword({ + password: '', + oldPassword: 'password' // 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 index c208714a37..7d9680025b 100644 --- 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 @@ -6,7 +6,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updatePhoneSession( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await account.updatePhoneSession({ + userId: '<USER_ID>', + 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 index 116d171c92..af05baf59d 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updatePhoneVerification( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await account.updatePhoneVerification({ + userId: '<USER_ID>', + 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 index c6c02fde9a..b1f1daa6c1 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updatePhone( - '+12065550100', // phone - 'password' // password -); +const result = await account.updatePhone({ + phone: '+12065550100', + 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 index ee8b042693..113f8678df 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updatePrefs( - {} // prefs -); +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 index bd4a87c3a9..c88b435238 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateRecovery( - '<USER_ID>', // userId - '<SECRET>', // secret - '' // password -); +const result = await account.updateRecovery({ + userId: '<USER_ID>', + 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 index be80c85750..c189f68e0a 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateSession( - '<SESSION_ID>' // sessionId -); +const result = await account.updateSession({ + sessionId: '<SESSION_ID>' +}); 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 index 0abb562a95..d64b402e4b 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateVerification( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await account.updateVerification({ + userId: '<USER_ID>', + 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 index 1cc825d917..9f3b2cce80 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getBrowser( - sdk.Browser.AvantBrowser, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = await avatars.getBrowser({ + code: sdk.Browser.AvantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index 7d62a96033..1337d05fb9 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getCreditCard( - sdk.CreditCard.AmericanExpress, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = await avatars.getCreditCard({ + code: sdk.CreditCard.AmericanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index 6056354e9e..6f79cb664a 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getFavicon( - 'https://example.com' // url -); +const result = await avatars.getFavicon({ + url: 'https://example.com' +}); 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 index a62f56dd47..672c18bb77 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getFlag( - sdk.Flag.Afghanistan, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = await avatars.getFlag({ + code: sdk.Flag.Afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // 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 index 7dac2423ba..12aef10321 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getImage( - 'https://example.com', // url - 0, // width (optional) - 0 // height (optional) -); +const result = await avatars.getImage({ + url: 'https://example.com', + width: 0, // optional + height: 0 // 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 index 2cd45bfac8..584786f65c 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getInitials( - '<NAME>', // name (optional) - 0, // width (optional) - 0, // height (optional) - '' // background (optional) -); +const result = await avatars.getInitials({ + name: '<NAME>', // optional + width: 0, // optional + height: 0, // 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-qr.md similarity index 67% rename from docs/examples/1.8.x/server-nodejs/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/server-nodejs/examples/avatars/get-qr.md index cfd649ea33..fd083807c8 100644 --- 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-qr.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getQR( - '<TEXT>', // text - 1, // size (optional) - 0, // margin (optional) - false // download (optional) -); +const result = await avatars.getQR({ + text: '<TEXT>', + size: 1, // optional + margin: 0, // optional + download: false // 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 index b6239698a5..2e9b5629cc 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const result = 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-nodejs/examples/databases/create-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md index fc5c798385..8ad770d907 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-datetime-attribute.md index 4c7328ce4b..7ca8b553e9 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const result = 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-nodejs/examples/databases/create-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md index a2e77b9241..39442d1cb7 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 @@ -7,10 +7,10 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/databases/create-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md index d73df44cd1..73d08aa21e 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // documents -); +const result = await databases.createDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 47b27508cd..4afebf6560 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const result = 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-nodejs/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-enum-attribute.md index 61c1d77f2c..5866eabb7d 100644 --- 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 @@ -7,12 +7,12 @@ const client = new sdk.Client() 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) -); +const result = 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-nodejs/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-float-attribute.md index 3e605001e6..7843c1658a 100644 --- 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 @@ -7,13 +7,13 @@ const client = new sdk.Client() 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) -); +const result = await databases.createFloatAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<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-nodejs/examples/databases/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-index.md index ed03322cbd..ce5214a9ab 100644 --- 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 @@ -7,12 +7,12 @@ const client = new sdk.Client() 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) -); +const result = await databases.createIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + type: sdk.IndexType.Key, + 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 index ce62624001..e3752669b6 100644 --- 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 @@ -7,13 +7,13 @@ const client = new sdk.Client() 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) -); +const result = await databases.createIntegerAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<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-nodejs/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-ip-attribute.md index e3bbffe227..110e3a813f 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const result = 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-nodejs/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-relationship-attribute.md index bb77bc00c3..b09c6a3b07 100644 --- 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 @@ -7,13 +7,13 @@ const client = new sdk.Client() 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) -); +const result = await databases.createRelationshipAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + relatedCollectionId: '<RELATED_COLLECTION_ID>', + type: sdk.RelationshipType.OneToOne, + twoWay: false, // optional + key: '', // optional + twoWayKey: '', // optional + onDelete: sdk.RelationMutate.Cascade // 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 index 94793e86db..57ed8f4ea2 100644 --- 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 @@ -7,13 +7,13 @@ const client = new sdk.Client() 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) -); +const result = 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-nodejs/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-url-attribute.md index 6b6b1daaa0..af3177f837 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const result = 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-nodejs/examples/databases/create.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create.md index c1fd4eca43..7392a85f37 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.create( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); +const result = await databases.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // 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 index 6bfc5f17cd..87e4d7d25c 100644 --- 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 @@ -3,15 +3,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 + .setSession(''); // The user session to authenticate with 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) -); +const result = await databases.decrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: null, // optional + min: null // 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 index 8291fc095e..166aa1961b 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.deleteAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const result = await databases.deleteAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 9551c558fb..f915076c3a 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.deleteCollection( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId -); +const result = await databases.deleteCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +}); 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 index 526f00eb3a..429554b74b 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.deleteDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId -); +const result = await databases.deleteDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>' +}); 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 index 01814e5052..0965d8ddaf 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.deleteDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const result = await databases.deleteDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 90353ea44e..24f74c6975 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.deleteIndex( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const result = await databases.deleteIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 65179d2b2a..fc9ace4960 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.delete( - '<DATABASE_ID>' // databaseId -); +const result = await databases.delete({ + databaseId: '<DATABASE_ID>' +}); 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 index 8757265edb..4c683034f8 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.getAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const result = await databases.getAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 79c5674985..4855471977 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.getCollection( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId -); +const result = await databases.getCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +}); 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 index eee515bf36..7cc71cd0c3 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.getDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - [] // queries (optional) -); +const result = await databases.getDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + 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 index a4b3a45eb8..d7edb84e34 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.getIndex( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const result = await databases.getIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index a8e8084673..eb83ef7a85 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/get.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.get( - '<DATABASE_ID>' // databaseId -); +const result = await databases.get({ + databaseId: '<DATABASE_ID>' +}); 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 index 0ba024514a..2b47f5a75d 100644 --- 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 @@ -3,15 +3,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 + .setSession(''); // The user session to authenticate with 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) -); +const result = await databases.incrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: null, // optional + max: null // 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 index e7b48fb9f0..a69800c4d7 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.listAttributes( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const result = await databases.listAttributes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index bc31eadf9b..933b53ce83 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.listCollections( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await databases.listCollections({ + databaseId: '<DATABASE_ID>', + 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 index d2514850d8..148bf83c8f 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.listDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const result = await databases.listDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 86c6c26ec6..f48112fccf 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.listIndexes( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const result = await databases.listIndexes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 06fe6a8462..4ac7e47d46 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/list.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index d0d551c3fd..224fc8e6f9 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateBooleanAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - false, // default - '' // newKey (optional) -); +const result = 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-nodejs/examples/databases/update-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md index 2618fc735e..d0d25b74d6 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-datetime-attribute.md index d2378f93ca..20034486fe 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateDatetimeAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default - '' // newKey (optional) -); +const result = await databases.updateDatetimeAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + 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 index 96468037e7..8a9a6856b4 100644 --- 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 @@ -7,10 +7,10 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/databases/update-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-documents.md index 62b2271bae..2cfb8c7800 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - {}, // data (optional) - [] // queries (optional) -); +const result = await databases.updateDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + 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 index 8b7afbebb5..738c533c33 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const result = 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-nodejs/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-enum-attribute.md index f328132519..f240cb0565 100644 --- 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 @@ -7,12 +7,12 @@ const client = new sdk.Client() 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) -); +const result = 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-nodejs/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-float-attribute.md index abb93c28fa..877cad18bf 100644 --- 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 @@ -7,13 +7,13 @@ const client = new sdk.Client() 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) -); +const result = await databases.updateFloatAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // 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 index e126f31fd8..cf7101e5f5 100644 --- 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 @@ -7,13 +7,13 @@ const client = new sdk.Client() 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) -); +const result = await databases.updateIntegerAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // 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 index 1c8ac79dd8..d41bb85060 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateIpAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default - '' // newKey (optional) -); +const result = await databases.updateIpAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + 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 index 1a7a26cc92..aa476c4160 100644 --- 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 @@ -7,10 +7,10 @@ const client = new sdk.Client() 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) -); +const result = await databases.updateRelationshipAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + onDelete: sdk.RelationMutate.Cascade, // 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 index 0e0656ef10..b0d7bea52e 100644 --- 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 @@ -7,12 +7,12 @@ const client = new sdk.Client() 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) -); +const result = 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-nodejs/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-url-attribute.md index 4a2aca0fe9..48d928151b 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const result = 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-nodejs/examples/databases/update.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update.md index 9c69bfd2ce..9a0dbd2eb1 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.update( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); +const result = await databases.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // 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 index fcc62d601c..5ec3e0541e 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 @@ -7,10 +7,10 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md index 425b7ba51f..8deec536ff 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.upsertDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // documents -); +const result = await databases.upsertDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [] +}); 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 index 5ede954907..77946a7084 100644 --- 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 @@ -8,10 +8,10 @@ const client = new sdk.Client() 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) -); +const result = await functions.createDeployment({ + functionId: '<FUNCTION_ID>', + code: InputFile.fromPath('/path/to/file', 'filename'), + activate: false, + 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 index 33f77ffd39..03c68e7491 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.createDuplicateDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>', // deploymentId - '<BUILD_ID>' // buildId (optional) -); +const result = await functions.createDuplicateDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>' // 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 index 5671483191..5b2c18cc86 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 @@ -7,12 +7,12 @@ const client = new sdk.Client() 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) - '<SCHEDULED_AT>' // scheduledAt (optional) -); +const result = await functions.createExecution({ + functionId: '<FUNCTION_ID>', + body: '<BODY>', // optional + async: false, // optional + path: '<PATH>', // optional + method: sdk.ExecutionMethod.GET, // optional + headers: {}, // optional + scheduledAt: '<SCHEDULED_AT>' // 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 index eef7148f94..8f6395f8fb 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/functions/create-variable.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-variable.md index 5e75d19bf4..45928395bd 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.createVariable( - '<FUNCTION_ID>', // functionId - '<KEY>', // key - '<VALUE>', // value - false // secret (optional) -); +const result = await functions.createVariable({ + functionId: '<FUNCTION_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // 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 index ba1067f579..0aabfcff8a 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.createVcsDeployment( - '<FUNCTION_ID>', // functionId - sdk.VCSDeploymentType.Branch, // type - '<REFERENCE>', // reference - false // activate (optional) -); +const result = await functions.createVcsDeployment({ + functionId: '<FUNCTION_ID>', + type: sdk.VCSDeploymentType.Branch, + reference: '<REFERENCE>', + activate: false // 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 index 646e2e5b4d..d9f21ff796 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/create.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create.md @@ -7,23 +7,23 @@ const client = new sdk.Client() 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) -); +const result = await functions.create({ + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: sdk..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-nodejs/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-deployment.md index f6768ec739..9f9815b91d 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.deleteDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await functions.deleteDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index c3e77a6860..cf9d1079cf 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.deleteExecution( - '<FUNCTION_ID>', // functionId - '<EXECUTION_ID>' // executionId -); +const result = await functions.deleteExecution({ + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +}); 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 index 7840b1d562..70ee4f7abe 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.deleteVariable( - '<FUNCTION_ID>', // functionId - '<VARIABLE_ID>' // variableId -); +const result = await functions.deleteVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +}); 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 index a2e0a23a2b..635f271a1c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.delete( - '<FUNCTION_ID>' // functionId -); +const result = await functions.delete({ + functionId: '<FUNCTION_ID>' +}); 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 index 5ba1035392..9e82998594 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.getDeploymentDownload( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>', // deploymentId - sdk.DeploymentDownloadType.Source // type (optional) -); +const result = await functions.getDeploymentDownload({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: sdk.DeploymentDownloadType.Source // 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 index 6a55534af4..c47081c718 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.getDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await functions.getDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index b9fed55799..ad3ff4874c 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.getExecution( - '<FUNCTION_ID>', // functionId - '<EXECUTION_ID>' // executionId -); +const result = await functions.getExecution({ + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +}); 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 index 3b6135f7dc..9f47331204 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.getVariable( - '<FUNCTION_ID>', // functionId - '<VARIABLE_ID>' // variableId -); +const result = await functions.getVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +}); 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 index b88609252e..463054d425 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/get.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.get( - '<FUNCTION_ID>' // functionId -); +const result = await functions.get({ + functionId: '<FUNCTION_ID>' +}); 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 index 731d1c46cf..e14c6d0441 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.listDeployments( - '<FUNCTION_ID>', // functionId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await functions.listDeployments({ + functionId: '<FUNCTION_ID>', + 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 index 24d3e54ef3..0d1ceb7223 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.listExecutions( - '<FUNCTION_ID>', // functionId - [] // queries (optional) -); +const result = await functions.listExecutions({ + functionId: '<FUNCTION_ID>', + queries: [] // optional +}); 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 index 4220918fa6..962a81005c 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.listVariables( - '<FUNCTION_ID>' // functionId -); +const result = await functions.listVariables({ + functionId: '<FUNCTION_ID>' +}); 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 index af5082c25e..847c34531a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/list.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index e7ce4a815c..32b8a619cd 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.updateDeploymentStatus( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await functions.updateDeploymentStatus({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index feef831e5c..b0d31325f1 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.updateFunctionDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await functions.updateFunctionDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index d9a7ac7e0b..73ae49fbf2 100644 --- 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 @@ -7,10 +7,10 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/functions/update.md b/docs/examples/1.8.x/server-nodejs/examples/functions/update.md index b6de177cff..8ed2828f56 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/update.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/update.md @@ -7,23 +7,23 @@ const client = new sdk.Client() 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) -); +const result = await functions.update({ + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: sdk..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-nodejs/examples/graphql/mutation.md b/docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md index 8031a5285a..dffb7b3f3b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const graphql = new sdk.Graphql(client); -const result = await graphql.mutation( - {} // query -); +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 index 15456754cb..1f873ed90d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/graphql/query.md +++ b/docs/examples/1.8.x/server-nodejs/examples/graphql/query.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const graphql = new sdk.Graphql(client); -const result = await graphql.query( - {} // query -); +const result = await graphql.query({ + query: {} +}); 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-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/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-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/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-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/health/get-certificate.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-certificate.md index ec9129344c..ccb880078c 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getCertificate( - '' // domain (optional) -); +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-db.md similarity index 100% rename from docs/examples/1.8.x/server-nodejs/examples/health/get-d-b.md rename to docs/examples/1.8.x/server-nodejs/examples/health/get-db.md 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 index d88b7f2bfd..bf77aa26d8 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getFailedJobs( - sdk..V1Database, // name - null // threshold (optional) -); +const result = await health.getFailedJobs({ + name: sdk..V1Database, + threshold: null // optional +}); 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 index 929f9769fb..8e28054718 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueBuilds( - null // threshold (optional) -); +const result = await health.getQueueBuilds({ + threshold: null // 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 index 33e71ecac6..89383ede8c 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueCertificates( - null // threshold (optional) -); +const result = await health.getQueueCertificates({ + threshold: null // 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 index ca409c1ba5..784525573c 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueDatabases( - '<NAME>', // name (optional) - null // threshold (optional) -); +const result = await health.getQueueDatabases({ + name: '<NAME>', // optional + threshold: null // 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 index 9f2d6f8cf5..8248b5c41f 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueDeletes( - null // threshold (optional) -); +const result = await health.getQueueDeletes({ + threshold: null // 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 index 0392db1079..5832a27439 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueFunctions( - null // threshold (optional) -); +const result = await health.getQueueFunctions({ + threshold: null // 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 index a71ff13397..055c525be4 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueLogs( - null // threshold (optional) -); +const result = await health.getQueueLogs({ + threshold: null // 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 index 8c45c1a194..fb29d0813d 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueMails( - null // threshold (optional) -); +const result = await health.getQueueMails({ + threshold: null // 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 index 46160a0e88..cc8eb4be0a 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueMessaging( - null // threshold (optional) -); +const result = await health.getQueueMessaging({ + threshold: null // 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 index 5f8d262e30..ddc7f517c5 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueMigrations( - null // threshold (optional) -); +const result = await health.getQueueMigrations({ + threshold: null // 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 index 1b16e6d5b8..dacf04c35a 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueStatsResources( - null // threshold (optional) -); +const result = await health.getQueueStatsResources({ + threshold: null // 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 index 2a20620cd2..5d06a7ce5b 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueUsage( - null // threshold (optional) -); +const result = await health.getQueueUsage({ + threshold: null // 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 index acc2098365..f4d0af8a1e 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueWebhooks( - null // threshold (optional) -); +const result = await health.getQueueWebhooks({ + threshold: null // optional +}); 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-eu.md similarity index 100% rename from docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-eu.md 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 index a28309023a..cd1a53b365 100644 --- 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 @@ -7,13 +7,13 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/create-email.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-email.md index b4b1f6622a..93fb2ef3b8 100644 --- 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 @@ -7,17 +7,17 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-fcm-provider.md index a8af6ba12c..8041e7f2a8 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createFcmProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - {}, // serviceAccountJSON (optional) - false // enabled (optional) -); +const result = await messaging.createFCMProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: {}, // optional + enabled: false // 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 index ee49f64f7c..dd8a0f6ad3 100644 --- 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 @@ -7,15 +7,15 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg-91-provider.md similarity index 53% rename from docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg91provider.md rename to docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg-91-provider.md index e7075dc3b8..7168e8bba6 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg91provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg-91-provider.md @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/create-push.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-push.md index bd89f761fb..c0a7f4713f 100644 --- 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 @@ -7,24 +7,24 @@ const client = new sdk.Client() 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) -); +const 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: null, // optional + draft: false, // optional + scheduledAt: '', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: sdk.MessagePriority.Normal // 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 index 8cde02e80c..8b26b2f3f6 100644 --- 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 @@ -7,13 +7,13 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sms.md index 226f47c8d4..c477643b4b 100644 --- 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 @@ -7,12 +7,12 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-smtp-provider.md index 50a8d202c5..241a0f0969 100644 --- 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 @@ -7,19 +7,19 @@ const client = new sdk.Client() 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) -); +const result = await messaging.createSMTPProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, // optional + username: '<USERNAME>', // optional + password: '<PASSWORD>', // optional + encryption: sdk.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-nodejs/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-subscriber.md index 9874d072b8..f86a424c2a 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>', // subscriberId - '<TARGET_ID>' // targetId -); +const result = await messaging.createSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>' +}); 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 index b877172163..b558fbd210 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-textmagic-provider.md index b40d5ee4e7..82141aeab8 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-topic.md index 35c93eadca..ce91b54279 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createTopic( - '<TOPIC_ID>', // topicId - '<NAME>', // name - ["any"] // subscribe (optional) -); +const result = await messaging.createTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] // 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 index 4dcb9a841d..b3d9ba6bfb 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-vonage-provider.md index 493cd2b660..b7a94ff527 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-provider.md index 23b474f787..590b8078ee 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.deleteProvider( - '<PROVIDER_ID>' // providerId -); +const result = await messaging.deleteProvider({ + providerId: '<PROVIDER_ID>' +}); 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 index 1f5e21af93..77f2f8962f 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.deleteSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>' // subscriberId -); +const result = await messaging.deleteSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +}); 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 index af39f73491..58ca2fb382 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.deleteTopic( - '<TOPIC_ID>' // topicId -); +const result = await messaging.deleteTopic({ + topicId: '<TOPIC_ID>' +}); 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 index fd49104a49..c2c0560d71 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.delete( - '<MESSAGE_ID>' // messageId -); +const result = await messaging.delete({ + messageId: '<MESSAGE_ID>' +}); 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 index f83ab51c23..503da4828d 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.getMessage( - '<MESSAGE_ID>' // messageId -); +const result = await messaging.getMessage({ + messageId: '<MESSAGE_ID>' +}); 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 index 2f52698bfc..f7c70587b4 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.getProvider( - '<PROVIDER_ID>' // providerId -); +const result = await messaging.getProvider({ + providerId: '<PROVIDER_ID>' +}); 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 index 5132f1772a..befc566bf9 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.getSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>' // subscriberId -); +const result = await messaging.getSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +}); 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 index 98e38383d4..f537973f3c 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.getTopic( - '<TOPIC_ID>' // topicId -); +const result = await messaging.getTopic({ + topicId: '<TOPIC_ID>' +}); 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 index 56e1288af7..c2d32f014b 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listMessageLogs( - '<MESSAGE_ID>', // messageId - [] // queries (optional) -); +const result = await messaging.listMessageLogs({ + messageId: '<MESSAGE_ID>', + 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 index db0785ece8..2edc75f689 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listMessages( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 6cb2a01df4..35fd2cf9b0 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listProviderLogs( - '<PROVIDER_ID>', // providerId - [] // queries (optional) -); +const result = await messaging.listProviderLogs({ + providerId: '<PROVIDER_ID>', + 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 index aefb41d15a..2445597f3e 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listProviders( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 8d46a08578..1da2c3bc27 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listSubscriberLogs( - '<SUBSCRIBER_ID>', // subscriberId - [] // queries (optional) -); +const result = await messaging.listSubscriberLogs({ + subscriberId: '<SUBSCRIBER_ID>', + 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 index 167b48e978..c2b594e4b2 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listSubscribers( - '<TOPIC_ID>', // topicId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await messaging.listSubscribers({ + topicId: '<TOPIC_ID>', + 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 index 971285d87c..75a4aa60f6 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listTargets( - '<MESSAGE_ID>', // messageId - [] // queries (optional) -); +const result = await messaging.listTargets({ + messageId: '<MESSAGE_ID>', + 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 index 39e82954d1..eacf4822b7 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listTopicLogs( - '<TOPIC_ID>', // topicId - [] // queries (optional) -); +const result = await messaging.listTopicLogs({ + topicId: '<TOPIC_ID>', + 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 index 6fd94bba42..3ff5538949 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listTopics( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index e782b8c3f7..f57fe6aba5 100644 --- 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 @@ -7,13 +7,13 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/update-email.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-email.md index 2ea2941efd..575b463545 100644 --- 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 @@ -7,17 +7,17 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-fcm-provider.md index 9184f283d0..0a3134a91a 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateFcmProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - {} // serviceAccountJSON (optional) -); +const result = await messaging.updateFCMProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // 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 index a1ac18fd60..fbe2d076f7 100644 --- 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 @@ -7,15 +7,15 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg-91-provider.md similarity index 52% rename from docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg91provider.md rename to docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg-91-provider.md index c66b91f8c0..7ecb3f031b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg91provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg-91-provider.md @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/update-push.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-push.md index db52bee373..5e857f1ff6 100644 --- 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 @@ -7,24 +7,24 @@ const client = new sdk.Client() 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) -); +const 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: null, // optional + draft: false, // optional + scheduledAt: '', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: sdk.MessagePriority.Normal // 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 index 8420a2fac2..340f275884 100644 --- 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 @@ -7,13 +7,13 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sms.md index 98ee6feb23..a325b5afb3 100644 --- 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 @@ -7,12 +7,12 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-smtp-provider.md index 0bbe4cd2cb..7b2a81164b 100644 --- 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 @@ -7,19 +7,19 @@ const client = new sdk.Client() 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) -); +const result = await messaging.updateSMTPProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + host: '<HOST>', // optional + port: 1, // optional + username: '<USERNAME>', // optional + password: '<PASSWORD>', // optional + encryption: sdk.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-nodejs/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-telesign-provider.md index 2f23a3b11f..8e1e2364c1 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-textmagic-provider.md index 6fb6c82e8f..8656723d14 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-topic.md index 6330970077..cf34080fea 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateTopic( - '<TOPIC_ID>', // topicId - '<NAME>', // name (optional) - ["any"] // subscribe (optional) -); +const result = await messaging.updateTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', // optional + subscribe: ["any"] // 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 index e4667f56ae..6a201415fe 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-vonage-provider.md index b95398b4ea..d99c07621c 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-deployment.md index 010da729ed..dbd78e094e 100644 --- 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 @@ -8,11 +8,11 @@ const client = new sdk.Client() 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) -); +const result = await sites.createDeployment({ + siteId: '<SITE_ID>', + code: InputFile.fromPath('/path/to/file', 'filename'), + activate: false, + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>' // 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 index 3ce35ff559..8d2bd4f604 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.createDuplicateDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.createDuplicateDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index aebc2b8f4d..7dfb4370e6 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/sites/create-variable.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-variable.md index 59a51eea76..2ec774c70b 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.createVariable( - '<SITE_ID>', // siteId - '<KEY>', // key - '<VALUE>', // value - false // secret (optional) -); +const result = await sites.createVariable({ + siteId: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // 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 index 4bd849777b..7f7c2196ba 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.createVcsDeployment( - '<SITE_ID>', // siteId - sdk.VCSDeploymentType.Branch, // type - '<REFERENCE>', // reference - false // activate (optional) -); +const result = await sites.createVcsDeployment({ + siteId: '<SITE_ID>', + type: sdk.VCSDeploymentType.Branch, + reference: '<REFERENCE>', + activate: false // 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 index ad680592c2..25c6715748 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/create.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create.md @@ -7,23 +7,23 @@ const client = new sdk.Client() 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) -); +const result = await sites.create({ + siteId: '<SITE_ID>', + name: '<NAME>', + framework: sdk..Analog, + buildRuntime: sdk..Node145, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + adapter: sdk..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-nodejs/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-deployment.md index c04a5c38d7..292f9e05d0 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.deleteDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.deleteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index 88e58a5f62..d1850e1ea3 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.deleteLog( - '<SITE_ID>', // siteId - '<LOG_ID>' // logId -); +const result = await sites.deleteLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +}); 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 index abc7e3ac47..069ff8dc07 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.deleteVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>' // variableId -); +const result = await sites.deleteVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +}); 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 index 87fd7d23be..7f6ad8bc88 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.delete( - '<SITE_ID>' // siteId -); +const result = await sites.delete({ + siteId: '<SITE_ID>' +}); 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 index 414d50d4f8..05e87058bc 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.getDeploymentDownload( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>', // deploymentId - sdk.DeploymentDownloadType.Source // type (optional) -); +const result = await sites.getDeploymentDownload({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: sdk.DeploymentDownloadType.Source // 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 index 3f06b1ab07..68b6dcf549 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.getDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.getDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index 4318882c95..3a22d90ff5 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.getLog( - '<SITE_ID>', // siteId - '<LOG_ID>' // logId -); +const result = await sites.getLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +}); 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 index 287336fd45..7d0a759ec4 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.getVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>' // variableId -); +const result = await sites.getVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +}); 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 index d382efa2c8..6d8180802f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/get.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.get( - '<SITE_ID>' // siteId -); +const result = await sites.get({ + siteId: '<SITE_ID>' +}); 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 index dce44ed134..53a900ee77 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.listDeployments( - '<SITE_ID>', // siteId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await sites.listDeployments({ + siteId: '<SITE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +}); 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 index faaf3d3542..17428d71f1 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.listLogs( - '<SITE_ID>', // siteId - [] // queries (optional) -); +const result = await sites.listLogs({ + siteId: '<SITE_ID>', + queries: [] // optional +}); 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 index 948e977abc..498584ee60 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.listVariables( - '<SITE_ID>' // siteId -); +const result = await sites.listVariables({ + siteId: '<SITE_ID>' +}); 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 index 184f4f3fc4..2f2f884989 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/list.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 7756424523..88d55b0d9e 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.updateDeploymentStatus( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.updateDeploymentStatus({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index bfbc0f3514..bb3adc437d 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.updateSiteDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.updateSiteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); 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 index c790ca10eb..a7e3f6a1ca 100644 --- 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 @@ -7,10 +7,10 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/sites/update.md b/docs/examples/1.8.x/server-nodejs/examples/sites/update.md index e801aed187..5cb52f7a3c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/update.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/update.md @@ -7,23 +7,23 @@ const client = new sdk.Client() 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) -); +const result = await sites.update({ + siteId: '<SITE_ID>', + name: '<NAME>', + framework: sdk..Analog, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + buildRuntime: sdk..Node145, // optional + adapter: sdk..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-nodejs/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md index fc318f169d..f1f029491a 100644 --- 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 @@ -7,15 +7,15 @@ const client = new sdk.Client() 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) -); +const 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: sdk..None, // optional + encryption: false, // optional + antivirus: false // 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 index b84d9ac653..628faf7249 100644 --- 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 @@ -8,9 +8,9 @@ const client = new sdk.Client() 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) -); +const result = await storage.createFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: InputFile.fromPath('/path/to/file', 'filename'), + permissions: ["read("any")"] // 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 index c2067efda2..a59844dd41 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.deleteBucket( - '<BUCKET_ID>' // bucketId -); +const result = await storage.deleteBucket({ + bucketId: '<BUCKET_ID>' +}); 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 index 4d2e7128cd..d973b5a50f 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.deleteFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>' // fileId -); +const result = await storage.deleteFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +}); 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 index c8a0b1c55d..2dd16cc148 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.getBucket( - '<BUCKET_ID>' // bucketId -); +const result = await storage.getBucket({ + bucketId: '<BUCKET_ID>' +}); 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 index 6935bede48..253e63851b 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.getFileDownload( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<TOKEN>' // token (optional) -); +const result = await storage.getFileDownload({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + 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 index fe24419c52..d188e0d8ae 100644 --- 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 @@ -7,19 +7,19 @@ const client = new sdk.Client() 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) -); +const result = await storage.getFilePreview({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, // optional + height: 0, // optional + gravity: sdk.ImageGravity.Center, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: '', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: '', // optional + output: sdk.ImageFormat.Jpg, // 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 index 9493cfb0a3..35c6ba2284 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.getFileView( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<TOKEN>' // token (optional) -); +const result = await storage.getFileView({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + 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 index 1a6b500013..a6c54c8670 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.getFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>' // fileId -); +const result = await storage.getFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +}); 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 index 3c4d4b14f7..a6dcf4004a 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.listBuckets( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index fb595efc05..b22c1c1047 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.listFiles( - '<BUCKET_ID>', // bucketId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await storage.listFiles({ + bucketId: '<BUCKET_ID>', + 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 index 24e4872d8d..136ebafe1b 100644 --- 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 @@ -7,15 +7,15 @@ const client = new sdk.Client() 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) -); +const 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: sdk..None, // optional + encryption: false, // optional + antivirus: false // 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 index 7eed687cf5..2d78d5fb91 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.updateFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<NAME>', // name (optional) - ["read("any")"] // permissions (optional) -); +const 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-nodejs/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..129e646ae6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.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-nodejs/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..dcc6c1ed2d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..a250d4a908 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.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-nodejs/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..f1e183088d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.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-nodejs/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..6dd4dfcf87 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<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-nodejs/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..ec84b060a0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: sdk.IndexType.Key, + columns: [], + orders: [], // optional + lengths: [] // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..b682db47eb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<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-nodejs/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..eaeb64aa86 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..09ebd96e2b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: sdk.RelationshipType.OneToOne, + twoWay: false, // optional + key: '', // optional + twoWayKey: '', // optional + onDelete: sdk.RelationMutate.Cascade // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..aa9242301e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] // 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/tablesdb/create-rows.md similarity index 61% rename from docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-rows.md index c9400a4edf..61eb1d1db8 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-rows.md @@ -5,10 +5,10 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); +const result = await tablesDB.createRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..dbe06329c1 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.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-nodejs/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-table.md new file mode 100644 index 0000000000..1b252f1484 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.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-nodejs/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..a37424e718 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.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-nodejs/examples/tablesdb/create.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create.md new file mode 100644 index 0000000000..a16191d4db --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..e3b13a887e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 + .setSession(''); // The user session to authenticate with + +const tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.decrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + min: null // 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/tablesdb/delete-column.md similarity index 61% rename from docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-column.md index 7130f48cae..890393a252 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-column.md @@ -5,10 +5,10 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.deleteColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); +const result = await tablesDB.deleteColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-index.md similarity index 61% rename from docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-index.md index b266062053..472b5de8a1 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-index.md @@ -5,10 +5,10 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.deleteIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); +const result = await tablesDB.deleteIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + 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/tablesdb/delete-row.md similarity index 61% rename from docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-row.md index cf202374a0..9802f0d03e 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-row.md @@ -5,10 +5,10 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); +const result = await tablesDB.deleteRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-rows.md similarity index 59% rename from docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-rows.md index aa36bacbda..6f4d7cd68b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-rows.md @@ -5,10 +5,10 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.deleteRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); +const result = await tablesDB.deleteRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..3c526e5d80 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.deleteTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete.md similarity index 68% rename from docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete.md index 4a31d091b7..351a40f518 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete.md @@ -5,8 +5,8 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.deleteDatabase( - '<DATABASE_ID>' // databaseId -); +const result = await tablesDB.delete({ + databaseId: '<DATABASE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-column.md similarity index 61% rename from docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-column.md index d3b08936d2..66bde58144 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-column.md @@ -5,10 +5,10 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.getColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); +const result = await tablesDB.getColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-index.md similarity index 62% rename from docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-index.md index e47b942df9..6dfa7320b0 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-index.md @@ -5,10 +5,10 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.getIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); +const result = await tablesDB.getIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + 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/tablesdb/get-row.md similarity index 57% rename from docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-row.md index 15c753000a..7ea3d1fca2 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-row.md @@ -5,11 +5,11 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); +const result = await tablesDB.getRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + 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/tablesdb/get-table.md similarity index 64% rename from docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-table.md index f7b28eb191..6d14204d19 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-table.md @@ -5,9 +5,9 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.getTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); +const result = await tablesDB.getTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get.md similarity index 69% rename from docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/get.md index 7d27bbca94..137296610b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get.md @@ -5,8 +5,8 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.getDatabase( - '<DATABASE_ID>' // databaseId -); +const result = await tablesDB.get({ + databaseId: '<DATABASE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..f5cac2ebaa --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 + .setSession(''); // The user session to authenticate with + +const tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.incrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + max: null // 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/tablesdb/list-columns.md similarity index 59% rename from docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-columns.md index dbfaac0262..b756a3d0bb 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-columns.md @@ -5,10 +5,10 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.listColumns( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); +const result = await tablesDB.listColumns({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // 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/tablesdb/list-indexes.md similarity index 59% rename from docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-indexes.md index 8a102996a6..1c99bf935a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-indexes.md @@ -5,10 +5,10 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.listIndexes( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); +const result = await tablesDB.listIndexes({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + 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/tablesdb/list-rows.md similarity index 60% rename from docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-rows.md index 9f9bb3bc33..6d3b883bd4 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-rows.md @@ -5,10 +5,10 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); +const result = await tablesDB.listRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + 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/tablesdb/list-tables.md similarity index 58% rename from docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-tables.md index e020b883e0..f6d6608c1a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-tables.md @@ -5,10 +5,10 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.listTables( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await tablesDB.listTables({ + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>' // 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/tablesdb/list.md similarity index 63% rename from docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/list.md index d3bb221e0d..6648ea789c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list.md @@ -5,9 +5,9 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.deleteTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); +const result = await tablesDB.list({ + queries: [], // optional + search: '<SEARCH>' // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..aa1d5239ca --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..10badccd9b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..ff40472234 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.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-nodejs/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..ccc70b113d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..73add7d522 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..18cceb056a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..c0313d126c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..a91b47986c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: sdk.RelationMutate.Cascade, // optional + newKey: '' // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..1c7f0af197 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.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-nodejs/examples/grids/update-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-rows.md similarity index 56% rename from docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-rows.md index 65c8f63cbd..31628d7150 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-rows.md @@ -5,11 +5,11 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.updateRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - {}, // data (optional) - [] // queries (optional) -); +const result = await tablesDB.updateRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: {}, // optional + queries: [] // optional +}); 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/tablesdb/update-string-column.md similarity index 54% rename from docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-string-column.md index f72d042dfb..f30614e80c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-string-column.md @@ -5,15 +5,14 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(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) -); +const result = await tablesDB.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-nodejs/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-table.md new file mode 100644 index 0000000000..b61fd6ac4e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.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-nodejs/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..cb2440a9d0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.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-nodejs/examples/tablesdb/update.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update.md new file mode 100644 index 0000000000..85f98ee112 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..9963bb6ced --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.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-nodejs/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-rows.md similarity index 61% rename from docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md rename to docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-rows.md index 19f2ce1a90..cca2b777bb 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-rows.md @@ -5,10 +5,10 @@ const client = new sdk.Client() .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key -const grids = new sdk.Grids(client); +const tablesDB = new sdk.TablesDB(client); -const result = await grids.upsertRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); +const result = await tablesDB.upsertRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +}); 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 index 7994423be0..28cb901ca2 100644 --- 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 @@ -7,12 +7,12 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/teams/create.md b/docs/examples/1.8.x/server-nodejs/examples/teams/create.md index 94de494bf0..8b1bd1d71f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/create.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/create.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.create( - '<TEAM_ID>', // teamId - '<NAME>', // name - [] // roles (optional) -); +const result = await teams.create({ + teamId: '<TEAM_ID>', + 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 index 5264af7f13..6fe5912391 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.deleteMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>' // membershipId -); +const result = await teams.deleteMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +}); 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 index 151bfb3f70..ebccae91d9 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.delete( - '<TEAM_ID>' // teamId -); +const result = await teams.delete({ + teamId: '<TEAM_ID>' +}); 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 index a8e9fc7311..a8deb5519f 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.getMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>' // membershipId -); +const result = await teams.getMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +}); 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 index 18afdaa67b..bf9d72207b 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.getPrefs( - '<TEAM_ID>' // teamId -); +const result = await teams.getPrefs({ + teamId: '<TEAM_ID>' +}); 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 index 8afc800aa9..2f4cc115af 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/get.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/get.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.get( - '<TEAM_ID>' // teamId -); +const result = await teams.get({ + teamId: '<TEAM_ID>' +}); 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 index 4fead97b8f..3a18bbb001 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.listMemberships( - '<TEAM_ID>', // teamId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await teams.listMemberships({ + teamId: '<TEAM_ID>', + 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 index 17fe585224..ef4ab51954 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/list.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/list.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 74fd9580fe..f3b8ba2a67 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.updateMembershipStatus( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>', // membershipId - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await teams.updateMembershipStatus({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + 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 index 649630ded9..f09e8e9ab2 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.updateMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>', // membershipId - [] // roles -); +const result = await teams.updateMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + 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 index 571f7ce399..aaad80f90f 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.updateName( - '<TEAM_ID>', // teamId - '<NAME>' // name -); +const result = await teams.updateName({ + teamId: '<TEAM_ID>', + 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 index b054694df5..7f16f62996 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.updatePrefs( - '<TEAM_ID>', // teamId - {} // prefs -); +const result = await teams.updatePrefs({ + teamId: '<TEAM_ID>', + 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 index d1409c4a99..2353720627 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const tokens = new sdk.Tokens(client); -const result = await tokens.createFileToken( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '' // expire (optional) -); +const result = await tokens.createFileToken({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + 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 index 1249839f65..659c03e5c9 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tokens/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const tokens = new sdk.Tokens(client); -const result = await tokens.delete( - '<TOKEN_ID>' // tokenId -); +const result = await tokens.delete({ + tokenId: '<TOKEN_ID>' +}); 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 index efb2b8c1b4..68371c329e 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tokens/get.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/get.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const tokens = new sdk.Tokens(client); -const result = await tokens.get( - '<TOKEN_ID>' // tokenId -); +const result = await tokens.get({ + tokenId: '<TOKEN_ID>' +}); 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 index 8b708f270f..41833b80e7 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tokens/list.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/list.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const tokens = new sdk.Tokens(client); -const result = await tokens.list( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - [] // queries (optional) -); +const result = await tokens.list({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + 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 index ebf5aa9bf8..8178dd0519 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tokens/update.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/update.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const tokens = new sdk.Tokens(client); -const result = await tokens.update( - '<TOKEN_ID>', // tokenId - '' // expire (optional) -); +const result = await tokens.update({ + tokenId: '<TOKEN_ID>', + expire: '' // 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-argon-2-user.md similarity index 64% rename from docs/examples/1.8.x/server-nodejs/examples/users/create-m-d5user.md rename to docs/examples/1.8.x/server-nodejs/examples/users/create-argon-2-user.md index 954374c37d..46badb7ab8 100644 --- 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-argon-2-user.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createMD5User( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const 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-nodejs/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-bcrypt-user.md index d010676d29..9c9463289b 100644 --- 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 @@ -7,9 +7,9 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createBcryptUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const 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-nodejs/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-jwt.md similarity index 67% rename from docs/examples/1.8.x/server-nodejs/examples/users/create-j-w-t.md rename to docs/examples/1.8.x/server-nodejs/examples/users/create-jwt.md index a2c9b59056..d46b9c6ace 100644 --- 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-jwt.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createJWT( - '<USER_ID>', // userId - '<SESSION_ID>', // sessionId (optional) - 0 // duration (optional) -); +const result = await users.createJWT({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', // optional + duration: 0 // 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-md-5-user.md similarity index 63% rename from docs/examples/1.8.x/server-nodejs/examples/users/create-argon2user.md rename to docs/examples/1.8.x/server-nodejs/examples/users/create-md-5-user.md index dce3646a48..c92227489d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-argon2user.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-md-5-user.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createArgon2User( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const 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-nodejs/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-mfa-recovery-codes.md index 8b2ed93b23..5ebb6ac252 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createMfaRecoveryCodes( - '<USER_ID>' // userId -); +const result = await users.createMFARecoveryCodes({ + userId: '<USER_ID>' +}); 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-ph-pass-user.md similarity index 63% rename from docs/examples/1.8.x/server-nodejs/examples/users/create-p-h-pass-user.md rename to docs/examples/1.8.x/server-nodejs/examples/users/create-ph-pass-user.md index eca31fe659..0a2207fc8a 100644 --- 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-ph-pass-user.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createPHPassUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const 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-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 deleted file mode 100644 index e7d8588fca..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-s-h-a-user.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 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 index 831107b569..bd30b25c0b 100644 --- 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 @@ -7,12 +7,12 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-user.md index 2c2da7e055..76f9e2fa12 100644 --- 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 @@ -7,14 +7,14 @@ const client = new sdk.Client() 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) -); +const result = await 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 +}); 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 index 9d8cc03ba0..869e67f3ba 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createSession( - '<USER_ID>' // userId -); +const result = await users.createSession({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-sha-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-sha-user.md new file mode 100644 index 0000000000..bb940be6b1 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-sha-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({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: sdk.PasswordHash.Sha1, // optional + name: '<NAME>' // optional +}); 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 index 7b9e6b0347..d856f3f92b 100644 --- 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 @@ -7,11 +7,11 @@ const client = new sdk.Client() 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) -); +const result = await users.createTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: sdk.MessagingProviderType.Email, + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', // 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 index de7d866e8c..9f116920ed 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createToken( - '<USER_ID>', // userId - 4, // length (optional) - 60 // expire (optional) -); +const result = await users.createToken({ + userId: '<USER_ID>', + length: 4, // optional + expire: 60 // 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 index 025c15ada1..3095dd1b20 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create.md @@ -7,10 +7,10 @@ const client = new sdk.Client() 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) -); +const 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-nodejs/examples/users/delete-identity.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-identity.md index 4c92f27d25..bcd0e9efbf 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.deleteIdentity( - '<IDENTITY_ID>' // identityId -); +const result = await users.deleteIdentity({ + identityId: '<IDENTITY_ID>' +}); 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 index 456242e22d..16061c7aaa 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.deleteMfaAuthenticator( - '<USER_ID>', // userId - sdk.AuthenticatorType.Totp // type -); +const result = await users.deleteMFAAuthenticator({ + userId: '<USER_ID>', + type: sdk.AuthenticatorType.Totp +}); 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 index 3f08370f3b..ce301fba6c 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.deleteSession( - '<USER_ID>', // userId - '<SESSION_ID>' // sessionId -); +const result = await users.deleteSession({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>' +}); 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 index 48714a0db1..5495fcbc9d 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.deleteSessions( - '<USER_ID>' // userId -); +const result = await users.deleteSessions({ + userId: '<USER_ID>' +}); 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 index ba7e6afd9c..33278f4ac9 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.deleteTarget( - '<USER_ID>', // userId - '<TARGET_ID>' // targetId -); +const result = await users.deleteTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +}); 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 index 8fdd9e90b8..13210442fa 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.delete( - '<USER_ID>' // userId -); +const result = await users.delete({ + userId: '<USER_ID>' +}); 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 index 233c3375ec..25f4e0b34f 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.getMfaRecoveryCodes( - '<USER_ID>' // userId -); +const result = await users.getMFARecoveryCodes({ + userId: '<USER_ID>' +}); 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 index 61933872e4..cb9d54fd25 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.getPrefs( - '<USER_ID>' // userId -); +const result = await users.getPrefs({ + userId: '<USER_ID>' +}); 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 index 00dc1f118b..0c320bf480 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.getTarget( - '<USER_ID>', // userId - '<TARGET_ID>' // targetId -); +const result = await users.getTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +}); 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 index 640aa6315c..594f034e0d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/get.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/get.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.get( - '<USER_ID>' // userId -); +const result = await users.get({ + userId: '<USER_ID>' +}); 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 index 819b1688ef..2ff959c36a 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.listIdentities( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index c1155d55e2..345d736c9e 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.listLogs( - '<USER_ID>', // userId - [] // queries (optional) -); +const result = await users.listLogs({ + userId: '<USER_ID>', + 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 index bbe4ed3711..4b2cc1fede 100644 --- 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 @@ -7,8 +7,8 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.listMemberships( - '<USER_ID>', // userId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await users.listMemberships({ + userId: '<USER_ID>', + 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 index 8bffa28834..79ffcff7b2 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.listMfaFactors( - '<USER_ID>' // userId -); +const result = await users.listMFAFactors({ + userId: '<USER_ID>' +}); 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 index 51ba0814c4..e1082c5d9e 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.listSessions( - '<USER_ID>' // userId -); +const result = await users.listSessions({ + userId: '<USER_ID>' +}); 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 index d991dcca73..ded1bbe9cc 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.listTargets( - '<USER_ID>', // userId - [] // queries (optional) -); +const result = await users.listTargets({ + userId: '<USER_ID>', + 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 index 2bf765bea2..74e72f5473 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/list.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +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 index 9dac2d0e54..14ab8fb479 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateEmailVerification( - '<USER_ID>', // userId - false // emailVerification -); +const result = await users.updateEmailVerification({ + userId: '<USER_ID>', + emailVerification: false +}); 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 index 0a8b1aa7af..b8990cd10c 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateEmail( - '<USER_ID>', // userId - 'email@example.com' // email -); +const result = await users.updateEmail({ + userId: '<USER_ID>', + email: 'email@example.com' +}); 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 index db9e8778ad..8e6588d5aa 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateLabels( - '<USER_ID>', // userId - [] // labels -); +const result = await users.updateLabels({ + userId: '<USER_ID>', + 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 index 9d47085370..66513ae499 100644 --- 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 @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateMfaRecoveryCodes( - '<USER_ID>' // userId -); +const result = await users.updateMFARecoveryCodes({ + userId: '<USER_ID>' +}); 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 index b4acc79938..f867b0691b 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateMfa( - '<USER_ID>', // userId - false // mfa -); +const result = await users.updateMFA({ + userId: '<USER_ID>', + mfa: false +}); 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 index 581e57b755..914f2a313e 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateName( - '<USER_ID>', // userId - '<NAME>' // name -); +const result = await users.updateName({ + userId: '<USER_ID>', + 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 index f4af49d67e..dd32ede72b 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updatePassword( - '<USER_ID>', // userId - '' // password -); +const result = await users.updatePassword({ + userId: '<USER_ID>', + 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 index ecbe7591df..bccc61a747 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updatePhoneVerification( - '<USER_ID>', // userId - false // phoneVerification -); +const result = await users.updatePhoneVerification({ + userId: '<USER_ID>', + phoneVerification: false +}); 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 index 45e5a6582a..de534f6f96 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updatePhone( - '<USER_ID>', // userId - '+12065550100' // number -); +const result = await users.updatePhone({ + userId: '<USER_ID>', + number: '+12065550100' +}); 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 index bb7eff8d6b..9b5d9d4803 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updatePrefs( - '<USER_ID>', // userId - {} // prefs -); +const result = await users.updatePrefs({ + userId: '<USER_ID>', + 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 index 57f64ce942..c222030823 100644 --- 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 @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateStatus( - '<USER_ID>', // userId - false // status -); +const result = await users.updateStatus({ + userId: '<USER_ID>', + status: false +}); 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 index c6e4d9a1b0..e77dbb5d0a 100644 --- 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 @@ -7,10 +7,10 @@ const client = new sdk.Client() 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) -); +const 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-php/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-php/examples/account/create-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/server-php/examples/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/server-php/examples/account/create-magic-url-token.md 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 index da3b4634e0..2eb50c3f00 100644 --- 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 @@ -11,6 +11,6 @@ $client = (new Client()) $account = new Account($client); -$result = $account->createMfaAuthenticator( +$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 index faa679fdf1..64471ef7e6 100644 --- 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 @@ -10,6 +10,6 @@ $client = (new Client()) $account = new Account($client); -$result = $account->createMfaChallenge( +$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 index 223c95be97..031bc4dfa0 100644 --- 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 @@ -10,4 +10,4 @@ $client = (new Client()) $account = new Account($client); -$result = $account->createMfaRecoveryCodes(); +$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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/server-php/examples/account/create-o-auth-2-token.md 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 index 42806f8358..524b9b3ea5 100644 --- 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 @@ -11,6 +11,6 @@ $client = (new Client()) $account = new Account($client); -$result = $account->deleteMfaAuthenticator( +$result = $account->deleteMFAAuthenticator( type: AuthenticatorType::TOTP() ); \ No newline at end of file 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 index bafd6d8520..fc5aef27b5 100644 --- 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 @@ -10,4 +10,4 @@ $client = (new Client()) $account = new Account($client); -$result = $account->getMfaRecoveryCodes(); +$result = $account->getMFARecoveryCodes(); 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 index 6756573cdb..f7b6e2620d 100644 --- 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 @@ -10,4 +10,4 @@ $client = (new Client()) $account = new Account($client); -$result = $account->listMfaFactors(); +$result = $account->listMFAFactors(); 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/server-php/examples/account/update-magic-url-session.md 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 index 6a09d95a10..8486e88cdd 100644 --- 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 @@ -11,7 +11,7 @@ $client = (new Client()) $account = new Account($client); -$result = $account->updateMfaAuthenticator( +$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 index 03ace31144..e5821e55be 100644 --- 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 @@ -10,7 +10,7 @@ $client = (new Client()) $account = new Account($client); -$result = $account->updateMfaChallenge( +$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 index c7ec6cb2b2..f57e490f3f 100644 --- 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 @@ -10,4 +10,4 @@ $client = (new Client()) $account = new Account($client); -$result = $account->updateMfaRecoveryCodes(); +$result = $account->updateMFARecoveryCodes(); 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/server-php/examples/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/server-php/examples/avatars/get-qr.md 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 index 40e14af844..6464a26818 100644 --- 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 @@ -6,7 +6,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 - ->setKey('<YOUR_API_KEY>'); // Your secret API key + ->setSession(''); // The user session to authenticate with $databases = new Databases($client); 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 index fb61d87295..9ad4bdfdec 100644 --- 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 @@ -6,7 +6,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 - ->setKey('<YOUR_API_KEY>'); // Your secret API key + ->setSession(''); // The user session to authenticate with $databases = new Databases($client); 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-db.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/health/get-d-b.md rename to docs/examples/1.8.x/server-php/examples/health/get-db.md 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-eu.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/server-php/examples/locale/list-countries-eu.md 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 index da13d17231..2ce4b7f95b 100644 --- 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 @@ -10,7 +10,7 @@ $client = (new Client()) $messaging = new Messaging($client); -$result = $messaging->createApnsProvider( +$result = $messaging->createAPNSProvider( providerId: '<PROVIDER_ID>', name: '<NAME>', authKey: '<AUTH_KEY>', // optional 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 index baf72a1df4..8037c23197 100644 --- 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 @@ -10,7 +10,7 @@ $client = (new Client()) $messaging = new Messaging($client); -$result = $messaging->createFcmProvider( +$result = $messaging->createFCMProvider( providerId: '<PROVIDER_ID>', name: '<NAME>', serviceAccountJSON: [], // optional 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/messaging/create-msg91provider.md rename to docs/examples/1.8.x/server-php/examples/messaging/create-msg-91-provider.md 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 index 1e2d9ac765..50623b5b63 100644 --- 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 @@ -10,7 +10,7 @@ $client = (new Client()) $messaging = new Messaging($client); -$result = $messaging->createSms( +$result = $messaging->createSMS( messageId: '<MESSAGE_ID>', content: '<CONTENT>', topics: [], // optional 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 index 4dcfb3a088..017f20cc15 100644 --- 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 @@ -10,7 +10,7 @@ $client = (new Client()) $messaging = new Messaging($client); -$result = $messaging->createSmtpProvider( +$result = $messaging->createSMTPProvider( providerId: '<PROVIDER_ID>', name: '<NAME>', host: '<HOST>', 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 index 724453b9b1..161a148563 100644 --- 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 @@ -10,7 +10,7 @@ $client = (new Client()) $messaging = new Messaging($client); -$result = $messaging->updateApnsProvider( +$result = $messaging->updateAPNSProvider( providerId: '<PROVIDER_ID>', name: '<NAME>', // optional enabled: false, // optional 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 index 36672f4b65..0df2b93af6 100644 --- 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 @@ -10,7 +10,7 @@ $client = (new Client()) $messaging = new Messaging($client); -$result = $messaging->updateFcmProvider( +$result = $messaging->updateFCMProvider( providerId: '<PROVIDER_ID>', name: '<NAME>', // optional enabled: false, // optional 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/messaging/update-msg91provider.md rename to docs/examples/1.8.x/server-php/examples/messaging/update-msg-91-provider.md 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 index 730da4178a..92d3ebbed7 100644 --- 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 @@ -10,7 +10,7 @@ $client = (new Client()) $messaging = new Messaging($client); -$result = $messaging->updateSms( +$result = $messaging->updateSMS( messageId: '<MESSAGE_ID>', topics: [], // optional users: [], // optional 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 index a16a630283..3bc80d2789 100644 --- 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 @@ -10,7 +10,7 @@ $client = (new Client()) $messaging = new Messaging($client); -$result = $messaging->updateSmtpProvider( +$result = $messaging->updateSMTPProvider( providerId: '<PROVIDER_ID>', name: '<NAME>', // optional host: '<HOST>', // optional 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/tablesdb/create-boolean-column.md similarity index 78% rename from docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-boolean-column.md index 22e7cf8058..5f0a2de34b 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-boolean-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->createBooleanColumn( +$result = $tablesDB->createBooleanColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-datetime-column.md similarity index 78% rename from docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-datetime-column.md index afb847fd30..9ea8e8f4d9 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-datetime-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->createDatetimeColumn( +$result = $tablesDB->createDatetimeColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-email-column.md similarity index 79% rename from docs/examples/1.8.x/server-php/examples/grids/create-email-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-email-column.md index 7516614820..64f3a08299 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-email-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-email-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->createEmailColumn( +$result = $tablesDB->createEmailColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-enum-column.md similarity index 80% rename from docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-enum-column.md index f4a9ff2e5d..0506a3364a 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-enum-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->createEnumColumn( +$result = $tablesDB->createEnumColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-float-column.md similarity index 81% rename from docs/examples/1.8.x/server-php/examples/grids/create-float-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-float-column.md index 7a02a1790b..65a7f00f8b 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-float-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-float-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->createFloatColumn( +$result = $tablesDB->createFloatColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-index.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-index.md similarity index 81% rename from docs/examples/1.8.x/server-php/examples/grids/create-index.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-index.md index 31bfdc2754..1a3fd13007 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-index.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-index.md @@ -1,7 +1,7 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; use Appwrite\Enums\IndexType; $client = (new Client()) @@ -9,9 +9,9 @@ $client = (new Client()) ->setProject('<YOUR_PROJECT_ID>') // Your project ID ->setKey('<YOUR_API_KEY>'); // Your secret API key -$grids = new Grids($client); +$tablesDB = new TablesDB($client); -$result = $grids->createIndex( +$result = $tablesDB->createIndex( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-integer-column.md similarity index 80% rename from docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-integer-column.md index 6495fc6309..4bf96e8b93 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-integer-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->createIntegerColumn( +$result = $tablesDB->createIntegerColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-ip-column.md similarity index 79% rename from docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-ip-column.md index 65379a2f94..ab0032e449 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-ip-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->createIpColumn( +$result = $tablesDB->createIpColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/create-relationship-column.md similarity index 83% rename from docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-relationship-column.md index cde72569ad..031d1fd1aa 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-relationship-column.md @@ -1,7 +1,7 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; use Appwrite\Enums\RelationshipType; $client = (new Client()) @@ -9,9 +9,9 @@ $client = (new Client()) ->setProject('<YOUR_PROJECT_ID>') // Your project ID ->setKey('<YOUR_API_KEY>'); // Your secret API key -$grids = new Grids($client); +$tablesDB = new TablesDB($client); -$result = $grids->createRelationshipColumn( +$result = $tablesDB->createRelationshipColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', relatedTableId: '<RELATED_TABLE_ID>', diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-row.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-row.md similarity index 80% rename from docs/examples/1.8.x/server-php/examples/grids/create-row.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-row.md index 58f678c6c3..0002b79852 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-row.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-row.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->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); +$tablesDB = new TablesDB($client); -$result = $grids->createRow( +$result = $tablesDB->createRow( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rowId: '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-rows.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-rows.md similarity index 76% rename from docs/examples/1.8.x/server-php/examples/grids/create-rows.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-rows.md index 531ebaf846..011443859f 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-rows.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-rows.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->createRows( +$result = $tablesDB->createRows( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rows: [] 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/tablesdb/create-string-column.md similarity index 80% rename from docs/examples/1.8.x/server-php/examples/grids/create-string-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-string-column.md index a5acf25859..22fc7ccf9d 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-string-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-string-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->createStringColumn( +$result = $tablesDB->createStringColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-table.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-table.md similarity index 81% rename from docs/examples/1.8.x/server-php/examples/grids/create-table.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-table.md index ca6e017375..46cf3885fb 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-table.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-table.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->createTable( +$result = $tablesDB->createTable( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', name: '<NAME>', 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/tablesdb/create-url-column.md similarity index 80% rename from docs/examples/1.8.x/server-php/examples/grids/create-url-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create-url-column.md index b0149f279b..fe25988a7e 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-url-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-url-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->createUrlColumn( +$result = $tablesDB->createUrlColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-database.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create.md similarity index 77% rename from docs/examples/1.8.x/server-php/examples/grids/update-database.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/create.md index 9d71e5e043..c3c4faaf01 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-database.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->updateDatabase( +$result = $tablesDB->create( databaseId: '<DATABASE_ID>', name: '<NAME>', enabled: false // optional 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/tablesdb/decrement-row-column.md similarity index 67% rename from docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/decrement-row-column.md index d7db09ed30..a58bd71071 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/decrement-row-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key + ->setSession(''); // The user session to authenticate with -$grids = new Grids($client); +$tablesDB = new TablesDB($client); -$result = $grids->decrementRowColumn( +$result = $tablesDB->decrementRowColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rowId: '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-column.md similarity index 75% rename from docs/examples/1.8.x/server-php/examples/grids/delete-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/delete-column.md index 3862ecbde9..dd99fabc09 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/delete-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->deleteColumn( +$result = $tablesDB->deleteColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '' diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-index.md b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-index.md similarity index 76% rename from docs/examples/1.8.x/server-php/examples/grids/delete-index.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/delete-index.md index 913091455b..1ef346fec3 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/delete-index.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-index.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->deleteIndex( +$result = $tablesDB->deleteIndex( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '' diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-row.md b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-row.md similarity index 77% rename from docs/examples/1.8.x/server-php/examples/grids/delete-row.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/delete-row.md index 14b72e6e56..4ffc112d66 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/delete-row.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-row.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->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); +$tablesDB = new TablesDB($client); -$result = $grids->deleteRow( +$result = $tablesDB->deleteRow( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rowId: '<ROW_ID>' diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-rows.md similarity index 77% rename from docs/examples/1.8.x/server-php/examples/grids/delete-rows.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/delete-rows.md index 567b497f04..10a3c87ff2 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/delete-rows.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-rows.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->deleteRows( +$result = $tablesDB->deleteRows( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', queries: [] // optional diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-table.md b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-table.md similarity index 75% rename from docs/examples/1.8.x/server-php/examples/grids/delete-table.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/delete-table.md index ea0eeda80f..3cbb35de68 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/delete-table.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-table.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->deleteTable( +$result = $tablesDB->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/delete-database.md b/docs/examples/1.8.x/server-php/examples/tablesdb/delete.md similarity index 74% rename from docs/examples/1.8.x/server-php/examples/grids/delete-database.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/delete.md index 761406ba9b..ea996e9b19 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/delete-database.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/delete.md @@ -1,15 +1,15 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->deleteDatabase( +$result = $tablesDB->delete( databaseId: '<DATABASE_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/tablesdb/get-column.md similarity index 76% rename from docs/examples/1.8.x/server-php/examples/grids/get-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/get-column.md index ac2c9bb0c4..d1705a4175 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/get-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/get-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->getColumn( +$result = $tablesDB->getColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '' diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-index.md b/docs/examples/1.8.x/server-php/examples/tablesdb/get-index.md similarity index 76% rename from docs/examples/1.8.x/server-php/examples/grids/get-index.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/get-index.md index 2434fd933b..0d67648151 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/get-index.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/get-index.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->getIndex( +$result = $tablesDB->getIndex( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '' diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-row.md b/docs/examples/1.8.x/server-php/examples/tablesdb/get-row.md similarity index 79% rename from docs/examples/1.8.x/server-php/examples/grids/get-row.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/get-row.md index e13ea67209..00ba9b65b5 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/get-row.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/get-row.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->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); +$tablesDB = new TablesDB($client); -$result = $grids->getRow( +$result = $tablesDB->getRow( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rowId: '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-table.md b/docs/examples/1.8.x/server-php/examples/tablesdb/get-table.md similarity index 75% rename from docs/examples/1.8.x/server-php/examples/grids/get-table.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/get-table.md index 1c9721f1c7..ee8812f685 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/get-table.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/get-table.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->getTable( +$result = $tablesDB->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/get-database.md b/docs/examples/1.8.x/server-php/examples/tablesdb/get.md similarity index 75% rename from docs/examples/1.8.x/server-php/examples/grids/get-database.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/get.md index c3e9f896c2..07f70987c5 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/get-database.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/get.md @@ -1,15 +1,15 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->getDatabase( +$result = $tablesDB->get( databaseId: '<DATABASE_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/tablesdb/increment-row-column.md similarity index 67% rename from docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/increment-row-column.md index fc9ee9a9eb..d72a1e374f 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/increment-row-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key + ->setSession(''); // The user session to authenticate with -$grids = new Grids($client); +$tablesDB = new TablesDB($client); -$result = $grids->incrementRowColumn( +$result = $tablesDB->incrementRowColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rowId: '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-columns.md b/docs/examples/1.8.x/server-php/examples/tablesdb/list-columns.md similarity index 76% rename from docs/examples/1.8.x/server-php/examples/grids/list-columns.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/list-columns.md index 7be7581a28..d12d52d4f8 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/list-columns.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/list-columns.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->listColumns( +$result = $tablesDB->listColumns( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', queries: [] // optional diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-php/examples/tablesdb/list-indexes.md similarity index 76% rename from docs/examples/1.8.x/server-php/examples/grids/list-indexes.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/list-indexes.md index d23248e5d4..cb51dbb5e3 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/list-indexes.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/list-indexes.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->listIndexes( +$result = $tablesDB->listIndexes( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', queries: [] // optional diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-rows.md b/docs/examples/1.8.x/server-php/examples/tablesdb/list-rows.md similarity index 77% rename from docs/examples/1.8.x/server-php/examples/grids/list-rows.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/list-rows.md index c8537651c6..c3b713703e 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/list-rows.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/list-rows.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->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); +$tablesDB = new TablesDB($client); -$result = $grids->listRows( +$result = $tablesDB->listRows( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', queries: [] // optional diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-tables.md b/docs/examples/1.8.x/server-php/examples/tablesdb/list-tables.md similarity index 77% rename from docs/examples/1.8.x/server-php/examples/grids/list-tables.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/list-tables.md index 95f4f7b65d..05f044bc72 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/list-tables.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/list-tables.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->listTables( +$result = $tablesDB->listTables( databaseId: '<DATABASE_ID>', queries: [], // optional search: '<SEARCH>' // optional diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-databases.md b/docs/examples/1.8.x/server-php/examples/tablesdb/list.md similarity index 76% rename from docs/examples/1.8.x/server-php/examples/grids/list-databases.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/list.md index f5fec16a25..c3f97c2330 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/list-databases.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/list.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->listDatabases( +$result = $tablesDB->list( 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/tablesdb/update-boolean-column.md similarity index 78% rename from docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update-boolean-column.md index bc7405d35d..0c735167cd 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-boolean-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->updateBooleanColumn( +$result = $tablesDB->updateBooleanColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-datetime-column.md similarity index 77% rename from docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update-datetime-column.md index 6850a6d373..52213c6e3c 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-datetime-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->updateDatetimeColumn( +$result = $tablesDB->updateDatetimeColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-email-column.md similarity index 79% rename from docs/examples/1.8.x/server-php/examples/grids/update-email-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update-email-column.md index 6fe7f82477..d13de56b30 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-email-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-email-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->updateEmailColumn( +$result = $tablesDB->updateEmailColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-enum-column.md similarity index 79% rename from docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update-enum-column.md index 4a18d02488..d54c0b38d0 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-enum-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->updateEnumColumn( +$result = $tablesDB->updateEnumColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-float-column.md similarity index 80% rename from docs/examples/1.8.x/server-php/examples/grids/update-float-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update-float-column.md index 5e58f8efaf..bb091abf94 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-float-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-float-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->updateFloatColumn( +$result = $tablesDB->updateFloatColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-integer-column.md similarity index 80% rename from docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update-integer-column.md index c097b7e286..2436bc2cee 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-integer-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->updateIntegerColumn( +$result = $tablesDB->updateIntegerColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-ip-column.md similarity index 78% rename from docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update-ip-column.md index 9ce131b8e1..aa97752a91 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-ip-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->updateIpColumn( +$result = $tablesDB->updateIpColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', 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/tablesdb/update-relationship-column.md similarity index 77% rename from docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update-relationship-column.md index a0241afb06..834dc18cee 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-relationship-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->updateRelationshipColumn( +$result = $tablesDB->updateRelationshipColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-row.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-row.md similarity index 80% rename from docs/examples/1.8.x/server-php/examples/grids/update-row.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update-row.md index a0aae15730..70e5d159fd 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-row.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-row.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->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); +$tablesDB = new TablesDB($client); -$result = $grids->updateRow( +$result = $tablesDB->updateRow( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rowId: '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-rows.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-rows.md similarity index 78% rename from docs/examples/1.8.x/server-php/examples/grids/update-rows.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update-rows.md index 270489f44e..8a676289d2 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-rows.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-rows.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->updateRows( +$result = $tablesDB->updateRows( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', data: [], // optional 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/tablesdb/update-string-column.md similarity index 79% rename from docs/examples/1.8.x/server-php/examples/grids/update-string-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update-string-column.md index 6213deb7aa..eb1acc15ed 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-string-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-string-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->updateStringColumn( +$result = $tablesDB->updateStringColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-table.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-table.md similarity index 81% rename from docs/examples/1.8.x/server-php/examples/grids/update-table.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update-table.md index 1483eee2a9..294d8d6751 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-table.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-table.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->updateTable( +$result = $tablesDB->updateTable( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', name: '<NAME>', 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/tablesdb/update-url-column.md similarity index 79% rename from docs/examples/1.8.x/server-php/examples/grids/update-url-column.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update-url-column.md index 7f7916c81a..b64b3024da 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/update-url-column.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-url-column.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->updateUrlColumn( +$result = $tablesDB->updateUrlColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-database.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update.md similarity index 77% rename from docs/examples/1.8.x/server-php/examples/grids/create-database.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/update.md index ff7c3f73fb..106b75e2b2 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/create-database.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->createDatabase( +$result = $tablesDB->update( databaseId: '<DATABASE_ID>', name: '<NAME>', enabled: false // optional diff --git a/docs/examples/1.8.x/server-php/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-php/examples/tablesdb/upsert-row.md similarity index 80% rename from docs/examples/1.8.x/server-php/examples/grids/upsert-row.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/upsert-row.md index a07cbe976f..235f0e577b 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/upsert-row.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/upsert-row.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->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); +$tablesDB = new TablesDB($client); -$result = $grids->upsertRow( +$result = $tablesDB->upsertRow( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rowId: '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-php/examples/tablesdb/upsert-rows.md similarity index 76% rename from docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md rename to docs/examples/1.8.x/server-php/examples/tablesdb/upsert-rows.md index 5d31648e02..c1890f1ea3 100644 --- a/docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/upsert-rows.md @@ -1,16 +1,16 @@ <?php use Appwrite\Client; -use Appwrite\Services\Grids; +use Appwrite\Services\TablesDB; $client = (new Client()) ->setEndpoint('https://<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); +$tablesDB = new TablesDB($client); -$result = $grids->upsertRows( +$result = $tablesDB->upsertRows( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', rows: [] 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-argon-2-user.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/users/create-argon2user.md rename to docs/examples/1.8.x/server-php/examples/users/create-argon-2-user.md 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/users/create-j-w-t.md rename to docs/examples/1.8.x/server-php/examples/users/create-jwt.md 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-md-5-user.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/users/create-m-d5user.md rename to docs/examples/1.8.x/server-php/examples/users/create-md-5-user.md 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 index 372fb1bc6a..ee96d2e277 100644 --- 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 @@ -10,6 +10,6 @@ $client = (new Client()) $users = new Users($client); -$result = $users->createMfaRecoveryCodes( +$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-ph-pass-user.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/users/create-p-h-pass-user.md rename to docs/examples/1.8.x/server-php/examples/users/create-ph-pass-user.md 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-sha-user.md similarity index 100% rename from docs/examples/1.8.x/server-php/examples/users/create-s-h-a-user.md rename to docs/examples/1.8.x/server-php/examples/users/create-sha-user.md 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 index 8ef1279589..f2f08ec172 100644 --- 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 @@ -11,7 +11,7 @@ $client = (new Client()) $users = new Users($client); -$result = $users->deleteMfaAuthenticator( +$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/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-php/examples/users/get-mfa-recovery-codes.md index db090fb245..7937e6ad4b 100644 --- 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 @@ -10,6 +10,6 @@ $client = (new Client()) $users = new Users($client); -$result = $users->getMfaRecoveryCodes( +$result = $users->getMFARecoveryCodes( userId: '<USER_ID>' ); \ 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 index 6a0088c9bd..5dae790c94 100644 --- 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 @@ -10,6 +10,6 @@ $client = (new Client()) $users = new Users($client); -$result = $users->listMfaFactors( +$result = $users->listMFAFactors( userId: '<USER_ID>' ); \ 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 index 75214de880..8474755fd3 100644 --- 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 @@ -10,6 +10,6 @@ $client = (new Client()) $users = new Users($client); -$result = $users->updateMfaRecoveryCodes( +$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 index 3eda496f1f..c24916a680 100644 --- 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 @@ -10,7 +10,7 @@ $client = (new Client()) $users = new Users($client); -$result = $users->updateMfa( +$result = $users->updateMFA( userId: '<USER_ID>', mfa: false ); \ No newline at end of file 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/server-python/examples/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/server-python/examples/account/create-magic-url-token.md 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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/server-python/examples/account/create-o-auth-2-token.md 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/server-python/examples/account/update-magic-url-session.md 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/server-python/examples/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/server-python/examples/avatars/get-qr.md 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 index 397bdd4bde..3efedf766e 100644 --- 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 @@ -4,7 +4,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_key('<YOUR_API_KEY>') # Your secret API key +client.set_session('') # The user session to authenticate with databases = Databases(client) 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 index d5700e0b30..9ae1cedfe4 100644 --- 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 @@ -4,7 +4,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_key('<YOUR_API_KEY>') # Your secret API key +client.set_session('') # The user session to authenticate with databases = Databases(client) 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-db.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/health/get-d-b.md rename to docs/examples/1.8.x/server-python/examples/health/get-db.md 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-eu.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/server-python/examples/locale/list-countries-eu.md 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/messaging/create-msg91provider.md rename to docs/examples/1.8.x/server-python/examples/messaging/create-msg-91-provider.md 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/messaging/update-msg91provider.md rename to docs/examples/1.8.x/server-python/examples/messaging/update-msg-91-provider.md 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/tablesdb/create-boolean-column.md similarity index 77% rename from docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-boolean-column.md index 73d8323533..84702b4cac 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-boolean-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_boolean_column( +result = tables_db.create_boolean_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/create-datetime-column.md similarity index 77% rename from docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-datetime-column.md index a98024c16c..d5d15905c5 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-datetime-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_datetime_column( +result = tables_db.create_datetime_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/create-email-column.md similarity index 78% rename from docs/examples/1.8.x/server-python/examples/grids/create-email-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-email-column.md index 372cbafce3..0e2ccb473a 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-email-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-email-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_email_column( +result = tables_db.create_email_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/create-enum-column.md similarity index 78% rename from docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-enum-column.md index d7b47c80cb..c2268cb271 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-enum-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_enum_column( +result = tables_db.create_enum_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/create-float-column.md similarity index 79% rename from docs/examples/1.8.x/server-python/examples/grids/create-float-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-float-column.md index 5a52128ac1..9e35e838ca 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-float-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-float-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_float_column( +result = tables_db.create_float_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-index.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-index.md similarity index 80% rename from docs/examples/1.8.x/server-python/examples/grids/create-index.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-index.md index 1d67b8abc0..e4aaa83e66 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-index.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-index.md @@ -1,5 +1,5 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB from appwrite.enums import IndexType client = Client() @@ -7,9 +7,9 @@ client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_index( +result = tables_db.create_index( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/create-integer-column.md similarity index 79% rename from docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-integer-column.md index aed49578aa..0cc20fcf83 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-integer-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_integer_column( +result = tables_db.create_integer_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/create-ip-column.md similarity index 78% rename from docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-ip-column.md index af873c91a1..50aa028349 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-ip-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_ip_column( +result = tables_db.create_ip_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/create-relationship-column.md similarity index 82% rename from docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-relationship-column.md index 3cb858d260..16acbf8fb8 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-relationship-column.md @@ -1,5 +1,5 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB from appwrite.enums import RelationshipType client = Client() @@ -7,9 +7,9 @@ client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_relationship_column( +result = tables_db.create_relationship_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', related_table_id = '<RELATED_TABLE_ID>', diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-row.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-row.md similarity index 78% rename from docs/examples/1.8.x/server-python/examples/grids/create-row.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-row.md index 5645f0bd23..69fee14914 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-row.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-row.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = 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) +tables_db = TablesDB(client) -result = grids.create_row( +result = tables_db.create_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/create-rows.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-rows.md similarity index 75% rename from docs/examples/1.8.x/server-python/examples/grids/create-rows.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-rows.md index 3274c48a10..656a47aa0b 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-rows.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-rows.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_rows( +result = tables_db.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/tablesdb/create-string-column.md similarity index 79% rename from docs/examples/1.8.x/server-python/examples/grids/create-string-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-string-column.md index 3771a070ba..778a0b4e94 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-string-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-string-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_string_column( +result = tables_db.create_string_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-table.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-table.md similarity index 80% rename from docs/examples/1.8.x/server-python/examples/grids/create-table.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-table.md index 64c1b50d69..f258ed880c 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-table.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-table.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_table( +result = tables_db.create_table( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', name = '<NAME>', 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/tablesdb/create-url-column.md similarity index 78% rename from docs/examples/1.8.x/server-python/examples/grids/create-url-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create-url-column.md index 45c1a2d82e..b235cdfceb 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-url-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-url-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_url_column( +result = tables_db.create_url_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-database.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create.md similarity index 76% rename from docs/examples/1.8.x/server-python/examples/grids/update-database.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/create.md index 2df676bcbc..9d64e9abf4 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-database.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.update_database( +result = tables_db.create( database_id = '<DATABASE_ID>', name = '<NAME>', enabled = 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/tablesdb/decrement-row-column.md similarity index 66% rename from docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/decrement-row-column.md index 9608337398..096bc4dbaa 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/decrement-row-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_session('') # The user session to authenticate with -grids = Grids(client) +tables_db = TablesDB(client) -result = grids.decrement_row_column( +result = tables_db.decrement_row_column( 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-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-column.md similarity index 74% rename from docs/examples/1.8.x/server-python/examples/grids/delete-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/delete-column.md index 650a1c3578..9014ccc93b 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/delete-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.delete_column( +result = tables_db.delete_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '' diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-index.md b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-index.md similarity index 74% rename from docs/examples/1.8.x/server-python/examples/grids/delete-index.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/delete-index.md index fed36f1d9c..e19de0eba7 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/delete-index.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-index.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.delete_index( +result = tables_db.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/tablesdb/delete-row.md similarity index 76% rename from docs/examples/1.8.x/server-python/examples/grids/delete-row.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/delete-row.md index eb1e661738..569b607020 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/delete-row.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-row.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = 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) +tables_db = TablesDB(client) -result = grids.delete_row( +result = tables_db.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/tablesdb/delete-rows.md similarity index 75% rename from docs/examples/1.8.x/server-python/examples/grids/delete-rows.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/delete-rows.md index 31503cdee1..c3e836e7c6 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/delete-rows.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-rows.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.delete_rows( +result = tables_db.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/tablesdb/delete-table.md similarity index 73% rename from docs/examples/1.8.x/server-python/examples/grids/delete-table.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/delete-table.md index d170c31d20..a91b7bfb2c 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/delete-table.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-table.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.delete_table( +result = tables_db.delete_table( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>' ) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-database.md b/docs/examples/1.8.x/server-python/examples/tablesdb/delete.md similarity index 73% rename from docs/examples/1.8.x/server-python/examples/grids/get-database.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/delete.md index e393d7587b..5bdc7152d7 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/get-database.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/delete.md @@ -1,13 +1,13 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.get_database( +result = tables_db.delete( database_id = '<DATABASE_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/tablesdb/get-column.md similarity index 75% rename from docs/examples/1.8.x/server-python/examples/grids/get-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/get-column.md index a724e07b0a..57be1dfaa4 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/get-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/get-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.get_column( +result = tables_db.get_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '' diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-index.md b/docs/examples/1.8.x/server-python/examples/tablesdb/get-index.md similarity index 75% rename from docs/examples/1.8.x/server-python/examples/grids/get-index.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/get-index.md index 6e3753dea5..400bf71843 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/get-index.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/get-index.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.get_index( +result = tables_db.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/tablesdb/get-row.md similarity index 78% rename from docs/examples/1.8.x/server-python/examples/grids/get-row.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/get-row.md index 939a992868..c806214297 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/get-row.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/get-row.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = 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) +tables_db = TablesDB(client) -result = grids.get_row( +result = tables_db.get_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/get-table.md b/docs/examples/1.8.x/server-python/examples/tablesdb/get-table.md similarity index 74% rename from docs/examples/1.8.x/server-python/examples/grids/get-table.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/get-table.md index afe24bd0f2..b28cd3d4b1 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/get-table.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/get-table.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.get_table( +result = tables_db.get_table( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>' ) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-database.md b/docs/examples/1.8.x/server-python/examples/tablesdb/get.md similarity index 73% rename from docs/examples/1.8.x/server-python/examples/grids/delete-database.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/get.md index 9898c07bc8..6634350085 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/delete-database.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/get.md @@ -1,13 +1,13 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.delete_database( +result = tables_db.get( database_id = '<DATABASE_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/tablesdb/increment-row-column.md similarity index 66% rename from docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/increment-row-column.md index 598cf58874..bcb88f7a31 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/increment-row-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_session('') # The user session to authenticate with -grids = Grids(client) +tables_db = TablesDB(client) -result = grids.increment_row_column( +result = tables_db.increment_row_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', row_id = '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-columns.md b/docs/examples/1.8.x/server-python/examples/tablesdb/list-columns.md similarity index 75% rename from docs/examples/1.8.x/server-python/examples/grids/list-columns.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/list-columns.md index b78327182c..a3179a9482 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/list-columns.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/list-columns.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.list_columns( +result = tables_db.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-indexes.md b/docs/examples/1.8.x/server-python/examples/tablesdb/list-indexes.md similarity index 75% rename from docs/examples/1.8.x/server-python/examples/grids/list-indexes.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/list-indexes.md index a6b52416c6..fe69041a34 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/list-indexes.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/list-indexes.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.list_indexes( +result = tables_db.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/tablesdb/list-rows.md similarity index 76% rename from docs/examples/1.8.x/server-python/examples/grids/list-rows.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/list-rows.md index 975f88f763..9ae7549fb0 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/list-rows.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/list-rows.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = 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) +tables_db = TablesDB(client) -result = grids.list_rows( +result = tables_db.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/tablesdb/list-tables.md similarity index 76% rename from docs/examples/1.8.x/server-python/examples/grids/list-tables.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/list-tables.md index 3e2e5508bc..2fab0d3adb 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/list-tables.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/list-tables.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.list_tables( +result = tables_db.list_tables( database_id = '<DATABASE_ID>', queries = [], # optional search = '<SEARCH>' # 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/tablesdb/list.md similarity index 75% rename from docs/examples/1.8.x/server-python/examples/grids/list-databases.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/list.md index 78c5cb4bd7..43cee6a39a 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/list-databases.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/list.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.list_databases( +result = tables_db.list( 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/tablesdb/update-boolean-column.md similarity index 76% rename from docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update-boolean-column.md index 6bcbf27355..abe6b97b73 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-boolean-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.update_boolean_column( +result = tables_db.update_boolean_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/update-datetime-column.md similarity index 76% rename from docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update-datetime-column.md index 6ae0e4dea5..1c150b50ac 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-datetime-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.update_datetime_column( +result = tables_db.update_datetime_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/update-email-column.md similarity index 77% rename from docs/examples/1.8.x/server-python/examples/grids/update-email-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update-email-column.md index c1ff1d0637..96a56ec7ae 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-email-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-email-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.update_email_column( +result = tables_db.update_email_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/update-enum-column.md similarity index 78% rename from docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update-enum-column.md index 6da49cfb81..f07b6286d4 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-enum-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.update_enum_column( +result = tables_db.update_enum_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/update-float-column.md similarity index 79% rename from docs/examples/1.8.x/server-python/examples/grids/update-float-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update-float-column.md index 8d3d9edb5f..1dfcccde1b 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-float-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-float-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.update_float_column( +result = tables_db.update_float_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/update-integer-column.md similarity index 79% rename from docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update-integer-column.md index 966f7b6805..a38c4dadb5 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-integer-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.update_integer_column( +result = tables_db.update_integer_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/update-ip-column.md similarity index 77% rename from docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update-ip-column.md index e5fccac320..780a2b027f 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-ip-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.update_ip_column( +result = tables_db.update_ip_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', 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/tablesdb/update-relationship-column.md similarity index 76% rename from docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update-relationship-column.md index fcff4591fd..1cb93dbdf2 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-relationship-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.update_relationship_column( +result = tables_db.update_relationship_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-row.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-row.md similarity index 79% rename from docs/examples/1.8.x/server-python/examples/grids/update-row.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update-row.md index e379697ce4..86d0cf2b8a 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-row.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-row.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = 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) +tables_db = TablesDB(client) -result = grids.update_row( +result = tables_db.update_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/update-rows.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-rows.md similarity index 77% rename from docs/examples/1.8.x/server-python/examples/grids/update-rows.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update-rows.md index 344bb5904b..386ddf8b88 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-rows.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-rows.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.update_rows( +result = tables_db.update_rows( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', data = {}, # 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/tablesdb/update-string-column.md similarity index 78% rename from docs/examples/1.8.x/server-python/examples/grids/update-string-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update-string-column.md index f303189b80..f5106ae7f0 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-string-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-string-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.update_string_column( +result = tables_db.update_string_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-table.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-table.md similarity index 80% rename from docs/examples/1.8.x/server-python/examples/grids/update-table.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update-table.md index cfd5b4d92e..7e494f0c43 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-table.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-table.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.update_table( +result = tables_db.update_table( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', name = '<NAME>', 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/tablesdb/update-url-column.md similarity index 78% rename from docs/examples/1.8.x/server-python/examples/grids/update-url-column.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update-url-column.md index ea6dc386ed..6e6c722b9f 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/update-url-column.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-url-column.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.update_url_column( +result = tables_db.update_url_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-database.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update.md similarity index 76% rename from docs/examples/1.8.x/server-python/examples/grids/create-database.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/update.md index a7749e4903..15c4eb7b33 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/create-database.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.create_database( +result = tables_db.update( database_id = '<DATABASE_ID>', name = '<NAME>', enabled = False # 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/tablesdb/upsert-row.md similarity index 79% rename from docs/examples/1.8.x/server-python/examples/grids/upsert-row.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/upsert-row.md index 79528818e0..068fded0c3 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/upsert-row.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/upsert-row.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = 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) +tables_db = TablesDB(client) -result = grids.upsert_row( +result = tables_db.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/grids/upsert-rows.md b/docs/examples/1.8.x/server-python/examples/tablesdb/upsert-rows.md similarity index 75% rename from docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md rename to docs/examples/1.8.x/server-python/examples/tablesdb/upsert-rows.md index b7573d4794..06436c0fa6 100644 --- a/docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/upsert-rows.md @@ -1,14 +1,14 @@ from appwrite.client import Client -from appwrite.services.grids import Grids +from appwrite.services.tables_db import TablesDB client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.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) +tables_db = TablesDB(client) -result = grids.upsert_rows( +result = tables_db.upsert_rows( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', rows = [] 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-argon-2-user.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/users/create-argon2user.md rename to docs/examples/1.8.x/server-python/examples/users/create-argon-2-user.md 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/users/create-j-w-t.md rename to docs/examples/1.8.x/server-python/examples/users/create-jwt.md 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-md-5-user.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/users/create-m-d5user.md rename to docs/examples/1.8.x/server-python/examples/users/create-md-5-user.md 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-ph-pass-user.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/users/create-p-h-pass-user.md rename to docs/examples/1.8.x/server-python/examples/users/create-ph-pass-user.md 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-sha-user.md similarity index 100% rename from docs/examples/1.8.x/server-python/examples/users/create-s-h-a-user.md rename to docs/examples/1.8.x/server-python/examples/users/create-sha-user.md 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/server-rest/examples/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/server-rest/examples/account/create-magic-url-token.md 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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/server-rest/examples/account/create-o-auth-2-token.md 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/server-rest/examples/account/update-magic-url-session.md 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/server-rest/examples/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/server-rest/examples/avatars/get-qr.md 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..78694a804d 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 @@ -3,6 +3,8 @@ 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> 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..cd6b4122eb 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 @@ -3,6 +3,8 @@ 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> X-Appwrite-Key: <YOUR_API_KEY> { 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/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-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/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-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/health/get-d-b.md b/docs/examples/1.8.x/server-rest/examples/health/get-db.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/health/get-d-b.md rename to docs/examples/1.8.x/server-rest/examples/health/get-db.md 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-eu.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/server-rest/examples/locale/list-countries-eu.md 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md rename to docs/examples/1.8.x/server-rest/examples/messaging/create-msg-91-provider.md 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md rename to docs/examples/1.8.x/server-rest/examples/messaging/update-msg-91-provider.md 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/tablesdb/create-boolean-column.md similarity index 74% rename from docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-boolean-column.md index d594385572..8450b65435 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-boolean-column.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/boolean HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/boolean HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/create-datetime-column.md similarity index 73% rename from docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-datetime-column.md index 88505a8a1f..73d80272f9 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-datetime-column.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/datetime HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/datetime HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/create-email-column.md similarity index 75% rename from docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-email-column.md index 28d733dab8..0d1d81c482 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-email-column.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/email HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/create-enum-column.md similarity index 76% rename from docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-enum-column.md index 35de1b5e2f..6b39abb92d 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-enum-column.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/enum HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/enum HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/create-float-column.md similarity index 76% rename from docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-float-column.md index 9c9996aced..e890c595d0 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-float-column.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/float HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/float HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-index.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-index.md similarity index 76% rename from docs/examples/1.8.x/server-rest/examples/grids/create-index.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-index.md index 7a7487bdae..baa06e815f 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-index.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-index.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/indexes HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/indexes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/create-integer-column.md similarity index 75% rename from docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-integer-column.md index be6eb92544..f34cf14965 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-integer-column.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/integer HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/integer HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/create-ip-column.md similarity index 75% rename from docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-ip-column.md index 30406d7025..10a849d073 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-ip-column.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/ip HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/ip HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/create-relationship-column.md similarity index 77% rename from docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-relationship-column.md index 75f54c9602..8dffdd30a2 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-relationship-column.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/relationship HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/relationship HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-row.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-row.md similarity index 80% rename from docs/examples/1.8.x/server-rest/examples/grids/create-row.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-row.md index 443b4e30c9..d15cee6065 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-row.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-row.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-rows.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-rows.md similarity index 76% rename from docs/examples/1.8.x/server-rest/examples/grids/create-rows.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-rows.md index 32578d87de..176b4cdb02 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-rows.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-rows.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/create-string-column.md similarity index 77% rename from docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-string-column.md index 2a0b0dc372..6e3f7e21cd 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-string-column.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/string HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/string HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-table.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-table.md similarity index 84% rename from docs/examples/1.8.x/server-rest/examples/grids/create-table.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-table.md index 7c22e81e7c..1625e8441b 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-table.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-table.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/create-url-column.md similarity index 76% rename from docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create-url-column.md index 5dada907a0..55e9774e51 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-url-column.md @@ -1,4 +1,4 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/url HTTP/1.1 +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-database.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create.md similarity index 89% rename from docs/examples/1.8.x/server-rest/examples/grids/create-database.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/create.md index fd1ae143fa..69789b081f 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-database.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create.md @@ -1,4 +1,4 @@ -POST /v1/databases HTTP/1.1 +POST /v1/tablesdb HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..26d8e1118c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,13 @@ +PATCH /v1/tablesdb/{databaseId}/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-Session: +X-Appwrite-JWT: <YOUR_JWT> +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/tablesdb/delete-column.md similarity index 66% rename from docs/examples/1.8.x/server-rest/examples/grids/delete-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/delete-column.md index 2680bcf03a..3b919093b1 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/delete-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-column.md @@ -1,4 +1,4 @@ -DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/columns/{key} HTTP/1.1 +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/columns/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-index.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-index.md similarity index 66% rename from docs/examples/1.8.x/server-rest/examples/grids/delete-index.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/delete-index.md index ca7d67a1b4..bc86671c3f 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/delete-index.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-index.md @@ -1,4 +1,4 @@ -DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/indexes/{key} HTTP/1.1 +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/indexes/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-row.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-row.md similarity index 72% rename from docs/examples/1.8.x/server-rest/examples/grids/delete-row.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/delete-row.md index 8fd3f6ee7d..3dbbf45a3c 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/delete-row.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-row.md @@ -1,4 +1,4 @@ -DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-rows.md similarity index 71% rename from docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/delete-rows.md index af1fabdb7a..c57d62ede3 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-rows.md @@ -1,4 +1,4 @@ -DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-table.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-table.md similarity index 70% rename from docs/examples/1.8.x/server-rest/examples/grids/delete-table.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/delete-table.md index e068291849..63eb1fd227 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/delete-table.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-table.md @@ -1,4 +1,4 @@ -DELETE /v1/databases/{databaseId}/grids/tables/{tableId} HTTP/1.1 +DELETE /v1/tablesdb/{databaseId}/tables/{tableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-database.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete.md similarity index 78% rename from docs/examples/1.8.x/server-rest/examples/grids/delete-database.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/delete.md index 85d5f7bb0e..bcd4c02663 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/delete-database.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete.md @@ -1,4 +1,4 @@ -DELETE /v1/databases/{databaseId} HTTP/1.1 +DELETE /v1/tablesdb/{databaseId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..92783ce733 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-column.md @@ -0,0 +1,5 @@ +GET /v1/tablesdb/{databaseId}/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/tablesdb/get-index.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..0aeaed382d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-index.md @@ -0,0 +1,5 @@ +GET /v1/tablesdb/{databaseId}/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/tablesdb/get-row.md similarity index 69% rename from docs/examples/1.8.x/server-rest/examples/grids/get-row.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/get-row.md index ba3b87bee0..9146d3653d 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/get-row.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-row.md @@ -1,4 +1,4 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +GET /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 Host: cloud.appwrite.io X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-table.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-table.md similarity index 66% rename from docs/examples/1.8.x/server-rest/examples/grids/get-table.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/get-table.md index e562f5c763..b8c0668b4e 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/get-table.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-table.md @@ -1,4 +1,4 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId} HTTP/1.1 +GET /v1/tablesdb/{databaseId}/tables/{tableId} HTTP/1.1 Host: cloud.appwrite.io X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-database.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/get.md similarity index 76% rename from docs/examples/1.8.x/server-rest/examples/grids/get-database.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/get.md index 644f251f56..32ee29126a 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/get-database.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/get.md @@ -1,4 +1,4 @@ -GET /v1/databases/{databaseId} HTTP/1.1 +GET /v1/tablesdb/{databaseId} HTTP/1.1 Host: cloud.appwrite.io X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..d687727806 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/increment-row-column.md @@ -0,0 +1,13 @@ +PATCH /v1/tablesdb/{databaseId}/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-Session: +X-Appwrite-JWT: <YOUR_JWT> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "max": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..ac81b3a157 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-columns.md @@ -0,0 +1,5 @@ +GET /v1/tablesdb/{databaseId}/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/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..5847bed650 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-indexes.md @@ -0,0 +1,5 @@ +GET /v1/tablesdb/{databaseId}/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/tablesdb/list-rows.md similarity index 72% rename from docs/examples/1.8.x/server-rest/examples/grids/list-rows.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/list-rows.md index d22624083f..dcff60e31e 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/list-rows.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-rows.md @@ -1,4 +1,4 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +GET /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 Host: cloud.appwrite.io X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-tables.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-tables.md similarity index 70% rename from docs/examples/1.8.x/server-rest/examples/grids/list-tables.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/list-tables.md index d3a4230165..79ee0f6df8 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/list-tables.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-tables.md @@ -1,4 +1,4 @@ -GET /v1/databases/{databaseId}/grids/tables HTTP/1.1 +GET /v1/tablesdb/{databaseId}/tables HTTP/1.1 Host: cloud.appwrite.io X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-databases.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/list.md similarity index 82% rename from docs/examples/1.8.x/server-rest/examples/grids/list-databases.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/list.md index 3b9530eec4..95cb1bac8d 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/list-databases.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/list.md @@ -1,4 +1,4 @@ -GET /v1/databases HTTP/1.1 +GET /v1/tablesdb HTTP/1.1 Host: cloud.appwrite.io X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> 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/tablesdb/update-boolean-column.md similarity index 71% rename from docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update-boolean-column.md index 4327743a81..7e1f55b6bb 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-boolean-column.md @@ -1,4 +1,4 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/boolean/{key} HTTP/1.1 +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/update-datetime-column.md similarity index 70% rename from docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update-datetime-column.md index bbdc0c3bc4..0063dc1b15 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-datetime-column.md @@ -1,4 +1,4 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/datetime/{key} HTTP/1.1 +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/update-email-column.md similarity index 73% rename from docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update-email-column.md index b9145a1c33..8e7c1ad01f 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-email-column.md @@ -1,4 +1,4 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/email/{key} HTTP/1.1 +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/update-enum-column.md similarity index 74% rename from docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update-enum-column.md index 8d3d6c359f..343026a9ef 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-enum-column.md @@ -1,4 +1,4 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/enum/{key} HTTP/1.1 +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/update-float-column.md similarity index 73% rename from docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update-float-column.md index 5e1a67c6a1..0756262cfd 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-float-column.md @@ -1,4 +1,4 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/float/{key} HTTP/1.1 +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/update-integer-column.md similarity index 73% rename from docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update-integer-column.md index f45fbf278f..252627eb02 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-integer-column.md @@ -1,4 +1,4 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/integer/{key} HTTP/1.1 +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/update-ip-column.md similarity index 72% rename from docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update-ip-column.md index 5080aaab25..e43959f511 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-ip-column.md @@ -1,4 +1,4 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/ip/{key} HTTP/1.1 +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/update-relationship-column.md similarity index 68% rename from docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update-relationship-column.md index d5d188ced4..fde5191383 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-relationship-column.md @@ -1,4 +1,4 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/{key}/relationship HTTP/1.1 +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/{key}/relationship HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-row.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-row.md similarity index 76% rename from docs/examples/1.8.x/server-rest/examples/grids/update-row.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update-row.md index 015fa8faf1..51f10f7f97 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-row.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-row.md @@ -1,4 +1,4 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-rows.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-rows.md similarity index 73% rename from docs/examples/1.8.x/server-rest/examples/grids/update-rows.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update-rows.md index eb5b77bb31..2f282d8e13 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-rows.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-rows.md @@ -1,4 +1,4 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/update-string-column.md similarity index 73% rename from docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update-string-column.md index eda416a4d9..a21b5e7fd1 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-string-column.md @@ -1,4 +1,4 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/string/{key} HTTP/1.1 +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-table.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-table.md similarity index 80% rename from docs/examples/1.8.x/server-rest/examples/grids/update-table.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update-table.md index 02d68944f9..e223b0c4ca 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-table.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-table.md @@ -1,4 +1,4 @@ -PUT /v1/databases/{databaseId}/grids/tables/{tableId} HTTP/1.1 +PUT /v1/tablesdb/{databaseId}/tables/{tableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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/tablesdb/update-url-column.md similarity index 73% rename from docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update-url-column.md index 4e0796887a..c5d7001454 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-url-column.md @@ -1,4 +1,4 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/url/{key} HTTP/1.1 +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-database.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update.md similarity index 83% rename from docs/examples/1.8.x/server-rest/examples/grids/update-database.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/update.md index d57ad48927..843387c9da 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-database.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update.md @@ -1,4 +1,4 @@ -PUT /v1/databases/{databaseId} HTTP/1.1 +PUT /v1/tablesdb/{databaseId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/upsert-row.md similarity index 77% rename from docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/upsert-row.md index c461d7c981..edb74043fb 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/upsert-row.md @@ -1,4 +1,4 @@ -PUT /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +PUT /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 diff --git a/docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/upsert-rows.md similarity index 72% rename from docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md rename to docs/examples/1.8.x/server-rest/examples/tablesdb/upsert-rows.md index 5d9446550f..147e4f66c3 100644 --- a/docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/upsert-rows.md @@ -1,4 +1,4 @@ -PUT /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +PUT /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 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-argon-2-user.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md rename to docs/examples/1.8.x/server-rest/examples/users/create-argon-2-user.md 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md rename to docs/examples/1.8.x/server-rest/examples/users/create-jwt.md 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-md-5-user.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md rename to docs/examples/1.8.x/server-rest/examples/users/create-md-5-user.md 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-ph-pass-user.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md rename to docs/examples/1.8.x/server-rest/examples/users/create-ph-pass-user.md 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-sha-user.md similarity index 100% rename from docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md rename to docs/examples/1.8.x/server-rest/examples/users/create-sha-user.md 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/server-ruby/examples/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/server-ruby/examples/account/create-magic-url-token.md 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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/server-ruby/examples/account/create-o-auth-2-token.md 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/server-ruby/examples/account/update-magic-url-session.md 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/server-ruby/examples/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/server-ruby/examples/avatars/get-qr.md 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 index 9b5a5f4006..9fd0191a0f 100644 --- 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 @@ -5,7 +5,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_key('<YOUR_API_KEY>') # Your secret API key + .set_session('') # The user session to authenticate with databases = Databases.new(client) 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 index 40d8ba2ab7..3e8bfe0b2a 100644 --- 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 @@ -5,7 +5,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_key('<YOUR_API_KEY>') # Your secret API key + .set_session('') # The user session to authenticate with databases = Databases.new(client) 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-db.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/health/get-d-b.md rename to docs/examples/1.8.x/server-ruby/examples/health/get-db.md 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-eu.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/server-ruby/examples/locale/list-countries-eu.md 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/messaging/create-msg91provider.md rename to docs/examples/1.8.x/server-ruby/examples/messaging/create-msg-91-provider.md 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/messaging/update-msg91provider.md rename to docs/examples/1.8.x/server-ruby/examples/messaging/update-msg-91-provider.md 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/tablesdb/create-boolean-column.md similarity index 84% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-boolean-column.md index 592f6028aa..99dfb41271 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-boolean-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_boolean_column( +result = tables_db.create_boolean_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/create-datetime-column.md similarity index 84% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-datetime-column.md index 4bc97b94ae..f53b5ef3c6 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-datetime-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_datetime_column( +result = tables_db.create_datetime_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/create-email-column.md similarity index 85% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-email-column.md index 4a1687d405..0a1ea924a6 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-email-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_email_column( +result = tables_db.create_email_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/create-enum-column.md similarity index 85% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-enum-column.md index 2a9b6de5de..0586dd8c58 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-enum-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_enum_column( +result = tables_db.create_enum_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/create-float-column.md similarity index 86% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-float-column.md index 0cd3bee568..88a0384ceb 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-float-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_float_column( +result = tables_db.create_float_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-index.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-index.md similarity index 87% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-index.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-index.md index 7ef4c2c790..f7c2d0e4e1 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-index.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-index.md @@ -8,9 +8,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_index( +result = tables_db.create_index( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/create-integer-column.md similarity index 85% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-integer-column.md index ae7c416965..4b9690eb96 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-integer-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_integer_column( +result = tables_db.create_integer_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/create-ip-column.md similarity index 85% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-ip-column.md index e407abaee8..1e32122706 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-ip-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_ip_column( +result = tables_db.create_ip_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/create-relationship-column.md similarity index 87% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-relationship-column.md index 3aecd5757d..1c5a935e68 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-relationship-column.md @@ -8,9 +8,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_relationship_column( +result = tables_db.create_relationship_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', related_table_id: '<RELATED_TABLE_ID>', diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-row.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-row.md similarity index 86% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-row.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-row.md index 4c4433bd10..5b66bc4cf4 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-row.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-row.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_session('') # The user session to authenticate with -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_row( +result = tables_db.create_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/create-rows.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-rows.md similarity index 83% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-rows.md index 1e619d25ce..f258d4d36f 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-rows.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_rows( +result = tables_db.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/tablesdb/create-string-column.md similarity index 86% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-string-column.md index 7808c6cfa2..8167289d30 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-string-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_string_column( +result = tables_db.create_string_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-table.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-table.md similarity index 87% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-table.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-table.md index ef3bc4b5cf..c8fcf477b3 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-table.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-table.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_table( +result = tables_db.create_table( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', name: '<NAME>', 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/tablesdb/create-url-column.md similarity index 85% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create-url-column.md index 55ff12a1c0..fc2159faf1 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-url-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_url_column( +result = tables_db.create_url_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-database.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create.md similarity index 84% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-database.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/create.md index 79216c3fd3..76346f5833 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-database.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_database( +result = tables_db.create( database_id: '<DATABASE_ID>', name: '<NAME>', enabled: 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/tablesdb/decrement-row-column.md similarity index 72% rename from docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/decrement-row-column.md index fcbc6efedc..21439740ed 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/decrement-row-column.md @@ -5,11 +5,11 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key + .set_session('') # The user session to authenticate with -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.decrement_row_column( +result = tables_db.decrement_row_column( 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-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-column.md similarity index 82% rename from docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-column.md index 79cf84f3fd..d9d9c2f0e9 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.delete_column( +result = tables_db.delete_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '' diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-index.md similarity index 83% rename from docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-index.md index 3968cfb675..5998633cc5 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-index.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.delete_index( +result = tables_db.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/tablesdb/delete-row.md similarity index 84% rename from docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-row.md index 183f02c5d3..704f52fc39 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-row.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_session('') # The user session to authenticate with -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.delete_row( +result = tables_db.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/tablesdb/delete-rows.md similarity index 83% rename from docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-rows.md index 560d63b033..5b15c1748a 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-rows.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.delete_rows( +result = tables_db.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/tablesdb/delete-table.md similarity index 82% rename from docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-table.md index d0c15da17c..2c955aed29 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-table.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.delete_table( +result = tables_db.delete_table( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>' ) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete.md similarity index 82% rename from docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/delete.md index 54d3660b9f..3c4371c7fa 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete.md @@ -7,8 +7,8 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.delete_database( +result = tables_db.delete( database_id: '<DATABASE_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/tablesdb/get-column.md similarity index 83% rename from docs/examples/1.8.x/server-ruby/examples/grids/get-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/get-column.md index 6288772e65..b231f2d91b 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/get-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.get_column( +result = tables_db.get_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '' diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-index.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-index.md similarity index 83% rename from docs/examples/1.8.x/server-ruby/examples/grids/get-index.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/get-index.md index 78a923c0ff..eb010e7111 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/get-index.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-index.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.get_index( +result = tables_db.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/tablesdb/get-row.md similarity index 85% rename from docs/examples/1.8.x/server-ruby/examples/grids/get-row.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/get-row.md index e8dc2cb6b1..621c2e12f6 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/get-row.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-row.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_session('') # The user session to authenticate with -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.get_row( +result = tables_db.get_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/get-table.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-table.md similarity index 83% rename from docs/examples/1.8.x/server-ruby/examples/grids/get-table.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/get-table.md index bafdfe1140..35843569f8 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/get-table.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-table.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.get_table( +result = tables_db.get_table( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>' ) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-database.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get.md similarity index 83% rename from docs/examples/1.8.x/server-ruby/examples/grids/get-database.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/get.md index 49a5cde300..e8067bc0e3 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/get-database.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get.md @@ -7,8 +7,8 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.get_database( +result = tables_db.get( database_id: '<DATABASE_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/tablesdb/increment-row-column.md similarity index 72% rename from docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/increment-row-column.md index d09f72080c..bf9b6cc230 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/increment-row-column.md @@ -5,11 +5,11 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key + .set_session('') # The user session to authenticate with -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.increment_row_column( +result = tables_db.increment_row_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', row_id: '<ROW_ID>', diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-columns.md similarity index 83% rename from docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/list-columns.md index 343775300b..f3f0165289 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-columns.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.list_columns( +result = tables_db.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-indexes.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-indexes.md similarity index 83% rename from docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/list-indexes.md index 2229c87249..85e343fa22 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-indexes.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.list_indexes( +result = tables_db.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/tablesdb/list-rows.md similarity index 84% rename from docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/list-rows.md index 40b7be88a7..af971fbe10 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-rows.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_session('') # The user session to authenticate with -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.list_rows( +result = tables_db.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/tablesdb/list-tables.md similarity index 84% rename from docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/list-tables.md index 69b213d3f3..a2ec4cda68 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-tables.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.list_tables( +result = tables_db.list_tables( database_id: '<DATABASE_ID>', queries: [], # optional search: '<SEARCH>' # 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/tablesdb/list.md similarity index 84% rename from docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/list.md index 21e54951ee..ca0d4645e2 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.list_databases( +result = tables_db.list( 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/tablesdb/update-boolean-column.md similarity index 83% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update-boolean-column.md index 78055c777f..d048d76410 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-boolean-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_boolean_column( +result = tables_db.update_boolean_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/update-datetime-column.md similarity index 83% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update-datetime-column.md index 1737c5a020..13bad26f00 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-datetime-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_datetime_column( +result = tables_db.update_datetime_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/update-email-column.md similarity index 84% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update-email-column.md index bc1f4cd7b6..e5c97a5d10 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-email-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_email_column( +result = tables_db.update_email_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/update-enum-column.md similarity index 85% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update-enum-column.md index 5012002e29..4ae45749c4 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-enum-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_enum_column( +result = tables_db.update_enum_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/update-float-column.md similarity index 85% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update-float-column.md index e05037f10c..5eb175fe6a 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-float-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_float_column( +result = tables_db.update_float_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/update-integer-column.md similarity index 85% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update-integer-column.md index 3ec34bd2f2..e32e1d4348 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-integer-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_integer_column( +result = tables_db.update_integer_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/update-ip-column.md similarity index 84% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update-ip-column.md index 5394075ae5..aae8ce9dc6 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-ip-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_ip_column( +result = tables_db.update_ip_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', 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/tablesdb/update-relationship-column.md similarity index 83% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update-relationship-column.md index 2c730048de..3951cbc047 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-relationship-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_relationship_column( +result = tables_db.update_relationship_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-row.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-row.md similarity index 86% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-row.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update-row.md index 57dd5cd381..7a48c5e3f6 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-row.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-row.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_session('') # The user session to authenticate with -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_row( +result = tables_db.update_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/update-rows.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-rows.md similarity index 84% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update-rows.md index 602670d67f..7316241139 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-rows.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_rows( +result = tables_db.update_rows( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', data: {}, # 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/tablesdb/update-string-column.md similarity index 85% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update-string-column.md index 09de9ba697..331ce88ad9 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-string-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_string_column( +result = tables_db.update_string_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-table.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-table.md similarity index 87% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-table.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update-table.md index 742a0c9829..cb8706d0b4 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-table.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-table.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_table( +result = tables_db.update_table( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', name: '<NAME>', 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/tablesdb/update-url-column.md similarity index 85% rename from docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update-url-column.md index fc3f055708..03034e9c07 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-url-column.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.update_url_column( +result = tables_db.update_url_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-database.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update.md similarity index 84% rename from docs/examples/1.8.x/server-ruby/examples/grids/create-database.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/update.md index db94d2386e..787d5c11e8 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-database.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.create_database( +result = tables_db.update( database_id: '<DATABASE_ID>', name: '<NAME>', enabled: false # 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/tablesdb/upsert-row.md similarity index 86% rename from docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/upsert-row.md index 2cf50d92d9..5eb4281002 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/upsert-row.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_session('') # The user session to authenticate with -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.upsert_row( +result = tables_db.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/grids/upsert-rows.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/upsert-rows.md similarity index 83% rename from docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md rename to docs/examples/1.8.x/server-ruby/examples/tablesdb/upsert-rows.md index af3a7e1dbf..c48211dcc0 100644 --- a/docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/upsert-rows.md @@ -7,9 +7,9 @@ client = Client.new .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key -grids = Grids.new(client) +tables_db = TablesDB.new(client) -result = grids.upsert_rows( +result = tables_db.upsert_rows( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', rows: [] 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-argon-2-user.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/users/create-argon2user.md rename to docs/examples/1.8.x/server-ruby/examples/users/create-argon-2-user.md 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/users/create-j-w-t.md rename to docs/examples/1.8.x/server-ruby/examples/users/create-jwt.md 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-md-5-user.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/users/create-m-d5user.md rename to docs/examples/1.8.x/server-ruby/examples/users/create-md-5-user.md 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-ph-pass-user.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/users/create-p-h-pass-user.md rename to docs/examples/1.8.x/server-ruby/examples/users/create-ph-pass-user.md 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-sha-user.md similarity index 100% rename from docs/examples/1.8.x/server-ruby/examples/users/create-s-h-a-user.md rename to docs/examples/1.8.x/server-ruby/examples/users/create-sha-user.md 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/account/create-j-w-t.md rename to docs/examples/1.8.x/server-swift/examples/account/create-jwt.md 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-url-token.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/account/create-magic-u-r-l-token.md rename to docs/examples/1.8.x/server-swift/examples/account/create-magic-url-token.md 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 index 4dd91d84dd..dd3a7d1201 100644 --- 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 @@ -8,7 +8,7 @@ let client = Client() let account = Account(client) -let mfaType = try await account.createMfaAuthenticator( +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 index 0b5d385999..27f1bc1784 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let account = Account(client) -let mfaChallenge = try await account.createMfaChallenge( +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 index a73e4f6024..3595cdae31 100644 --- 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 @@ -7,5 +7,5 @@ let client = Client() let account = Account(client) -let mfaRecoveryCodes = try await account.createMfaRecoveryCodes() +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-auth-2-token.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/account/create-o-auth2token.md rename to docs/examples/1.8.x/server-swift/examples/account/create-o-auth-2-token.md 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 index e4209a2550..5a85cdcad5 100644 --- 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 @@ -8,7 +8,7 @@ let client = Client() let account = Account(client) -let result = try await account.deleteMfaAuthenticator( +let result = try await account.deleteMFAAuthenticator( type: .totp ) 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 index 69455f4acd..86c435d2cb 100644 --- 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 @@ -7,5 +7,5 @@ let client = Client() let account = Account(client) -let mfaRecoveryCodes = try await account.getMfaRecoveryCodes() +let mfaRecoveryCodes = try await account.getMFARecoveryCodes() 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 index a63d4d0f82..be41b2b2ff 100644 --- 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 @@ -7,5 +7,5 @@ let client = Client() let account = Account(client) -let mfaFactors = try await account.listMfaFactors() +let mfaFactors = try await account.listMFAFactors() 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-url-session.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/account/update-magic-u-r-l-session.md rename to docs/examples/1.8.x/server-swift/examples/account/update-magic-url-session.md 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 index fedbc954af..79f408e1d4 100644 --- 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 @@ -8,7 +8,7 @@ let client = Client() let account = Account(client) -let user = try await account.updateMfaAuthenticator( +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 index 4edb1fbbc3..c595f1ebc0 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let account = Account(client) -let session = try await account.updateMfaChallenge( +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 index d0a2b8c686..ee6f9acb39 100644 --- 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 @@ -7,5 +7,5 @@ let client = Client() let account = Account(client) -let mfaRecoveryCodes = try await account.updateMfaRecoveryCodes() +let mfaRecoveryCodes = try await account.updateMFARecoveryCodes() 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-mfa.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/account/update-m-f-a.md rename to docs/examples/1.8.x/server-swift/examples/account/update-mfa.md 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-qr.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/avatars/get-q-r.md rename to docs/examples/1.8.x/server-swift/examples/avatars/get-qr.md 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 index 88ba9ae01b..81516fa26a 100644 --- 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 @@ -3,7 +3,7 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key + .setSession("") // The user session to authenticate with let databases = Databases(client) 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 index 452b200e34..64ba46b413 100644 --- 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 @@ -3,7 +3,7 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key + .setSession("") // The user session to authenticate with let databases = Databases(client) 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-db.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/health/get-d-b.md rename to docs/examples/1.8.x/server-swift/examples/health/get-db.md 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-eu.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/locale/list-countries-e-u.md rename to docs/examples/1.8.x/server-swift/examples/locale/list-countries-eu.md 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 index 5e20018fef..772084dc44 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let messaging = Messaging(client) -let provider = try await messaging.createApnsProvider( +let provider = try await messaging.createAPNSProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", authKey: "<AUTH_KEY>", // 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 index 0071e477f1..2b004507b6 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let messaging = Messaging(client) -let provider = try await messaging.createFcmProvider( +let provider = try await messaging.createFCMProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", serviceAccountJSON: [:], // 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/messaging/create-msg91provider.md rename to docs/examples/1.8.x/server-swift/examples/messaging/create-msg-91-provider.md 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 index 4f579312a9..28a6ba7a63 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let messaging = Messaging(client) -let message = try await messaging.createSms( +let message = try await messaging.createSMS( messageId: "<MESSAGE_ID>", content: "<CONTENT>", topics: [], // 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 index 18d25df738..ec9b92c8e1 100644 --- 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 @@ -8,7 +8,7 @@ let client = Client() let messaging = Messaging(client) -let provider = try await messaging.createSmtpProvider( +let provider = try await messaging.createSMTPProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", host: "<HOST>", 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 index 03afe5555b..bed92ba11c 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let messaging = Messaging(client) -let provider = try await messaging.updateApnsProvider( +let provider = try await messaging.updateAPNSProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // 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 index c4548f6549..efd7e1fb9d 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let messaging = Messaging(client) -let provider = try await messaging.updateFcmProvider( +let provider = try await messaging.updateFCMProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // 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-msg-91-provider.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/messaging/update-msg91provider.md rename to docs/examples/1.8.x/server-swift/examples/messaging/update-msg-91-provider.md 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 index 46b225fce0..d6dc207b02 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let messaging = Messaging(client) -let message = try await messaging.updateSms( +let message = try await messaging.updateSMS( messageId: "<MESSAGE_ID>", topics: [], // optional users: [], // 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 index 7ef8f2e760..402c2675d2 100644 --- 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 @@ -8,7 +8,7 @@ let client = Client() let messaging = Messaging(client) -let provider = try await messaging.updateSmtpProvider( +let provider = try await messaging.updateSMTPProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional host: "<HOST>", // 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/tablesdb/create-boolean-column.md similarity index 80% rename from docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-boolean-column.md index 4d0a226eb2..af4b7bdf9d 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-boolean-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnBoolean = try await grids.createBooleanColumn( +let columnBoolean = try await tablesDB.createBooleanColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-datetime-column.md similarity index 80% rename from docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-datetime-column.md index 8271b44c9f..ee1945d563 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-datetime-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnDatetime = try await grids.createDatetimeColumn( +let columnDatetime = try await tablesDB.createDatetimeColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-email-column.md similarity index 82% rename from docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-email-column.md index ca99534c78..4ca0fe78aa 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-email-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnEmail = try await grids.createEmailColumn( +let columnEmail = try await tablesDB.createEmailColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-enum-column.md similarity index 82% rename from docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-enum-column.md index 3d52e94a96..ccddf5297b 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-enum-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnEnum = try await grids.createEnumColumn( +let columnEnum = try await tablesDB.createEnumColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-float-column.md similarity index 83% rename from docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-float-column.md index f0abdc7b9f..c1c685bc02 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-float-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnFloat = try await grids.createFloatColumn( +let columnFloat = try await tablesDB.createFloatColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-index.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-index.md similarity index 83% rename from docs/examples/1.8.x/server-swift/examples/grids/create-index.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-index.md index 2d0c1272b2..3620c625eb 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-index.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-index.md @@ -6,9 +6,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnIndex = try await grids.createIndex( +let columnIndex = try await tablesDB.createIndex( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-integer-column.md similarity index 82% rename from docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-integer-column.md index dca7968bfb..52ad14a592 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-integer-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnInteger = try await grids.createIntegerColumn( +let columnInteger = try await tablesDB.createIntegerColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-ip-column.md similarity index 82% rename from docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-ip-column.md index 9517ed960f..d8801c5a24 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-ip-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnIp = try await grids.createIpColumn( +let columnIp = try await tablesDB.createIpColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/create-relationship-column.md similarity index 83% rename from docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-relationship-column.md index 1ead20f97d..4c464b5d70 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-relationship-column.md @@ -6,9 +6,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnRelationship = try await grids.createRelationshipColumn( +let columnRelationship = try await tablesDB.createRelationshipColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", relatedTableId: "<RELATED_TABLE_ID>", diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-row.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-row.md similarity index 84% rename from docs/examples/1.8.x/server-swift/examples/grids/create-row.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-row.md index 9d042b4034..31e0ea9bc1 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-row.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-row.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with -let grids = Grids(client) +let tablesDB = TablesDB(client) -let row = try await grids.createRow( +let row = try await tablesDB.createRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-rows.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-rows.md similarity index 79% rename from docs/examples/1.8.x/server-swift/examples/grids/create-rows.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-rows.md index 3e1aced6e7..25ea512590 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-rows.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-rows.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let rowList = try await grids.createRows( +let rowList = try await tablesDB.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/tablesdb/create-string-column.md similarity index 82% rename from docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-string-column.md index 74eea86fe4..e38dcb8014 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-string-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnString = try await grids.createStringColumn( +let columnString = try await tablesDB.createStringColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-table.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-table.md similarity index 84% rename from docs/examples/1.8.x/server-swift/examples/grids/create-table.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-table.md index 3792c0aee4..11d14e1881 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-table.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-table.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let table = try await grids.createTable( +let table = try await tablesDB.createTable( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", name: "<NAME>", 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/tablesdb/create-url-column.md similarity index 82% rename from docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create-url-column.md index 7ea729aa1a..083556f2a3 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-url-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnUrl = try await grids.createUrlColumn( +let columnUrl = try await tablesDB.createUrlColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-database.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create.md similarity index 81% rename from docs/examples/1.8.x/server-swift/examples/grids/update-database.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/create.md index 827245bd97..be88b5950d 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-database.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let database = try await grids.updateDatabase( +let database = try await tablesDB.create( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false // optional diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..196289e994 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/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 + .setSession("") // The user session to authenticate with + +let tablesDB = TablesDB(client) + +let row = try await tablesDB.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/tablesdb/delete-column.md similarity index 79% rename from docs/examples/1.8.x/server-swift/examples/grids/delete-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/delete-column.md index b58a4d0890..f9f2c5cf60 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/delete-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let result = try await grids.deleteColumn( +let result = try await tablesDB.deleteColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "" diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-index.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-index.md similarity index 79% rename from docs/examples/1.8.x/server-swift/examples/grids/delete-index.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/delete-index.md index d83cd551da..0a413b6418 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/delete-index.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-index.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let result = try await grids.deleteIndex( +let result = try await tablesDB.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/tablesdb/delete-row.md similarity index 81% rename from docs/examples/1.8.x/server-swift/examples/grids/delete-row.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/delete-row.md index d2d77234a3..5449c74edb 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/delete-row.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-row.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with -let grids = Grids(client) +let tablesDB = TablesDB(client) -let result = try await grids.deleteRow( +let result = try await tablesDB.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/tablesdb/delete-rows.md similarity index 80% rename from docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/delete-rows.md index 6a3f145526..85d8957f78 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-rows.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let rowList = try await grids.deleteRows( +let rowList = try await tablesDB.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/tablesdb/delete-table.md similarity index 79% rename from docs/examples/1.8.x/server-swift/examples/grids/delete-table.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/delete-table.md index 8abdfcae2d..1986f3a19e 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/delete-table.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-table.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let result = try await grids.deleteTable( +let result = try await tablesDB.deleteTable( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>" ) diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-database.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete.md similarity index 78% rename from docs/examples/1.8.x/server-swift/examples/grids/delete-database.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/delete.md index e7600d7726..08e6ddc2d1 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/delete-database.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let result = try await grids.deleteDatabase( +let result = try await tablesDB.delete( databaseId: "<DATABASE_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/tablesdb/get-column.md similarity index 80% rename from docs/examples/1.8.x/server-swift/examples/grids/get-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/get-column.md index 68c0d3933d..2d88b03967 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/get-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let result = try await grids.getColumn( +let result = try await tablesDB.getColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "" diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-index.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-index.md similarity index 79% rename from docs/examples/1.8.x/server-swift/examples/grids/get-index.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/get-index.md index 24c3be9e27..6f65fdba2b 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/get-index.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-index.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnIndex = try await grids.getIndex( +let columnIndex = try await tablesDB.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/tablesdb/get-row.md similarity index 83% rename from docs/examples/1.8.x/server-swift/examples/grids/get-row.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/get-row.md index 4d3e53cba6..17e6ccbb52 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/get-row.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-row.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with -let grids = Grids(client) +let tablesDB = TablesDB(client) -let row = try await grids.getRow( +let row = try await tablesDB.getRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-table.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-table.md similarity index 79% rename from docs/examples/1.8.x/server-swift/examples/grids/get-table.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/get-table.md index 9ad5e0c202..e9167d4d0a 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/get-table.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-table.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let table = try await grids.getTable( +let table = try await tablesDB.getTable( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>" ) diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-database.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/get.md similarity index 78% rename from docs/examples/1.8.x/server-swift/examples/grids/get-database.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/get.md index f3936ae4ba..d670cf7a18 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/get-database.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/get.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let database = try await grids.getDatabase( +let database = try await tablesDB.get( databaseId: "<DATABASE_ID>" ) diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..38aa7581c6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/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 + .setSession("") // The user session to authenticate with + +let tablesDB = TablesDB(client) + +let row = try await tablesDB.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/tablesdb/list-columns.md similarity index 79% rename from docs/examples/1.8.x/server-swift/examples/grids/list-columns.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/list-columns.md index facf87f9a3..271a6d4afd 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/list-columns.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/list-columns.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnList = try await grids.listColumns( +let columnList = try await tablesDB.listColumns( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", queries: [] // 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/tablesdb/list-indexes.md similarity index 78% rename from docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/list-indexes.md index c31f162d5d..a8e2770f8f 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/list-indexes.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnIndexList = try await grids.listIndexes( +let columnIndexList = try await tablesDB.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/tablesdb/list-rows.md similarity index 81% rename from docs/examples/1.8.x/server-swift/examples/grids/list-rows.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/list-rows.md index 01dd6637fc..7320147685 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/list-rows.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/list-rows.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with -let grids = Grids(client) +let tablesDB = TablesDB(client) -let rowList = try await grids.listRows( +let rowList = try await tablesDB.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/tablesdb/list-tables.md similarity index 80% rename from docs/examples/1.8.x/server-swift/examples/grids/list-tables.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/list-tables.md index af8cdd1264..46fcdcf0a6 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/list-tables.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/list-tables.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let tableList = try await grids.listTables( +let tableList = try await tablesDB.listTables( databaseId: "<DATABASE_ID>", queries: [], // optional search: "<SEARCH>" // 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/tablesdb/list.md similarity index 79% rename from docs/examples/1.8.x/server-swift/examples/grids/list-databases.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/list.md index 26d50a24b1..6923d8ade3 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/list-databases.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/list.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let databaseList = try await grids.listDatabases( +let databaseList = try await tablesDB.list( 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/tablesdb/update-boolean-column.md similarity index 80% rename from docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update-boolean-column.md index 8994b79e7c..c8ca0fc499 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-boolean-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnBoolean = try await grids.updateBooleanColumn( +let columnBoolean = try await tablesDB.updateBooleanColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-datetime-column.md similarity index 79% rename from docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update-datetime-column.md index 7a59cd1ef1..67e411bd35 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-datetime-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnDatetime = try await grids.updateDatetimeColumn( +let columnDatetime = try await tablesDB.updateDatetimeColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-email-column.md similarity index 81% rename from docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update-email-column.md index 3704401fa5..56a7d074de 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-email-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnEmail = try await grids.updateEmailColumn( +let columnEmail = try await tablesDB.updateEmailColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-enum-column.md similarity index 82% rename from docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update-enum-column.md index 946804a88c..a86d114c0c 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-enum-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnEnum = try await grids.updateEnumColumn( +let columnEnum = try await tablesDB.updateEnumColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-float-column.md similarity index 82% rename from docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update-float-column.md index 10f0babb2c..10806aae70 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-float-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnFloat = try await grids.updateFloatColumn( +let columnFloat = try await tablesDB.updateFloatColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-integer-column.md similarity index 81% rename from docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update-integer-column.md index 60e145e3b0..ba6bfa589a 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-integer-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnInteger = try await grids.updateIntegerColumn( +let columnInteger = try await tablesDB.updateIntegerColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-ip-column.md similarity index 81% rename from docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update-ip-column.md index 17f490d644..5686e71016 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-ip-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnIp = try await grids.updateIpColumn( +let columnIp = try await tablesDB.updateIpColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", 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/tablesdb/update-relationship-column.md similarity index 79% rename from docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update-relationship-column.md index 994feefa92..0a021ff03e 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-relationship-column.md @@ -6,9 +6,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnRelationship = try await grids.updateRelationshipColumn( +let columnRelationship = try await tablesDB.updateRelationshipColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-row.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-row.md similarity index 84% rename from docs/examples/1.8.x/server-swift/examples/grids/update-row.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update-row.md index 3e4408f700..e06338b3d6 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-row.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-row.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with -let grids = Grids(client) +let tablesDB = TablesDB(client) -let row = try await grids.updateRow( +let row = try await tablesDB.updateRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-rows.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-rows.md similarity index 81% rename from docs/examples/1.8.x/server-swift/examples/grids/update-rows.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update-rows.md index c57463cc8a..58894f5b85 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-rows.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-rows.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let rowList = try await grids.updateRows( +let rowList = try await tablesDB.updateRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", data: [:], // 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/tablesdb/update-string-column.md similarity index 81% rename from docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update-string-column.md index e9e2d71c62..55efca1c67 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-string-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnString = try await grids.updateStringColumn( +let columnString = try await tablesDB.updateStringColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-table.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-table.md similarity index 84% rename from docs/examples/1.8.x/server-swift/examples/grids/update-table.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update-table.md index 8b3fa5e12e..278d6e6b4e 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-table.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-table.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let table = try await grids.updateTable( +let table = try await tablesDB.updateTable( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", name: "<NAME>", 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/tablesdb/update-url-column.md similarity index 82% rename from docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update-url-column.md index b72666e240..693fe52796 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-url-column.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let columnUrl = try await grids.updateUrlColumn( +let columnUrl = try await tablesDB.updateUrlColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-database.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update.md similarity index 81% rename from docs/examples/1.8.x/server-swift/examples/grids/create-database.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/update.md index 75ec62df4b..4a7dcc8c53 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-database.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let database = try await grids.createDatabase( +let database = try await tablesDB.update( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false // 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/tablesdb/upsert-row.md similarity index 84% rename from docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-row.md index 1d09e7b767..dc133f6cd1 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-row.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with -let grids = Grids(client) +let tablesDB = TablesDB(client) -let row = try await grids.upsertRow( +let row = try await tablesDB.upsertRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-rows.md similarity index 79% rename from docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md rename to docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-rows.md index 84173c9c0f..fe35f0da91 100644 --- a/docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-rows.md @@ -5,9 +5,9 @@ let client = Client() .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key -let grids = Grids(client) +let tablesDB = TablesDB(client) -let rowList = try await grids.upsertRows( +let rowList = try await tablesDB.upsertRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rows: [] 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-argon-2-user.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/users/create-argon2user.md rename to docs/examples/1.8.x/server-swift/examples/users/create-argon-2-user.md 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-jwt.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/users/create-j-w-t.md rename to docs/examples/1.8.x/server-swift/examples/users/create-jwt.md 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-md-5-user.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/users/create-m-d5user.md rename to docs/examples/1.8.x/server-swift/examples/users/create-md-5-user.md 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 index 577a533fcb..5f073d10e6 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let users = Users(client) -let mfaRecoveryCodes = try await users.createMfaRecoveryCodes( +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-ph-pass-user.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/users/create-p-h-pass-user.md rename to docs/examples/1.8.x/server-swift/examples/users/create-ph-pass-user.md 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-sha-user.md similarity index 100% rename from docs/examples/1.8.x/server-swift/examples/users/create-s-h-a-user.md rename to docs/examples/1.8.x/server-swift/examples/users/create-sha-user.md 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 index da2b8e091a..be9f39529e 100644 --- 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 @@ -8,7 +8,7 @@ let client = Client() let users = Users(client) -let result = try await users.deleteMfaAuthenticator( +let result = try await users.deleteMFAAuthenticator( userId: "<USER_ID>", type: .totp ) 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 index 1ae285142f..874076c6ac 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let users = Users(client) -let mfaRecoveryCodes = try await users.getMfaRecoveryCodes( +let mfaRecoveryCodes = try await users.getMFARecoveryCodes( userId: "<USER_ID>" ) 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 index a5b5e38e12..4a58a07147 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let users = Users(client) -let mfaFactors = try await users.listMfaFactors( +let mfaFactors = try await users.listMFAFactors( userId: "<USER_ID>" ) 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 index a6169a782c..7ebb34efcb 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let users = Users(client) -let mfaRecoveryCodes = try await users.updateMfaRecoveryCodes( +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 index ad010f36b8..ca442b3a3b 100644 --- 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 @@ -7,7 +7,7 @@ let client = Client() let users = Users(client) -let user = try await users.updateMfa( +let user = try await users.updateMFA( userId: "<USER_ID>", mfa: false ) diff --git a/docs/references/account/create-token-email.md b/docs/references/account/create-token-email.md index 3e49899888..3ed175c7f9 100644 --- a/docs/references/account/create-token-email.md +++ b/docs/references/account/create-token-email.md @@ -1,3 +1,3 @@ -Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. +Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. -A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). \ No newline at end of file +A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). diff --git a/docs/references/databases/list-usage.md b/docs/references/databases/list-usage.md index 0f318d6466..a88e76680e 100644 --- a/docs/references/databases/list-usage.md +++ b/docs/references/databases/list-usage.md @@ -1 +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 +List 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/grids/create-boolean-column.md b/docs/references/grids/create-boolean-column.md deleted file mode 100644 index c528ede1a2..0000000000 --- a/docs/references/grids/create-boolean-column.md +++ /dev/null @@ -1 +0,0 @@ -Create a boolean column. diff --git a/docs/references/grids/create-datetime-column.md b/docs/references/grids/create-datetime-column.md deleted file mode 100644 index ad92750639..0000000000 --- a/docs/references/grids/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/grids/create-email-column.md b/docs/references/grids/create-email-column.md deleted file mode 100644 index 91aa5c9326..0000000000 --- a/docs/references/grids/create-email-column.md +++ /dev/null @@ -1 +0,0 @@ -Create an email column. diff --git a/docs/references/grids/create-enum-column.md b/docs/references/grids/create-enum-column.md deleted file mode 100644 index b9e5a3ebe4..0000000000 --- a/docs/references/grids/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/grids/create-float-column.md b/docs/references/grids/create-float-column.md deleted file mode 100644 index 0b133eef28..0000000000 --- a/docs/references/grids/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/grids/create-integer-column.md b/docs/references/grids/create-integer-column.md deleted file mode 100644 index 5f51b3965a..0000000000 --- a/docs/references/grids/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/grids/create-ip-column.md b/docs/references/grids/create-ip-column.md deleted file mode 100644 index 012431dbae..0000000000 --- a/docs/references/grids/create-ip-column.md +++ /dev/null @@ -1 +0,0 @@ -Create IP address column. diff --git a/docs/references/grids/create-relationship-column.md b/docs/references/grids/create-relationship-column.md deleted file mode 100644 index d87d8bccf8..0000000000 --- a/docs/references/grids/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/grids/create-row.md b/docs/references/grids/create-row.md deleted file mode 100644 index a07abfa04d..0000000000 --- a/docs/references/grids/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/grids/create-rows.md b/docs/references/grids/create-rows.md deleted file mode 100644 index cea67913b4..0000000000 --- a/docs/references/grids/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/grids/create-string-column.md b/docs/references/grids/create-string-column.md deleted file mode 100644 index 7395e26a11..0000000000 --- a/docs/references/grids/create-string-column.md +++ /dev/null @@ -1 +0,0 @@ -Create a string column. diff --git a/docs/references/grids/create-table.md b/docs/references/grids/create-table.md deleted file mode 100644 index 263638ea00..0000000000 --- a/docs/references/grids/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/grids/create-url-column.md b/docs/references/grids/create-url-column.md deleted file mode 100644 index e731d758ce..0000000000 --- a/docs/references/grids/create-url-column.md +++ /dev/null @@ -1 +0,0 @@ -Create a URL column. diff --git a/docs/references/grids/decrement-row-column.md b/docs/references/grids/decrement-row-column.md deleted file mode 100644 index b7b32d6148..0000000000 --- a/docs/references/grids/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/grids/delete-column.md b/docs/references/grids/delete-column.md deleted file mode 100644 index efba8b1d77..0000000000 --- a/docs/references/grids/delete-column.md +++ /dev/null @@ -1 +0,0 @@ -Deletes a column. \ No newline at end of file diff --git a/docs/references/grids/delete-row.md b/docs/references/grids/delete-row.md deleted file mode 100644 index c0b9dfbdaf..0000000000 --- a/docs/references/grids/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/grids/delete-rows.md b/docs/references/grids/delete-rows.md deleted file mode 100644 index 9d5189ce76..0000000000 --- a/docs/references/grids/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/grids/delete-table.md b/docs/references/grids/delete-table.md deleted file mode 100644 index ad74ca3233..0000000000 --- a/docs/references/grids/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/grids/get-column.md b/docs/references/grids/get-column.md deleted file mode 100644 index cd8b8797a9..0000000000 --- a/docs/references/grids/get-column.md +++ /dev/null @@ -1 +0,0 @@ -Get column by 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 deleted file mode 100644 index 1d494ed53e..0000000000 --- a/docs/references/grids/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/grids/get-row.md b/docs/references/grids/get-row.md deleted file mode 100644 index 6a30fa472c..0000000000 --- a/docs/references/grids/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/grids/get-table-logs.md b/docs/references/grids/get-table-logs.md deleted file mode 100644 index 8b00c7f317..0000000000 --- a/docs/references/grids/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/grids/get-table-usage.md b/docs/references/grids/get-table-usage.md deleted file mode 100644 index 08e28af0a6..0000000000 --- a/docs/references/grids/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/grids/get-table.md b/docs/references/grids/get-table.md deleted file mode 100644 index 67b8428431..0000000000 --- a/docs/references/grids/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/grids/increment-row-column.md b/docs/references/grids/increment-row-column.md deleted file mode 100644 index 7a19b3fbc7..0000000000 --- a/docs/references/grids/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/grids/list-columns.md b/docs/references/grids/list-columns.md deleted file mode 100644 index aacf373082..0000000000 --- a/docs/references/grids/list-columns.md +++ /dev/null @@ -1 +0,0 @@ -List columns in the table. \ 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/list-rows.md b/docs/references/grids/list-rows.md deleted file mode 100644 index 68185fc192..0000000000 --- a/docs/references/grids/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/grids/list-tables.md b/docs/references/grids/list-tables.md deleted file mode 100644 index e14795eeac..0000000000 --- a/docs/references/grids/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/grids/update-boolean-column.md b/docs/references/grids/update-boolean-column.md deleted file mode 100644 index f5167d97b6..0000000000 --- a/docs/references/grids/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/grids/update-datetime-column.md b/docs/references/grids/update-datetime-column.md deleted file mode 100644 index e793b41921..0000000000 --- a/docs/references/grids/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/grids/update-email-column.md b/docs/references/grids/update-email-column.md deleted file mode 100644 index 0db17e29bd..0000000000 --- a/docs/references/grids/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/grids/update-enum-column.md b/docs/references/grids/update-enum-column.md deleted file mode 100644 index df172cbc38..0000000000 --- a/docs/references/grids/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/grids/update-float-column.md b/docs/references/grids/update-float-column.md deleted file mode 100644 index 4e0eb9ddb2..0000000000 --- a/docs/references/grids/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/grids/update-integer-column.md b/docs/references/grids/update-integer-column.md deleted file mode 100644 index 0f2a07ea6e..0000000000 --- a/docs/references/grids/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/grids/update-ip-column.md b/docs/references/grids/update-ip-column.md deleted file mode 100644 index 115c87a7e1..0000000000 --- a/docs/references/grids/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/grids/update-relationship-column.md b/docs/references/grids/update-relationship-column.md deleted file mode 100644 index dfdcd8ae5a..0000000000 --- a/docs/references/grids/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/grids/update-row.md b/docs/references/grids/update-row.md deleted file mode 100644 index b532ea411d..0000000000 --- a/docs/references/grids/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/grids/update-rows.md b/docs/references/grids/update-rows.md deleted file mode 100644 index 334b91aec1..0000000000 --- a/docs/references/grids/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/grids/update-string-column.md b/docs/references/grids/update-string-column.md deleted file mode 100644 index 617214b4c9..0000000000 --- a/docs/references/grids/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/grids/update-table.md b/docs/references/grids/update-table.md deleted file mode 100644 index bbd676d3b8..0000000000 --- a/docs/references/grids/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/grids/update-url-column.md b/docs/references/grids/update-url-column.md deleted file mode 100644 index 6080d71509..0000000000 --- a/docs/references/grids/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/grids/upsert-row.md b/docs/references/grids/upsert-row.md deleted file mode 100644 index 1132afd53c..0000000000 --- a/docs/references/grids/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/grids/upsert-rows.md b/docs/references/grids/upsert-rows.md deleted file mode 100644 index 21aa3da1ef..0000000000 --- a/docs/references/grids/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. diff --git a/docs/references/databases/create-boolean-column.md b/docs/references/tablesdb/create-boolean-column.md similarity index 100% rename from docs/references/databases/create-boolean-column.md rename to docs/references/tablesdb/create-boolean-column.md diff --git a/docs/references/databases/create-datetime-column.md b/docs/references/tablesdb/create-datetime-column.md similarity index 100% rename from docs/references/databases/create-datetime-column.md rename to docs/references/tablesdb/create-datetime-column.md diff --git a/docs/references/databases/create-email-column.md b/docs/references/tablesdb/create-email-column.md similarity index 100% rename from docs/references/databases/create-email-column.md rename to docs/references/tablesdb/create-email-column.md diff --git a/docs/references/databases/create-enum-column.md b/docs/references/tablesdb/create-enum-column.md similarity index 100% rename from docs/references/databases/create-enum-column.md rename to docs/references/tablesdb/create-enum-column.md diff --git a/docs/references/databases/create-float-column.md b/docs/references/tablesdb/create-float-column.md similarity index 100% rename from docs/references/databases/create-float-column.md rename to docs/references/tablesdb/create-float-column.md diff --git a/docs/references/grids/create-index.md b/docs/references/tablesdb/create-index.md similarity index 71% rename from docs/references/grids/create-index.md rename to docs/references/tablesdb/create-index.md index 6ce853a217..b0920a74a5 100644 --- a/docs/references/grids/create-index.md +++ b/docs/references/tablesdb/create-index.md @@ -1,2 +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 +Type can be `key`, `fulltext`, or `unique`. \ No newline at end of file diff --git a/docs/references/databases/create-integer-column.md b/docs/references/tablesdb/create-integer-column.md similarity index 100% rename from docs/references/databases/create-integer-column.md rename to docs/references/tablesdb/create-integer-column.md diff --git a/docs/references/databases/create-ip-column.md b/docs/references/tablesdb/create-ip-column.md similarity index 100% rename from docs/references/databases/create-ip-column.md rename to docs/references/tablesdb/create-ip-column.md diff --git a/docs/references/databases/create-relationship-column.md b/docs/references/tablesdb/create-relationship-column.md similarity index 100% rename from docs/references/databases/create-relationship-column.md rename to docs/references/tablesdb/create-relationship-column.md diff --git a/docs/references/databases/create-row.md b/docs/references/tablesdb/create-row.md similarity index 56% rename from docs/references/databases/create-row.md rename to docs/references/tablesdb/create-row.md index a07abfa04d..9b25555eeb 100644 --- a/docs/references/databases/create-row.md +++ b/docs/references/tablesdb/create-row.md @@ -1 +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 +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/tablesdb#tablesDBCreateTable) 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/tablesdb/create-rows.md similarity index 57% rename from docs/references/databases/create-rows.md rename to docs/references/tablesdb/create-rows.md index cea67913b4..6a19d7bc9f 100644 --- a/docs/references/databases/create-rows.md +++ b/docs/references/tablesdb/create-rows.md @@ -1 +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 +Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) 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/tablesdb/create-string-column.md similarity index 100% rename from docs/references/databases/create-string-column.md rename to docs/references/tablesdb/create-string-column.md diff --git a/docs/references/databases/create-table.md b/docs/references/tablesdb/create-table.md similarity index 55% rename from docs/references/databases/create-table.md rename to docs/references/tablesdb/create-table.md index 263638ea00..006e8794df 100644 --- a/docs/references/databases/create-table.md +++ b/docs/references/tablesdb/create-table.md @@ -1 +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 +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/tablesdb#tablesDBCreateTable) 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/tablesdb/create-url-column.md similarity index 100% rename from docs/references/databases/create-url-column.md rename to docs/references/tablesdb/create-url-column.md diff --git a/docs/references/grids/create-database.md b/docs/references/tablesdb/create.md similarity index 100% rename from docs/references/grids/create-database.md rename to docs/references/tablesdb/create.md diff --git a/docs/references/databases/decrement-row-column.md b/docs/references/tablesdb/decrement-row-column.md similarity index 100% rename from docs/references/databases/decrement-row-column.md rename to docs/references/tablesdb/decrement-row-column.md diff --git a/docs/references/databases/delete-column.md b/docs/references/tablesdb/delete-column.md similarity index 100% rename from docs/references/databases/delete-column.md rename to docs/references/tablesdb/delete-column.md diff --git a/docs/references/grids/delete-index.md b/docs/references/tablesdb/delete-index.md similarity index 100% rename from docs/references/grids/delete-index.md rename to docs/references/tablesdb/delete-index.md diff --git a/docs/references/databases/delete-row.md b/docs/references/tablesdb/delete-row.md similarity index 100% rename from docs/references/databases/delete-row.md rename to docs/references/tablesdb/delete-row.md diff --git a/docs/references/databases/delete-rows.md b/docs/references/tablesdb/delete-rows.md similarity index 100% rename from docs/references/databases/delete-rows.md rename to docs/references/tablesdb/delete-rows.md diff --git a/docs/references/databases/delete-table.md b/docs/references/tablesdb/delete-table.md similarity index 100% rename from docs/references/databases/delete-table.md rename to docs/references/tablesdb/delete-table.md diff --git a/docs/references/grids/delete-database.md b/docs/references/tablesdb/delete.md similarity index 100% rename from docs/references/grids/delete-database.md rename to docs/references/tablesdb/delete.md diff --git a/docs/references/databases/get-column.md b/docs/references/tablesdb/get-column.md similarity index 100% rename from docs/references/databases/get-column.md rename to docs/references/tablesdb/get-column.md diff --git a/docs/references/grids/get-database-usage.md b/docs/references/tablesdb/get-database-usage.md similarity index 100% rename from docs/references/grids/get-database-usage.md rename to docs/references/tablesdb/get-database-usage.md diff --git a/docs/references/grids/get-database.md b/docs/references/tablesdb/get-database.md similarity index 100% rename from docs/references/grids/get-database.md rename to docs/references/tablesdb/get-database.md diff --git a/docs/references/grids/get-index.md b/docs/references/tablesdb/get-index.md similarity index 100% rename from docs/references/grids/get-index.md rename to docs/references/tablesdb/get-index.md diff --git a/docs/references/grids/get-logs.md b/docs/references/tablesdb/get-logs.md similarity index 100% rename from docs/references/grids/get-logs.md rename to docs/references/tablesdb/get-logs.md diff --git a/docs/references/databases/get-row-logs.md b/docs/references/tablesdb/get-row-logs.md similarity index 100% rename from docs/references/databases/get-row-logs.md rename to docs/references/tablesdb/get-row-logs.md diff --git a/docs/references/databases/get-row.md b/docs/references/tablesdb/get-row.md similarity index 100% rename from docs/references/databases/get-row.md rename to docs/references/tablesdb/get-row.md diff --git a/docs/references/databases/get-table-logs.md b/docs/references/tablesdb/get-table-logs.md similarity index 100% rename from docs/references/databases/get-table-logs.md rename to docs/references/tablesdb/get-table-logs.md diff --git a/docs/references/databases/get-table-usage.md b/docs/references/tablesdb/get-table-usage.md similarity index 100% rename from docs/references/databases/get-table-usage.md rename to docs/references/tablesdb/get-table-usage.md diff --git a/docs/references/databases/get-table.md b/docs/references/tablesdb/get-table.md similarity index 100% rename from docs/references/databases/get-table.md rename to docs/references/tablesdb/get-table.md diff --git a/docs/references/tablesdb/get.md b/docs/references/tablesdb/get.md new file mode 100644 index 0000000000..24183f6f6b --- /dev/null +++ b/docs/references/tablesdb/get.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/databases/increment-row-column.md b/docs/references/tablesdb/increment-row-column.md similarity index 100% rename from docs/references/databases/increment-row-column.md rename to docs/references/tablesdb/increment-row-column.md diff --git a/docs/references/databases/list-columns.md b/docs/references/tablesdb/list-columns.md similarity index 100% rename from docs/references/databases/list-columns.md rename to docs/references/tablesdb/list-columns.md diff --git a/docs/references/tablesdb/list-indexes.md b/docs/references/tablesdb/list-indexes.md new file mode 100644 index 0000000000..598187558d --- /dev/null +++ b/docs/references/tablesdb/list-indexes.md @@ -0,0 +1 @@ +List indexes on the table. \ No newline at end of file diff --git a/docs/references/databases/list-rows.md b/docs/references/tablesdb/list-rows.md similarity index 100% rename from docs/references/databases/list-rows.md rename to docs/references/tablesdb/list-rows.md diff --git a/docs/references/databases/list-tables.md b/docs/references/tablesdb/list-tables.md similarity index 100% rename from docs/references/databases/list-tables.md rename to docs/references/tablesdb/list-tables.md diff --git a/docs/references/grids/list-database-usage.md b/docs/references/tablesdb/list-usage.md similarity index 100% rename from docs/references/grids/list-database-usage.md rename to docs/references/tablesdb/list-usage.md diff --git a/docs/references/grids/list-databases.md b/docs/references/tablesdb/list.md similarity index 100% rename from docs/references/grids/list-databases.md rename to docs/references/tablesdb/list.md diff --git a/docs/references/databases/update-boolean-column.md b/docs/references/tablesdb/update-boolean-column.md similarity index 100% rename from docs/references/databases/update-boolean-column.md rename to docs/references/tablesdb/update-boolean-column.md diff --git a/docs/references/databases/update-datetime-column.md b/docs/references/tablesdb/update-datetime-column.md similarity index 100% rename from docs/references/databases/update-datetime-column.md rename to docs/references/tablesdb/update-datetime-column.md diff --git a/docs/references/databases/update-email-column.md b/docs/references/tablesdb/update-email-column.md similarity index 100% rename from docs/references/databases/update-email-column.md rename to docs/references/tablesdb/update-email-column.md diff --git a/docs/references/databases/update-enum-column.md b/docs/references/tablesdb/update-enum-column.md similarity index 100% rename from docs/references/databases/update-enum-column.md rename to docs/references/tablesdb/update-enum-column.md diff --git a/docs/references/databases/update-float-column.md b/docs/references/tablesdb/update-float-column.md similarity index 100% rename from docs/references/databases/update-float-column.md rename to docs/references/tablesdb/update-float-column.md diff --git a/docs/references/databases/update-integer-column.md b/docs/references/tablesdb/update-integer-column.md similarity index 100% rename from docs/references/databases/update-integer-column.md rename to docs/references/tablesdb/update-integer-column.md diff --git a/docs/references/databases/update-ip-column.md b/docs/references/tablesdb/update-ip-column.md similarity index 100% rename from docs/references/databases/update-ip-column.md rename to docs/references/tablesdb/update-ip-column.md diff --git a/docs/references/databases/update-relationship-column.md b/docs/references/tablesdb/update-relationship-column.md similarity index 100% rename from docs/references/databases/update-relationship-column.md rename to docs/references/tablesdb/update-relationship-column.md diff --git a/docs/references/databases/update-row.md b/docs/references/tablesdb/update-row.md similarity index 100% rename from docs/references/databases/update-row.md rename to docs/references/tablesdb/update-row.md diff --git a/docs/references/databases/update-rows.md b/docs/references/tablesdb/update-rows.md similarity index 100% rename from docs/references/databases/update-rows.md rename to docs/references/tablesdb/update-rows.md diff --git a/docs/references/databases/update-string-column.md b/docs/references/tablesdb/update-string-column.md similarity index 100% rename from docs/references/databases/update-string-column.md rename to docs/references/tablesdb/update-string-column.md diff --git a/docs/references/databases/update-table.md b/docs/references/tablesdb/update-table.md similarity index 100% rename from docs/references/databases/update-table.md rename to docs/references/tablesdb/update-table.md diff --git a/docs/references/databases/update-url-column.md b/docs/references/tablesdb/update-url-column.md similarity index 100% rename from docs/references/databases/update-url-column.md rename to docs/references/tablesdb/update-url-column.md diff --git a/docs/references/grids/update-database.md b/docs/references/tablesdb/update.md similarity index 100% rename from docs/references/grids/update-database.md rename to docs/references/tablesdb/update.md diff --git a/docs/references/databases/upsert-row.md b/docs/references/tablesdb/upsert-row.md similarity index 55% rename from docs/references/databases/upsert-row.md rename to docs/references/tablesdb/upsert-row.md index 1132afd53c..26edd7ad04 100644 --- a/docs/references/databases/upsert-row.md +++ b/docs/references/tablesdb/upsert-row.md @@ -1 +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 +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/tablesdb#tablesDBCreateTable) 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/tablesdb/upsert-rows.md similarity index 55% rename from docs/references/databases/upsert-rows.md rename to docs/references/tablesdb/upsert-rows.md index 21aa3da1ef..f980d8c30d 100644 --- a/docs/references/databases/upsert-rows.md +++ b/docs/references/tablesdb/upsert-rows.md @@ -1 +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. +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/tablesdb#tablesDBCreateTable) API or directly from your database console. diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index 1972a122e3..9a0b94a85d 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -1,5 +1,27 @@ # Change Log +## 17.0.0 + +* Support for Appwrite 1.8 +* Added TablesDB service +* Added new query types: + * `notContains` + * `notSearch` + * `notBetween` + * `notStartsWith` + * `notEndsWith` + * `createdBefore` + * `createdAfter` + * `updatedBefore` + * `updatedAfter` +* Deprecated `updateMagicURLSession` +* Deprecated `updatePhoneSession` +* Deprecated Databases service +> The TablesDB service is the new recommended way to work with databases. +> Existing databases/collections/attributes/documents can be managed using the TablesDB service. +> Existing Databases service will continue to work, but new features may only be added to the TablesDB service. + + ## 16.2.0 * Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service diff --git a/docs/sdks/dart/EXAMPLES.md b/docs/sdks/dart/EXAMPLES.md new file mode 100644 index 0000000000..6de057486a --- /dev/null +++ b/docs/sdks/dart/EXAMPLES.md @@ -0,0 +1,58 @@ +@@ -1,62 +0,0 @@ +# Examples + +Init your Appwrite client: + +```dart +Client client = Client(); + +client + .setProject('<YOUR_PROJECT_ID>') + .setKey('<YOUR_API_KEY>'); +``` + +Create a new user: + +```dart +Users users = Users(client); + +User result = await users.create( + userId: ID.unique(), + email: "email@example.com", + phone: "+123456789", + password: "password", + name: "Walter O'Brien" +); +``` + +Get user: + +```dart +Users users = Users(client); + +User user = await users.get( + userId: '[USER_ID]', +); +``` + +Upload File: + +```dart +Storage storage = Storage(client); + +InputFile input = InputFile( + path: './path-to-file/image.jpg', + filename: 'image.jpg', +); + +File file = await storage.createFile( + bucketId: '<YOUR_BUCKET_ID>', + fileId: ID.unique(), + file: input, + permissions: [ + Permission.read(Role.any()), + ], +); +``` + +All examples and API features are available at the [official Appwrite docs](https://appwrite.io/docs) diff --git a/docs/sdks/dart/GETTING_STARTED.md b/docs/sdks/dart/GETTING_STARTED.md index a1dd4b5c4e..1df40dd2ff 100644 --- a/docs/sdks/dart/GETTING_STARTED.md +++ b/docs/sdks/dart/GETTING_STARTED.md @@ -4,38 +4,29 @@ Once you add the dependencies, its extremely easy to get started with the SDK; All you need to do is import the package in your code, set your Appwrite credentials, and start making API calls. Below is a simple example: ```dart -import 'package:dart_appwrite/dart_appwrite.dart'; +Client client = Client() + .setProject('<YOUR_PROJECT_ID>') + .setKey('<YOUR_API_KEY>'); -void main() async { - Client client = Client() - .setEndpoint('http://[HOSTNAME_OR_IP]/v1') // Make sure your endpoint is accessible - .setProject('5ff3379a01d25') // Your project ID - .setKey('cd868c7af8bdc893b4...93b7535db89') - .setSelfSigned(); // Use only on dev mode with a self-signed SSL cert +Users users = Users(client); - Users users = Users(client); - - try { - final user = await users.create(userId: ID.unique(), email: "email@example.com", phone: "+123456789", password: "password", name: "Walter O'Brien"); - print(user.toMap()); - } on AppwriteException catch(e) { - print(e.message); - } -} +User user = await users.create( + userId: ID.unique(), + email: 'email@example.com', + phone: '+123456789', + password: 'password', + name: 'Walter O'Brien' +); ``` ### Error handling The Appwrite Dart SDK raises `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching `AppwriteException` and present the `message` to the user or handle it yourself based on the provided error information. Below is an example. ```dart -Users users = Users(client); - try { - final user = await users.create(userId: ID.unique(), email: "email@example.com", phone: "+123456789", password: "password", name: "Walter O'Brien"); - print(user.toMap()); + User user = await users.create(...); } on AppwriteException catch(e) { - //show message to user or do other operation based on error as required - print(e.message); + // Handle the error } ``` diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index 9a291e24b2..9794709ed7 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -1,5 +1,26 @@ # Change Log +## 18.0.0 + +* Support for Appwrite 1.8 +* Added TablesDB service +* Added new query types: + * `notContains` + * `notSearch` + * `notBetween` + * `notStartsWith` + * `notEndsWith` + * `createdBefore` + * `createdAfter` + * `updatedBefore` + * `updatedAfter` +* Deprecated `updateMagicURLSession` +* Deprecated `updatePhoneSession` +* Deprecated Databases service +> The TablesDB service is the new recommended way to work with databases. +> Existing databases/collections/attributes/documents can be managed using the TablesDB service. +> Existing Databases service will continue to work, but new features may only be added to the TablesDB service. + ## 17.1.0 * Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service diff --git a/docs/sdks/flutter/GETTING_STARTED.md b/docs/sdks/flutter/GETTING_STARTED.md index c3a1a8d33d..75cf9de1af 100644 --- a/docs/sdks/flutter/GETTING_STARTED.md +++ b/docs/sdks/flutter/GETTING_STARTED.md @@ -17,7 +17,7 @@ In order to capture the Appwrite OAuth callback url, the following activity need .... <application ...> .... - <!-- Add this inside the <application> tag, along side the existing <activity> tags --> + <!-- Add this inside the <application> tag, alongside the existing <activity> tags --> <activity android:exported="true" android:name="com.linusu.flutter_web_auth_2.CallbackActivity" > <intent-filter android:label="flutter_web_auth_2"> <action android:name="android.intent.action.VIEW" /> @@ -43,8 +43,8 @@ The Appwrite SDK uses ASWebAuthenticationSession on iOS 12+ and SFAuthentication ### Linux For **Linux** add your app <u>name</u> and <u>package name</u>, Your package name is generally the **name** in your <a href="https://github.com/appwrite/playground-for-flutter/blob/0fdbdff98384fff940ed0b1e08cf14cfe3a2be3e/pubspec.yaml#L1" target="_blank" rel="noopener">pubspec.yaml<a> file. If you cannot find the correct package name, run the application in linux, and make any request with proper exception handling, you should get the application ID needed to add in the received error message. -### Mac OS -For **Mac OS** add your app name and Bundle ID, You can find your Bundle Identifier in the General tab for your app's primary target in Xcode. +### macOS +For **macOS** add your app name and Bundle ID, You can find your Bundle Identifier in the General tab for your app's primary target in Xcode. The Appwrite SDK uses ASWebAuthenticationSession on macOS 10.15+ to allow OAuth authentication. You have to change your macOS Deployment Target in Xcode to be macOS >= 10.15 to be able to build your app for macOS. @@ -88,77 +88,53 @@ For **Windows** add your app <u>name</u> and <u>package name</u>, Your package n ### Init your SDK -<p>Initialize your SDK with your Appwrite server API endpoint and project ID, which can be found in your project settings page. +<p>Initialize your SDK with your project ID, which can be found in your project settings page. ```dart -import 'package:appwrite/appwrite.dart'; - -void main() { - Client client = Client(); - - client - .setEndpoint('https://localhost/v1') // Your Appwrite Endpoint - .setProject('5e8cf4f46b5e8') // Your project ID - .setSelfSigned() // Use only on dev mode with a self-signed SSL cert - ; -} +Client client = Client().setProject('<YOUR_PROJECT_ID>'); ``` -Before starting to send any API calls to your new Appwrite instance, make sure your Android or iOS emulators has network access to the Appwrite server hostname or IP address. - -When trying to connect to Appwrite from an emulator or a mobile device, localhost is the hostname for the device or emulator and not your local Appwrite instance. You should replace localhost with your private IP as the Appwrite endpoint's hostname. You can also use a service like [ngrok](https://ngrok.com/) to proxy the Appwrite API. +> If using a self-hosted instance, you will also need to set your Appwrite endpoint using the `setEndpoint` method. Before starting to send any API calls to your new Appwrite instance, make sure your Android or iOS emulators has network access to the Appwrite server hostname or IP address. +> When trying to connect to a local Appwrite instance from an emulator or a mobile device, localhost is the hostname for the device or emulator and not your machine. You should replace localhost with your machine's private IP as the Appwrite endpoint's hostname (e.g. 192.168.1.100). You can also use a service like [ngrok](https://ngrok.com/) to proxy the Appwrite API. ### Make Your First Request <p>Once your SDK object is set, access any of the Appwrite services and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the [API References](https://appwrite.io/docs) section. ```dart -// Register User Account account = Account(client); -final user = await account - .create( - userId: ID.unique(), email: "email@example.com", password: "password", name: "Walter O'Brien" - ); + +User user = await account.create( + userId: ID.unique(), + email: 'email@example.com', + password: 'password', + name: 'Walter O'Brien', +); ``` ### Full Example ```dart -import 'package:appwrite/appwrite.dart'; +Client client = Client().setProject('<YOUR_PROJECT_ID>>'); -void main() { - Client client = Client(); +Account account = Account(client); - - client - .setEndpoint('https://localhost/v1') // Your Appwrite Endpoint - .setProject('5e8cf4f46b5e8') // Your project ID - .setSelfSigned() // Use only on dev mode with a self-signed SSL cert - ; - - - // Register User - Account account = Account(client); - - final user = await account - .create( - userId: ID.unique(), email: "email@example.com", password: "password", name: "Walter O'Brien" - ); -} +User user = await account.create( + userId: ID.unique(), + email: 'email@example.com', + password: 'password', + name: 'Walter O'Brien' +); ``` ### Error Handling The Appwrite Flutter SDK raises `AppwriteException` object with `message`, `type`, `code` and `response` properties. You can handle any errors by catching `AppwriteException` and present the `message` to the user or handle it yourself based on the provided error information. Below is an example. ```dart -Account account = Account(client); - try { - final user = await account.create(userId: ID.unique(), email: "email@example.com", password: "password", name: "Walter O'Brien"); - print(user.toMap()); + User user = await account.create(...); } on AppwriteException catch(e) { - //show message to user or do other operation based on error as required - print(e.message); + // Handle the exception } ``` diff --git a/docs/services/tables.md b/docs/services/tables.md deleted file mode 100644 index f0c252db30..0000000000 --- a/docs/services/tables.md +++ /dev/null @@ -1,7 +0,0 @@ -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 diff --git a/docs/services/tablesdb.md b/docs/services/tablesdb.md new file mode 100644 index 0000000000..b64fb92e34 --- /dev/null +++ b/docs/services/tablesdb.md @@ -0,0 +1,7 @@ +The TablesDB 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 TablesDB service are represented as structured JSON objects. + +The TablesDB 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 diff --git a/phpunit.xml b/phpunit.xml index 598b730908..4c4e55ea4e 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -6,7 +6,7 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" - stopOnFailure="true" + stopOnFailure="false" > <extensions> <extension class="Appwrite\Tests\TestHook" /> diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 2465623d18..558f402ea2 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -134,6 +134,7 @@ class Exception extends \Exception public const AVATAR_IMAGE_NOT_FOUND = 'avatar_image_not_found'; public const AVATAR_REMOTE_URL_FAILED = 'avatar_remote_url_failed'; public const AVATAR_ICON_NOT_FOUND = 'avatar_icon_not_found'; + public const AVATAR_SVG_SANITIZATION_FAILED = 'avatar_svg_sanitization_failed'; /** Storage */ public const STORAGE_FILE_ALREADY_EXISTS = 'storage_file_already_exists'; diff --git a/src/Appwrite/Platform/Action.php b/src/Appwrite/Platform/Action.php index e5a7cf7984..5699a67ff2 100644 --- a/src/Appwrite/Platform/Action.php +++ b/src/Appwrite/Platform/Action.php @@ -2,6 +2,8 @@ namespace Appwrite\Platform; +use Appwrite\Utopia\Request; +use Appwrite\Utopia\Response; use Swoole\Coroutine as Co; use Utopia\CLI\Console; use Utopia\Database\Database; @@ -25,6 +27,14 @@ class Action extends UtopiaAction 'subQueryVariables', // Sites ]; + /** + * Attributes to remove from relationship path documents per API + * Default is empty - APIs should set their specific attributes + * + * @var array + */ + protected array $removableAttributes = []; + /** * Foreach Document * Call provided callback for each document in the collection @@ -149,4 +159,45 @@ class Action extends UtopiaAction Console::info("[" . DateTime::now() . "] " . $method . ' ' . $type . ' ' . $project->getSequence() . ' ' . $project->getId() . ' ' . $collectionId . ' ' . $log); } } + + + /** + * Helper to apply (request) select queries to response model. + * + * This prevents default values of rules to be presnet for not-selected attributes + * + * @param Request $request + * @param Document $document + * @return void + */ + public function applySelectQueries(Request $request, Response $response, string $model): void + { + $queries = $request->getParam('queries', []); + + $queries = Query::parseQueries($queries); + $selectQueries = Query::groupByType($queries)['selections'] ?? []; + + // No select queries means no filtering out + if (empty($selectQueries)) { + return; + } + + $attributes = []; + foreach ($selectQueries as $query) { + foreach ($query->getValues() as $attribute) { + $attributes[] = $attribute; + } + } + + $responseModel = $response->getModel($model); + foreach ($responseModel->getRules() as $ruleName => $rule) { + if (\str_starts_with($ruleName, '$')) { + continue; + } + + if (!\in_array($ruleName, $attributes)) { + $responseModel->removeRule($ruleName); + } + } + } } diff --git a/src/Appwrite/Platform/Modules/Compute/Base.php b/src/Appwrite/Platform/Modules/Compute/Base.php index e58f2b8664..92805fbaf8 100644 --- a/src/Appwrite/Platform/Modules/Compute/Base.php +++ b/src/Appwrite/Platform/Modules/Compute/Base.php @@ -4,6 +4,7 @@ namespace Appwrite\Platform\Modules\Compute; use Appwrite\Event\Build; use Appwrite\Extend\Exception; +use Appwrite\Platform\Action; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Exception\Duplicate; @@ -11,7 +12,6 @@ use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; -use Utopia\Platform\Action; use Utopia\Swoole\Request; use Utopia\System\System; use Utopia\VCS\Adapter\Git\GitHub; diff --git a/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php b/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php index 114a24ef22..b67a42adb1 100644 --- a/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php +++ b/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php @@ -11,9 +11,11 @@ use Appwrite\Utopia\Response; use Utopia\Database\Database; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; +use Utopia\Domains\Domain as Domain; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -use Utopia\Validator\Domain; +use Utopia\System\System; +use Utopia\Validator\Domain as DomainValidator; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; @@ -67,10 +69,59 @@ class Get extends Action Database $dbForPlatform ) { if ($type === 'rules') { - $validator = new Domain($value); + $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); + $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); + + $restrictions = []; + if (!empty($sitesDomain)) { + // Ensure site domains are exactly 1 subdomain, and dont start with reserved prefix + $domainLevel = \count(\explode('.', $sitesDomain)); + $restrictions[] = DomainValidator::createRestriction($sitesDomain, $domainLevel + 1, ['commit-', 'branch-']); + } + if (!empty($functionsDomain)) { + // Ensure function domains are exactly 1 subdomain + $domainLevel = \count(\explode('.', $functionsDomain)); + $restrictions[] = DomainValidator::createRestriction($functionsDomain, $domainLevel + 1); + } + $validator = new DomainValidator($restrictions); if (!$validator->isValid($value)) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $validator->getDescription()); + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); + } + + $deniedDomains = [ + 'localhost', + APP_HOSTNAME_INTERNAL + ]; + + $mainDomain = System::getEnv('_APP_DOMAIN', ''); + $deniedDomains[] = $mainDomain; + + if (!empty($sitesDomain)) { + $deniedDomains[] = $sitesDomain; + } + + if (!empty($functionsDomain)) { + $deniedDomains[] = $functionsDomain; + } + + $denyListDomains = System::getEnv('_APP_CUSTOM_DOMAIN_DENY_LIST', ''); + $denyListDomains = \array_map('trim', explode(',', $denyListDomains)); + foreach ($denyListDomains as $denyListDomain) { + if (empty($denyListDomain)) { + continue; + } + $deniedDomains[] = $denyListDomain; + } + + if (\in_array($value, $deniedDomains)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); + } + + try { + $domain = new Domain($value); + } catch (\Throwable) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Domain may not start with http:// or https://.'); } $document = Authorization::skip(fn () => $dbForPlatform->findOne('rules', [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Action.php new file mode 100644 index 0000000000..884b9c5589 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Action.php @@ -0,0 +1,23 @@ +<?php + +namespace Appwrite\Platform\Modules\Databases\Http\Databases; + +use Utopia\Platform\Action as UtopiaAction; + +class Action extends UtopiaAction +{ + private string $context = 'legacy'; + + public function getDatabaseType(): string + { + return $this->context; + } + + public function setHttpPath(string $path): UtopiaAction + { + if (\str_contains($path, '/tablesdb')) { + $this->context = 'tablesdb'; + } + return parent::setHttpPath($path); + } +} 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 e7c9814655..0939376c49 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php @@ -20,17 +20,16 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/grids/tables')) { + if (\str_contains($path, '/tablesdb')) { $this->context = TABLES; } - return parent::setHttpPath($path); } /** * Get the current API context. */ - final protected function getContext(): string + protected function getContext(): string { return $this->context; } @@ -38,7 +37,7 @@ abstract class Action extends UtopiaAction /** * Get the key used in event parameters (e.g., 'collectionId' or 'tableId'). */ - final protected function getEventsParamKey(): string + protected function getEventsParamKey(): string { return $this->getContext() . 'Id'; } @@ -46,7 +45,7 @@ abstract class Action extends UtopiaAction /** * Determine if the current action is for the Collections API. */ - final protected function isCollectionsAPI(): bool + protected function isCollectionsAPI(): bool { return $this->getContext() === COLLECTIONS; } @@ -54,7 +53,7 @@ abstract class Action extends UtopiaAction /** * Get the SDK group name for the current action. */ - final protected function getSdkGroup(): string + protected function getSdkGroup(): string { return $this->isCollectionsAPI() ? 'collections' : 'tables'; } @@ -62,15 +61,15 @@ abstract class Action extends UtopiaAction /** * Get the SDK namespace for the current action. */ - final protected function getSdkNamespace(): string + protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'grids'; + return $this->isCollectionsAPI() ? 'databases' : 'tablesDB'; } /** * Get the exception to throw when the resource already exists. */ - final protected function getDuplicateException(): string + protected function getDuplicateException(): string { return $this->isCollectionsAPI() ? Exception::COLLECTION_ALREADY_EXISTS @@ -80,7 +79,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate index invalid exception. */ - final protected function getInvalidIndexException(): string + protected function getInvalidIndexException(): string { return $this->isCollectionsAPI() ? Exception::INDEX_INVALID @@ -90,7 +89,7 @@ abstract class Action extends UtopiaAction /** * Get the exception to throw when the resource is not found. */ - final protected function getNotFoundException(): string + protected function getNotFoundException(): string { return $this->isCollectionsAPI() ? Exception::COLLECTION_NOT_FOUND @@ -100,7 +99,7 @@ abstract class Action extends UtopiaAction /** * Get the exception to throw when the resource limit is exceeded. */ - final protected function getLimitException(): string + protected function getLimitException(): string { return $this->isCollectionsAPI() ? Exception::COLLECTION_LIMIT_EXCEEDED 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 765741ef41..bb536bc498 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,17 +37,16 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/grids/tables')) { + if (\str_contains($path, '/tablesdb')) { $this->context = COLUMNS; } - return parent::setHttpPath($path); } /** * Get the current context. */ - final protected function getContext(): string + protected function getContext(): string { return $this->context; } @@ -55,7 +54,7 @@ abstract class Action extends UtopiaAction /** * Returns true if current context is Collections API. */ - final protected function isCollectionsAPI(): bool + protected function isCollectionsAPI(): bool { // columns in tables context // attributes in collections context @@ -67,7 +66,7 @@ abstract class Action extends UtopiaAction * * Can be used for XList operations as well! */ - final protected function getSdkGroup(): string + protected function getSdkGroup(): string { return $this->isCollectionsAPI() ? 'attributes' : 'columns'; } @@ -75,15 +74,15 @@ abstract class Action extends UtopiaAction /** * Get the SDK namespace for the current action. */ - final protected function getSdkNamespace(): string + protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'grids'; + return $this->isCollectionsAPI() ? 'databases' : 'tablesDB'; } /** * Get the appropriate parent level not found exception. */ - final protected function getParentNotFoundException(): string + protected function getParentNotFoundException(): string { return $this->isCollectionsAPI() ? Exception::COLLECTION_NOT_FOUND @@ -93,7 +92,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate not found exception. */ - final protected function getNotFoundException(): string + protected function getNotFoundException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_NOT_FOUND @@ -103,7 +102,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate not found exception. */ - final protected function getIndexDependencyException(): string + protected function getIndexDependencyException(): string { return $this->isCollectionsAPI() ? Exception::INDEX_DEPENDENCY @@ -113,7 +112,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate already exists exception. */ - final protected function getDuplicateException(): string + protected function getDuplicateException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_ALREADY_EXISTS @@ -123,7 +122,7 @@ abstract class Action extends UtopiaAction /** * Get the correct invalid structure message. */ - final protected function getInvalidStructureException(): string + protected function getInvalidStructureException(): string { return $this->isCollectionsAPI() ? Exception::DOCUMENT_INVALID_STRUCTURE @@ -133,7 +132,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate limit exceeded exception. */ - final protected function getLimitException(): string + protected function getLimitException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_LIMIT_EXCEEDED @@ -143,7 +142,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate index invalid exception. */ - final protected function getInvalidIndexException(): string + protected function getInvalidIndexException(): string { return $this->isCollectionsAPI() ? Exception::INDEX_INVALID @@ -153,7 +152,7 @@ abstract class Action extends UtopiaAction /** * Get the correct default unsupported message. */ - final protected function getDefaultUnsupportedException(): string + protected function getDefaultUnsupportedException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED @@ -163,7 +162,7 @@ abstract class Action extends UtopiaAction /** * Get the correct format unsupported message. */ - final protected function getFormatUnsupportedException(): string + protected function getFormatUnsupportedException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_FORMAT_UNSUPPORTED @@ -173,7 +172,7 @@ abstract class Action extends UtopiaAction /** * Get the exception for invalid type or format mismatch. */ - final protected function getTypeInvalidException(): string + protected function getTypeInvalidException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_TYPE_INVALID @@ -183,7 +182,7 @@ abstract class Action extends UtopiaAction /** * Get the exception for resizing invalid attributes/columns. */ - final protected function getInvalidResizeException(): string + protected function getInvalidResizeException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_INVALID_RESIZE @@ -193,7 +192,7 @@ abstract class Action extends UtopiaAction /** * Get the exception for invalid attributes/columns value. */ - final protected function getInvalidValueException(): string + protected function getInvalidValueException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_VALUE_INVALID @@ -203,7 +202,7 @@ abstract class Action extends UtopiaAction /** * Get the exception for non-available column/attribute. */ - final protected function getNotAvailableException(): string + protected function getNotAvailableException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_NOT_AVAILABLE @@ -213,7 +212,7 @@ abstract class Action extends UtopiaAction /** * Get the correct collections context for Events queue. */ - final protected function getCollectionsEventsContext(): string + protected function getCollectionsEventsContext(): string { return $this->isCollectionsAPI() ? 'collection' : 'table'; } @@ -221,7 +220,7 @@ abstract class Action extends UtopiaAction /** * Get the proper column/attribute type based on set context. */ - final protected function getModel(string $type, string $format): string + protected function getModel(string $type, string $format): string { $isCollections = $this->isCollectionsAPI(); @@ -273,7 +272,7 @@ abstract class Action extends UtopiaAction }; } - final protected function createAttribute(string $databaseId, string $collectionId, Document $attribute, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): Document + 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', ''); @@ -435,7 +434,7 @@ abstract class Action extends UtopiaAction 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 + 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)); @@ -615,14 +614,14 @@ abstract class Action extends UtopiaAction */ foreach ($collection->getAttribute('indexes') as $index) { /** - * @var string[] $attribute + * @var array<string> $attributes */ - $attribute = $index->getAttribute('attributes', []); - $found = \array_search($key, $attribute); + $attributes = $index->getAttribute('attributes', []); + $found = \array_search($key, $attributes); if ($found !== false) { - $attribute[$found] = $newKey; - $index->setAttribute('attributes', $attribute); + $attributes[$found] = $newKey; + $index->setAttribute('attributes', $attributes); $dbForProject->updateDocument('indexes', $index->getId(), $index); } } 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 ba44cf5900..6c4be252a0 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: 'grids.createBooleanColumn', + replaceWith: 'tablesDB.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 2c46e457b8..752e8c6c59 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: 'grids.updateBooleanColumn', + replaceWith: 'tablesDB.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 693b87726e..5d5b8fe4bf 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: 'grids.createDatetimeColumn', + replaceWith: 'tablesDB.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 3bc76b5ecb..e1d1d40f75 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: 'grids.updateDatetimeColumn', + replaceWith: 'tablesDB.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 c86bb956f9..8dec7530bf 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: 'grids.deleteColumn', + replaceWith: 'tablesDB.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 6638622bae..bc58ca10af 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: 'grids.createEmailColumn', + replaceWith: 'tablesDB.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 66d0e611b4..53300725d7 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: 'grids.updateEmailColumn', + replaceWith: 'tablesDB.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 414aa12e1b..cd22e87d1c 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: 'grids.createEnumColumn', + replaceWith: 'tablesDB.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 201af5c394..951e43effe 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: 'grids.updateEnumColumn', + replaceWith: 'tablesDB.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 4d2bb1f827..2a8253c22c 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: 'grids.createFloatColumn', + replaceWith: 'tablesDB.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 74e81210be..327a766cee 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: 'grids.updateFloatColumn', + replaceWith: 'tablesDB.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 5fedfc608a..28ee584778 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: 'grids.getColumn', + replaceWith: 'tablesDB.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 a022fe39a9..aa699b4a49 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: 'grids.createIpColumn', + replaceWith: 'tablesDB.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 70495b1755..f61cf21732 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: 'grids.updateIpColumn', + replaceWith: 'tablesDB.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 d7c345759d..81a11b0471 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: 'grids.createIntegerColumn', + replaceWith: 'tablesDB.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 c29f634114..11cfb24943 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: 'grids.updateIntegerColumn', + replaceWith: 'tablesDB.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 a4112bacd1..a062816329 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: 'grids.createRelationshipColumn', + replaceWith: 'tablesDB.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 b71d7175a0..c19c4ff046 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: 'grids.updateRelationshipColumn', + replaceWith: 'tablesDB.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 d3fa0a01dc..592aa8ee93 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: 'grids.createStringColumn', + replaceWith: 'tablesDB.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 e450abe88a..03efac1430 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: 'grids.updateStringColumn', + replaceWith: 'tablesDB.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 86474d4ca4..39153b3cb8 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: 'grids.createUrlColumn', + replaceWith: 'tablesDB.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 c3e6456c11..7ace4d0683 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: 'grids.updateUrlColumn', + replaceWith: 'tablesDB.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 7b01e7c4fa..1852290f76 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: 'grids.listColumns', + replaceWith: 'tablesDB.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 c3fdd372ee..e06dae89bb 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: 'grids.createTable', + replaceWith: 'tablesDB.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 f6755f7437..d20570fb43 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: 'grids.deleteTable', + replaceWith: 'tablesDB.deleteTable', ), )) ->param('databaseId', '', new UID(), 'Database ID.') 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 002c777dec..d1d0738990 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,12 +4,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documen use Appwrite\Event\Event; use Appwrite\Extend\Exception; +use Appwrite\Platform\Action as AppwriteAction; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; -use Utopia\Platform\Action as UtopiaAction; -abstract class Action extends UtopiaAction +abstract class Action extends AppwriteAction { /** * @var string|null The current context (either 'row' or 'document') @@ -21,12 +21,25 @@ abstract class Action extends UtopiaAction */ abstract protected function getResponseModel(): string; - public function setHttpPath(string $path): UtopiaAction + public function setHttpPath(string $path): AppwriteAction { - if (str_contains($path, '/:databaseId/grids/tables')) { + if (str_contains($path, '/tablesdb/')) { $this->context = ROWS; } + $contextId = '$' . $this->getCollectionsEventsContext() . 'Id'; + $this->removableAttributes = [ + '*' => [ + '$sequence', + '$databaseId', + $contextId, + ], + 'privileged' => [ + '$createdAt', + '$updatedAt', + ], + ]; + return parent::setHttpPath($path); } @@ -73,7 +86,7 @@ abstract class Action extends UtopiaAction */ protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'grids'; + return $this->isCollectionsAPI() ? 'databases' : 'tablesDB'; } /** @@ -192,6 +205,25 @@ abstract class Action extends UtopiaAction return $this->isCollectionsAPI() ? 'collection' : 'table'; } + /** + * Remove configured removable attributes from a document. + * Used for relationship path handling to remove API-specific attributes. + */ + protected function removeReadonlyAttributes( + Document|array $document, + bool $privileged = false, + ): Document|array { + foreach ($this->removableAttributes['*'] as $attribute) { + unset($document[$attribute]); + } + if (!$privileged) { + foreach ($this->removableAttributes['privileged'] ?? [] as $attribute) { + unset($document[$attribute]); + } + } + return $document; + } + /** * Resolves relationships in a document and attaches metadata. */ @@ -218,7 +250,7 @@ abstract class Action extends UtopiaAction $collectionId = $collection->getId(); $document->removeAttribute('$collection'); $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collectionId); + $document->setAttribute('$' . $this->getCollectionsEventsContext() . 'Id', $collectionId); $relationships = $collectionsCache[$collectionId] ??= \array_filter( $collection->getAttribute('attributes', []), 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 31f17388b9..39bb5b1f97 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 @@ -58,7 +58,7 @@ class Decrement extends Action group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/decrement-document-attribute.md', - auth: [AuthType::ADMIN, AuthType::KEY], + auth: [AuthType::SESSION, AuthType::JWT, AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, @@ -68,7 +68,7 @@ class Decrement extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.decrementRowColumn', + replaceWith: 'tablesDB.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 b87b4bdea1..0fa19f8370 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 @@ -58,7 +58,7 @@ class Increment extends Action group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/increment-document-attribute.md', - auth: [AuthType::ADMIN, AuthType::KEY], + auth: [AuthType::SESSION, AuthType::JWT, AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, @@ -68,7 +68,7 @@ class Increment extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.incrementRowColumn', + replaceWith: 'tablesDB.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 fedbf7d5b5..b57c047a8c 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 @@ -65,7 +65,7 @@ class Delete extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.deleteRows', + replaceWith: 'tablesDB.deleteRows', ), )) ->param('databaseId', '', new UID(), 'Database ID.') @@ -176,7 +176,7 @@ class Delete extends Action foreach ($documents as $document) { $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); + $document->setAttribute('$'.$this->getCollectionsEventsContext().'Id', $collection->getId()); } $queueForStatsUsage 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 c198e9cc7b..41b8bbda74 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 @@ -68,7 +68,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateRows', + replaceWith: 'tablesDB.updateRows', ), )) ->param('databaseId', '', new UID(), 'Database ID.') @@ -129,6 +129,8 @@ class Update extends Action } } + $data = $this->removeReadonlyAttributes($data, privileged: true); + // Handle transaction staging if ($transactionId !== null) { $transaction = $dbForProject->getDocument('transactions', $transactionId); @@ -202,7 +204,7 @@ class Update extends Action foreach ($documents as $document) { $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); + $document->setAttribute('$'.$this->getCollectionsEventsContext().'Id', $collection->getId()); } $queueForStatsUsage 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 b3288cb4fb..d9bb4564ad 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 @@ -40,7 +40,7 @@ class Upsert extends Action $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents') - ->desc('Create or update documents') + ->desc('Upsert documents') ->groups(['api', 'database']) ->label('scope', 'documents.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) @@ -65,7 +65,7 @@ class Upsert extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.upsertRows', + replaceWith: 'tablesDB.upsertRows', ), ) ]) @@ -102,6 +102,7 @@ class Upsert extends Action } foreach ($documents as $key => $document) { + $document = $this->removeReadonlyAttributes($document, privileged: true); $documents[$key] = new Document($document); } @@ -177,7 +178,7 @@ class Upsert extends Action foreach ($upserted as $document) { $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); + $document->setAttribute('$'.$this->getCollectionsEventsContext().'Id', $collection->getId()); } $queueForStatsUsage 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 d4a7e2cfda..224c01d2de 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,7 +86,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createRow', + replaceWith: 'tablesDB.createRow', ), ), new Method( @@ -111,7 +111,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createRows', + replaceWith: 'tablesDB.createRows', ), ) ]) @@ -258,7 +258,7 @@ class Create extends Action $operations = 0; - $checkPermissions = function (Document $collection, Document $document, string $permission) use (&$checkPermissions, $dbForProject, $database, &$operations) { + $checkPermissions = function (Document $collection, Document $document, string $permission) use ($isAPIKey, $isPrivilegedUser, &$checkPermissions, $dbForProject, $database, &$operations) { $operations++; $documentSecurity = $collection->getAttribute('documentSecurity', false); @@ -311,6 +311,8 @@ class Create extends Action $relation = new Document($relation); } if ($relation instanceof Document) { + $relation = $this->removeReadonlyAttributes($relation, $isAPIKey || $isPrivilegedUser); + $current = Authorization::skip( fn () => $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $relatedCollection->getSequence(), $relation->getId()) ); @@ -322,8 +324,6 @@ class Create extends Action $relation['$id'] = ID::unique(); } } else { - $relation->removeAttribute('$collectionId'); - $relation->removeAttribute('$databaseId'); $relation->setAttribute('$collection', $relatedCollection->getId()); $type = Database::PERMISSION_UPDATE; } @@ -358,22 +358,10 @@ 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 - if (!$isAPIKey && !$isPrivilegedUser) { - if (isset($document['$createdAt'])) { - 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" can not be modified. Please use a server SDK with an API key to modify server attributes.'); - } - } - + $document = $this->removeReadonlyAttributes($document, $isAPIKey || $isPrivilegedUser); $document = new Document($document); $setPermissions($document, $permissions); $checkPermissions($collection, $document, Database::PERMISSION_CREATE); - return $document; }, $documents); 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 d801704b53..7ce1d411ce 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 @@ -67,7 +67,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.deleteRow', + replaceWith: 'tablesDB.deleteRow', ), )) ->param('databaseId', '', new UID(), 'Database ID.') @@ -167,6 +167,7 @@ class Delete extends Action } $collectionsCache = []; + $this->processDocument( database: $database, collection: $collection, 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 f3e2a24672..7f621fb33a 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: 'grids.getRow', + replaceWith: 'tablesDB.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 0f8a8688c6..93c8639520 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: 'grids.listRowLogs', + replaceWith: 'tablesDB.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 8566911429..ba3ad4d8b5 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: 'grids.updateRow', + replaceWith: 'tablesDB.updateRow', ), )) ->param('databaseId', '', new UID(), 'Database ID.') @@ -111,17 +111,6 @@ class Update extends Action throw new Exception($this->getParentNotFoundException()); } - // 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" 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" 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 /** @var Document $document */ $document = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId)); @@ -164,12 +153,12 @@ class Update extends Action $data['$id'] = $documentId; $data['$permissions'] = $permissions; + $data = $this->removeReadonlyAttributes($data, $isAPIKey || $isPrivilegedUser); $newDocument = new Document($data); $operations = 0; - $setCollection = (function (Document $collection, Document $document) use (&$setCollection, $dbForProject, $database, &$operations) { - + $setCollection = (function (Document $collection, Document $document) use ($isAPIKey, $isPrivilegedUser, &$setCollection, $dbForProject, $database, &$operations) { $operations++; $relationships = \array_filter( @@ -208,12 +197,13 @@ class Update extends Action $relation = new Document($relation); } if ($relation instanceof Document) { + $relation = $this->removeReadonlyAttributes($relation, $isAPIKey || $isPrivilegedUser); + $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', 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 316fe4f484..c117691348 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 @@ -45,7 +45,7 @@ class Upsert extends Action $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') - ->desc('Create or update a document') + ->desc('Upsert a document') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].upsert') ->label('scope', 'documents.write') @@ -71,7 +71,7 @@ class Upsert extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.upsertRow', + replaceWith: 'tablesDB.upsertRow', ), ), ]) @@ -99,6 +99,10 @@ class Upsert extends Action throw new Exception($this->getMissingPayloadException()); } + if (\array_is_list($data) && \count($data) > 1) { // Allow 1 associated array + throw new Exception($this->getMissingPayloadException()); + } + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); @@ -119,7 +123,8 @@ class Upsert extends Action ]; $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 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()) { @@ -155,24 +160,14 @@ 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" 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" can not be modified. Please use a server SDK with an API key to modify server attributes.'); - } - } $data['$id'] = $documentId; $data['$permissions'] = $permissions ?? []; + $data = $this->removeReadonlyAttributes($data, $isAPIKey || $isPrivilegedUser); $newDocument = new Document($data); $operations = 0; - $setCollection = (function (Document $collection, Document $document) use (&$setCollection, $dbForProject, $database, &$operations) { - + $setCollection = (function (Document $collection, Document $document) use ($isAPIKey, $isPrivilegedUser, &$setCollection, $dbForProject, $database, &$operations) { $operations++; $relationships = \array_filter( @@ -211,12 +206,13 @@ class Upsert extends Action $relation = new Document($relation); } if ($relation instanceof Document) { + $relation = $this->removeReadonlyAttributes($relation, $isAPIKey || $isPrivilegedUser); + $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', @@ -322,7 +318,13 @@ class Upsert extends Action } $collectionsCache = []; + + if (empty($upserted[0])) { + $upserted[0] = $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId); + } + $document = $upserted[0]; + $this->processDocument( database: $database, collection: $collection, 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 42fe51e09a..9c8405cf18 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: 'grids.listRows', + replaceWith: 'tablesDB.listRows', ), )) ->param('databaseId', '', new UID(), 'Database ID.') @@ -73,16 +73,15 @@ class XList extends 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()); + $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()); } @@ -120,16 +119,14 @@ class XList extends Action $cursor->setValue($cursorDocument); } - $selectQueries = []; - try { $selectQueries = Query::groupByType($queries)['selections'] ?? []; if (! empty($selectQueries)) { - // has selects, allow relationship on documents! + // 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! + // has no selects, disable relationship loading on documents /* @type Document[] $documents */ $documents = $dbForProject->skipRelationships(fn () => $dbForProject->find('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $queries)); } @@ -161,17 +158,10 @@ class XList extends Action ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), 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 + // Check if the SELECT query includes the removable attributes $hasWildcard = false; - $hasDatabaseId = false; - $hasCollectionId = false; $hasSelectQueries = !empty($selectQueries); + $requestedAttributes = []; if ($hasSelectQueries) { foreach ($selectQueries as $query) { @@ -185,22 +175,21 @@ class XList extends Action break; } - if (\in_array('$databaseId', $values, true)) { - $hasDatabaseId = true; - } - - if (\in_array('$collectionId', $values, true)) { - $hasCollectionId = true; + // Check which removable attributes are explicitly requested + foreach ($this->removableAttributes['*'] as $attribute) { + if (\in_array($attribute, $values, true)) { + $requestedAttributes[$attribute] = true; + } } } if (!$hasWildcard) { foreach ($documents as $document) { - if (!$hasDatabaseId) { - $document->removeAttribute('$databaseId'); - } - if (!$hasCollectionId) { - $document->removeAttribute('$collectionId'); + // Remove attributes that are not explicitly requested + foreach ($this->removableAttributes['*'] as $attribute) { + if (!isset($requestedAttributes[$attribute])) { + $document->removeAttribute($attribute); + } } } } 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 3dfff2a621..af4b6bf733 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: 'grids.getTable', + replaceWith: 'tablesDB.getTable', ), )) ->param('databaseId', '', new UID(), 'Database ID.') 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 bafa9d0b91..f136fdd29b 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,10 +19,9 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/grids/tables')) { + if (\str_contains($path, '/tablesdb')) { $this->context = COLUMN_INDEX; } - return parent::setHttpPath($path); } @@ -63,7 +62,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'grids'; + return $this->isCollectionsAPI() ? 'databases' : 'tablesDB'; } /** 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 5ba1fff5bf..04baa093d8 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: 'grids.createIndex', + replaceWith: 'tablesDB.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 80ccd8fadf..9ba4c98046 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: 'grids.deleteIndex', + replaceWith: 'tablesDB.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 475835538a..9e05cc79c7 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: 'grids.getIndex', + replaceWith: 'tablesDB.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 643360c12d..c0aa9457e7 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: 'grids.listIndexes', + replaceWith: 'tablesDB.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 359fed118a..1309793234 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: 'grids.listTableLogs', + replaceWith: 'tablesDB.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 03148eeb2b..5bf740d7d1 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: 'grids.updateTable', + replaceWith: 'tablesDB.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 ec46f77581..9cf7b85267 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: 'grids.getTableUsage', + replaceWith: 'tablesDB.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 1b2f3cab32..f2f7a2233a 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: 'grids.listTables', + replaceWith: 'tablesDB.listTables', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index b2f89f92f2..110ec99a9d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -19,11 +19,9 @@ 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\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Text; -use Utopia\Validator\WhiteList; class Create extends Action { @@ -60,35 +58,20 @@ class Create extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createDatabase', + replaceWith: 'tablesDB.create', ) - ), - 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) - ->param('type', 'grids', new WhiteList(['grids','legacy']), 'Database type.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') ->callback($this->action(...)); } - public function action(string $databaseId, string $name, bool $enabled, string $type, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + public function action(string $databaseId, string $name, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void { $databaseId = $databaseId == 'unique()' ? ID::unique() : $databaseId; @@ -98,13 +81,11 @@ class Create extends Action 'name' => $name, 'enabled' => $enabled, 'search' => implode(' ', [$databaseId, $name]), - 'type' => $type + 'type' => $this->getDatabaseType(), ])); } 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()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php index 388b5edf7e..7be96fa883 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php @@ -51,23 +51,9 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.deleteDatabase', + replaceWith: 'tablesDB.delete', ) ), - 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') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php index a3ac4d0da0..c4626c804c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php @@ -46,23 +46,9 @@ class Get extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.getDatabase', + replaceWith: 'tablesDB.get', ) ), - 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') 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 5828b9f8b8..fd6ae05335 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php @@ -58,23 +58,9 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.listDatabaseLogs', + replaceWith: 'tablesDB.listDatabaseLogs', ) ), - 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) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php index b2b268075c..d3057c1ca5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php @@ -52,23 +52,9 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateDatabase', + replaceWith: 'tablesDB.update', ) ), - 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.') 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 8efb6ae0ee..4770d727a0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -39,7 +39,7 @@ class Get extends Action new Method( namespace: 'databases', group: null, - name: self::getName(), + name: 'getUsage', description: '/docs/references/databases/get-database-usage.md', auth: [AuthType::ADMIN], responses: [ @@ -51,24 +51,9 @@ class Get extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.' . self::getName(), + replaceWith: 'tablesDB.getUsage' ) - ), - 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) 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 31d520611e..c13149cfc7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -21,7 +21,7 @@ class XList extends Action { public static function getName(): string { - return 'listUsage'; + return 'listDatabaseUsage'; } public function __construct() @@ -37,7 +37,7 @@ class XList extends Action new Method( namespace: 'databases', group: null, - name: self::getName(), + name: 'listUsage', description: '/docs/references/databases/list-usage.md', auth: [AuthType::ADMIN], responses: [ @@ -49,23 +49,9 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.listDatabaseUsage' + replaceWith: 'tablesDB.listUsage' ) ), - 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') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php index fdf3428101..d7c6245e5c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php @@ -52,23 +52,9 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.listDatabases', + replaceWith: 'tablesDB.list', ) ), - 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) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Create.php new file mode 100644 index 0000000000..8993f00368 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Create.php @@ -0,0 +1,57 @@ +<?php + +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB; + +use Appwrite\Platform\Modules\Databases\Http\Databases\Create as DatabaseCreate; +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; +use Utopia\Swoole\Response as SwooleResponse; +use Utopia\Validator\Boolean; +use Utopia\Validator\Text; + +class Create extends DatabaseCreate +{ + public static function getName(): string + { + return 'createTablesDatabase'; + } + + public function __construct() + { + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/tablesdb') + ->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: 'tablesDB', + group: 'tablesdb', + name: 'create', + description: '/docs/references/tablesdb/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(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Delete.php new file mode 100644 index 0000000000..0a6cb3cd87 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Delete.php @@ -0,0 +1,55 @@ +<?php + +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB; + +use Appwrite\Platform\Modules\Databases\Http\Databases\Delete as DatabaseDelete; +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\Validator\UID; +use Utopia\Swoole\Response as SwooleResponse; + +class Delete extends DatabaseDelete +{ + public static function getName(): string + { + return 'deleteTablesDatabase'; + } + + public function __construct() + { + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/tablesdb/: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: 'tablesDB', + group: 'tablesdb', + name: 'delete', + description: '/docs/references/tablesdb/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(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Get.php new file mode 100644 index 0000000000..9690f25370 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Get.php @@ -0,0 +1,49 @@ +<?php + +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB; + +use Appwrite\Platform\Modules\Databases\Http\Databases\Get as DatabaseGet; +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\Validator\UID; +use Utopia\Swoole\Response as SwooleResponse; + +class Get extends DatabaseGet +{ + public static function getName(): string + { + return 'getTablesDatabase'; + } + + public function __construct() + { + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/tablesdb/:databaseId') + ->desc('Get database') + ->groups(['api', 'database']) + ->label('scope', 'databases.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'tablesDB', + group: 'tablesdb', + name: 'get', + description: '/docs/references/tablesdb/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(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Logs/XList.php new file mode 100644 index 0000000000..02403fe472 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Logs/XList.php @@ -0,0 +1,142 @@ +<?php + +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Logs; + +use Appwrite\Extend\Exception; +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\Helpers\ID; +use Utopia\Database\Query; +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\Swoole\Response as SwooleResponse; + +class XList extends Action +{ + public static function getName(): string + { + return 'listLogs'; + } + + public function __construct() + { + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/tablesdb/:databaseId/logs') + ->desc('List database logs') + ->groups(['api', 'database']) + ->label('scope', 'databases.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', [ + new Method( + namespace: 'tablesDB', + group: 'logs', + name: 'listDatabaseLogs', + description: '/docs/references/tablesdb/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/Grids/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Create.php similarity index 85% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Create.php index a28b52aef0..5222d2e133 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Boolean; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Boolean; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Create as BooleanCreate; use Appwrite\SDK\AuthType; @@ -28,19 +28,19 @@ class Create extends BooleanCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/boolean') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/boolean') ->desc('Create boolean column') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-boolean-column.md', + description: '/docs/references/tablesdb/create-boolean-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -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/tables#tablesCreate).') + ->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).') ->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/Grids/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Update.php similarity index 85% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Update.php index c2f40c96fb..3c6ef50813 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Boolean; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Boolean; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Update as BooleanUpdate; use Appwrite\SDK\AuthType; @@ -30,19 +30,19 @@ class Update extends BooleanUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/boolean/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/boolean/:key') ->desc('Update boolean column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-boolean-column.md', + description: '/docs/references/tablesdb/update-boolean-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -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/tables#tablesCreate).') + ->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).') ->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/Grids/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Create.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Create.php index f1214f707b..9598278ffc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Datetime; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Datetime; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Create as DatetimeCreate; use Appwrite\SDK\AuthType; @@ -30,19 +30,19 @@ class Create extends DatetimeCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/datetime') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/datetime') ->desc('Create datetime column') ->groups(['api', 'database']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-datetime-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/Datetime/Update.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Update.php index f2f5001242..d7b5ec2448 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Datetime; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Datetime; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Update as DatetimeUpdate; use Appwrite\SDK\AuthType; @@ -32,19 +32,19 @@ class Update extends DatetimeUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/datetime/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/datetime/:key') ->desc('Update dateTime column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-datetime-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/Delete.php similarity index 86% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Delete.php index 9af55bee70..50a148ce19 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Delete.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Delete as AttributesDelete; use Appwrite\SDK\AuthType; @@ -29,19 +29,19 @@ class Delete extends AttributesDelete { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/:key') ->desc('Delete column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/delete-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/Email/Create.php similarity index 86% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Create.php index 3fd8d88fb5..e28a216fff 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Email; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Email; use Appwrite\Network\Validator\Email; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Create as EmailCreate; @@ -29,19 +29,19 @@ class Create extends EmailCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/email') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/email') ->desc('Create email column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-email-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/Email/Update.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Update.php index 180ce40b6d..0fb856acb9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Email; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Email; use Appwrite\Network\Validator\Email; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Update as EmailUpdate; @@ -31,19 +31,19 @@ class Update extends EmailUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/email/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/email/:key') ->desc('Update email column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-email-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/Enum/Create.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Create.php index c3ccffec1e..5b9d89c7e9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Enum; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Enum; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Create as EnumCreate; use Appwrite\SDK\AuthType; @@ -31,19 +31,19 @@ class Create extends EnumCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/enum') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/enum') ->desc('Create enum column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-enum-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/Enum/Update.php similarity index 88% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Update.php index 32f77a488a..0c00e3f268 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Enum; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Enum; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Update as EnumUpdate; use Appwrite\SDK\AuthType; @@ -33,19 +33,19 @@ class Update extends EnumUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/enum/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/enum/:key') ->desc('Update enum column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-enum-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/Float/Create.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Create.php index 42699ca45e..5967b00196 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Float; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Float; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Create as FloatCreate; use Appwrite\SDK\AuthType; @@ -29,19 +29,19 @@ class Create extends FloatCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/float') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/float') ->desc('Create float column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-float-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/Float/Update.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Update.php index cd801450c7..9486b3a75c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Float; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Float; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Update as FloatUpdate; use Appwrite\SDK\AuthType; @@ -31,19 +31,19 @@ class Update extends FloatUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/float/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/float/:key') ->desc('Update float column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-float-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/Get.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Get.php index 295a4ff530..d536a7aaf2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Get.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Get as AttributesGet; use Appwrite\SDK\AuthType; @@ -38,16 +38,16 @@ class Get extends AttributesGet { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/:key') ->desc('Get column') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/get-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/IP/Create.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Create.php index 541214897e..325a9382e5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\IP; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\IP; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Create as IPCreate; use Appwrite\SDK\AuthType; @@ -29,19 +29,19 @@ class Create extends IPCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/ip') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/ip') ->desc('Create IP address column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-ip-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/IP/Update.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Update.php index c52105c812..b9e6368307 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\IP; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\IP; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Update as IPUpdate; use Appwrite\SDK\AuthType; @@ -31,19 +31,19 @@ class Update extends IPUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/ip/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/ip/:key') ->desc('Update IP address column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-ip-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/Integer/Create.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php index 9873ad83b1..bd6fec3f53 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Integer; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Integer; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Create as IntegerCreate; use Appwrite\SDK\AuthType; @@ -29,19 +29,19 @@ class Create extends IntegerCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/integer') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/integer') ->desc('Create integer column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-integer-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/Integer/Update.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php index e70f8bf7b0..be92811d1b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Integer; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Integer; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Update as IntegerUpdate; use Appwrite\SDK\AuthType; @@ -31,19 +31,19 @@ class Update extends IntegerUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/integer/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/integer/:key') ->desc('Update integer column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-integer-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/Relationship/Create.php similarity index 88% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Create.php index d6942a4d15..b6f9663f77 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Relationship; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Relationship; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Create as RelationshipCreate; use Appwrite\SDK\AuthType; @@ -30,19 +30,19 @@ class Create extends RelationshipCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/relationship') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/relationship') ->desc('Create relationship column') ->groups(['api', 'database']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-relationship-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/Relationship/Update.php similarity index 86% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Update.php index 729760bde0..421e11af91 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Relationship; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Relationship; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Update as RelationshipUpdate; use Appwrite\SDK\AuthType; @@ -30,19 +30,19 @@ class Update extends RelationshipUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key/relationship') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/:key/relationship') ->desc('Update relationship column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-relationship-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/String/Create.php similarity index 84% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Create.php index 5829ce5361..14f0c8321e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\String; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\String; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Create as StringCreate; use Appwrite\SDK\AuthType; @@ -31,19 +31,19 @@ class Create extends StringCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/string') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/string') ->desc('Create string column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-string-column.md', + description: '/docs/references/tablesdb/create-string-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -53,9 +53,9 @@ 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/tables#tablesCreate).') + ->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).') ->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('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Validator::TYPE_INTEGER), 'Column size for text columns, 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) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Update.php similarity index 86% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Update.php index 6333443686..fc45557f3b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\String; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\String; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Update as StringUpdate; use Appwrite\SDK\AuthType; @@ -33,19 +33,19 @@ class Update extends StringUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/string/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/string/:key') ->desc('Update string column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-string-column.md', + description: '/docs/references/tablesdb/update-string-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -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/tables#tablesCreate).') + ->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).') ->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/Grids/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Create.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Create.php index 429ef06dbd..bc53ad5250 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\URL; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\URL; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Create as URLCreate; use Appwrite\SDK\AuthType; @@ -29,19 +29,19 @@ class Create extends URLCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/url') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/url') ->desc('Create URL column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-url-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/URL/Update.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Update.php index de4b4ab79b..36bd7dc054 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\URL; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\URL; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Update as URLUpdate; use Appwrite\SDK\AuthType; @@ -31,19 +31,19 @@ class Update extends URLUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/url/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/url/:key') ->desc('Update URL column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-url-column.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Columns/XList.php similarity index 83% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/XList.php index d8b6e39ac6..ca41bb024d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/XList.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\XList as AttributesXList; use Appwrite\SDK\AuthType; @@ -27,16 +27,16 @@ class XList extends AttributesXList { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns') ->desc('List columns') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/list-columns.md', + description: '/docs/references/tablesdb/list-columns.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -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_COLUMNS), 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 columns: ' . implode(', ', Columns::ALLOWED_COLUMNS), true) ->inject('response') ->inject('dbForProject') ->callback($this->action(...)); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php index f4274079bc..3965e12a74 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Create as CollectionCreate; use Appwrite\SDK\AuthType; @@ -31,19 +31,19 @@ class Create extends CollectionCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables') + ->setHttpPath('/v1/tablesdb/:databaseId/tables') ->desc('Create table') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].create') - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'table.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{response.$id}') + ->label('audits.resource', 'database/{request.databaseId}/table/{response.$id}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), - group: null, + group: 'tables', name: self::getName(), - description: '/docs/references/grids/create-table.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Delete.php similarity index 84% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Delete.php index 13c3a7196b..9bfdf42cef 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Delete.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Delete as CollectionDelete; use Appwrite\SDK\AuthType; @@ -27,19 +27,19 @@ class Delete extends CollectionDelete { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId') ->desc('Delete table') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), - group: null, + group: 'tables', name: self::getName(), - description: '/docs/references/grids/delete-table.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Get.php similarity index 83% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Get.php index 3ac36d27ca..a7d33478f7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Get.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Get as CollectionGet; use Appwrite\SDK\AuthType; @@ -27,16 +27,16 @@ class Get extends CollectionGet { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId') ->desc('Get table') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), - group: null, + group: 'tables', name: self::getName(), - description: '/docs/references/grids/get-table.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Indexes/Create.php similarity index 88% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Create.php index 9bb3d6f123..022eeb4e3a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Indexes; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Create as IndexCreate; use Appwrite\SDK\AuthType; @@ -33,19 +33,19 @@ class Create extends IndexCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/indexes') ->desc('Create index') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create') - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'index.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( 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/grids/create-index.md', + description: '/docs/references/tablesdb/create-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -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/tables#tablesCreate).') + ->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).') ->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/Grids/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Delete.php similarity index 85% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Delete.php index 679de9b77c..586bad78f4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Delete.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Indexes; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Delete as IndexDelete; use Appwrite\SDK\AuthType; @@ -32,19 +32,19 @@ class Delete extends IndexDelete { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/indexes/:key') ->desc('Delete index') ->groups(['api', 'database']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( 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/grids/delete-index.md', + description: '/docs/references/tablesdb/delete-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -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/tables#tablesCreate).') + ->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).') ->param('key', '', new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Get.php similarity index 83% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Get.php index f2c7cbcb94..3f2978b547 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Get.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Indexes; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Get as IndexGet; use Appwrite\SDK\AuthType; @@ -28,16 +28,16 @@ class Get extends IndexGet { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/indexes/:key') ->desc('Get index') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( 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/grids/get-index.md', + description: '/docs/references/tablesdb/get-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -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/tables#tablesCreate).') + ->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).') ->param('key', null, new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/XList.php similarity index 82% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/XList.php index 4ec7da0a41..c275fd2771 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/XList.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Indexes; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\XList as IndexXList; use Appwrite\SDK\AuthType; @@ -28,16 +28,16 @@ class XList extends IndexXList { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/indexes') ->desc('List indexes') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( 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/grids/list-indexes.md', + description: '/docs/references/tablesdb/list-indexes.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -48,8 +48,8 @@ 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/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) + ->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).') + ->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 columns: ' . implode(', ', Indexes::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') ->callback($this->action(...)); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Logs/XList.php similarity index 86% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Logs/XList.php index 1c24a23175..6d386df4f6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Logs/XList.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Logs; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Logs; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Logs\XList as CollectionLogXList; use Appwrite\SDK\AuthType; @@ -24,16 +24,16 @@ class XList extends CollectionLogXList { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/logs') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/logs') ->desc('List table logs') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/get-table-logs.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Rows/Bulk/Delete.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Delete.php index e040757b7a..a46ffe6cba 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Delete.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Bulk; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Bulk; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Delete as DocumentsDelete; use Appwrite\SDK\AuthType; @@ -29,13 +29,13 @@ class Delete extends DocumentsDelete { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('Delete rows') ->groups(['api', 'database']) - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.delete') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->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) @@ -43,7 +43,7 @@ class Delete extends DocumentsDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/delete-rows.md', + description: '/docs/references/tablesdb/delete-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( @@ -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/tables#tablesCreate).') + ->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).') ->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) ->param('transactionId', null, new UID(), 'Transaction ID for staging the operation.', true) ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php index 72381ee38f..1fc8ba031b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Bulk; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Bulk; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Update as DocumentsUpdate; use Appwrite\SDK\AuthType; @@ -30,13 +30,13 @@ class Update extends DocumentsUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('Update rows') ->groups(['api', 'database']) - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->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) @@ -44,7 +44,7 @@ class Update extends DocumentsUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-rows.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Rows/Bulk/Upsert.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Upsert.php index 230f81676a..f21bd411e7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Upsert.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Bulk; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Bulk; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Upsert as DocumentsUpsert; use Appwrite\SDK\AuthType; @@ -29,13 +29,13 @@ class Upsert extends DocumentsUpsert { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') - ->desc('Create or update rows') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') + ->desc('Upsert rows') ->groups(['api', 'database']) - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->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) @@ -44,7 +44,7 @@ class Upsert extends DocumentsUpsert namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/upsert-rows.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Rows/Column/Decrement.php similarity index 85% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Decrement.php index b967394288..06cfdb5150 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Decrement.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Column; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Column; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Attribute\Decrement as DecrementDocumentAttribute; use Appwrite\SDK\AuthType; @@ -29,14 +29,14 @@ class Decrement extends DecrementDocumentAttribute { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId/:column/decrement') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId/:column/decrement') ->desc('Decrement row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->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) @@ -44,8 +44,8 @@ class Decrement extends DecrementDocumentAttribute namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/decrement-row-column.md', - auth: [AuthType::ADMIN, AuthType::KEY], + description: '/docs/references/tablesdb/decrement-row-column.md', + auth: [AuthType::SESSION, AuthType::JWT, AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Increment.php similarity index 85% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Increment.php index d08c30e943..bddda28b25 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Increment.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Column; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Column; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Attribute\Increment as IncrementDocumentAttribute; use Appwrite\SDK\AuthType; @@ -29,14 +29,14 @@ class Increment extends IncrementDocumentAttribute { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId/:column/increment') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId/:column/increment') ->desc('Increment row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->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) @@ -44,8 +44,8 @@ class Increment extends IncrementDocumentAttribute namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/increment-row-column.md', - auth: [AuthType::ADMIN, AuthType::KEY], + description: '/docs/references/tablesdb/increment-row-column.md', + auth: [AuthType::SESSION, AuthType::JWT, AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php index cf0adddb89..1cb5c36df2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Create as DocumentCreate; use Appwrite\SDK\AuthType; @@ -38,13 +38,13 @@ class Create extends DocumentCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('Create row') ->groups(['api', 'database']) - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->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) @@ -54,7 +54,7 @@ class Create extends DocumentCreate group: $this->getSdkGroup(), name: self::getName(), desc: 'Create row', - description: '/docs/references/grids/create-row.md', + description: '/docs/references/tablesdb/create-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( @@ -77,7 +77,7 @@ class Create extends DocumentCreate group: $this->getSdkGroup(), name: $this->getBulkActionName(self::getName()), desc: 'Create rows', - description: '/docs/references/grids/create-rows.md', + description: '/docs/references/tablesdb/create-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( @@ -96,7 +96,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/tables#tablesCreate). 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/tablesdb#tablesDBCreate). 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 rows data as JSON objects.', true, ['plan']) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php similarity index 86% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php index ca1914b422..0695573ee1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Delete as DocumentDelete; use Appwrite\SDK\AuthType; @@ -33,14 +33,14 @@ class Delete extends DocumentDelete { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId') ->desc('Delete row') ->groups(['api', 'database']) - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', '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}/grid/table/{request.tableId}/row/{request.rowId}') + ->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) @@ -48,7 +48,7 @@ class Delete extends DocumentDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/delete-row.md', + description: '/docs/references/tablesdb/delete-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( @@ -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/tables#tablesCreate).') + ->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).') ->param('rowId', '', new UID(), 'Row ID.') ->param('transactionId', null, new UID(), 'Transaction ID for staging the operation.', true) ->inject('requestTimestamp') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Get.php similarity index 86% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Get.php index 1015e01819..5704f75d82 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Get.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Get as DocumentGet; use Appwrite\SDK\AuthType; @@ -29,16 +29,16 @@ class Get extends DocumentGet { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId') ->desc('Get row') ->groups(['api', 'database']) - ->label('scope', 'rows.read') + ->label('scope', ['rows.read', 'documents.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/get-row.md', + description: '/docs/references/tablesdb/get-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( @@ -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/tables#tablesCreate).') + ->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).') ->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/Grids/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Logs/XList.php similarity index 86% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Logs/XList.php index 4522b3005f..a80249070b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Logs/XList.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Logs; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Logs; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Logs\XList as DocumentLogXList; use Appwrite\SDK\AuthType; @@ -24,16 +24,16 @@ class XList extends DocumentLogXList { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId/logs') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId/logs') ->desc('List row logs') ->groups(['api', 'database']) - ->label('scope', 'rows.read') + ->label('scope', ['rows.read', 'documents.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: 'logs', name: self::getName(), - description: '/docs/references/grids/get-row-logs.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Rows/Update.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Update.php index bed6c549f9..6d60cceb22 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Update as DocumentUpdate; use Appwrite\SDK\AuthType; @@ -30,14 +30,14 @@ class Update extends DocumentUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId') ->desc('Update row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}/row/{response.$id}') + ->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) @@ -45,7 +45,7 @@ class Update extends DocumentUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-row.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Rows/Upsert.php similarity index 88% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php index daf9147390..e16fa67e97 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Upsert as DocumentUpsert; use Appwrite\SDK\AuthType; @@ -30,14 +30,14 @@ class Upsert extends DocumentUpsert { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') - ->desc('Create or update a row') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId') + ->desc('Upsert a row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].upsert') - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.upsert') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}/row/{response.$id}') + ->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) @@ -46,7 +46,7 @@ class Upsert extends DocumentUpsert namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/upsert-row.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Rows/XList.php similarity index 83% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/XList.php index d2589e4b63..5d503f1c59 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/XList.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\XList as DocumentXList; use Appwrite\SDK\AuthType; @@ -29,16 +29,16 @@ class XList extends DocumentXList { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('List rows') ->groups(['api', 'database']) - ->label('scope', 'rows.read') + ->label('scope', ['rows.read', 'documents.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/list-rows.md', + description: '/docs/references/tablesdb/list-rows.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( @@ -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/tables#tablesCreate).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the TableDB service [server integration](https://appwrite.io/docs/server/tablesdbdb#tablesdbCreate).') ->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/Grids/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php similarity index 88% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php index b4e8df6e57..0fcdf319d2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Update as CollectionUpdate; use Appwrite\SDK\AuthType; @@ -30,19 +30,19 @@ class Update extends CollectionUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId') ->desc('Update table') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', '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}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), - group: null, + group: 'tables', name: self::getName(), - description: '/docs/references/grids/update-table.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/Usage/Get.php similarity index 85% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Usage/Get.php index 015c2c2592..87f720e689 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Usage/Get.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Usage; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Usage; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Usage\Get as CollectionUsageGet; use Appwrite\SDK\AuthType; @@ -28,16 +28,16 @@ class Get extends CollectionUsageGet { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/usage') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/usage') ->desc('Get table usage stats') ->groups(['api', 'database', 'usage']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/grids/get-table-usage.md', + description: '/docs/references/tablesdb/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/TablesDB/Tables/XList.php similarity index 83% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/XList.php index fd329ea6aa..d9a92e41b1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/XList.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables; +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\XList as CollectionXList; use Appwrite\SDK\AuthType; @@ -29,16 +29,16 @@ class XList extends CollectionXList { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables') + ->setHttpPath('/v1/tablesdb/:databaseId/tables') ->desc('List tables') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), - group: null, + group: 'tables', name: self::getName(), - description: '/docs/references/grids/list-tables.md', + description: '/docs/references/tablesdb/list-tables.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -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_COLUMNS), 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 columns: ' . 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/Platform/Modules/Databases/Http/TablesDB/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Update.php new file mode 100644 index 0000000000..10d4284947 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Update.php @@ -0,0 +1,57 @@ +<?php + +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB; + +use Appwrite\Platform\Modules\Databases\Http\Databases\Update as DatabaseUpdate; +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\Validator\UID; +use Utopia\Swoole\Response as SwooleResponse; +use Utopia\Validator\Boolean; +use Utopia\Validator\Text; + +class Update extends DatabaseUpdate +{ + public static function getName(): string + { + return 'updateTablesDatabase'; + } + + public function __construct() + { + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) + ->setHttpPath('/v1/tablesdb/: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: 'tablesDB', + group: 'tablesdb', + name: 'update', + description: '/docs/references/tablesdb/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(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/Get.php new file mode 100644 index 0000000000..89b9fbd8c2 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/Get.php @@ -0,0 +1,53 @@ +<?php + +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Usage; + +use Appwrite\Platform\Modules\Databases\Http\Databases\Usage\Get as DatabaseUsageGet; +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\Validator\UID; +use Utopia\Swoole\Response as SwooleResponse; +use Utopia\Validator\WhiteList; + +class Get extends DatabaseUsageGet +{ + public static function getName(): string + { + return 'getTablesDBUsage'; + } + + public function __construct() + { + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/tablesdb/:databaseId/usage') + ->desc('Get TablesDB usage stats') + ->groups(['api', 'database', 'usage']) + ->label('scope', ['tables.read', 'collections.read']) + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', [ + new Method( + namespace: 'tablesDB', + group: null, + name: 'getUsage', + description: '/docs/references/tablesdb/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(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/XList.php new file mode 100644 index 0000000000..0bd96fc40a --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/XList.php @@ -0,0 +1,51 @@ +<?php + +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Usage; + +use Appwrite\Platform\Modules\Databases\Http\Databases\Usage\XList as DatabaseUsageXList; +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\Swoole\Response as SwooleResponse; +use Utopia\Validator\WhiteList; + +class XList extends DatabaseUsageXList +{ + public static function getName(): string + { + return 'listTablesDBUsage'; + } + + public function __construct() + { + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/tablesdb/usage') + ->desc('Get TablesDB usage stats') + ->groups(['api', 'database', 'usage']) + ->label('scope', ['tables.read', 'collections.read']) + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', [ + new Method( + namespace: 'tablesDB', + group: null, + name: 'listUsage', + description: '/docs/references/tablesdb/list-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(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/XList.php new file mode 100644 index 0000000000..4d28834d31 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/XList.php @@ -0,0 +1,51 @@ +<?php + +namespace Appwrite\Platform\Modules\Databases\Http\TablesDB; + +use Appwrite\Platform\Modules\Databases\Http\Databases\XList as DatabaseXList; +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; +use Utopia\Swoole\Response as SwooleResponse; +use Utopia\Validator\Text; + +class XList extends DatabaseXList +{ + public static function getName(): string + { + return 'listTablesDatabases'; + } + + public function __construct() + { + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/tablesdb') + ->desc('List databases') + ->groups(['api', 'database']) + ->label('scope', 'databases.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'tablesDB', + group: 'tablesdb', + name: 'list', + description: '/docs/references/tablesdb/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 columns: ' . 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(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Http.php b/src/Appwrite/Platform/Modules/Databases/Services/Http.php index d2f66f3657..ccd9dfd140 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Http.php @@ -14,7 +14,6 @@ class Http extends Service { $this->type = Service::TYPE_HTTP; - // Project database timeout init hook! $this->addAction(Timeout::getName(), new Timeout()); foreach ([ diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php index aad8571553..7772aff933 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php @@ -2,52 +2,59 @@ namespace Appwrite\Platform\Modules\Databases\Services\Registry; -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 Appwrite\Platform\Modules\Databases\Http\TablesDB\Create as CreateTablesDatabase; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Delete as DeleteTablesDatabase; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Get as GetTablesDatabase; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Boolean\Create as CreateBoolean; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Boolean\Update as UpdateBoolean; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Datetime\Create as CreateDatetime; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Datetime\Update as UpdateDatetime; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Delete as DeleteColumn; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Email\Create as CreateEmail; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Email\Update as UpdateEmail; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Enum\Create as CreateEnum; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Enum\Update as UpdateEnum; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Float\Create as CreateFloat; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Float\Update as UpdateFloat; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Get as GetColumn; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Integer\Create as CreateInteger; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Integer\Update as UpdateInteger; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\IP\Create as CreateIP; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\IP\Update as UpdateIP; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Relationship\Create as CreateRelationship; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Relationship\Update as UpdateRelationship; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\String\Create as CreateString; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\String\Update as UpdateString; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\URL\Create as CreateURL; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\URL\Update as UpdateURL; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\XList as ListColumns; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Create as CreateTable; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Delete as DeleteTable; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Get as GetTable; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Indexes\Create as CreateColumnIndex; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Indexes\Delete as DeleteColumnIndex; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Indexes\Get as GetColumnIndex; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Indexes\XList as ListColumnIndexes; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Logs\XList as ListTableLogs; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Bulk\Delete as DeleteRows; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Bulk\Update as UpdateRows; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Bulk\Upsert as UpsertRows; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Column\Decrement as DecrementRowColumn; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Column\Increment as IncrementRowColumn; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Create as CreateRow; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Delete as DeleteRow; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Get as GetRow; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Logs\XList as ListRowLogs; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Update as UpdateRow; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Upsert as UpsertRow; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\XList as ListRows; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Update as UpdateTable; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Usage\Get as GetTableUsage; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\XList as ListTables; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Update as UpdateTablesDatabase; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Usage\Get as GetTablesDatabaseUsage; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Usage\XList as ListTablesDatabaseUsage; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\XList as ListTablesDatabase; use Utopia\Platform\Service; /** @@ -63,12 +70,24 @@ class Tables extends Base { protected function register(Service $service): void { + $this->registerDatabaseActions($service); $this->registerTableActions($service); $this->registerColumnActions($service); $this->registerIndexActions($service); $this->registerRowActions($service); } + private function registerDatabaseActions(Service $service): void + { + $service->addAction(CreateTablesDatabase::getName(), new CreateTablesDatabase()); + $service->addAction(GetTablesDatabase::getName(), new GetTablesDatabase()); + $service->addAction(UpdateTablesDatabase::getName(), new UpdateTablesDatabase()); + $service->addAction(DeleteTablesDatabase::getName(), new DeleteTablesDatabase()); + $service->addAction(ListTablesDatabase::getName(), new ListTablesDatabase()); + $service->addAction(GetTablesDatabaseUsage::getName(), new GetTablesDatabaseUsage()); + $service->addAction(ListTablesDatabaseUsage::getName(), new ListTablesDatabaseUsage()); + } + private function registerTableActions(Service $service): void { $service->addAction(CreateTable::getName(), new CreateTable()); diff --git a/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php index 22f1e6a2f2..9a98d77d2d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php +++ b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php @@ -64,14 +64,6 @@ class Databases extends Action $collection = new Document($payload['table'] ?? $payload['collection'] ?? []); $database = new Document($payload['database'] ?? []); - Console::info("Processing database operation: \n" . \json_encode([ - 'type' => $type, - 'projectId' => $project->getId(), - 'databaseId' => $database->getId(), - 'collectionId' => $collection->getId(), - 'documentId' => $document->getId(), - ], JSON_PRETTY_PRINT)); - $log->addTag('projectId', $project->getId()); $log->addTag('type', $type); diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Deployments/XList.php b/src/Appwrite/Platform/Modules/Functions/Http/Deployments/XList.php index 996df299d0..2850c5b279 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Deployments/XList.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Deployments/XList.php @@ -3,10 +3,12 @@ namespace Appwrite\Platform\Modules\Functions\Http\Deployments; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Deployments; +use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use Utopia\Database\Database; use Utopia\Database\Document; @@ -19,7 +21,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Text; -class XList extends Action +class XList extends Base { use HTTP; @@ -55,6 +57,7 @@ class XList extends Action ->param('functionId', '', new UID(), 'Function ID.') ->param('queries', [], new Deployments(), '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(', ', Deployments::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) + ->inject('request') ->inject('response') ->inject('dbForProject') ->callback($this->action(...)); @@ -64,6 +67,7 @@ class XList extends Action string $functionId, array $queries, string $search, + Request $request, Response $response, Database $dbForProject ) { @@ -121,6 +125,7 @@ class XList extends Action 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."); } + $this->applySelectQueries($request, $response, Response::MODEL_DEPLOYMENT); $response->dynamic(new Document([ 'deployments' => $results, 'total' => $total, diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php index ef31d5a79c..1603e8f997 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php @@ -80,7 +80,7 @@ class Create extends Base ->param('body', '', new Text(10485760, 0), 'HTTP body of execution. Default value is empty string.', true) ->param('async', false, new Boolean(true), 'Execute code in the background. Default value is false.', true) ->param('path', '/', new Text(2048), 'HTTP path of execution. Path can include query params. Default value is /', true) - ->param('method', 'POST', new Whitelist(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], true), 'HTTP method of execution. Default value is GET.', true) + ->param('method', 'POST', new Whitelist(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS', 'HEAD'], true), 'HTTP method of execution. Default value is POST.', true) ->param('headers', [], new AnyOf([new Assoc(), new Text(65535)], AnyOf::TYPE_MIXED), 'HTTP headers of execution. Defaults to empty.', true) ->param('scheduledAt', null, new Text(100), '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.', true) ->inject('response') @@ -221,6 +221,8 @@ class Create extends Base 'scopes' => $function->getAttribute('scopes', []) ]); + $executionId = ID::unique(); + $headers['x-appwrite-execution-id'] = $executionId ?? ''; $headers['x-appwrite-key'] = API_KEY_DYNAMIC . '_' . $apiKey; $headers['x-appwrite-trigger'] = 'http'; $headers['x-appwrite-user-id'] = $user->getId() ?? ''; @@ -228,8 +230,9 @@ class Create extends Base $headers['x-appwrite-country-code'] = ''; $headers['x-appwrite-continent-code'] = ''; $headers['x-appwrite-continent-eu'] = 'false'; + $ip = $request->getIP(); + $headers['x-appwrite-client-ip'] = $ip; - $ip = $headers['x-real-ip'] ?? ''; if (!empty($ip)) { $record = $geodb->get($ip); @@ -249,7 +252,7 @@ class Create extends Base } } - $executionId = ID::unique(); + $status = $async ? 'waiting' : 'processing'; @@ -423,13 +426,34 @@ class Create extends Base } } + $maxLogLength = APP_FUNCTION_LOG_LENGTH_LIMIT; + $logs = $executionResponse['logs'] ?? ''; + + if (\is_string($logs) && \strlen($logs) > $maxLogLength) { + $warningMessage = "[WARNING] Logs truncated. The output exceeded {$maxLogLength} characters.\n"; + $warningLength = \strlen($warningMessage); + $maxContentLength = $maxLogLength - $warningLength; + $logs = $warningMessage . \substr($logs, -$maxContentLength); + } + + // Truncate errors if they exceed the limit + $maxErrorLength = APP_FUNCTION_ERROR_LENGTH_LIMIT; + $errors = $executionResponse['errors'] ?? ''; + + if (\is_string($errors) && \strlen($errors) > $maxErrorLength) { + $warningMessage = "[WARNING] Errors truncated. The output exceeded {$maxErrorLength} characters.\n"; + $warningLength = \strlen($warningMessage); + $maxContentLength = $maxErrorLength - $warningLength; + $errors = $warningMessage . \substr($errors, -$maxContentLength); + } + /** Update execution status */ $status = $executionResponse['statusCode'] >= 500 ? 'failed' : 'completed'; $execution->setAttribute('status', $status); $execution->setAttribute('responseStatusCode', $executionResponse['statusCode']); $execution->setAttribute('responseHeaders', $headersFiltered); - $execution->setAttribute('logs', $executionResponse['logs']); - $execution->setAttribute('errors', $executionResponse['errors']); + $execution->setAttribute('logs', $logs); + $execution->setAttribute('errors', $errors); $execution->setAttribute('duration', $executionResponse['duration']); } catch (\Throwable $th) { $durationEnd = \microtime(true); @@ -460,6 +484,8 @@ class Create extends Base $execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution)); } + $executionResponse['headers']['x-appwrite-execution-id'] = $execution->getId(); + $headers = []; foreach (($executionResponse['headers'] ?? []) as $key => $value) { $headers[] = ['name' => $key, 'value' => $value]; diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 67bea01a28..9547a752ef 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -117,6 +117,8 @@ class Builds extends Action Executor $executor, array $plan ): void { + Console::log('Build action started'); + $payload = $message->getPayload() ?? []; if (empty($payload)) { @@ -209,6 +211,8 @@ class Builds extends Action Executor $executor, array $plan ): void { + Console::info('Deployment action started'); + $startTime = DateTime::now(); $durationStart = \microtime(true); @@ -278,6 +282,8 @@ class Builds extends Action $resource = $dbForProject->updateDocument($resource->getCollection(), $resource->getId(), new Document(['latestDeploymentStatus' => $deployment->getAttribute('status', '')])); } + Console::log('Status marked as processing'); + $queueForRealtime ->setPayload($deployment->getArrayCopy()) ->trigger(); @@ -359,6 +365,8 @@ class Builds extends Action $queueForRealtime ->setPayload($deployment->getArrayCopy()) ->trigger(); + + Console::log('Template cloned'); } } elseif ($isVcsEnabled) { // VCS and VCS+Temaplte @@ -401,6 +409,8 @@ class Builds extends Action throw new \Exception('Unable to clone code repository: ' . $stderr); } + Console::log('Git repository cloned'); + // Local refactoring for function folder with spaces if (str_contains($rootDirectory, ' ')) { $rootDirectoryWithoutSpaces = str_replace(' ', '', $rootDirectory); @@ -469,6 +479,8 @@ class Builds extends Action $queueForRealtime ->setPayload($deployment->getArrayCopy()) ->trigger(); + + Console::log('Git template pushed'); } $tmpPath = '/tmp/builds/' . $deploymentId; @@ -516,9 +528,13 @@ class Builds extends Action ->setPayload($deployment->getArrayCopy()) ->trigger(); + Console::log('Git source uploaded'); + $this->runGitAction('processing', $github, $providerCommitHash, $owner, $repositoryName, $project, $resource, $deployment->getId(), $dbForProject, $dbForPlatform, $queueForRealtime); } + Console::log('Status marked as building'); + /** Request the executor to build the code... */ $deployment->setAttribute('status', 'building'); $deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment); @@ -662,6 +678,8 @@ class Builds extends Action $isCanceled = false; + Console::log('Runtime creation started'); + Co::join([ Co\go(function () use ($executor, &$response, $project, $deployment, $source, $resource, $runtime, $vars, $command, $cpus, $memory, $timeout, &$err, $version) { try { @@ -709,7 +727,10 @@ class Builds extends Action command: $command, outputDirectory: $resource->getAttribute('outputDirectory', '') ); + + Console::log('createRuntime finished'); } catch (\Throwable $error) { + Console::warning('createRuntime failed'); $err = $error; } }), @@ -798,7 +819,9 @@ class Builds extends Action } } ); + Console::warning('listLogs finished'); } catch (\Throwable $error) { + Console::warning('listLogs failed'); if (empty($err)) { $err = $error; } @@ -806,6 +829,8 @@ class Builds extends Action }), ]); + Console::log('Runtime creation finished'); + if ($dbForProject->getDocument('deployments', $deploymentId)->getAttribute('status') === 'canceled') { $this->cancelDeployment($deployment->getId(), $dbForProject, $queueForRealtime); return; @@ -860,6 +885,8 @@ class Builds extends Action $deployment->setAttribute('adapter', $detection->getName()); $deployment->setAttribute('fallbackFile', $detection->getFallbackFile() ?? ''); + + Console::log('Adapter detected'); } elseif ($adapter === 'ssr' && $detection->getName() === 'static') { throw new \Exception('Adapter mismatch. Detected: ' . $detection->getName() . ' does not match with the set adapter: ' . $adapter); } @@ -870,10 +897,15 @@ class Builds extends Action ->setPayload($deployment->getArrayCopy()) ->trigger(); + Console::log('Build details stored'); + $this->afterBuildSuccess($queueForRealtime, $dbForProject, $deployment); $logs = $deployment->getAttribute('buildLogs', ''); + /** Screenshot site */ if ($resource->getCollection() === 'sites') { + Console::log('Site screenshot started'); + $date = \date('H:i:s'); $logs .= "[$date] [appwrite] Screenshot capturing started. \n"; $deployment->setAttribute('buildLogs', $logs); @@ -881,10 +913,7 @@ class Builds extends Action $queueForRealtime ->setPayload($deployment->getArrayCopy()) ->trigger(); - } - /** Screenshot site */ - if ($resource->getCollection() === 'sites') { try { $rule = Authorization::skip(fn () => $dbForPlatform->findOne('rules', [ Query::equal("projectInternalId", [$project->getSequence()]), @@ -1049,6 +1078,8 @@ class Builds extends Action $deployment->setAttribute('buildLogs', $logs); $deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment); } + + Console::log('Site screenshot finished'); } $logs = $deployment->getAttribute('buildLogs', ''); @@ -1060,6 +1091,8 @@ class Builds extends Action $deployment->setAttribute('status', 'ready'); $deployment = $dbForProject->updateDocument('deployments', $deploymentId, $deployment); + Console::log('Status marked as ready'); + if ($deployment->getSequence() === $resource->getAttribute('latestDeploymentInternalId', '')) { $resource = $dbForProject->updateDocument($resource->getCollection(), $resource->getId(), new Document(['latestDeploymentStatus' => $deployment->getAttribute('status', '')])); } @@ -1072,8 +1105,6 @@ class Builds extends Action $this->runGitAction('ready', $github, $providerCommitHash, $owner, $repositoryName, $project, $resource, $deployment->getId(), $dbForProject, $dbForPlatform, $queueForRealtime); } - Console::success("Build id: $deploymentId created"); - /** Set auto deploy */ $activateBuild = false; if ($deployment->getAttribute('activate') === true) { @@ -1153,6 +1184,8 @@ class Builds extends Action break; } + + Console::log('Deployment activated'); } if ($resource->getCollection() === 'sites') { @@ -1211,6 +1244,8 @@ class Builds extends Action 'deploymentInternalId' => $deployment->getSequence(), ])); }, $queries); + + Console::log('Preview rule created'); } } @@ -1228,6 +1263,8 @@ class Builds extends Action return; } + Console::log('Build duration updated'); + /** Update function schedule */ // Inform scheduler if function is still active @@ -1239,6 +1276,8 @@ class Builds extends Action ->setAttribute('active', !empty($resource->getAttribute('schedule')) && !empty($resource->getAttribute('deploymentId'))); Authorization::skip(fn () => $dbForPlatform->updateDocument('schedules', $schedule->getId(), $schedule)); } + + Console::info('Deployment action finished'); } catch (\Throwable $th) { Console::warning('Build failed:'); Console::error($th->getMessage()); diff --git a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/API/Create.php b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/API/Create.php index 4efe8176f6..4cc8f48e7c 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/API/Create.php +++ b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/API/Create.php @@ -71,6 +71,24 @@ class Create extends Action public function action(string $domain, Response $response, Document $project, Certificate $queueForCertificates, Event $queueForEvents, Database $dbForPlatform) { + $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); + $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); + + $restrictions = []; + if (!empty($sitesDomain)) { + $domainLevel = \count(\explode('.', $sitesDomain)); + $restrictions[] = ValidatorDomain::createRestriction($sitesDomain, $domainLevel + 1, ['commit-', 'branch-']); + } + if (!empty($functionsDomain)) { + $domainLevel = \count(\explode('.', $functionsDomain)); + $restrictions[] = ValidatorDomain::createRestriction($functionsDomain, $domainLevel + 1); + } + $validator = new ValidatorDomain($restrictions); + + if (!$validator->isValid($domain)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); + } + $deniedDomains = [ 'localhost', APP_HOSTNAME_INTERNAL @@ -79,12 +97,10 @@ class Create extends Action $mainDomain = System::getEnv('_APP_DOMAIN', ''); $deniedDomains[] = $mainDomain; - $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); if (!empty($sitesDomain)) { $deniedDomains[] = $sitesDomain; } - $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); if (!empty($functionsDomain)) { $deniedDomains[] = $functionsDomain; } @@ -102,10 +118,6 @@ class Create extends Action throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); } - if (\str_starts_with($domain, 'commit-') || \str_starts_with($domain, 'branch-')) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); - } - try { $domain = new Domain($domain); } catch (\Throwable) { diff --git a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Function/Create.php b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Function/Create.php index 1c8fe7b04d..5839e03e25 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Function/Create.php +++ b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Function/Create.php @@ -76,6 +76,24 @@ class Create extends Action public function action(string $domain, string $functionId, string $branch, Response $response, Document $project, Certificate $queueForCertificates, Event $queueForEvents, Database $dbForPlatform, Database $dbForProject) { + $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); + $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); + + $restrictions = []; + if (!empty($sitesDomain)) { + $domainLevel = \count(\explode('.', $sitesDomain)); + $restrictions[] = ValidatorDomain::createRestriction($sitesDomain, $domainLevel + 1, ['commit-', 'branch-']); + } + if (!empty($functionsDomain)) { + $domainLevel = \count(\explode('.', $functionsDomain)); + $restrictions[] = ValidatorDomain::createRestriction($functionsDomain, $domainLevel + 1); + } + $validator = new ValidatorDomain($restrictions); + + if (!$validator->isValid($domain)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); + } + $deniedDomains = [ 'localhost', APP_HOSTNAME_INTERNAL @@ -84,12 +102,10 @@ class Create extends Action $mainDomain = System::getEnv('_APP_DOMAIN', ''); $deniedDomains[] = $mainDomain; - $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); if (!empty($sitesDomain)) { $deniedDomains[] = $sitesDomain; } - $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); if (!empty($functionsDomain)) { $deniedDomains[] = $functionsDomain; } @@ -107,10 +123,6 @@ class Create extends Action throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); } - if (\str_starts_with($domain, 'commit-') || \str_starts_with($domain, 'branch-')) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); - } - try { $domain = new Domain($domain); } catch (\Throwable) { diff --git a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Redirect/Create.php b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Redirect/Create.php index 580d92bc74..1dfef8bcc7 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Redirect/Create.php +++ b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Redirect/Create.php @@ -79,6 +79,24 @@ class Create extends Action public function action(string $domain, string $url, int $statusCode, string $resourceId, string $resourceType, Response $response, Document $project, Certificate $queueForCertificates, Event $queueForEvents, Database $dbForPlatform, Database $dbForProject) { + $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); + $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); + + $restrictions = []; + if (!empty($sitesDomain)) { + $domainLevel = \count(\explode('.', $sitesDomain)); + $restrictions[] = ValidatorDomain::createRestriction($sitesDomain, $domainLevel + 1, ['commit-', 'branch-']); + } + if (!empty($functionsDomain)) { + $domainLevel = \count(\explode('.', $functionsDomain)); + $restrictions[] = ValidatorDomain::createRestriction($functionsDomain, $domainLevel + 1); + } + $validator = new ValidatorDomain($restrictions); + + if (!$validator->isValid($domain)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); + } + $deniedDomains = [ 'localhost', APP_HOSTNAME_INTERNAL @@ -87,12 +105,10 @@ class Create extends Action $mainDomain = System::getEnv('_APP_DOMAIN', ''); $deniedDomains[] = $mainDomain; - $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); if (!empty($sitesDomain)) { $deniedDomains[] = $sitesDomain; } - $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); if (!empty($functionsDomain)) { $deniedDomains[] = $functionsDomain; } @@ -110,10 +126,6 @@ class Create extends Action throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); } - if (\str_starts_with($domain, 'commit-') || \str_starts_with($domain, 'branch-')) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); - } - try { $domain = new Domain($domain); } catch (\Throwable) { diff --git a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Site/Create.php b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Site/Create.php index 7a5a1f4952..43cf09eaca 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Site/Create.php +++ b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Site/Create.php @@ -76,6 +76,24 @@ class Create extends Action public function action(string $domain, string $siteId, string $branch, Response $response, Document $project, Certificate $queueForCertificates, Event $queueForEvents, Database $dbForPlatform, Database $dbForProject) { + $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); + $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); + + $restrictions = []; + if (!empty($sitesDomain)) { + $domainLevel = \count(\explode('.', $sitesDomain)); + $restrictions[] = ValidatorDomain::createRestriction($sitesDomain, $domainLevel + 1, ['commit-', 'branch-']); + } + if (!empty($functionsDomain)) { + $domainLevel = \count(\explode('.', $functionsDomain)); + $restrictions[] = ValidatorDomain::createRestriction($functionsDomain, $domainLevel + 1); + } + $validator = new ValidatorDomain($restrictions); + + if (!$validator->isValid($domain)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); + } + $deniedDomains = [ 'localhost', APP_HOSTNAME_INTERNAL @@ -84,12 +102,10 @@ class Create extends Action $mainDomain = System::getEnv('_APP_DOMAIN', ''); $deniedDomains[] = $mainDomain; - $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); if (!empty($sitesDomain)) { $deniedDomains[] = $sitesDomain; } - $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); if (!empty($functionsDomain)) { $deniedDomains[] = $functionsDomain; } @@ -107,10 +123,6 @@ class Create extends Action throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); } - if (\str_starts_with($domain, 'commit-') || \str_starts_with($domain, 'branch-')) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); - } - try { $domain = new Domain($domain); } catch (\Throwable) { diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Deployments/XList.php b/src/Appwrite/Platform/Modules/Sites/Http/Deployments/XList.php index a1a79ec155..436cd69b52 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Deployments/XList.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Deployments/XList.php @@ -3,10 +3,12 @@ namespace Appwrite\Platform\Modules\Sites\Http\Deployments; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Deployments; +use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use Utopia\Database\Database; use Utopia\Database\Document; @@ -19,7 +21,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Text; -class XList extends Action +class XList extends Base { use HTTP; @@ -55,13 +57,20 @@ class XList extends Action ->param('siteId', '', new UID(), 'Site ID.') ->param('queries', [], new Deployments(), '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(', ', Deployments::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) + ->inject('request') ->inject('response') ->inject('dbForProject') ->callback($this->action(...)); } - public function action(string $siteId, array $queries, string $search, Response $response, Database $dbForProject) - { + public function action( + string $siteId, + array $queries, + string $search, + Request $request, + Response $response, + Database $dbForProject + ) { $site = $dbForProject->getDocument('sites', $siteId); if ($site->isEmpty()) { @@ -116,6 +125,7 @@ class XList extends Action 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."); } + $this->applySelectQueries($request, $response, Response::MODEL_DEPLOYMENT); $response->dynamic(new Document([ 'deployments' => $results, 'total' => $total, diff --git a/src/Appwrite/Platform/Tasks/ScheduleBase.php b/src/Appwrite/Platform/Tasks/ScheduleBase.php index 222051a67f..5cd25b09b4 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleBase.php +++ b/src/Appwrite/Platform/Tasks/ScheduleBase.php @@ -26,6 +26,8 @@ abstract class ScheduleBase extends Action protected BrokerPool $publisher; protected BrokerPool $publisherMigrations; + protected BrokerPool $publisherFunctions; + protected BrokerPool $publisherMessaging; private ?Histogram $collectSchedulesTelemetryDuration = null; private ?Gauge $collectSchedulesTelemetryCount = null; @@ -45,6 +47,8 @@ abstract class ScheduleBase extends Action ->desc("Execute {$type}s scheduled in Appwrite") ->inject('publisher') ->inject('publisherMigrations') + ->inject('publisherFunctions') + ->inject('publisherMessaging') ->inject('dbForPlatform') ->inject('getProjectDB') ->inject('telemetry') @@ -67,13 +71,15 @@ abstract class ScheduleBase extends Action * 2. Create timer that sync all changes from 'schedules' collection to local copy. Only reading changes thanks to 'resourceUpdatedAt' attribute * 3. Create timer that prepares coroutines for soon-to-execute schedules. When it's ready, coroutine sleeps until exact time before sending request to worker. */ - public function action(BrokerPool $publisher, BrokerPool $publisherMigrations, Database $dbForPlatform, callable $getProjectDB, Telemetry $telemetry): void + public function action(BrokerPool $publisher, BrokerPool $publisherMigrations, BrokerPool $publisherFunctions, BrokerPool $publisherMessaging, Database $dbForPlatform, callable $getProjectDB, Telemetry $telemetry): void { Console::title(\ucfirst(static::getSupportedResource()) . ' scheduler V1'); Console::success(APP_NAME . ' ' . \ucfirst(static::getSupportedResource()) . ' scheduler v1 has started'); $this->publisher = $publisher; $this->publisherMigrations = $publisherMigrations; + $this->publisherFunctions = $publisherFunctions; + $this->publisherMessaging = $publisherMessaging; $this->scheduleTelemetryCount = $telemetry->createGauge('task.schedule.count'); $this->collectSchedulesTelemetryDuration = $telemetry->createHistogram('task.schedule.collect_schedules.duration', 's'); diff --git a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php index 96a5a05f0e..14a4259e17 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php @@ -30,7 +30,7 @@ class ScheduleExecutions extends ScheduleBase { $intervalEnd = (new \DateTime())->modify('+' . self::ENQUEUE_TIMER . ' seconds'); - $queueForFunctions = new Func($this->publisher); + $queueForFunctions = new Func($this->publisherFunctions); foreach ($this->schedules as $schedule) { if (!$schedule['active']) { diff --git a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php index 43f1025c08..6f072425e4 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php @@ -90,7 +90,7 @@ class ScheduleFunctions extends ScheduleBase $this->updateProjectAccess($schedule['project'], $dbForPlatform); - $queueForFunctions = new Func($this->publisher); + $queueForFunctions = new Func($this->publisherFunctions); $queueForFunctions ->setType('schedule') diff --git a/src/Appwrite/Platform/Tasks/ScheduleMessages.php b/src/Appwrite/Platform/Tasks/ScheduleMessages.php index c4e1376ff9..fe4afbe69c 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleMessages.php +++ b/src/Appwrite/Platform/Tasks/ScheduleMessages.php @@ -40,7 +40,7 @@ class ScheduleMessages extends ScheduleBase } \go(function () use ($schedule, $scheduledAt, $dbForPlatform) { - $queueForMessaging = new Messaging($this->publisher); + $queueForMessaging = new Messaging($this->publisherMessaging); $this->updateProjectAccess($schedule['project'], $dbForPlatform); diff --git a/src/Appwrite/Platform/Workers/Audits.php b/src/Appwrite/Platform/Workers/Audits.php index 04b562a219..a88e2e641f 100644 --- a/src/Appwrite/Platform/Workers/Audits.php +++ b/src/Appwrite/Platform/Workers/Audits.php @@ -131,21 +131,23 @@ class Audits extends Action return new NoCommit(); } - try { - foreach ($this->logs as $sequence => $projectLogs) { - $dbForProject = $getProjectDB($projectLogs['project']); + foreach ($this->logs as $sequence => $projectLogs) { + try { + Console::log('Processing Project "' . $sequence . '" batch with ' . count($projectLogs['logs']) . ' events'); - Console::log('Processing batch with ' . count($projectLogs['logs']) . ' events'); + $projectDocument = $projectLogs['project']; + $dbForProject = $getProjectDB($projectDocument); $audit = new Audit($dbForProject); - $audit->logBatch($projectLogs['logs']); - Console::success('Audit logs processed successfully'); + Console::success('Audit logs processed successfully'); + } catch (Throwable $e) { + Console::error('Error processing audit logs for Project "' . $sequence . '": ' . $e->getMessage()); + } finally { unset($this->logs[$sequence]); } - } catch (Throwable $e) { - Console::error('Error processing audit logs: ' . $e->getMessage()); } + $this->lastTriggeredTime = time(); return new Commit(); } diff --git a/src/Appwrite/Platform/Workers/Functions.php b/src/Appwrite/Platform/Workers/Functions.php index 2e25248d9a..df1833ad33 100644 --- a/src/Appwrite/Platform/Workers/Functions.php +++ b/src/Appwrite/Platform/Workers/Functions.php @@ -264,6 +264,8 @@ class Functions extends Action string $jwt = null, string $event = null, ): void { + $executionId = ID::unique(); + $headers['x-appwrite-execution-id'] = $executionId ?? ''; $headers['x-appwrite-trigger'] = $trigger; $headers['x-appwrite-event'] = $event ?? ''; $headers['x-appwrite-user-id'] = $user->getId() ?? ''; @@ -276,7 +278,6 @@ class Functions extends Action } } - $executionId = ID::unique(); $execution = new Document([ '$id' => $executionId, '$permissions' => $user->isEmpty() ? [] : [Permission::read(Role::user($user->getId()))], @@ -397,6 +398,7 @@ class Functions extends Action 'scopes' => $function->getAttribute('scopes', []) ]); + $headers['x-appwrite-execution-id'] = $executionId ?? ''; $headers['x-appwrite-key'] = API_KEY_DYNAMIC . '_' . $apiKey; $headers['x-appwrite-trigger'] = $trigger; $headers['x-appwrite-event'] = $event ?? ''; @@ -409,6 +411,8 @@ class Functions extends Action /** Create execution or update execution status */ $execution = $dbForProject->getDocument('executions', $executionId ?? ''); if ($execution->isEmpty()) { + $executionId = ID::unique(); + $headers['x-appwrite-execution-id'] = $executionId; $headersFiltered = []; foreach ($headers as $key => $value) { if (\in_array(\strtolower($key), FUNCTION_ALLOWLIST_HEADERS_REQUEST)) { @@ -416,7 +420,6 @@ class Functions extends Action } } - $executionId = ID::unique(); $execution = new Document([ '$id' => $executionId, '$permissions' => $user->isEmpty() ? [] : [Permission::read(Role::user($user->getId()))], @@ -543,6 +546,8 @@ class Functions extends Action $status = $executionResponse['statusCode'] >= 500 ? 'failed' : 'completed'; + $executionResponse['headers']['x-appwrite-execution-id'] = $execution->getId(); + $headersFiltered = []; foreach ($executionResponse['headers'] as $key => $value) { if (\in_array(\strtolower($key), FUNCTION_ALLOWLIST_HEADERS_RESPONSE)) { @@ -550,14 +555,36 @@ class Functions extends Action } } + $maxLogLength = APP_FUNCTION_LOG_LENGTH_LIMIT; + $logs = $executionResponse['logs'] ?? ''; + + if (\is_string($logs) && \strlen($logs) > $maxLogLength) { + $warningMessage = "[WARNING] Logs truncated. The output exceeded {$maxLogLength} characters.\n"; + $warningLength = \strlen($warningMessage); + $maxContentLength = $maxLogLength - $warningLength; + $logs = $warningMessage . \substr($logs, -$maxContentLength); + } + + // Truncate errors if they exceed the limit + $maxErrorLength = APP_FUNCTION_ERROR_LENGTH_LIMIT; + $errors = $executionResponse['errors'] ?? ''; + + if (\is_string($errors) && \strlen($errors) > $maxErrorLength) { + $warningMessage = "[WARNING] Errors truncated. The output exceeded {$maxErrorLength} characters.\n"; + $warningLength = \strlen($warningMessage); + $maxContentLength = $maxErrorLength - $warningLength; + $errors = $warningMessage . \substr($errors, -$maxContentLength); + } + /** Update execution status */ $execution ->setAttribute('status', $status) ->setAttribute('responseStatusCode', $executionResponse['statusCode']) ->setAttribute('responseHeaders', $headersFiltered) - ->setAttribute('logs', $executionResponse['logs']) - ->setAttribute('errors', $executionResponse['errors']) + ->setAttribute('logs', $logs) + ->setAttribute('errors', $errors) ->setAttribute('duration', $executionResponse['duration']); + } catch (\Throwable $th) { $durationEnd = \microtime(true); $execution diff --git a/src/Appwrite/Platform/Workers/Mails.php b/src/Appwrite/Platform/Workers/Mails.php index f07cfcf699..117b689863 100644 --- a/src/Appwrite/Platform/Workers/Mails.php +++ b/src/Appwrite/Platform/Workers/Mails.php @@ -6,7 +6,6 @@ use Appwrite\Template\Template; use Exception; use PHPMailer\PHPMailer\PHPMailer; use Swoole\Runtime; -use Utopia\CLI\Console; use Utopia\Logger\Log; use Utopia\Platform\Action; use Utopia\Queue\Message; @@ -149,17 +148,6 @@ class Mails extends Action $mail->AltBody = \strip_tags($mail->AltBody); $mail->AltBody = \trim($mail->AltBody); - if (\str_contains($mail->Body, 'buttonText') || \str_contains($mail->AltBody, 'buttonText')) { - Console::warning('Email might contain placeholder. Logs relevant to verify and isolate the issue:'); - var_dump($mail->Body); - var_dump($mail->AltBody); - \var_dump($message->getPayload()); - \var_dump($message->getPid()); - \var_dump($message->getQueue()); - \var_dump($message->getTimestamp()); - Console::warning('End of placeholder detection report.'); - } - $replyTo = System::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', APP_EMAIL_TEAM); $replyToName = \urldecode(System::getEnv('_APP_SYSTEM_EMAIL_NAME', APP_NAME . ' Server')); diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 39adb37374..cd7a6a1058 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -204,7 +204,6 @@ class Migrations extends Action // set the errors back without trace $clonedMigrationDocument->setAttribute('errors', $errorMessages); - /** Trigger Realtime Events */ $queueForRealtime ->setProject($project) diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index 77e3e1f1af..8d11b07198 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -24,7 +24,7 @@ class Method * @param array<SDKResponse> $responses * @param ContentType $contentType * @param MethodType|null $type - * @param bool|Deprecated $deprecated + * @param Deprecated|null $deprecated * @param array|bool $hide * @param bool $packaging * @param ContentType $requestType @@ -41,7 +41,7 @@ class Method protected array $responses, protected ContentType $contentType = ContentType::JSON, protected ?MethodType $type = null, - protected bool|Deprecated $deprecated = false, + protected ?Deprecated $deprecated = null, protected array|bool $hide = false, protected bool $packaging = false, protected ContentType $requestType = ContentType::JSON, @@ -185,10 +185,10 @@ class Method public function isDeprecated(): bool { - return $this->deprecated !== false; + return $this->deprecated !== null; } - public function getDeprecated(): bool|Deprecated + public function getDeprecated(): ?Deprecated { return $this->deprecated; } diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index 6ab0310e14..825f9bf01d 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -175,13 +175,12 @@ abstract class Format break; case 'databases': switch ($method) { - /*case 'getUsage':*/ + case 'getUsage': case 'listUsage': case 'getCollectionUsage': - case 'getDatabaseUsage': switch ($param) { case 'range': - return 'DatabaseUsageRange'; + return 'UsageRange'; } break; case 'createRelationshipAttribute': @@ -207,14 +206,14 @@ abstract class Format } } break; - case 'grids': + case 'tablesDB': switch ($method) { - case 'getDatabaseUsage': - case 'listDatabaseUsage': + case 'getUsage': + case 'listUsage': case 'getTableUsage': switch ($param) { case 'range': - return 'GridUsageRange'; + return 'UsageRange'; } break; case 'createRelationshipColumn': @@ -246,7 +245,7 @@ abstract class Format case 'listUsage': switch ($param) { case 'range': - return 'FunctionUsageRange'; + return 'UsageRange'; } break; case 'createExecution': @@ -281,7 +280,7 @@ abstract class Format case 'listUsage': switch ($param) { case 'range': - return 'SiteUsageRange'; + return 'UsageRange'; } break; case 'createVcsDeployment': @@ -404,7 +403,7 @@ abstract class Format case 'getBucketUsage': switch ($param) { case 'range': - return 'StorageUsageRange'; + return 'UsageRange'; } break; case 'getFilePreview': @@ -422,7 +421,7 @@ abstract class Format case 'getUsage': switch ($param) { case 'range': - return 'UserUsageRange'; + return 'UsageRange'; } break; case 'createMfaAuthenticator': @@ -479,18 +478,17 @@ abstract class Format break; case 'databases': switch ($method) { - /*case 'getUsage':*/ + case 'getUsage': case 'listUsage': case 'getCollectionUsage': - case 'getDatabaseUsage': // Range Enum Keys return ['Twenty Four Hours', 'Thirty Days', 'Ninety Days']; } break; - case 'grids': + case 'tablesDB': switch ($method) { - case 'getDatabaseUsage': - case 'listDatabaseUsage': + case 'getUsage': + case 'listUsage': 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 e9933f4a25..4a492e4c00 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -3,7 +3,6 @@ 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; @@ -156,7 +155,7 @@ class OpenAPI3 extends Format 'weight' => $route->getOrder(), 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', - 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($methodName) . '.md', + 'demo' => \strtolower($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), @@ -167,7 +166,7 @@ class OpenAPI3 extends Format ], ]; - if ($sdk->getDeprecated() instanceof Deprecated) { + if ($sdk->getDeprecated()) { $temp['x-appwrite']['deprecated'] = [ 'since' => $sdk->getDeprecated()->getSince(), 'replaceWith' => $sdk->getDeprecated()->getReplaceWith(), @@ -216,17 +215,17 @@ class OpenAPI3 extends Format $additionalMethod = [ 'name' => $methodObj->getMethodName(), 'namespace' => $methodObj->getNamespace(), - 'desc' => $method->getDesc() ?? '', + 'desc' => $methodObj->getDesc() ?? '', 'auth' => \array_slice($methodSecurities, 0, $this->authCount), 'parameters' => [], 'required' => [], 'responses' => [], 'description' => ($desc) ? \file_get_contents($desc) : '', - 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method->getMethodName()) . '.md', + 'demo' => \strtolower($namespace) . '/' . Template::fromCamelCaseToDash($methodObj->getMethodName()) . '.md', ]; // add deprecation only if method has it! - if ($methodObj->getDeprecated() instanceof Deprecated) { + if ($methodObj->getDeprecated()) { $additionalMethod['deprecated'] = [ 'since' => $methodObj->getDeprecated()->getSince(), 'replaceWith' => $methodObj->getDeprecated()->getReplaceWith(), diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index db561650d8..313d46be8f 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -3,7 +3,6 @@ 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; @@ -160,7 +159,7 @@ class Swagger2 extends Format 'weight' => $route->getOrder(), 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', - 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($methodName) . '.md', + 'demo' => \strtolower($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), @@ -171,7 +170,7 @@ class Swagger2 extends Format ], ]; - if ($sdk->getDeprecated() instanceof Deprecated) { + if ($sdk->getDeprecated()) { $temp['x-appwrite']['deprecated'] = [ 'since' => $sdk->getDeprecated()->getSince(), 'replaceWith' => $sdk->getDeprecated()->getReplaceWith(), @@ -225,15 +224,17 @@ class Swagger2 extends Format $additionalMethod = [ 'name' => $methodObj->getMethodName(), 'namespace' => $methodObj->getNamespace(), + 'desc' => $methodObj->getDesc() ?? '', 'auth' => \array_slice($methodSecurities, 0, $this->authCount), 'parameters' => [], 'required' => [], 'responses' => [], 'description' => ($desc) ? \file_get_contents($desc) : '', + 'demo' => \strtolower($namespace) . '/' . Template::fromCamelCaseToDash($methodObj->getMethodName()) . '.md', ]; // add deprecation only if method has it! - if ($methodObj->getDeprecated() instanceof Deprecated) { + if ($methodObj->getDeprecated()) { $additionalMethod['deprecated'] = [ 'since' => $methodObj->getDeprecated()->getSince(), 'replaceWith' => $methodObj->getDeprecated()->getReplaceWith(), @@ -348,11 +349,10 @@ class Swagger2 extends Format } } - if (!empty($scope)) { // && 'public' != $scope + if (!empty($scope)) { $securities = ['Project' => []]; foreach ($sdk->getAuth() as $security) { - /** @var AuthType $security */ if (\array_key_exists($security->value, $this->keys)) { $securities[$security->value] = []; } diff --git a/src/Appwrite/Template/Template.php b/src/Appwrite/Template/Template.php index e0568c98e9..c8744c87bb 100644 --- a/src/Appwrite/Template/Template.php +++ b/src/Appwrite/Template/Template.php @@ -173,6 +173,6 @@ class Template extends View */ public static function fromCamelCaseToDash($input): string { - return \str_replace([' ', '_'], '-', \strtolower(\preg_replace('/([a-zA-Z])(?=[A-Z])/', '$1-', $input))); + return \str_replace([' ', '_'], '', \strtolower(\preg_replace('/(?<!^)([A-Z][a-z]|(?<=[a-z])[^a-z\s]|(?<=[A-Z])[0-9_])/', '-$1', $input))); } } diff --git a/src/Appwrite/Transformation/Adapter/Preview.php b/src/Appwrite/Transformation/Adapter/Preview.php index 70af19a188..bfbb2e82fd 100644 --- a/src/Appwrite/Transformation/Adapter/Preview.php +++ b/src/Appwrite/Transformation/Adapter/Preview.php @@ -32,9 +32,24 @@ class Preview extends Adapter $this->output = $this->input; $banner = <<<EOT + <link rel="preconnect" href="https://assets.appwrite.io/" crossorigin> + <style> + @font-face { + font-family: 'Inter'; + src: url('https://assets.appwrite.io/fonts/inter/Inter-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; + } + @font-face { + font-family: 'Inter'; + src: url('https://assets.appwrite.io/fonts/inter/Inter-Medium.woff2') format('woff2'); + font-weight: 500; + font-style: normal; + font-display: swap; + } + </style> <style> - @import url(https://fonts.bunny.net/css?family=fira-code:400|inter:400); - #appwrite-preview { min-width: auto; min-height: auto; diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Base.php b/src/Appwrite/Utopia/Database/Validator/Queries/Base.php index 1c5dec44dd..9d9bbde00b 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Base.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Base.php @@ -11,6 +11,7 @@ use Utopia\Database\Validator\Query\Filter; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\Query\Order; +use Utopia\Database\Validator\Query\Select; class Base extends Queries { @@ -40,41 +41,51 @@ class Base extends Queries $allowedAttributesLookup[$attribute] = true; } + $allAttributes = []; $attributes = []; foreach ($collection['attributes'] as $attribute) { $key = $attribute['$id']; - if (!isset($allowedAttributesLookup[$key])) { - continue; - } - - $attributes[] = new Document([ + $attributeDocument = new Document([ 'key' => $key, 'type' => $attribute['type'], 'array' => $attribute['array'], ]); + + $allAttributes[] = $attributeDocument; + + if (isset($allowedAttributesLookup[$key])) { + $attributes[] = $attributeDocument; + } } - $attributes[] = new Document([ - 'key' => '$id', - 'type' => Database::VAR_STRING, - 'array' => false, - ]); - $attributes[] = new Document([ - 'key' => '$createdAt', - 'type' => Database::VAR_DATETIME, - 'array' => false, - ]); - $attributes[] = new Document([ - 'key' => '$updatedAt', - 'type' => Database::VAR_DATETIME, - 'array' => false, - ]); - $attributes[] = new Document([ - 'key' => '$sequence', - 'type' => Database::VAR_INTEGER, - 'array' => false, - ]); + $internalAttributes = [ + new Document([ + 'key' => '$id', + 'type' => Database::VAR_STRING, + 'array' => false, + ]), + new Document([ + 'key' => '$createdAt', + 'type' => Database::VAR_DATETIME, + 'array' => false, + ]), + new Document([ + 'key' => '$updatedAt', + 'type' => Database::VAR_DATETIME, + 'array' => false, + ]), + new Document([ + 'key' => '$sequence', + 'type' => Database::VAR_INTEGER, + 'array' => false, + ]) + ]; + + foreach ($internalAttributes as $attribute) { + $attributes[] = $attribute; + $allAttributes[] = $attribute; + } $validators = [ new Limit(), @@ -84,6 +95,15 @@ class Base extends Queries new Order($attributes), ]; + if ($this->isSelectQueryAllowed()) { + $validators[] = new Select($allAttributes); + } + parent::__construct($validators); } + + public function isSelectQueryAllowed(): bool + { + return false; + } } diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Deployments.php b/src/Appwrite/Utopia/Database/Validator/Queries/Deployments.php index 73631ecfb8..6348e69cd9 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Deployments.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Deployments.php @@ -22,4 +22,9 @@ class Deployments extends Base { parent::__construct('deployments', self::ALLOWED_ATTRIBUTES); } + + public function isSelectQueryAllowed(): bool + { + return true; + } } diff --git a/src/Appwrite/Utopia/Request/Filters/V20.php b/src/Appwrite/Utopia/Request/Filters/V20.php index bb25f39c8e..c8622f8b7a 100644 --- a/src/Appwrite/Utopia/Request/Filters/V20.php +++ b/src/Appwrite/Utopia/Request/Filters/V20.php @@ -32,55 +32,67 @@ class V20 extends Filter */ protected function manageSelectQueries(array $content): array { - $hasWildcard = false; - if (! isset($content['queries'])) { - $hasWildcard = true; - // only query, make it json encoded! - $content['queries'] = [Query::select(['*'])->toString()]; + if (!isset($content['queries'])) { + $content['queries'] = []; + } + + // Handle case where queries is an array but empty + if (\is_array($content['queries'])) { + $content['queries'] = \array_filter($content['queries'], function ($q) { + if (\is_object($q) && empty((array)$q)) { + return false; + } + if (\is_string($q) && \trim($q) === '') { + return false; + } + if (empty($q)) { + return false; + } + return true; + }); } try { $parsed = Query::parseQueries($content['queries']); } catch (QueryException) { - // don't crash! return $content; } $selections = Query::groupByType($parsed)['selections'] ?? []; - if (! $hasWildcard) { - // check if any select includes a wildcard as we added one above + // Check if we need to add wildcard + relationships + // This happens when: + // 1. No select queries exist, OR + // 2. A wildcard select exists + $needsRelationships = empty($selections); + if (!$needsRelationships) { foreach ($selections as $select) { if (\in_array('*', $select->getValues(), true)) { - $hasWildcard = true; + $needsRelationships = true; break; } } } /** - * Add `keys.*` for all model types! + * Add wildcard and relationship selects for backward compatibility */ - if ($hasWildcard) { + if ($needsRelationships) { $relatedKeys = $this->getRelatedCollectionKeys(); + $selects = \array_values(\array_unique(\array_merge(['*'], $relatedKeys))); - if (! empty($relatedKeys)) { - $selects = \array_values(\array_unique(\array_merge(['*'], $relatedKeys))); + // Remove any existing select queries + $parsed = \array_filter( + $parsed, + fn ($query) => $query->getMethod() !== Query::TYPE_SELECT + ); - // remove previous select queries - $parsed = \array_filter( - $parsed, - fn ($query) => $query->getMethod() !== Query::TYPE_SELECT - ); - - // add wildcard + relationship(s) selects - $parsed[] = Query::select($selects); - } + // Add wildcard + relationship(s) selects + $parsed[] = Query::select($selects); } $resolvedQueries = []; foreach ($parsed as $query) { - // make em json encoded! $resolvedQueries[] = $query->toString(); } @@ -91,37 +103,89 @@ class V20 extends Filter /** * Returns all relationship attribute keys in `key.*` format for use with `Query::select`. + * Recursively includes nested relationships up to 3 levels deep. + * Prevents infinite loops by tracking all visited collections in the current path. */ - private function getRelatedCollectionKeys(): array - { - $dbForProject = $this->getDbForProject(); + private function getRelatedCollectionKeys( + ?string $databaseId = null, + ?string $collectionId = null, + ?string $prefix = null, + int $depth = 1, + array $visited = [] + ): array { + $databaseId ??= $this->getParamValue('databaseId'); + $collectionId ??= $this->getParamValue('collectionId'); + if ( + empty($databaseId) || + empty($collectionId) || + $depth > Database::RELATION_MAX_DEPTH + ) { + return []; + } + + // Check if we've already visited this collection in the current path to prevent cycles + if (in_array($collectionId, $visited)) { + return []; + } + + $visited[] = $collectionId; + + $dbForProject = $this->getDbForProject(); if ($dbForProject === null) { return []; } - $databaseId = $this->getParamValue('databaseId'); - $collectionId = $this->getParamValue('collectionId'); - - if (empty($databaseId) || empty($collectionId)) { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { return []; } - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - $collection = $dbForProject->getDocument( + $collection = Authorization::skip(fn () => $dbForProject->getDocument( 'database_' . $database->getSequence(), $collectionId - ); + )); + if ($collection->isEmpty()) { + return []; + } $attributes = $collection->getAttribute('attributes', []); + $relationshipKeys = []; - return \array_values(\array_map( - fn ($attr) => $attr['key'] . '.*', - \array_filter( - $attributes, - fn ($attr) => ($attr['type'] ?? null) === Database::VAR_RELATIONSHIP - ) - )); + foreach ($attributes as $attr) { + if ( + ($attr['type'] ?? null) !== Database::VAR_RELATIONSHIP || + $attr['status'] !== 'available' + ) { + continue; + } + + $key = $attr['key']; + $fullKey = $prefix ? $prefix . '.' . $key : $key; + $relatedCollectionId = $attr['relatedCollection'] ?? null; + + // Skip this relationship entirely if it points to an already visited collection + if ($relatedCollectionId && in_array($relatedCollectionId, $visited)) { + continue; + } + + // Add the wildcard select for this relationship + $relationshipKeys[] = $fullKey . '.*'; + + // Continue recursively if we have a related collection + if ($relatedCollectionId) { + $nestedKeys = $this->getRelatedCollectionKeys( + $databaseId, + $relatedCollectionId, + $fullKey, + $depth + 1, + $visited + ); + + $relationshipKeys = \array_merge($relationshipKeys, $nestedKeys); + } + } + + return \array_values(\array_unique($relationshipKeys)); } } diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 53f38b9016..94ae5a0937 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -407,7 +407,7 @@ class Response extends SwooleResponse /** * Response constructor. * - * @param SwooleHTTPResponse $response + * @param SwooleHTTPResponse $response Native response to be passed to parent constructor */ public function __construct(SwooleHTTPResponse $response) { diff --git a/src/Appwrite/Utopia/Response/Filters/V20.php b/src/Appwrite/Utopia/Response/Filters/V20.php index 96e847fa1f..8bccd3ea1d 100644 --- a/src/Appwrite/Utopia/Response/Filters/V20.php +++ b/src/Appwrite/Utopia/Response/Filters/V20.php @@ -12,18 +12,15 @@ class V20 extends Filter { $parsedResponse = $content; - $parsedResponse = match($model) { + return 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; } } diff --git a/src/Appwrite/Utopia/Response/Model.php b/src/Appwrite/Utopia/Response/Model.php index 962da4834c..80c2c4d620 100644 --- a/src/Appwrite/Utopia/Response/Model.php +++ b/src/Appwrite/Utopia/Response/Model.php @@ -44,6 +44,7 @@ abstract class Model /** * Filter Document Structure + * @param Document $document Document to apply filter on * * @return Document */ @@ -105,7 +106,7 @@ abstract class Model * @param string $key * @return Model */ - protected function removeRule(string $key): self + public function removeRule(string $key): self { if (isset($this->rules[$key])) { unset($this->rules[$key]); diff --git a/src/Appwrite/Utopia/Response/Model/BaseList.php b/src/Appwrite/Utopia/Response/Model/BaseList.php index dea5d476f2..447a4436e3 100644 --- a/src/Appwrite/Utopia/Response/Model/BaseList.php +++ b/src/Appwrite/Utopia/Response/Model/BaseList.php @@ -24,8 +24,14 @@ class BaseList extends Model * @param bool $paging * @param bool $public */ - public function __construct(string $name, string $type, string $key, string $model, bool $paging = true, bool $public = true) - { + public function __construct( + string $name, + string $type, + string $key, + string $model, + bool $paging = true, + bool $public = true + ) { $this->name = $name; $this->type = $type; $this->public = $public; @@ -40,9 +46,9 @@ class BaseList extends Model ]; if (\in_array($name, $namesWithCap)) { - $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).'; + $description = 'Total number of ' . $key . ' 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 . ' rows that matched your query.'; + $description = 'Total number of ' . $key . ' that matched your query.'; } $this->addRule('total', [ diff --git a/src/Appwrite/Utopia/Response/Model/ColumnBoolean.php b/src/Appwrite/Utopia/Response/Model/ColumnBoolean.php index ffbfe0e793..0b273ca81a 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnBoolean.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnBoolean.php @@ -25,7 +25,7 @@ class ColumnBoolean extends Column ]) ->addRule('default', [ 'type' => self::TYPE_BOOLEAN, - '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' => false diff --git a/src/Appwrite/Utopia/Response/Model/ColumnDatetime.php b/src/Appwrite/Utopia/Response/Model/ColumnDatetime.php index 4c68102775..6a0321c4a8 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnDatetime.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnDatetime.php @@ -32,7 +32,7 @@ class ColumnDatetime extends Column ]) ->addRule('default', [ 'type' => self::TYPE_STRING, - 'description' => 'Default value for attribute when not provided. Only null is optional', + 'description' => 'Default value for column when not provided. Only null is optional', 'default' => null, 'example' => self::TYPE_DATETIME_EXAMPLE, 'array' => false, diff --git a/src/Appwrite/Utopia/Response/Model/ColumnEmail.php b/src/Appwrite/Utopia/Response/Model/ColumnEmail.php index 446f993227..df42a32836 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnEmail.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnEmail.php @@ -31,7 +31,7 @@ class ColumnEmail extends Column ]) ->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@example.com', diff --git a/src/Appwrite/Utopia/Response/Model/ColumnEnum.php b/src/Appwrite/Utopia/Response/Model/ColumnEnum.php index b0873a2f7b..d450c0bef5 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnEnum.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnEnum.php @@ -38,7 +38,7 @@ class ColumnEnum extends Column ]) ->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' => 'element', diff --git a/src/Appwrite/Utopia/Response/Model/ColumnFloat.php b/src/Appwrite/Utopia/Response/Model/ColumnFloat.php index 5867ac8712..e547a4b474 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnFloat.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnFloat.php @@ -39,7 +39,7 @@ class ColumnFloat extends Column ]) ->addRule('default', [ 'type' => self::TYPE_FLOAT, - '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' => 2.5, diff --git a/src/Appwrite/Utopia/Response/Model/ColumnIP.php b/src/Appwrite/Utopia/Response/Model/ColumnIP.php index 2ca7130720..7190f0106d 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnIP.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnIP.php @@ -31,7 +31,7 @@ class ColumnIP extends Column ]) ->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' => '192.0.2.0', diff --git a/src/Appwrite/Utopia/Response/Model/ColumnInteger.php b/src/Appwrite/Utopia/Response/Model/ColumnInteger.php index 086f36a961..9f6c2c89ab 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnInteger.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnInteger.php @@ -39,7 +39,7 @@ class ColumnInteger extends Column ]) ->addRule('default', [ 'type' => self::TYPE_INTEGER, - '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' => 10, diff --git a/src/Appwrite/Utopia/Response/Model/Execution.php b/src/Appwrite/Utopia/Response/Model/Execution.php index d7d30fe549..39d2203bf9 100644 --- a/src/Appwrite/Utopia/Response/Model/Execution.php +++ b/src/Appwrite/Utopia/Response/Model/Execution.php @@ -27,7 +27,7 @@ class Execution extends Model ]) ->addRule('$updatedAt', [ 'type' => self::TYPE_DATETIME, - 'description' => 'Execution upate date in ISO 8601 format.', + 'description' => 'Execution update date in ISO 8601 format.', 'default' => '', 'example' => self::TYPE_DATETIME_EXAMPLE, ]) @@ -38,12 +38,19 @@ class Execution extends Model 'example' => [Role::any()->toString()], 'array' => true, ]) + // TODO: Sites listLogs will not have this, and will need siteId instead ->addRule('functionId', [ 'type' => self::TYPE_STRING, 'description' => 'Function ID.', 'default' => '', 'example' => '5e5ea6g16897e', ]) + ->addRule('deploymentId', [ + 'type' => self::TYPE_STRING, + 'description' => 'Function\'s deployment ID used to create the execution.', + 'default' => '', + 'example' => '5e5ea5c16897e', + ]) ->addRule('trigger', [ 'type' => self::TYPE_STRING, 'description' => 'The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.', diff --git a/src/Appwrite/Utopia/Response/Model/ResourceToken.php b/src/Appwrite/Utopia/Response/Model/ResourceToken.php index ef186c3d0b..87ab66ab5d 100644 --- a/src/Appwrite/Utopia/Response/Model/ResourceToken.php +++ b/src/Appwrite/Utopia/Response/Model/ResourceToken.php @@ -61,24 +61,28 @@ class ResourceToken extends Model public function filter(Document $document): Document { - $maxAge = PHP_INT_MAX; $expire = $document->getAttribute('expire'); - if ($expire !== null) { - $now = new \DateTime(); - $expiryDate = new \DateTime($expire); + // Use a large but reasonable maxAge to avoid auto-exp when we set explicit exp + $jwt = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 86400 * 365 * 10, 10); // 10 years - // set 1 min if expired, we check for expiry later on route hooks for validation! - $maxAge = min(60, $expiryDate->getTimestamp() - $now->getTimestamp()); - } - - $jwt = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', $maxAge, 10); - $secret = $jwt->encode([ + $payload = [ 'tokenId' => $document->getId(), 'resourceId' => $document->getAttribute('resourceId'), 'resourceType' => $document->getAttribute('resourceType'), 'resourceInternalId' => $document->getAttribute('resourceInternalId'), - ]); + ]; + + // Set explicit expiration in JWT payload if we have an expiry date + if ($expire !== null) { + $expiryDate = new \DateTime($expire); + $payload['exp'] = $expiryDate->getTimestamp(); + } else { + // For infinite expiry, set 'iat' to prevent JWT library from auto-adding 'exp' + $payload['iat'] = time(); + } + + $secret = $jwt->encode($payload); $document->setAttribute('secret', $secret); diff --git a/src/Appwrite/Utopia/Response/Model/Row.php b/src/Appwrite/Utopia/Response/Model/Row.php index b7750feccd..14a9ec9cda 100644 --- a/src/Appwrite/Utopia/Response/Model/Row.php +++ b/src/Appwrite/Utopia/Response/Model/Row.php @@ -41,18 +41,21 @@ class Row extends Any 'description' => 'Row automatically incrementing ID.', 'default' => 0, 'example' => 1, + 'readOnly' => true, ]) ->addRule('$tableId', [ 'type' => self::TYPE_STRING, 'description' => 'Table ID.', 'default' => '', 'example' => '5e5ea5c15117e', + 'readOnly' => true, ]) ->addRule('$databaseId', [ 'type' => self::TYPE_STRING, 'description' => 'Database ID.', 'default' => '', 'example' => '5e5ea5c15117e', + 'readOnly' => true, ]) ->addRule('$createdAt', [ 'type' => self::TYPE_DATETIME, @@ -79,13 +82,7 @@ class Row extends Any { $document->removeAttribute('$collection'); $document->removeAttribute('$tenant'); - - $collectionId = $document->getAttribute('$collectionId', ''); - if (!empty($collectionId)) { - $document - ->removeAttribute('$collectionId') - ->setAttribute('$tableId', $collectionId); - } + $document->setAttribute('$sequence', (int)$document->getAttribute('$sequence', 0)); foreach ($document->getAttributes() as $column) { if (\is_array($column)) { diff --git a/tests/e2e/Client.php b/tests/e2e/Client.php index e411b68454..6b81713654 100644 --- a/tests/e2e/Client.php +++ b/tests/e2e/Client.php @@ -108,6 +108,20 @@ class Client return $this; } + /** + * Set Response Format + * + * @param string $value + * + * @return self $this + */ + public function setResponseFormat(string $value): self + { + $this->addHeader('X-Appwrite-Response-Format', $value); + + return $this; + } + /** * @param bool $status true * @return self $this diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 090f1faec7..8f5477331a 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 . '/grids/tables', + '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, + '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns' . '/string', + '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/rows/' . $rowId, + '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/usage?range=30d', + '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/usage?range=30d', $this->getConsoleHeaders() ); @@ -1290,7 +1290,7 @@ class UsageTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'domain' => 'test-' . ID::unique() . System::getEnv('_APP_DOMAIN_FUNCTIONS'), + 'domain' => 'test-' . ID::unique() . '.' . System::getEnv('_APP_DOMAIN_FUNCTIONS'), 'functionId' => $functionId, ], ); diff --git a/tests/e2e/Scopes/Scope.php b/tests/e2e/Scopes/Scope.php index 2dbeae961e..5b7f1a8771 100644 --- a/tests/e2e/Scopes/Scope.php +++ b/tests/e2e/Scopes/Scope.php @@ -7,6 +7,7 @@ use Appwrite\Tests\Retryable; use PHPUnit\Framework\TestCase; use Tests\E2E\Client; use Utopia\Database\Helpers\ID; +use Utopia\System\System; abstract class Scope extends TestCase { @@ -23,6 +24,17 @@ abstract class Scope extends TestCase { $this->client = new Client(); $this->client->setEndpoint($this->endpoint); + + $format = System::getEnv('_APP_E2E_RESPONSE_FORMAT'); + if (!empty($format)) { + if ( + !\preg_match('/^\d+\.\d+\.\d+$/', $format) || + !\version_compare($format, APP_VERSION_STABLE, '<=') + ) { + throw new \Exception('E2E response format must be ' . APP_VERSION_STABLE . ' or lower.'); + } + $this->client->setResponseFormat($format); + } } protected function tearDown(): void diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index d652673370..4a56a3ae0c 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -32,44 +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('grids', $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->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' => 'legacy' - ]); - $this->assertNotEmpty($database2['body']['$id']); - $this->assertEquals(201, $database2['headers']['status-code']); - $this->assertEquals('Test Database with type', $database2['body']['name']); - $this->assertEquals('legacy', $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']); + $this->assertEquals('legacy', $database['body']['type']); return ['databaseId' => $database['body']['$id']]; } @@ -1734,6 +1697,7 @@ trait DatabasesBase return $data; } + /** * @depends testCreateIndexes */ @@ -1741,6 +1705,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; $documentId = ID::unique(); + $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'], @@ -1758,6 +1723,7 @@ trait DatabasesBase $this->assertEquals(200, $document['headers']['status-code']); $this->assertCount(3, $document['body']['$permissions']); + $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'], @@ -1765,6 +1731,35 @@ trait DatabasesBase $this->assertEquals('Thor: Ragnarok', $document['body']['title']); + /** + * Resubmit same document, nothing to update + */ + $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, + 'integers' => [], + 'birthDay' => null, + 'duration' => null, + 'starringActors' => [], + 'actors' => [], + 'tagline' => '', + 'description' => '', + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + ]); + + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $document['body']['title']); + $this->assertCount(3, $document['body']['$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'], @@ -2217,6 +2212,55 @@ trait DatabasesBase $this->assertArrayHasKey('$permissions', $library3['body']); $this->assertCount(3, $library3['body']['$permissions']); $this->assertNotEmpty($library3['body']['$permissions']); + + // Readonly attributes are ignored + $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' => [ + '$id' => 'some-other-id', + '$collectionId' => 'some-other-collection', + '$databaseId' => 'some-other-database', + '$createdAt' => '2024-01-01T00:00:00Z', + '$updatedAt' => '2024-01-01T00:00:00Z', + 'library' => [ + '$id' => 'library3', + 'libraryName' => 'Library 3', + '$createdAt' => '2024-01-01T00:00:00Z', + '$updatedAt' => '2024-01-01T00:00:00Z', + ], + ], + ]); + + $update = $personNoPerm; + $update['body']['$id'] = 'random'; + $update['body']['$sequence'] = 123; + $update['body']['$databaseId'] = 'random'; + $update['body']['$collectionId'] = 'random'; + $update['body']['$createdAt'] = '2024-01-01T00:00:00.000+00:00'; + $update['body']['$updatedAt'] = '2024-01-01T00:00:00.000+00:00'; + + $upserted = $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' => $update['body'] + ]); + + $this->assertEquals(200, $upserted['headers']['status-code']); + $this->assertEquals($personNoPerm['body']['$id'], $upserted['body']['$id']); + $this->assertEquals($personNoPerm['body']['$collectionId'], $upserted['body']['$collectionId']); + $this->assertEquals($personNoPerm['body']['$databaseId'], $upserted['body']['$databaseId']); + $this->assertEquals($personNoPerm['body']['$sequence'], $upserted['body']['$sequence']); + + if ($this->getSide() === 'client') { + $this->assertEquals($personNoPerm['body']['$createdAt'], $upserted['body']['$createdAt']); + $this->assertNotEquals('2024-01-01T00:00:00.000+00:00', $upserted['body']['$updatedAt']); + } else { + $this->assertEquals('2024-01-01T00:00:00.000+00:00', $upserted['body']['$createdAt']); + $this->assertEquals('2024-01-01T00:00:00.000+00:00', $upserted['body']['$updatedAt']); + } } } @@ -3006,6 +3050,37 @@ trait DatabasesBase $this->assertEquals(200, $response['headers']['status-code']); + // Test readonly attributes are ignored + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-timestamp' => DateTime::formatTz(DateTime::now()), + ], $this->getHeaders()), [ + 'data' => [ + '$id' => 'newId', + '$sequence' => 9999, + '$collectionId' => 'newCollectionId', + '$databaseId' => 'newDatabaseId', + '$createdAt' => '2024-01-01T00:00:00.000+00:00', + '$updatedAt' => '2024-01-01T00:00:00.000+00:00', + 'title' => 'Thor: Ragnarok', + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals($id, $response['body']['$id']); + $this->assertEquals($data['moviesId'], $response['body']['$collectionId']); + $this->assertEquals($databaseId, $response['body']['$databaseId']); + $this->assertNotEquals(9999, $response['body']['$sequence']); + + if ($this->getSide() === 'client') { + $this->assertNotEquals('2024-01-01T00:00:00.000+00:00', $response['body']['$createdAt']); + $this->assertNotEquals('2024-01-01T00:00:00.000+00:00', $response['body']['$updatedAt']); + } else { + $this->assertEquals('2024-01-01T00:00:00.000+00:00', $response['body']['$createdAt']); + $this->assertEquals('2024-01-01T00:00:00.000+00:00', $response['body']['$updatedAt']); + } + return []; } @@ -4342,7 +4417,9 @@ trait DatabasesBase ] ]); if ($this->getSide() === 'client') { - $this->assertEquals($document['headers']['status-code'], 400); + $this->assertEquals($document['body']['title'], 'Again Updated Date Test'); + $this->assertNotEquals($document['body']['$createdAt'], DateTime::formatTz('2022-08-01 13:09:23.040')); + $this->assertNotEquals($document['body']['$updatedAt'], DateTime::formatTz('2022-08-01 13:09:23.050')); } else { $this->assertEquals($document['body']['title'], 'Again Updated Date Test'); $this->assertEquals($document['body']['$createdAt'], DateTime::formatTz('2022-08-01 13:09:23.040')); diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesCustomClientTest.php index 23153e8f39..699a2b8f25 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesCustomClientTest.php @@ -889,157 +889,4 @@ 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/Grids/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php similarity index 82% rename from tests/e2e/Services/Databases/Grids/DatabasesBase.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index 2f300e7788..c2a1ee859d 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Grids; +namespace Tests\E2E\Services\Databases\TablesDB; use Appwrite\Extend\Exception; use Tests\E2E\Client; @@ -20,7 +20,7 @@ trait DatabasesBase /** * Test for SUCCESS */ - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -32,44 +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('grids', $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->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' => 'legacy' - ]); - $this->assertNotEmpty($database2['body']['$id']); - $this->assertEquals(201, $database2['headers']['status-code']); - $this->assertEquals('Test Database with type', $database2['body']['name']); - $this->assertEquals('legacy', $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']); + $this->assertEquals('tablesdb', $database['body']['type']); return ['databaseId' => $database['body']['$id']]; } @@ -83,7 +46,7 @@ trait DatabasesBase /** * Test for SUCCESS */ - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -99,7 +62,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 . '/grids/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -135,7 +98,7 @@ trait DatabasesBase $response = $this->client->call( Client::METHOD_GET, - '/databases/console/grids/tables/' . $data['moviesId'] . '/rows', + '/tablesdb/console/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', @@ -148,7 +111,7 @@ trait DatabasesBase $response = $this->client->call( Client::METHOD_GET, - '/databases/console/grids/tables/' . $data['moviesId'] . '/rows', + '/tablesdb/console/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', // 'x-appwrite-project' => '', empty header @@ -167,7 +130,7 @@ trait DatabasesBase /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -181,7 +144,7 @@ trait DatabasesBase $this->assertFalse($response['body']['enabled']); if ($this->getSide() === 'client') { - $responseCreateDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $responseCreateRow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -196,24 +159,24 @@ trait DatabasesBase ], ]); - $this->assertEquals(404, $responseCreateDocument['headers']['status-code']); + $this->assertEquals(404, $responseCreateRow['headers']['status-code']); - $responseListDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $responseListRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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']); + $this->assertEquals(404, $responseListRow['headers']['status-code']); - $responseGetDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/someID', array_merge([ + $responseGetRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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']); + $this->assertEquals(404, $responseGetRow['headers']['status-code']); } - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -234,7 +197,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -244,7 +207,7 @@ trait DatabasesBase 'required' => true, ]); - $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $description = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -255,7 +218,7 @@ trait DatabasesBase 'default' => '', ]); - $tagline = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $tagline = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -266,7 +229,7 @@ trait DatabasesBase 'default' => '', ]); - $releaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + $releaseYear = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -277,7 +240,7 @@ trait DatabasesBase 'max' => 2200, ]); - $duration = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + $duration = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -287,7 +250,7 @@ trait DatabasesBase 'min' => 60, ]); - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -298,7 +261,7 @@ trait DatabasesBase 'array' => true, ]); - $datetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/datetime', array_merge([ + $datetime = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -307,7 +270,7 @@ trait DatabasesBase 'required' => false, ]); - $relationship = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/relationship', array_merge([ + $relationship = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -319,7 +282,7 @@ trait DatabasesBase 'twoWayKey' => 'movie' ]); - $integers = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + $integers = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -391,7 +354,7 @@ trait DatabasesBase // wait for database worker to create attributes sleep(2); - $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ + $movies = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -418,7 +381,7 @@ trait DatabasesBase public function testListColumns(array $data): void { $databaseId = $data['databaseId']; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -431,7 +394,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 . '/grids/tables/' . $data['moviesId'] . '/columns', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -449,7 +412,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -465,7 +428,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.'/grids/tables/'.$table['body']['$id'].'/columns/string', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/tablesdb/'.$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'] @@ -479,7 +442,7 @@ trait DatabasesBase sleep(1); - $index = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/grids/tables/'.$table['body']['$id'].'/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/'.$databaseId.'/tables/'.$table['body']['$id'].'/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -493,9 +456,9 @@ trait DatabasesBase sleep(1); /** - * Update attribute size to exceed Index maximum length + * Update column size to exceed Index maximum length */ - $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/'.$databaseId.'/grids/tables/'.$table['body']['$id'].'/columns/string/'.$attribute['body']['key'], array_merge([ + $attribute = $this->client->call(Client::METHOD_PATCH, '/tablesdb/'.$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'], @@ -511,7 +474,7 @@ trait DatabasesBase public function testUpdateColumnEnum(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -520,7 +483,7 @@ trait DatabasesBase 'name' => 'Test Database 2' ]); - $players = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/grids/tables', array_merge([ + $players = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $database['body']['$id'] . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -533,8 +496,8 @@ trait DatabasesBase ], ]); - // Create enum attribute - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/grids/tables/' . $players['body']['$id'] . '/columns/enum', array_merge([ + // Create enum column + $attribute = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'], @@ -551,8 +514,8 @@ trait DatabasesBase \sleep(2); - // Update enum attribute - $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $database['body']['$id'] . '/grids/tables/' . $players['body']['$id'] . '/columns/enum/' . $attribute['body']['key'], array_merge([ + // Update enum column + $attribute = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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'], @@ -572,7 +535,7 @@ trait DatabasesBase public function testColumnResponseModels(array $data): array { $databaseId = $data['databaseId']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -588,7 +551,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $columnsPath = "/databases/" . $databaseId . "/grids/tables/{$tableId}/columns"; + $columnsPath = "/tablesdb/" . $databaseId . "/tables/{$tableId}/columns"; $string = $this->client->call(Client::METHOD_POST, $columnsPath . '/string', array_merge([ 'content-type' => 'application/json', @@ -989,7 +952,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 . '/grids/tables/' . $tableId . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1101,7 +1064,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 . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1216,7 +1179,7 @@ trait DatabasesBase /** * Test for FAILURE */ - $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ + $badEnum = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1240,7 +1203,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $titleIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $titleIndex = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1256,7 +1219,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 . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $releaseYearIndex = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1272,7 +1235,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 . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $releaseWithDate1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1290,7 +1253,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 . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $releaseWithDate2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1307,7 +1270,7 @@ trait DatabasesBase $this->assertEquals('birthDay', $releaseWithDate2['body']['columns'][0]); // Test for failure - $fulltextReleaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $fulltextReleaseYear = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1320,7 +1283,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 . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $noAttributes = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1333,7 +1296,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 . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $duplicates = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1346,7 +1309,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 . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $tooLong = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1359,7 +1322,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 . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $fulltextArray = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1372,7 +1335,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 . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $actorsArray = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1384,7 +1347,7 @@ trait DatabasesBase $this->assertEquals(202, $actorsArray['headers']['status-code']); - $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1397,7 +1360,7 @@ trait DatabasesBase $this->assertEquals(202, $twoLevelsArray['headers']['status-code']); - $unknown = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $unknown = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1410,27 +1373,27 @@ 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 . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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 + 'columns' => ['integers'], // array column 'orders' => ['DESC'], // Check order is removed in API ]); $this->assertEquals(202, $index1['headers']['status-code']); - $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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 + 'columns' => ['integers'], // array column ]); $this->assertEquals(202, $index2['headers']['status-code']); @@ -1440,7 +1403,7 @@ trait DatabasesBase */ sleep(2); - $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ + $movies = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1468,7 +1431,7 @@ trait DatabasesBase $tableId = $data['moviesId']; // Test case for valid lengths - $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1481,7 +1444,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}/grids/tables/{$tableId}/indexes/lengthTestIndex", [ + $index = $this->client->call(Client::METHOD_GET, "/tablesdb/{$databaseId}/tables/{$tableId}/indexes/lengthTestIndex", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1491,7 +1454,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}/grids/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1504,7 +1467,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}/grids/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1518,7 +1481,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}/grids/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1537,7 +1500,7 @@ trait DatabasesBase public function testListIndexes(array $data): void { $databaseId = $data['databaseId']; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1549,7 +1512,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 . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1568,7 +1531,7 @@ trait DatabasesBase public function testCreateRow(array $data): array { $databaseId = $data['databaseId']; - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1589,7 +1552,7 @@ trait DatabasesBase ] ]); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1612,7 +1575,7 @@ trait DatabasesBase ] ]); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1635,7 +1598,7 @@ trait DatabasesBase ] ]); - $row4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row4 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1662,6 +1625,8 @@ trait DatabasesBase $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->assertTrue(array_key_exists('$sequence', $row1['body'])); + $this->assertIsInt($row1['body']['$sequence']); $this->assertEquals(201, $row2['headers']['status-code']); $this->assertEquals($data['moviesId'], $row2['body']['$tableId']); @@ -1706,7 +1671,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; $rowId = ID::unique(); - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1723,14 +1688,64 @@ trait DatabasesBase $this->assertEquals(200, $row['headers']['status-code']); $this->assertCount(3, $row['body']['$permissions']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + /** + * Resubmit same document, nothing to update + */ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $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, + 'integers' => [], + 'birthDay' => null, + 'duration' => null, + 'starringActors' => [], + 'actors' => [], + 'tagline' => '', + 'description' => '', + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + ]); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $row['body']['title']); + $this->assertCount(3, $row['body']['$permissions']); + + /** + * Do not allow array list + */ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + [ + 'title' => 'Thor: Ragnarok 1', + ], + [ + 'title' => 'Thor: Ragnarok 2', + ] + ], + 'permissions' => [ + Permission::read(Role::users()), + ], + ]); + $this->assertEquals(400, $row['headers']['status-code']); + + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1748,7 +1763,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 . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -1756,7 +1771,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 . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1769,7 +1784,7 @@ trait DatabasesBase ], ]); // shouldn't be able to read as no read permission - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -1782,7 +1797,7 @@ trait DatabasesBase break; } // shouldn't be able to delete as no delete permission - $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -1792,7 +1807,7 @@ trait DatabasesBase $this->assertEquals(401, $row['headers']['status-code']); } // giving the delete permission - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1807,14 +1822,14 @@ trait DatabasesBase ], ]); - $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $person = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1832,7 +1847,7 @@ trait DatabasesBase $this->assertEquals(201, $person['headers']['status-code']); - $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $library = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1850,7 +1865,7 @@ trait DatabasesBase $this->assertEquals(201, $library['headers']['status-code']); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -1862,7 +1877,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -1876,7 +1891,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ + $libraryName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -1892,7 +1907,7 @@ trait DatabasesBase // upserting values $rowId = ID::unique(); - $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ + $person1 = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1915,7 +1930,7 @@ trait DatabasesBase ]); $this->assertEquals('Library 1', $person1['body']['library']['libraryName']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1929,7 +1944,7 @@ trait DatabasesBase $this->assertEquals('Library 1', $rows['body']['rows'][0]['library']['libraryName']); - $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ + $person1 = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1953,7 +1968,7 @@ trait DatabasesBase // data should get updated $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1967,7 +1982,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 . '/grids/tables/' . $person['body']['$id'] . '/rows/'.ID::unique(), array_merge([ + $person1 = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.ID::unique(), array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1991,7 +2006,7 @@ trait DatabasesBase $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2003,7 +2018,7 @@ trait DatabasesBase $this->assertEquals(2, $rows['body']['total']); // test without passing permissions - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2016,7 +2031,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 . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2024,7 +2039,7 @@ trait DatabasesBase $this->assertEquals(200, $row['headers']['status-code']); - $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2033,10 +2048,10 @@ 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 + // Skipped on server side: Creating a row 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([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2046,10 +2061,10 @@ trait DatabasesBase ] ]); - $this->assertEquals(200, $document['headers']['status-code']); - $this->assertEquals('Thor: Ragnarok', $document['body']['title']); - $this->assertCount(3, $document['body']['$permissions']); - $permissionsCreated = $document['body']['$permissions']; + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $row['body']['title']); + $this->assertCount(3, $row['body']['$permissions']); + $permissionsCreated = $row['body']['$permissions']; // checking the default created permission $defaultPermission = [ Permission::read(Role::user($this->getUser()['$id'])), @@ -2059,15 +2074,15 @@ trait DatabasesBase // 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([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders())); - $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals(200, $row['headers']['status-code']); // updating the created doc - $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2076,14 +2091,14 @@ trait DatabasesBase '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']); + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $row['body']['title']); + $this->assertEquals(2002, $row['body']['releaseYear']); + $this->assertCount(3, $row['body']['$permissions']); + $this->assertEquals($permissionsCreated, $row['body']['$permissions']); // removing the delete permission - $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2095,12 +2110,12 @@ trait DatabasesBase 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']); + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $row['body']['title']); + $this->assertEquals(2002, $row['body']['releaseYear']); + $this->assertCount(1, $row['body']['$permissions']); - $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders())); @@ -2108,7 +2123,7 @@ trait DatabasesBase $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([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2121,22 +2136,22 @@ trait DatabasesBase 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']); + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $row['body']['title']); + $this->assertEquals(2002, $row['body']['releaseYear']); + $this->assertCount(2, $row['body']['$permissions']); - $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $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 + // upsert for the related row 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([ + $personNoPerm = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/' . $newPersonId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2151,7 +2166,7 @@ trait DatabasesBase $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([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2159,22 +2174,22 @@ trait DatabasesBase Query::select(['fullName', 'library.*'])->toString() ], ]); - $this->assertGreaterThanOrEqual(1, $documents['body']['total']); - $documentsDetails = $documents['body']['documents']; - foreach ($documentsDetails as $doc) { + $this->assertGreaterThanOrEqual(1, $rows['body']['total']); + $rowsDetails = $rows['body']['rows']; + foreach ($rowsDetails as $doc) { $this->assertCount(3, $doc['$permissions']); } $found = false; - foreach ($documents['body']['documents'] as $doc) { + foreach ($rows['body']['rows'] 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.'); + $this->assertTrue($found, 'Library 3 should be present in the upserted rows.'); // 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([ + $library3 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $library['body']['$id'] . '/rows/library3', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2193,7 +2208,7 @@ trait DatabasesBase public function testListRows(array $data): array { $databaseId = $data['databaseId']; - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2217,7 +2232,7 @@ trait DatabasesBase $this->assertEquals($data['moviesId'], $row['$tableId']); } - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2232,8 +2247,8 @@ trait DatabasesBase $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 . '/grids/tables/' . $data['moviesId'] . '/columns/string/description', array_merge([ + // changing description column to be null by default instead of empty string + $patchNull = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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'] @@ -2243,7 +2258,7 @@ trait DatabasesBase ]); // creating a dummy doc with null description - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2260,7 +2275,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rowsPaginated = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2273,7 +2288,7 @@ trait DatabasesBase $this->assertEquals(400, $rowsPaginated['headers']['status-code']); // deleting the dummy doc created - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $row1['body']['$id'], array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $row1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2287,7 +2302,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; foreach ($data['rows'] as $row) { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2314,7 +2329,7 @@ trait DatabasesBase $databaseId = $data['databaseId']; $row = $data['rows'][0]; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2338,7 +2353,7 @@ trait DatabasesBase /** * Test after without order. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2349,7 +2364,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2363,7 +2378,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2378,7 +2393,7 @@ trait DatabasesBase /** * Test with ASC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2393,7 +2408,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2410,7 +2425,7 @@ trait DatabasesBase /** * Test with DESC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2425,7 +2440,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2442,7 +2457,7 @@ trait DatabasesBase /** * Test after with unknown row. */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2457,7 +2472,7 @@ trait DatabasesBase * Test null value for cursor */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2480,7 +2495,7 @@ trait DatabasesBase /** * Test before without order. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2491,7 +2506,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2505,7 +2520,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2520,7 +2535,7 @@ trait DatabasesBase /** * Test with ASC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2535,7 +2550,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2552,7 +2567,7 @@ trait DatabasesBase /** * Test with DESC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2567,7 +2582,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2590,7 +2605,7 @@ trait DatabasesBase public function testListRowsLimitAndOffset(array $data): array { $databaseId = $data['databaseId']; - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2604,7 +2619,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2629,7 +2644,7 @@ trait DatabasesBase public function testRowsListQueries(array $data): array { $databaseId = $data['databaseId']; - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2642,7 +2657,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2655,7 +2670,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2668,7 +2683,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2682,7 +2697,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2694,7 +2709,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2706,7 +2721,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2718,7 +2733,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2731,7 +2746,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2742,7 +2757,7 @@ trait DatabasesBase $this->assertCount(3, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2753,7 +2768,7 @@ trait DatabasesBase $this->assertCount(0, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2765,7 +2780,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2777,7 +2792,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2789,7 +2804,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2803,7 +2818,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2824,7 +2839,7 @@ trait DatabasesBase $conditions[] = $i; } - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2841,7 +2856,7 @@ trait DatabasesBase $value .= "[" . $i . "] Too long title to cross 2k chars query limit "; } - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2854,7 +2869,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + // $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ // 'content-type' => 'application/json', // 'x-appwrite-project' => $this->getProject()['$id'], // ], $this->getHeaders()), [ @@ -2874,7 +2889,7 @@ trait DatabasesBase public function testUpdateRow(array $data): array { $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2907,7 +2922,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 . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2932,7 +2947,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 . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2946,7 +2961,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 . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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()), @@ -2962,7 +2977,7 @@ trait DatabasesBase * Test for failure */ - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-timestamp' => 'invalid', @@ -2976,7 +2991,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 . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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)), @@ -2999,7 +3014,7 @@ trait DatabasesBase public function testDeleteRow(array $data): array { $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3021,21 +3036,21 @@ trait DatabasesBase $this->assertEquals(201, $row['headers']['status-code']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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 . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $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 . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3053,19 +3068,19 @@ trait DatabasesBase '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 . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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', + 'name' => 'invalidRowStructure', 'permissions' => [ Permission::create(Role::any()), Permission::read(Role::any()), @@ -3074,11 +3089,11 @@ trait DatabasesBase ]); $this->assertEquals(201, $table['headers']['status-code']); - $this->assertEquals('invalidDocumentStructure', $table['body']['name']); + $this->assertEquals('invalidRowStructure', $table['body']['name']); $tableId = $table['body']['$id']; - $email = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email', array_merge([ + $email = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/email', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3087,7 +3102,7 @@ trait DatabasesBase 'required' => false, ]); - $enum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ + $enum = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3097,7 +3112,7 @@ trait DatabasesBase 'required' => false, ]); - $ip = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip', array_merge([ + $ip = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/ip', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3106,7 +3121,7 @@ trait DatabasesBase 'required' => false, ]); - $url = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url', array_merge([ + $url = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/url', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3116,7 +3131,7 @@ trait DatabasesBase 'required' => false, ]); - $range = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $range = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3128,7 +3143,7 @@ trait DatabasesBase ]); // TODO@kodumbeats min and max are rounded in error message - $floatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float', array_merge([ + $floatRange = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3139,7 +3154,7 @@ trait DatabasesBase 'max' => 1.4, ]); - $probability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float', array_merge([ + $probability = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3151,7 +3166,7 @@ trait DatabasesBase 'max' => 1, ]); - $upperBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $upperBound = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3161,7 +3176,7 @@ trait DatabasesBase 'max' => 10, ]); - $lowerBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $lowerBound = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3175,7 +3190,7 @@ trait DatabasesBase * Test for failure */ - $invalidRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $invalidRange = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ @@ -3185,7 +3200,7 @@ trait DatabasesBase 'max' => 3, ]); - $defaultArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $defaultArray = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ @@ -3195,7 +3210,7 @@ trait DatabasesBase 'array' => true, ]); - $defaultRequired = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $defaultRequired = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3205,7 +3220,7 @@ trait DatabasesBase 'default' => 12 ]); - $enumDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ + $enumDefault = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3215,7 +3230,7 @@ trait DatabasesBase 'default' => 'south' ]); - $enumDefaultStrict = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ + $enumDefaultStrict = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3225,7 +3240,7 @@ trait DatabasesBase 'default' => 'NORTH' ]); - $goodDatetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ + $goodDatetime = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3235,7 +3250,7 @@ trait DatabasesBase 'default' => null ]); - $datetimeDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ + $datetimeDefault = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3267,7 +3282,7 @@ trait DatabasesBase // wait for worker to add attributes sleep(3); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -3279,7 +3294,7 @@ trait DatabasesBase * Test for successful validation */ - $goodEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodEmail = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3294,7 +3309,7 @@ trait DatabasesBase ] ]); - $goodEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodEnum = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3309,7 +3324,7 @@ trait DatabasesBase ] ]); - $goodIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodIp = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3324,7 +3339,7 @@ trait DatabasesBase ] ]); - $goodUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodUrl = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3339,7 +3354,7 @@ trait DatabasesBase ] ]); - $goodRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodRange = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3354,7 +3369,7 @@ trait DatabasesBase ] ]); - $goodFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodFloatRange = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3369,7 +3384,7 @@ trait DatabasesBase ] ]); - $goodProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodProbability = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3384,7 +3399,7 @@ trait DatabasesBase ] ]); - $notTooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $notTooHigh = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3399,7 +3414,7 @@ trait DatabasesBase ] ]); - $notTooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $notTooLow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3425,10 +3440,10 @@ trait DatabasesBase $this->assertEquals(201, $notTooLow['headers']['status-code']); /* - * Test that custom validators reject documents + * Test that custom validators reject rows */ - $badEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badEmail = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3443,7 +3458,7 @@ trait DatabasesBase ] ]); - $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badEnum = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3458,7 +3473,7 @@ trait DatabasesBase ] ]); - $badIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badIp = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3473,7 +3488,7 @@ trait DatabasesBase ] ]); - $badUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badUrl = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3488,7 +3503,7 @@ trait DatabasesBase ] ]); - $badRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badRange = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3503,7 +3518,7 @@ trait DatabasesBase ] ]); - $badFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badFloatRange = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3518,7 +3533,7 @@ trait DatabasesBase ] ]); - $badProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badProbability = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3533,7 +3548,7 @@ trait DatabasesBase ] ]); - $tooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $tooHigh = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3548,7 +3563,7 @@ trait DatabasesBase ] ]); - $tooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $tooLow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3563,7 +3578,7 @@ trait DatabasesBase ] ]); - $badTime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badTime = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3604,7 +3619,7 @@ trait DatabasesBase public function testDefaultPermissions(array $data): array { $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3637,7 +3652,7 @@ trait DatabasesBase // Updated Permissions - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3665,7 +3680,7 @@ trait DatabasesBase Permission::update(Role::user($this->getUser()['$id'])), ], $row['body']['$permissions']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3682,7 +3697,7 @@ trait DatabasesBase // Reset Permissions - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3701,7 +3716,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 . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3726,20 +3741,20 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'databaseId' => ID::unique(), - 'name' => 'EnforceCollectionAndDocumentPermissions', + 'name' => 'EnforceCollectionAndRowPermissions', ]); $this->assertEquals(201, $database['headers']['status-code']); - $this->assertEquals('EnforceCollectionAndDocumentPermissions', $database['body']['name']); + $this->assertEquals('EnforceCollectionAndRowPermissions', $database['body']['name']); $databaseId = $database['body']['$id']; $user = $this->getUser()['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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', + 'name' => 'enforceCollectionAndRowPermissions', 'rowSecurity' => true, 'permissions' => [ Permission::read(Role::user($user)), @@ -3750,30 +3765,30 @@ trait DatabasesBase ]); $this->assertEquals(201, $table['headers']['status-code']); - $this->assertEquals($table['body']['name'], 'enforceCollectionAndDocumentPermissions'); + $this->assertEquals($table['body']['name'], 'enforceCollectionAndRowPermissions'); $this->assertEquals($table['body']['rowSecurity'], true); $tableId = $table['body']['$id']; sleep(2); - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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', + 'key' => 'column', 'size' => 64, 'required' => true, ]); $this->assertEquals(202, $attribute['headers']['status-code'], 202); - $this->assertEquals('attribute', $attribute['body']['key']); + $this->assertEquals('column', $attribute['body']['key']); - // wait for db to add attribute + // wait for db to add column sleep(2); - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3786,16 +3801,16 @@ trait DatabasesBase $this->assertEquals(202, $index['headers']['status-code']); $this->assertEquals('key_attribute', $index['body']['key']); - // wait for db to add attribute + // wait for db to add column sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'rowId' => ID::unique(), 'data' => [ - 'attribute' => 'one', + 'column' => 'one', ], 'permissions' => [ Permission::read(Role::user($user)), @@ -3806,13 +3821,13 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'rowId' => ID::unique(), 'data' => [ - 'attribute' => 'one', + 'column' => 'one', ], 'permissions' => [ Permission::update(Role::user($user)), @@ -3822,14 +3837,14 @@ trait DatabasesBase $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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', + 'column' => 'one', ], 'permissions' => [ Permission::read(Role::user(ID::custom('other'))), @@ -3839,7 +3854,7 @@ trait DatabasesBase $this->assertEquals(201, $row3['headers']['status-code']); - $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $rowsUser1 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3848,7 +3863,7 @@ trait DatabasesBase $this->assertEquals(3, $rowsUser1['body']['total']); $this->assertCount(3, $rowsUser1['body']['rows']); - $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ + $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3879,7 +3894,7 @@ trait DatabasesBase ]); $session2 = $session2['cookies']['a_session_' . $this->getProject()['$id']]; - $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ + $row3GetWithRowRead = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3887,9 +3902,9 @@ trait DatabasesBase ]); // Current user has no table permissions but has read permission for this row - $this->assertEquals(200, $row3GetWithDocumentRead['headers']['status-code']); + $this->assertEquals(200, $row3GetWithRowRead['headers']['status-code']); - $row2GetFailure = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row2['body']['$id'], [ + $row2GetFailure = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row2['body']['$id'], [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3899,7 +3914,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 . '/grids/tables/' . $tableId . '/rows', [ + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3926,7 +3941,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; $user = $this->getUser()['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3947,22 +3962,22 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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', + 'key' => 'column', 'size' => 64, 'required' => true, ]); $this->assertEquals(202, $attribute['headers']['status-code'], 202); - $this->assertEquals('attribute', $attribute['body']['key']); + $this->assertEquals('column', $attribute['body']['key']); \sleep(2); - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3977,13 +3992,13 @@ trait DatabasesBase \sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'rowId' => ID::unique(), 'data' => [ - 'attribute' => 'one', + 'column' => 'one', ], 'permissions' => [ Permission::read(Role::user($user)), @@ -3994,13 +4009,13 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'rowId' => ID::unique(), 'data' => [ - 'attribute' => 'one', + 'column' => 'one', ], 'permissions' => [ Permission::update(Role::user($user)), @@ -4010,14 +4025,14 @@ trait DatabasesBase $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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', + 'column' => 'one', ], 'permissions' => [ Permission::read(Role::user(ID::custom('other2'))), @@ -4027,7 +4042,7 @@ trait DatabasesBase $this->assertEquals(201, $row3['headers']['status-code']); - $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $rowsUser1 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4036,7 +4051,7 @@ trait DatabasesBase $this->assertEquals(3, $rowsUser1['body']['total']); $this->assertCount(3, $rowsUser1['body']['rows']); - $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ + $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4067,7 +4082,7 @@ trait DatabasesBase ]); $session2 = $session2['cookies']['a_session_' . $this->getProject()['$id']]; - $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ + $row3GetWithRowRead = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4075,9 +4090,9 @@ trait DatabasesBase ]); // other2 has no table permissions and row permissions are disabled - $this->assertEquals(404, $row3GetWithDocumentRead['headers']['status-code']); + $this->assertEquals(404, $row3GetWithRowRead['headers']['status-code']); - $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4088,7 +4103,7 @@ trait DatabasesBase $this->assertEquals(401, $rowsUser2['headers']['status-code']); // Enable row permissions - $this->client->call(CLient::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $tableId, [ + $this->client->call(CLient::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $tableId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4097,7 +4112,7 @@ trait DatabasesBase 'rowSecurity' => true, ]); - $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4115,7 +4130,7 @@ trait DatabasesBase public function testUniqueIndexDuplicate(array $data): array { $databaseId = $data['databaseId']; - $uniqueIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $uniqueIndex = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4130,7 +4145,7 @@ trait DatabasesBase sleep(2); // test for failure - $duplicate = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $duplicate = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4153,7 +4168,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 . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4176,7 +4191,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 . '/grids/tables/' . $data['moviesId'] . '/rows/' . $row['body']['$id'], array_merge([ + $duplicate = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4215,7 +4230,7 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ]; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['moviesId'] . '/rows', $headers, [ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows', $headers, [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Creation Date Test', @@ -4231,7 +4246,7 @@ trait DatabasesBase \sleep(1); - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ 'data' => [ 'title' => 'Updated Date Test', ] @@ -4245,7 +4260,7 @@ trait DatabasesBase \sleep(1); - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ 'data' => [ 'title' => 'Again Updated Date Test', '$createdAt' => '2022-08-01 13:09:23.040', @@ -4254,9 +4269,10 @@ trait DatabasesBase ]); if ($this->getSide() === 'client') { - $this->assertEquals($row['headers']['status-code'], 400); - } else { $this->assertEquals($row['body']['title'], 'Again Updated Date Test'); + $this->assertNotEquals($row['body']['$createdAt'], DateTime::formatTz('2022-08-01 13:09:23.040')); + $this->assertNotEquals($row['body']['$updatedAt'], DateTime::formatTz('2022-08-01 13:09:23.050')); + } else { $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')); @@ -4281,7 +4297,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create table - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4302,8 +4318,8 @@ trait DatabasesBase $moviesId = $movies['body']['$id']; - // create attribute - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/columns/string', array_merge([ + // create column + $title = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4319,7 +4335,7 @@ trait DatabasesBase sleep(2); // add row - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4343,7 +4359,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 . '/grids/tables/' . $moviesId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4356,7 +4372,7 @@ trait DatabasesBase $this->assertCount(1, $row['body']['$permissions']); // Send only mutation permissions - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4374,7 +4390,7 @@ trait DatabasesBase } // remove table - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $moviesId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $moviesId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4392,7 +4408,7 @@ trait DatabasesBase /** * Test for SUCCESS */ - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4405,7 +4421,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $true = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean', array_merge([ + $true = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4417,7 +4433,7 @@ trait DatabasesBase $this->assertEquals(202, $true['headers']['status-code']); - $false = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean', array_merge([ + $false = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4437,7 +4453,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $person = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4455,7 +4471,7 @@ trait DatabasesBase $this->assertEquals(201, $person['headers']['status-code']); - $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $library = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4472,7 +4488,7 @@ trait DatabasesBase $this->assertEquals(201, $library['headers']['status-code']); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -4484,7 +4500,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -4498,7 +4514,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ + $libraryName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -4516,7 +4532,7 @@ trait DatabasesBase $this->assertEquals('relationship', $relation['body']['type']); $this->assertEquals('processing', $relation['body']['status']); - $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4531,7 +4547,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}/grids/tables/{$person['body']['$id']}/columns/library", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/tablesdb/{$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'] @@ -4548,7 +4564,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 . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $person1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4572,7 +4588,7 @@ trait DatabasesBase $this->assertEquals('Library 1', $person1['body']['library']['libraryName']); // Create without nested ID - $person2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $person2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4603,7 +4619,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('$internalId', $person1['body']); $this->assertArrayNotHasKey('$internalId', $person1['body']['library']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4617,7 +4633,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 . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4629,7 +4645,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 . '/grids/tables/' . $person['body']['$id'] . '/columns/library', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $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'] @@ -4639,7 +4655,7 @@ trait DatabasesBase $this->assertEquals(204, $response['headers']['status-code']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$person['body']['$id']}/columns/library", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/tablesdb/{$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'] @@ -4647,7 +4663,7 @@ trait DatabasesBase $this->assertEquals(404, $attribute['headers']['status-code']); - $person1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/' . $person1['body']['$id'], array_merge([ + $person1 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/' . $person1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4655,7 +4671,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('library', $person1['body']); //Test Deletion of related twoKey - $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $library['body']['$id'] . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $library['body']['$id'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4682,7 +4698,7 @@ trait DatabasesBase $libraryCollection = $data['libraryCollection']; // One person can own several libraries - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $personCollection . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4696,7 +4712,7 @@ trait DatabasesBase sleep(1); - $libraryAttributesResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $libraryCollection . '/columns', array_merge([ + $libraryAttributesResponse = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $libraryCollection . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4706,7 +4722,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 . '/grids/tables/' . $libraryCollection, array_merge([ + $libraryCollectionResponse = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $libraryCollection, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4715,7 +4731,7 @@ trait DatabasesBase $this->assertIsArray($libraryCollectionResponse['body']['columns']); $this->assertCount(2, $libraryCollectionResponse['body']['columns']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$personCollection}/columns/libraries", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/tablesdb/{$databaseId}/tables/{$personCollection}/columns/libraries", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4732,7 +4748,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 . '/grids/tables/' . $personCollection . '/rows', array_merge([ + $person2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $personCollection . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4771,7 +4787,7 @@ trait DatabasesBase $this->assertArrayHasKey('libraries', $person2['body']); $this->assertEquals(2, count($person2['body']['libraries'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/rows/' . $person2['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $personCollection . '/rows/' . $person2['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4785,7 +4801,7 @@ trait DatabasesBase $this->assertArrayHasKey('libraries', $response['body']); $this->assertEquals(2, count($response['body']['libraries'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $libraryCollection . '/rows/library11', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $libraryCollection . '/rows/library11', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4798,7 +4814,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 . '/grids/tables/' . $personCollection . '/columns/libraries/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $personCollection . '/columns/libraries/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4808,7 +4824,7 @@ trait DatabasesBase $this->assertEquals(200, $response['headers']['status-code']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$personCollection}/columns/libraries", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/tablesdb/{$databaseId}/tables/{$personCollection}/columns/libraries", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4835,7 +4851,7 @@ trait DatabasesBase $databaseId = $data['databaseId']; // Create album table - $albums = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $albums = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4849,8 +4865,8 @@ trait DatabasesBase ], ]); - // Create album name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/columns/string', array_merge([ + // Create album name column + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -4861,7 +4877,7 @@ trait DatabasesBase ]); // Create artist table - $artists = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $artists = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4875,8 +4891,8 @@ trait DatabasesBase ], ]); - // Create artist name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $artists['body']['$id'] . '/columns/string', array_merge([ + // Create artist name column + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -4887,7 +4903,7 @@ trait DatabasesBase ]); // Create relationship - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -4917,7 +4933,7 @@ trait DatabasesBase ]; // Create album - $album = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/rows', array_merge([ + $album = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4939,7 +4955,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 . '/grids/tables/' . $albums['body']['$id'] . '/rows/album1', array_merge([ + $album = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/rows/album1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4955,7 +4971,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 . '/grids/tables/' . $artists['body']['$id'] . '/rows/' . $album['body']['artist']['$id'], array_merge([ + $artist = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $artists['body']['$id'] . '/rows/' . $album['body']['artist']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4987,7 +5003,7 @@ trait DatabasesBase $databaseId = $data['databaseId']; // Create sports table - $sports = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $sports = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5001,8 +5017,8 @@ trait DatabasesBase ], ]); - // Create sport name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/columns/string', array_merge([ + // Create sport name column + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -5013,7 +5029,7 @@ trait DatabasesBase ]); // Create player table - $players = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $players = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5027,8 +5043,8 @@ trait DatabasesBase ], ]); - // Create player name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $players['body']['$id'] . '/columns/string', array_merge([ + // Create player name column + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -5039,7 +5055,7 @@ trait DatabasesBase ]); // Create relationship - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -5070,7 +5086,7 @@ trait DatabasesBase ]; // Create sport - $sport = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/rows', array_merge([ + $sport = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5100,7 +5116,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 . '/grids/tables/' . $sports['body']['$id'] . '/rows/sport1', array_merge([ + $sport = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/rows/sport1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5118,7 +5134,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 . '/grids/tables/' . $players['body']['$id'] . '/rows/' . $sport['body']['players'][0]['$id'], array_merge([ + $player = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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()), [ @@ -5147,7 +5163,7 @@ trait DatabasesBase */ public function testValidateOperators(array $data): void { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5166,7 +5182,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'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5190,7 +5206,7 @@ trait DatabasesBase */ public function testSelectQueries(array $data): void { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5205,7 +5221,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'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5219,7 +5235,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('$databaseId', $row); $this->assertArrayNotHasKey('$tableId', $row); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows/' . $row['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5240,7 +5256,7 @@ trait DatabasesBase public function testOrQueries(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5256,7 +5272,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $presidents = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $presidents = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5273,7 +5289,7 @@ trait DatabasesBase $this->assertEquals($presidents['body']['name'], 'USA Presidents'); // Create Attributes - $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ + $firstName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -5284,7 +5300,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $firstName['headers']['status-code']); - $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ + $lastName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -5299,7 +5315,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5314,7 +5330,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5329,7 +5345,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5347,7 +5363,7 @@ trait DatabasesBase $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5376,7 +5392,7 @@ trait DatabasesBase public function testNotContains(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5392,7 +5408,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5409,7 +5425,7 @@ trait DatabasesBase $this->assertEquals($movies['body']['name'], 'Movies'); // Create Attributes - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'] . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $movies['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5420,7 +5436,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $title['headers']['status-code']); - $genre = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'] . '/columns/string', array_merge([ + $genre = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $movies['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5435,7 +5451,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $movies['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5450,7 +5466,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $movies['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5465,7 +5481,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $movies['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5484,7 +5500,7 @@ trait DatabasesBase // Test notContains query - should return movies that don't contain "Spider" in title $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $movies['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5512,7 +5528,7 @@ trait DatabasesBase public function testNotSearch(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5528,7 +5544,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $books = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $books = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5545,7 +5561,7 @@ trait DatabasesBase $this->assertEquals($books['body']['name'], 'Books'); // Create Attributes - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5556,7 +5572,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $title['headers']['status-code']); - $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/columns/string', array_merge([ + $description = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5570,7 +5586,7 @@ trait DatabasesBase \sleep(2); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/indexes', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5580,7 +5596,7 @@ trait DatabasesBase 'columns' => ['description'], ]); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5595,7 +5611,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5610,7 +5626,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5629,7 +5645,7 @@ trait DatabasesBase // Test notSearch query - should return books that don't have "space" in the description $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5654,7 +5670,7 @@ trait DatabasesBase public function testNotBetween(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5670,7 +5686,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $products = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $products = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5687,7 +5703,7 @@ trait DatabasesBase $this->assertEquals($products['body']['name'], 'Products'); // Create Attributes - $name = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $products['body']['$id'] . '/columns/string', array_merge([ + $name = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $products['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5698,7 +5714,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $name['headers']['status-code']); - $price = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $products['body']['$id'] . '/columns/float', array_merge([ + $price = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $products['body']['$id'] . '/columns/float', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5712,7 +5728,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $products['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $products['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5727,7 +5743,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $products['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $products['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5742,7 +5758,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $products['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $products['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5761,7 +5777,7 @@ trait DatabasesBase // Test notBetween query - should return products NOT priced between 10 and 50 $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $products['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $products['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5786,7 +5802,7 @@ trait DatabasesBase public function testNotStartsWith(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5802,7 +5818,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $employees = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $employees = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5819,7 +5835,7 @@ trait DatabasesBase $this->assertEquals($employees['body']['name'], 'Employees'); // Create Attributes - $name = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $employees['body']['$id'] . '/columns/string', array_merge([ + $name = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $employees['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5830,7 +5846,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $name['headers']['status-code']); - $department = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $employees['body']['$id'] . '/columns/string', array_merge([ + $department = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $employees['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5845,7 +5861,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $employees['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $employees['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5860,7 +5876,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $employees['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $employees['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5875,7 +5891,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $employees['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $employees['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5894,7 +5910,7 @@ trait DatabasesBase // Test notStartsWith query - should return employees whose names don't start with "John" $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $employees['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $employees['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5919,7 +5935,7 @@ trait DatabasesBase public function testNotEndsWith(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5935,7 +5951,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $files = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $files = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5952,7 +5968,7 @@ trait DatabasesBase $this->assertEquals($files['body']['name'], 'Files'); // Create Attributes - $filename = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $files['body']['$id'] . '/columns/string', array_merge([ + $filename = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $files['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5963,7 +5979,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $filename['headers']['status-code']); - $type = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $files['body']['$id'] . '/columns/string', array_merge([ + $type = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $files['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5978,13 +5994,13 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $files['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $files['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'rowId' => ID::unique(), 'data' => [ - 'filename' => 'document.pdf', + 'filename' => 'row.pdf', 'type' => 'PDF', ], 'permissions' => [ @@ -5993,7 +6009,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $files['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $files['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6008,7 +6024,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $files['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $files['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6027,7 +6043,7 @@ trait DatabasesBase // Test notEndsWith query - should return files that don't end with ".pdf" $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $files['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $files['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -6052,7 +6068,7 @@ trait DatabasesBase public function testCreatedBefore(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6068,7 +6084,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $posts = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $posts = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6085,7 +6101,7 @@ trait DatabasesBase $this->assertEquals($posts['body']['name'], 'Posts'); // Create Attributes - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $posts['body']['$id'] . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $posts['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6096,7 +6112,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $title['headers']['status-code']); - $content = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $posts['body']['$id'] . '/columns/string', array_merge([ + $content = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $posts['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6111,7 +6127,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $posts['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $posts['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6129,7 +6145,7 @@ trait DatabasesBase // Sleep to ensure different creation times sleep(1); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $posts['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $posts['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6150,7 +6166,7 @@ trait DatabasesBase // Sleep again sleep(1); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $posts['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $posts['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6169,7 +6185,7 @@ trait DatabasesBase // Test createdBefore query - should return posts created before the second post $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $posts['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $posts['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -6193,7 +6209,7 @@ trait DatabasesBase public function testCreatedAfter(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6209,7 +6225,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $events = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $events = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6226,7 +6242,7 @@ trait DatabasesBase $this->assertEquals($events['body']['name'], 'Events'); // Create Attributes - $name = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $events['body']['$id'] . '/columns/string', array_merge([ + $name = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $events['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6237,7 +6253,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $name['headers']['status-code']); - $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $events['body']['$id'] . '/columns/string', array_merge([ + $description = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $events['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6252,7 +6268,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $events['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $events['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6270,7 +6286,7 @@ trait DatabasesBase // Sleep to ensure different creation times sleep(1); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $events['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $events['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6291,7 +6307,7 @@ trait DatabasesBase // Sleep again sleep(1); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $events['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $events['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6310,7 +6326,7 @@ trait DatabasesBase // Test createdAfter query - should return events created after the second event $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $events['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $events['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -6334,7 +6350,7 @@ trait DatabasesBase public function testUpdatedBefore(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6350,7 +6366,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $tasks = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tasks = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6368,7 +6384,7 @@ trait DatabasesBase $this->assertEquals($tasks['body']['name'], 'Tasks'); // Create Attributes - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6379,7 +6395,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $title['headers']['status-code']); - $status = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/columns/string', array_merge([ + $status = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6394,7 +6410,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6411,7 +6427,7 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); $taskOneId = $row1['body']['$id']; - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6428,7 +6444,7 @@ trait DatabasesBase $this->assertEquals(201, $row2['headers']['status-code']); $taskTwoId = $row2['body']['$id']; - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6447,7 +6463,7 @@ trait DatabasesBase // Update first task sleep(1); - $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows/' . $taskOneId, array_merge([ + $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows/' . $taskOneId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6458,7 +6474,7 @@ trait DatabasesBase // Update second task and get its updated time sleep(1); - $updatedTaskTwo = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows/' . $taskTwoId, array_merge([ + $updatedTaskTwo = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows/' . $taskTwoId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6470,7 +6486,7 @@ trait DatabasesBase // Update third task sleep(1); - $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows/' . $taskThreeId, array_merge([ + $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows/' . $taskThreeId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6482,7 +6498,7 @@ trait DatabasesBase // Test updatedBefore query - should return tasks updated before the second task's update time $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -6507,7 +6523,7 @@ trait DatabasesBase public function testUpdatedAfter(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6523,7 +6539,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $orders = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $orders = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6541,7 +6557,7 @@ trait DatabasesBase $this->assertEquals($orders['body']['name'], 'Orders'); // Create Attributes - $orderNumber = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/columns/string', array_merge([ + $orderNumber = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6552,7 +6568,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $orderNumber['headers']['status-code']); - $status = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/columns/string', array_merge([ + $status = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6567,7 +6583,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6584,7 +6600,7 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); $orderOneId = $row1['body']['$id']; - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6601,7 +6617,7 @@ trait DatabasesBase $this->assertEquals(201, $row2['headers']['status-code']); $orderTwoId = $row2['body']['$id']; - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6620,7 +6636,7 @@ trait DatabasesBase // Update first order sleep(1); - $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows/' . $orderOneId, array_merge([ + $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows/' . $orderOneId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6631,7 +6647,7 @@ trait DatabasesBase // Update second order and get its updated time sleep(1); - $updatedOrderTwo = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows/' . $orderTwoId, array_merge([ + $updatedOrderTwo = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows/' . $orderTwoId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6643,7 +6659,7 @@ trait DatabasesBase // Update third order sleep(1); - $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows/' . $orderThreeId, array_merge([ + $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows/' . $orderThreeId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6655,7 +6671,7 @@ trait DatabasesBase // Test updatedAfter query - should return orders updated after the second order's update time $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -6683,7 +6699,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6697,7 +6713,7 @@ trait DatabasesBase ], ]); - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6714,7 +6730,7 @@ trait DatabasesBase $table1 = $table1['body']['$id']; $table2 = $table2['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1 . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6724,7 +6740,7 @@ trait DatabasesBase 'required' => true, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table2 . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table2 . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6734,7 +6750,7 @@ trait DatabasesBase 'required' => true, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1 . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6747,27 +6763,27 @@ trait DatabasesBase sleep(1); - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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', + 'name' => 'Row 1', 'collection2' => [ [ - 'name' => 'Document 2', + 'name' => 'Row 2', ], ], ], ]); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/rows/' . $row['body']['$id'], array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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', + 'name' => 'Row 1 Updated', ], ]); @@ -6779,7 +6795,7 @@ trait DatabasesBase */ public function testTimeout(array $data): void { - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $data['databaseId'] . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6799,7 +6815,7 @@ trait DatabasesBase 'databaseId' => $table['body']['databaseId'] ]; - $longtext = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/columns/string', array_merge([ + $longtext = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -6813,7 +6829,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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6829,7 +6845,7 @@ trait DatabasesBase ]); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-timeout' => 1, @@ -6847,7 +6863,7 @@ trait DatabasesBase */ public function testIncrementColumn(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6857,7 +6873,7 @@ trait DatabasesBase ]); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6872,8 +6888,8 @@ trait DatabasesBase ]); $tableId = $table['body']['$id']; - // Add integer attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + // Add integer column + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6885,7 +6901,7 @@ trait DatabasesBase \sleep(3); // Create row with initial count = 5 - $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6903,7 +6919,7 @@ trait DatabasesBase $rowId = $doc['body']['$id']; // Increment by default 1 - $inc = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$rowId/count/increment", array_merge([ + $inc = $this->client->call(Client::METHOD_PATCH, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId/count/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ])); @@ -6911,14 +6927,14 @@ trait DatabasesBase $this->assertEquals(6, $inc['body']['count']); // Verify count = 6 - $get = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/grids/tables/$tableId/rows/$rowId", array_merge([ + $get = $this->client->call(Client::METHOD_GET, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId", 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/grids/tables/$tableId/rows/$rowId/count/increment", array_merge([ + $inc2 = $this->client->call(Client::METHOD_PATCH, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId/count/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), [ @@ -6927,28 +6943,28 @@ trait DatabasesBase $this->assertEquals(200, $inc2['headers']['status-code']); $this->assertEquals(10, $inc2['body']['count']); - $get2 = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/grids/tables/$tableId/rows/$rowId", array_merge([ + $get2 = $this->client->call(Client::METHOD_GET, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId", 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/grids/tables/$tableId/rows/$rowId/count/increment", array_merge([ + $err = $this->client->call(Client::METHOD_PATCH, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId/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/grids/tables/$tableId/rows/$rowId/unknown/increment", array_merge([ + // Test column not found + $notFound = $this->client->call(Client::METHOD_PATCH, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId/unknown/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ])); $this->assertEquals(404, $notFound['headers']['status-code']); // Test decrement with value 0 - $inc3 = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$rowId/count/increment", array_merge([ + $inc3 = $this->client->call(Client::METHOD_PATCH, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId/count/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), [ @@ -6959,7 +6975,7 @@ trait DatabasesBase public function testDecrementColumn(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6970,7 +6986,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6986,8 +7002,8 @@ trait DatabasesBase $tableId = $table['body']['$id']; - // Add integer attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + // Add integer column + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6999,7 +7015,7 @@ trait DatabasesBase \sleep(2); // Create row with initial count = 10 - $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -7014,21 +7030,21 @@ trait DatabasesBase $rowId = $doc['body']['$id']; // Decrement by default 1 (count = 10 -> 9) - $dec = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $dec = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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 . '/grids/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + $get = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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 . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $dec2 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), [ @@ -7037,28 +7053,28 @@ trait DatabasesBase $this->assertEquals(200, $dec2['headers']['status-code']); $this->assertEquals(6, $dec2['body']['count']); - $get2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + $get2 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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 . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $err = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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 . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + // Test type error on non-numeric column + $typeErr = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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']); // Test decrement with value 0 - $inc3 = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$rowId/count/decrement", array_merge([ + $inc3 = $this->client->call(Client::METHOD_PATCH, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId/count/decrement", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), [ diff --git a/tests/e2e/Services/Databases/Grids/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/TablesDB/DatabasesConsoleClientTest.php similarity index 81% rename from tests/e2e/Services/Databases/Grids/DatabasesConsoleClientTest.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesConsoleClientTest.php index 32fe49b6fa..3cde767d50 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesConsoleClientTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Grids; +namespace Tests\E2E\Services\Databases\TablesDB; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; @@ -18,7 +18,7 @@ class DatabasesConsoleClientTest extends Scope public function testCreateTable(): array { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -34,7 +34,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test for SUCCESS */ - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -55,7 +55,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test when database is disabled but can still create tables */ - $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId, array_merge([ + $database = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId, 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 . '/grids/tables', array_merge([ + $tvShows = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $movies['body']['$id'], array_merge([ + $database = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $moviesCollectionId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $moviesCollectionId, array_merge([ + $table = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tvShowsId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tvShowsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -203,7 +203,7 @@ class DatabasesConsoleClientTest extends Scope * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/usage', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ @@ -216,7 +216,7 @@ class DatabasesConsoleClientTest extends Scope * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/usage', 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 . '/grids/tables/' . $data['moviesId'] . '/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/randomCollectionId/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['moviesId'] . '/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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/Grids/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/TablesDB/DatabasesCustomClientTest.php similarity index 63% rename from tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesCustomClientTest.php index f07b648890..f986b5dd03 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesCustomClientTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Grids; +namespace Tests\E2E\Services\Databases\TablesDB; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; @@ -23,7 +23,7 @@ class DatabasesCustomClientTest extends Scope * Test for SUCCESS */ - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -34,8 +34,8 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; - // Collection aliases write to create, update, delete - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + // table aliases write to create, update, delete + $movies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $moviesId . '/columns/string', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $moviesId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $moviesId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -109,7 +109,7 @@ class DatabasesCustomClientTest extends Scope 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 + // If row 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([ @@ -132,8 +132,8 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals('Test Database', $database['body']['name']); $databaseId = $database['body']['$id']; - // Create collection - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + // Create table + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -145,8 +145,8 @@ class DatabasesCustomClientTest extends Scope ]); $this->assertEquals(201, $response['headers']['status-code']); - // Add attribute to collection - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/permissionCheck/columns/string', array_merge([ + // Add column to table + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/permissionCheck/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -160,8 +160,8 @@ class DatabasesCustomClientTest extends Scope // 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 . '/grids/tables/permissionCheck/rows', array_merge([ + // Creating row by server, give read permission to our user + some other user + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/permissionCheck/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -180,9 +180,9 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); - // Update document + // Update row // 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 . '/grids/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -193,8 +193,8 @@ 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 . '/grids/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ + // Get name of the row, should be the new one + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -202,8 +202,8 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals("AppwriteExpert", $response['body']['name']); // Cleanup to prevent collision with other tests - // Delete collection - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/permissionCheck', array_merge([ + // Delete table + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/permissionCheck', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -212,11 +212,11 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); - // Wait for database worker to finish deleting collection + // Wait for database worker to finish deleting table sleep(2); - // Make sure collection has been deleted - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/permissionCheck', array_merge([ + // Make sure table has been deleted + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/permissionCheck', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -229,7 +229,7 @@ class DatabasesCustomClientTest extends Scope public function testUpdateTwoWayRelationship(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -241,8 +241,8 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; - // Creating collection 1 - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + // Creating table 1 + $table1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -258,8 +258,8 @@ class DatabasesCustomClientTest extends Scope ] ]); - // Creating collection 2 - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + // Creating table 2 + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -277,8 +277,8 @@ 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 . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + // Creating two way relationship between table 1 and table 2 from table 1 + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -293,8 +293,8 @@ class DatabasesCustomClientTest extends Scope \sleep(3); - // Update relation from collection 2 to on delete restrict - $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table2['body']['$id'] . '/columns/' . $table1['body']['$id'] . '/relationship', array_merge([ + // Update relation from table 2 to on delete restrict + $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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'] @@ -303,7 +303,7 @@ class DatabasesCustomClientTest extends Scope ]); // Fetching attributes after updating relation to compare - $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'], [ + $table1Attributes = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'], [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -319,7 +319,7 @@ class DatabasesCustomClientTest extends Scope public function testRelationshipSameTwoWayKey(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ '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 . '/grids/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -437,7 +437,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(409, $relation['body']['code']); // RelationshipManyToMany - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -455,8 +455,8 @@ class DatabasesCustomClientTest extends Scope $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 . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + // Second RelationshipManyToMany on Same tables + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -478,7 +478,7 @@ class DatabasesCustomClientTest extends Scope public function testUpdateWithoutRelationPermission(): void { $userId = $this->getUser()['$id']; - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -489,14 +489,14 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; - // Creating collection 1 - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + // Creating table 1 + $table1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'), + 'tableId' => ID::custom('table1'), + 'name' => ID::custom('table1'), 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), @@ -505,27 +505,27 @@ class DatabasesCustomClientTest extends Scope ] ]); - // Creating collection 2 - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + // Creating table 2 + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'), + 'tableId' => ID::custom('table2'), + 'name' => ID::custom('table2'), 'rowSecurity' => false, 'permissions' => [ Permission::read(Role::user($userId)), ] ]); - $table3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'), + 'tableId' => ID::custom('table3'), + 'name' => ID::custom('table3'), 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), @@ -534,26 +534,26 @@ class DatabasesCustomClientTest extends Scope ] ]); - $table4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table4 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'), + 'tableId' => ID::custom('table4'), + 'name' => ID::custom('table4'), 'rowSecurity' => false, 'permissions' => [ Permission::read(Role::user($userId)), ] ]); - $table5 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table5 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'), + 'tableId' => ID::custom('table5'), + 'name' => ID::custom('table5'), 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), @@ -562,8 +562,8 @@ class DatabasesCustomClientTest extends Scope ] ]); - // Creating one to one relationship from collection 1 to colletion 2 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + // Creating one to one relationship from table 1 to colletion 2 + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -575,8 +575,8 @@ class DatabasesCustomClientTest extends Scope 'key' => $table2['body']['$id'] ]); - // Creating one to one relationship from collection 2 to colletion 3 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table2['body']['$id'] . '/columns/relationship', array_merge([ + // Creating one to one relationship from table 2 to colletion 3 + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -588,8 +588,8 @@ class DatabasesCustomClientTest extends Scope 'key' => $table3['body']['$id'] ]); - // Creating one to one relationship from collection 3 to colletion 4 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table3['body']['$id'] . '/columns/relationship', array_merge([ + // Creating one to one relationship from table 3 to colletion 4 + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -601,8 +601,8 @@ class DatabasesCustomClientTest extends Scope 'key' => $table4['body']['$id'] ]); - // Creating one to one relationship from collection 4 to colletion 5 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table4['body']['$id'] . '/columns/relationship', array_merge([ + // Creating one to one relationship from table 4 to colletion 5 + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -614,7 +614,7 @@ class DatabasesCustomClientTest extends Scope 'key' => $table5['body']['$id'] ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -626,7 +626,7 @@ class DatabasesCustomClientTest extends Scope 'default' => null, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table2['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -638,7 +638,7 @@ class DatabasesCustomClientTest extends Scope 'default' => null, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table3['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -650,7 +650,7 @@ class DatabasesCustomClientTest extends Scope 'default' => null, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table4['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -662,7 +662,7 @@ class DatabasesCustomClientTest extends Scope 'default' => null, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table5['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -675,8 +675,8 @@ 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 . '/grids/tables/' . $table1['body']['$id'] . '/rows', array_merge([ + // Creating parent row with a child reference to test the permissions + $parentDocument = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -704,8 +704,8 @@ 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 . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + // This is the point of the test. We should not need any authorization permission to update the row with same data. + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -733,14 +733,14 @@ class DatabasesCustomClientTest extends Scope $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 . '/grids/tables/collection3', array_merge([ + // Giving update permission of table 3 to user. + $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/table3', 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'), + 'tableId' => ID::custom('table3'), + 'name' => ID::custom('table3'), 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), @@ -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 . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -777,10 +777,10 @@ class DatabasesCustomClientTest extends Scope ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(11, $response['body'][$table2['body']['$id']]['collection3']['Rating']); + $this->assertEquals(11, $response['body'][$table2['body']['$id']]['table3']['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 . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + // We should not be allowed to update the row as we do not have permission for table 2. + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -796,8 +796,8 @@ 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 . '/grids/tables/' . $table2['body']['$id'] . '/rows/' . $table2['body']['$id'], array_merge([ + // We should not be allowed to update the row as we do not have permission for table 2. + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/rows/' . $table2['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -808,14 +808,14 @@ 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 . '/grids/tables/collection3', array_merge([ + // Removing update permission from table 3. + $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/table3', 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'), + 'tableId' => ID::custom('table3'), + 'name' => ID::custom('table3'), 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), @@ -824,14 +824,14 @@ class DatabasesCustomClientTest extends Scope ] ]); - // Giving update permission to collection 2. - $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/collection2', array_merge([ + // Giving update permission to table 2. + $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/table2', 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'), + 'tableId' => ID::custom('table2'), + 'name' => ID::custom('table2'), 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), @@ -841,13 +841,13 @@ class DatabasesCustomClientTest extends Scope ] ]); - // Creating collection 3 new document - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table3['body']['$id'] . '/rows', array_merge([ + // Creating table 3 new row + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'), + 'rowId' => ID::custom('table3Doc1'), 'data' => [ 'Rating' => '20' ] @@ -855,8 +855,8 @@ 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 . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + // We should be allowed to link a new row from table 3 to table 2. + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -864,7 +864,7 @@ class DatabasesCustomClientTest extends Scope 'Title' => 'Captain America', $table2['body']['$id'] => [ '$id' => ID::custom($table2['body']['$id']), - $table3['body']['$id'] => 'collection3Doc1', + $table3['body']['$id'] => 'table3Doc1', ] ] ]); @@ -872,8 +872,8 @@ class DatabasesCustomClientTest extends Scope $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 . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + // We should be allowed to link and create a new row from table 3 to table 2. + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -882,7 +882,7 @@ class DatabasesCustomClientTest extends Scope $table2['body']['$id'] => [ '$id' => ID::custom($table2['body']['$id']), $table3['body']['$id'] => [ - '$id' => ID::custom('collection3Doc2') + '$id' => ID::custom('table3Doc2') ], ] ] @@ -890,158 +890,4 @@ 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/TablesDB/DatabasesCustomServerTest.php similarity index 79% rename from tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesCustomServerTest.php index d2c24ca2f1..d987019d7a 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesCustomServerTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Grids; +namespace Tests\E2E\Services\Databases\TablesDB; use Appwrite\Extend\Exception as AppwriteException; use Tests\E2E\Client; @@ -23,7 +23,7 @@ class DatabasesCustomServerTest extends Scope public function testListDatabases() { - $test1 = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $test1 = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -35,7 +35,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $test1['headers']['status-code']); $this->assertEquals('Test 1', $test1['body']['name']); - $test2 = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $test2 = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -46,7 +46,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $test2['headers']['status-code']); $this->assertEquals('Test 2', $test2['body']['name']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -57,7 +57,7 @@ class DatabasesCustomServerTest extends Scope $base = array_reverse($databases['body']['databases']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -68,7 +68,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $databases['headers']['status-code']); $this->assertCount(1, $databases['body']['databases']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -79,7 +79,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $databases['headers']['status-code']); $this->assertCount(1, $databases['body']['databases']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -90,7 +90,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $databases['headers']['status-code']); $this->assertCount(2, $databases['body']['databases']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -101,7 +101,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $databases['headers']['status-code']); $this->assertCount(1, $databases['body']['databases']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -115,7 +115,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for Order */ - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -131,12 +131,12 @@ class DatabasesCustomServerTest extends Scope /** * Test for After */ - $base = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -148,7 +148,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -163,12 +163,12 @@ class DatabasesCustomServerTest extends Scope /** * Test for Before */ - $base = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -180,7 +180,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -195,7 +195,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for Search */ - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -205,7 +205,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(1, $databases['body']['total']); $this->assertEquals('first', $databases['body']['databases'][0]['$id']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -216,7 +216,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -228,7 +228,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -240,7 +240,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // This database already exists - $response = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -262,7 +262,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for SUCCESS */ - $database = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId, [ + $database = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -282,7 +282,7 @@ class DatabasesCustomServerTest extends Scope { $databaseId = $data['databaseId']; - $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId, [ + $database = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -296,7 +296,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($database['body']['enabled']); // Now update the database without the passing the enabled parameter - $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId, [ + $database = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -316,7 +316,7 @@ class DatabasesCustomServerTest extends Scope { $databaseId = $data['databaseId']; - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -326,7 +326,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals("", $response['body']); // Try to get the database and check if it has been deleted - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders())); @@ -336,7 +336,7 @@ class DatabasesCustomServerTest extends Scope public function testListTables(): array { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -352,7 +352,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for SUCCESS */ - $test1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $test1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $test2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actors['body']['$id'] . '/columns'; + $columnsPath = '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actors['body']['$id'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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'] @@ -745,7 +745,7 @@ class DatabasesCustomServerTest extends Scope public function testDeleteColumn(): array { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', 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 . '/grids/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + $firstName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -791,7 +791,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + $lastName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -801,7 +801,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $unneeded = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + $unneeded = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $actors['body']['$id'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actors['body']['$id'] . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actors['body']['$id'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actors['body']['$id'] . '/columns/' . $unneededId, array_merge([ + $column = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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'] @@ -885,7 +885,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotContains($unneededId, $row['body']); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['tableId'] . '/indexes/' . $data['key'], array_merge([ + $index = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $data['tableId'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['tableId'] . '/columns/string', array_merge([ + $column1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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, ]); - $column2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/columns/string', array_merge([ + $column2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['tableId'] . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['tableId'] . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['tableId'] . '/columns/' . $column2['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $data['tableId'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['tableId'] . '/columns/' . $column1['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $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'] @@ -1033,7 +1033,7 @@ class DatabasesCustomServerTest extends Scope public function testCleanupDuplicateIndexOnDeleteColumn() { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', 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 . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $column1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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, ]); - $column2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $column2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $column1['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $column2['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders())); @@ -1234,7 +1234,7 @@ class DatabasesCustomServerTest extends Scope */ public function testDeleteTableDeletesRelatedColumns(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', 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 . '/grids/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1 . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table2, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1 . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1 . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1301,7 +1301,7 @@ class DatabasesCustomServerTest extends Scope public function testColumnRowWidthLimit() { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', 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 . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $tooWide = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1367,7 +1367,7 @@ class DatabasesCustomServerTest extends Scope public function testIndexLimitException() { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', 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 . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/indexes', array_merge([ + $tooMany = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1492,7 +1492,7 @@ class DatabasesCustomServerTest extends Scope public function testColumnUpdate(): array { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', 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 . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/email', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/ip', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/url', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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 Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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 Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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 Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $tableId . '/rows/' . $newDoc['body']['$id'], array_merge([ + $deleteDoc = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $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'] @@ -3350,7 +3350,7 @@ class DatabasesCustomServerTest extends Scope // Test Resize Down - $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/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/grids/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/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'] @@ -3484,7 +3484,7 @@ class DatabasesCustomServerTest extends Scope /** * Check if Table exists */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/i_dont_exist/columns/' . $key . '/unknown_' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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'] @@ -3496,7 +3496,7 @@ class DatabasesCustomServerTest extends Scope /** * Check if Column exists */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $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'] @@ -3519,7 +3519,7 @@ class DatabasesCustomServerTest extends Scope // Create row to test against $row = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $doc1 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3614,7 +3614,7 @@ class DatabasesCustomServerTest extends Scope public function createRelationshipTables(): void { // Prepare the database with tables and relationships - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3625,7 +3625,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3662,7 +3662,7 @@ class DatabasesCustomServerTest extends Scope public function cleanupRelationshipTable(): void { - $this->client->call(Client::METHOD_DELETE, '/databases/database1', [ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/database1', [ '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 . '/grids/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2'][0]['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $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'] @@ -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 . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table2Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4138,7 +4138,7 @@ class DatabasesCustomServerTest extends Scope public function testBulkCreate(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ '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 . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/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}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_GET, "/tablesdb/{$databaseId}/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}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/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}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/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}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/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}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/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}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/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}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/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}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/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 . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4376,7 +4376,7 @@ class DatabasesCustomServerTest extends Scope public function testBulkUpdate(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4389,7 +4389,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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 . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4666,7 +4666,7 @@ class DatabasesCustomServerTest extends Scope public function testBulkUpsert(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4679,7 +4679,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $data['databaseId'] . '/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 . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4859,7 +4859,7 @@ class DatabasesCustomServerTest extends Scope public function testBulkDelete(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4872,7 +4872,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/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 . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5192,7 +5192,7 @@ class DatabasesCustomServerTest extends Scope public function testDateTimeRow(): void { - $databaseId = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $databaseId = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5204,7 +5204,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $databaseId['headers']['status-code']); $databaseId = $databaseId['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5219,7 +5219,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $table['body']['$id']; // Create string column - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5230,7 +5230,7 @@ class DatabasesCustomServerTest extends Scope ]); // Create datetime column - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5245,7 +5245,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5266,7 +5266,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5277,7 +5277,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5298,7 +5298,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row2', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5309,13 +5309,13 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEquals($row['body']['$updatedAt'], $date); // Cleanup - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/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([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5324,7 +5324,7 @@ class DatabasesCustomServerTest extends Scope public function testSingleRowDateOperations(): void { - $databaseId = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $databaseId = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5336,7 +5336,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $databaseId['headers']['status-code']); $databaseId = $databaseId['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5351,7 +5351,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $table['body']['$id']; // Create string column - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5370,7 +5370,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5392,7 +5392,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $updatedRow = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5408,7 +5408,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5431,7 +5431,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5449,7 +5449,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $row3['headers']['status-code']); - $updatedRow3 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row3', array_merge([ + $updatedRow3 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row3', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5466,7 +5466,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $row4 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5486,7 +5486,7 @@ class DatabasesCustomServerTest extends Scope $originalCreatedAt4 = $row4['body']['$createdAt']; $originalUpdatedAt4 = $row4['body']['$updatedAt']; - $updatedRow4 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row4', array_merge([ + $updatedRow4 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row4', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5503,7 +5503,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $finalRow4 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row4', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5520,7 +5520,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $row5 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5541,7 +5541,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $updatedRow5 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row5', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5557,7 +5557,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $row6 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5579,7 +5579,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $updatedRow6 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row6', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5596,13 +5596,13 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($date3, $updatedRow6['body']['$updatedAt']); // Cleanup - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/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([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5611,7 +5611,7 @@ class DatabasesCustomServerTest extends Scope public function testBulkRowDateOperations(): void { - $databaseId = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $databaseId = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5623,7 +5623,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $databaseId['headers']['status-code']); $databaseId = $databaseId['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5638,7 +5638,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $table['body']['$id']; // Create string column - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5718,7 +5718,7 @@ class DatabasesCustomServerTest extends Scope ]; // Create all rows in one bulk operation - $bulkCreateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $bulkCreateResponse = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5731,7 +5731,7 @@ class DatabasesCustomServerTest extends Scope // Verify initial state foreach (['row1', 'row3'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5741,7 +5741,7 @@ class DatabasesCustomServerTest extends Scope } foreach (['row2', 'row3'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5751,7 +5751,7 @@ class DatabasesCustomServerTest extends Scope } foreach (['row4', 'row5', 'row6'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5776,7 +5776,7 @@ class DatabasesCustomServerTest extends Scope ]; // Use bulk update instead of individual updates - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5786,7 +5786,7 @@ class DatabasesCustomServerTest extends Scope // Verify updated state foreach (['row1', 'row3'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5798,7 +5798,7 @@ class DatabasesCustomServerTest extends Scope } foreach (['row2', 'row4', 'row5', 'row6'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5818,7 +5818,7 @@ class DatabasesCustomServerTest extends Scope ]; // Use bulk update instead of individual updates - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5829,7 +5829,7 @@ class DatabasesCustomServerTest extends Scope // 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([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5841,13 +5841,13 @@ class DatabasesCustomServerTest extends Scope } // Cleanup - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/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([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5856,7 +5856,7 @@ class DatabasesCustomServerTest extends Scope public function testUpsertRowDateOperations(): void { - $databaseId = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $databaseId = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5868,7 +5868,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $databaseId['headers']['status-code']); $databaseId = $databaseId['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5883,7 +5883,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $table['body']['$id']; // Create string column - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5902,7 +5902,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $upsertRow1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5924,7 +5924,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $updatedUpsertRow1 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/upsert1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5940,7 +5940,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $upsertRow2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5963,7 +5963,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $updatedUpsertRow2 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/upsert2', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6009,7 +6009,7 @@ class DatabasesCustomServerTest extends Scope ]; // Create rows using bulk upsert - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6021,7 +6021,7 @@ class DatabasesCustomServerTest extends Scope // 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([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -6031,7 +6031,7 @@ class DatabasesCustomServerTest extends Scope } foreach (['bulk_upsert2', 'bulk_upsert3'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -6041,7 +6041,7 @@ class DatabasesCustomServerTest extends Scope } foreach (['bulk_upsert4'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -6065,7 +6065,7 @@ class DatabasesCustomServerTest extends Scope $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([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6076,7 +6076,7 @@ class DatabasesCustomServerTest extends Scope // Verify updated state foreach ($upsertIds as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -6098,7 +6098,7 @@ class DatabasesCustomServerTest extends Scope ]; // Use bulk update instead of individual updates - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6109,7 +6109,7 @@ class DatabasesCustomServerTest extends Scope // Verify null handling foreach ($upsertIds as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -6120,13 +6120,13 @@ class DatabasesCustomServerTest extends Scope } // Cleanup - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/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([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $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/DatabasesPermissionsGuestTest.php b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsGuestTest.php similarity index 79% rename from tests/e2e/Services/Databases/Grids/DatabasesPermissionsGuestTest.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsGuestTest.php index c0c3cdae0b..71d033c89e 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesPermissionsGuestTest.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsGuestTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Grids; +namespace Tests\E2E\Services\Databases\TablesDB; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; @@ -19,7 +19,7 @@ class DatabasesPermissionsGuestTest extends Scope public function createTable(): array { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -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 . '/grids/tables', $this->getServerHeader(), [ + $publicMovies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', $this->getServerHeader(), [ + $privateMovies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $publicTable['id'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $publicTable['id'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $privateTable['id'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $publicTableId . '/rows', $this->getServerHeader(), [ + $publicResponse = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $publicTableId . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], 'permissions' => $permissions, ]); - $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ + $privateResponse = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $publicTableId . '/rows', [ + $publicRows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $publicTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); - $privateRows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows', [ + $privateRows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $publicTableId . '/rows', [ + $publicResponse = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $privateTableId . '/rows', [ + $privateResponse = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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 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 . '/grids/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ + // Create a row in private table with API key so we can test that update and delete are also not allowed + $privateResponse = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $publicTableId . '/rows/' . $publicRowId, [ + $publicRow = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $privateTableId . '/rows/' . $privateRowId, [ + $privateRow = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $publicTableId . '/rows/' . $publicRowId, [ + $publicRow = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $privateTableId . '/rows/' . $privateRowId, [ + $privateRow = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $privateTableId . '/rows/' . $privateRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); @@ -228,7 +228,7 @@ class DatabasesPermissionsGuestTest extends Scope public function testWriteRowWithPermissions() { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -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 . '/grids/tables', $this->getServerHeader(), [ + $movies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $moviesId . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $moviesId . '/rows', [ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ diff --git a/tests/e2e/Services/Databases/Grids/DatabasesPermissionsMemberTest.php b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsMemberTest.php similarity index 81% rename from tests/e2e/Services/Databases/Grids/DatabasesPermissionsMemberTest.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsMemberTest.php index 397f82db41..8e5af51493 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesPermissionsMemberTest.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsMemberTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Grids; +namespace Tests\E2E\Services\Databases\TablesDB; 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 . '/grids/tables', $this->getServerHeader(), [ + $public = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $this->tables['public'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', $this->getServerHeader(), [ + $private = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $this->tables['private'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables', $this->getServerHeader(), [ + $doconly = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $this->tables['doconly'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tables['public'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tables['private'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tables['doconly'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tables['public'] . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tables['private'] . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $tables['doconly'] . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tables['doconly'] . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], diff --git a/tests/e2e/Services/Databases/Grids/DatabasesPermissionsScope.php b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsScope.php similarity index 98% rename from tests/e2e/Services/Databases/Grids/DatabasesPermissionsScope.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsScope.php index 0ab3f83ef1..bffc0606de 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesPermissionsScope.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsScope.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Grids; +namespace Tests\E2E\Services\Databases\TablesDB; use Tests\E2E\Client; diff --git a/tests/e2e/Services/Databases/Grids/DatabasesPermissionsTeamTest.php b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsTeamTest.php similarity index 80% rename from tests/e2e/Services/Databases/Grids/DatabasesPermissionsTeamTest.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsTeamTest.php index 95abfbc4fe..640ba1acc5 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesPermissionsTeamTest.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsTeamTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Grids; +namespace Tests\E2E\Services\Databases\TablesDB; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; @@ -38,13 +38,13 @@ class DatabasesPermissionsTeamTest extends Scope public function createTables($teams) { - $db = $this->client->call(Client::METHOD_POST, '/databases', $this->getServerHeader(), [ + $db = $this->client->call(Client::METHOD_POST, '/tablesdb', $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 . '/grids/tables', $this->getServerHeader(), [ + $table1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $this->databaseId . '/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 . '/grids/tables/' . $this->tables['table1'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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 . '/grids/tables', $this->getServerHeader(), [ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $this->databaseId . '/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 . '/grids/tables/' . $this->tables['table2'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $this->databaseId . '/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 . '/grids/tables/' . $this->tables['table1'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $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 . '/grids/tables/' . $this->tables['table2'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $this->databaseId . '/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 . '/grids/tables/' . $table . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $this->databaseId . '/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 . '/grids/tables/' . $table . '/rows', [ + $rows = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $this->databaseId . '/tables/' . $table . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], diff --git a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php index a60c9e59cf..f8b7bae325 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php @@ -142,6 +142,19 @@ class FunctionsCustomClientTest extends Scope ]); $output = json_decode($execution['body']['responseBody'], true); $this->assertEquals(201, $execution['headers']['status-code']); + + $this->assertNotEmpty($execution['body']['responseHeaders']); + + $executionIdHeader = null; + foreach ($execution['body']['responseHeaders'] as $header) { + if ($header['name'] === 'x-appwrite-execution-id') { + $executionIdHeader = $header['value']; + break; + } + } + $this->assertNotEmpty($executionIdHeader); + $this->assertEquals($execution['body']['$id'], $executionIdHeader); + $this->assertEquals(200, $execution['body']['responseStatusCode']); $this->assertGreaterThan(0, $execution['body']['duration']); $this->assertEquals('completed', $execution['body']['status']); @@ -159,6 +172,11 @@ class FunctionsCustomClientTest extends Scope $this->assertNotEmpty($output['APPWRITE_FUNCTION_JWT']); $this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']); + $executionId = $execution['body']['$id'] ?? ''; + $this->assertNotEmpty($output['APPWRITE_FUNCTION_EXECUTION_ID']); + $this->assertEquals($executionId, $output['APPWRITE_FUNCTION_EXECUTION_ID']); + $this->assertNotEmpty($output['APPWRITE_FUNCTION_CLIENT_IP']); + $execution = $this->createExecution($functionId, [ 'body' => 'foobar', 'async' => true diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index ff99033fdf..0d63791151 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -721,6 +721,30 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals($deployments['headers']['status-code'], 200); $this->assertCount(1, $deployments['body']['deployments']); + $deployments = $this->listDeployments($functionId, [ + 'queries' => [ + Query::select(['status'])->toString(), + ], + ]); + + $this->assertEquals($deployments['headers']['status-code'], 200); + $this->assertArrayHasKey('status', $deployments['body']['deployments'][0]); + $this->assertArrayHasKey('status', $deployments['body']['deployments'][1]); + $this->assertArrayNotHasKey('sourceSize', $deployments['body']['deployments'][0]); + $this->assertArrayNotHasKey('sourceSize', $deployments['body']['deployments'][1]); + + // Extra select query check, for attribute not allowed by filter queries + $deployments = $this->listDeployments($functionId, [ + 'queries' => [ + Query::select(['buildLogs'])->toString(), + ], + ]); + $this->assertEquals($deployments['headers']['status-code'], 200); + $this->assertArrayHasKey('buildLogs', $deployments['body']['deployments'][0]); + $this->assertArrayHasKey('buildLogs', $deployments['body']['deployments'][1]); + $this->assertArrayNotHasKey('sourceSize', $deployments['body']['deployments'][0]); + $this->assertArrayNotHasKey('sourceSize', $deployments['body']['deployments'][1]); + $deployments = $this->listDeployments($functionId, [ 'queries' => [ Query::offset(1)->toString(), @@ -892,6 +916,19 @@ class FunctionsCustomServerTest extends Scope ]); $this->assertEquals(201, $execution['headers']['status-code']); + + $this->assertNotEmpty($execution['body']['responseHeaders']); + + $executionIdHeader = null; + foreach ($execution['body']['responseHeaders'] as $header) { + if ($header['name'] === 'x-appwrite-execution-id') { + $executionIdHeader = $header['value']; + break; + } + } + $this->assertNotEmpty($executionIdHeader); + $this->assertEquals($execution['body']['$id'], $executionIdHeader); + $this->assertNotEmpty($execution['body']['$id']); $this->assertNotEmpty($execution['body']['functionId']); $this->assertEquals(true, (new DatetimeValidator())->isValid($execution['body']['$createdAt'])); @@ -912,6 +949,26 @@ class FunctionsCustomServerTest extends Scope $executionId = $execution['body']['$id'] ?? ''; + /** Test create execution with HEAD method */ + $execution = $this->createExecution($data['functionId'], [ + 'async' => 'false', + 'method' => 'HEAD', + ]); + + $this->assertEquals(201, $execution['headers']['status-code']); + $this->assertEquals('completed', $execution['body']['status']); + $this->assertEquals(200, $execution['body']['responseStatusCode']); + $this->assertIsArray($execution['body']['responseHeaders']); + $this->assertEmpty($execution['body']['responseBody']); // For HEAD requests, response body is empty + + /** Delete execution */ + $execution = $this->client->call(Client::METHOD_DELETE, '/functions/' . $data['functionId'] . '/executions/' . $execution['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), []); + $this->assertEquals(204, $execution['headers']['status-code']); + + /** Test create execution with 400 status code */ $execution = $this->createExecution($data['functionId'], [ 'async' => 'false', 'path' => '/?code=400' @@ -921,11 +978,11 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals('completed', $execution['body']['status']); $this->assertEquals(400, $execution['body']['responseStatusCode']); + /** Delete execution */ $execution = $this->client->call(Client::METHOD_DELETE, '/functions/' . $data['functionId'] . '/executions/' . $execution['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); - $this->assertEquals(204, $execution['headers']['status-code']); return array_merge($data, ['executionId' => $executionId]); @@ -945,6 +1002,29 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(1, $executions['body']['total']); $this->assertIsArray($executions['body']['executions']); $this->assertCount(1, $executions['body']['executions']); + $this->assertEquals($data['deploymentId'], $executions['body']['executions'][0]['deploymentId']); + + $executions = $this->listExecutions($data['functionId'], [ + 'queries' => [ + Query::equal('deploymentId', [$data['deploymentId']])->toString(), + ], + ]); + + $this->assertEquals(200, $executions['headers']['status-code']); + $this->assertEquals(1, $executions['body']['total']); + $this->assertIsArray($executions['body']['executions']); + $this->assertCount(1, $executions['body']['executions']); + + $executions = $this->listExecutions($data['functionId'], [ + 'queries' => [ + Query::equal('deploymentId', ['some-random-id'])->toString(), + ], + ]); + + $this->assertEquals(200, $executions['headers']['status-code']); + $this->assertEquals(0, $executions['body']['total']); + $this->assertIsArray($executions['body']['executions']); + $this->assertCount(0, $executions['body']['executions']); $executions = $this->listExecutions($data['functionId'], [ 'queries' => [ @@ -1034,8 +1114,9 @@ class FunctionsCustomServerTest extends Scope */ $execution = $this->getExecution($data['functionId'], $data['executionId']); - $this->assertEquals($execution['headers']['status-code'], 200); - $this->assertEquals($execution['body']['$id'], $data['executionId']); + $this->assertEquals(200, $execution['headers']['status-code']); + $this->assertEquals($data['executionId'], $execution['body']['$id']); + $this->assertEquals($data['deploymentId'], $execution['body']['deploymentId']); /** * Test for FAILURE @@ -1136,6 +1217,12 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(1, $output['APPWRITE_FUNCTION_CPUS']); $this->assertEquals(1024, $output['APPWRITE_FUNCTION_MEMORY']); + // Test execution ID and client IP + $executionId = $execution['body']['$id'] ?? ''; + $this->assertNotEmpty($output['APPWRITE_FUNCTION_EXECUTION_ID']); + $this->assertEquals($executionId, $output['APPWRITE_FUNCTION_EXECUTION_ID']); + $this->assertNotEmpty($output['APPWRITE_FUNCTION_CLIENT_IP']); + // Change the specs to 1vcpu 512mb $function = $this->client->call(Client::METHOD_PUT, '/functions/' . $data['functionId'], array_merge([ 'content-type' => 'application/json', @@ -1508,7 +1595,10 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(204, $lastExecution['responseStatusCode']); $this->assertStringContainsString($userId, $lastExecution['logs']); $this->assertStringContainsString('Event User', $lastExecution['logs']); - }, 10000, 500); + $this->assertNotEmpty($lastExecution['$id']); + $headers = array_column($lastExecution['requestHeaders'] ?? [], 'value', 'name'); + $this->assertEmpty($headers['x-appwrite-client-ip'] ?? ''); + }, 20_000, 500); $this->cleanupFunction($functionId); @@ -1652,6 +1742,9 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals($cookie, $response['body']); + $this->assertArrayHasKey('x-appwrite-execution-id', $response['headers']); + $this->assertNotEmpty($response['headers']['x-appwrite-execution-id']); + // Async execution document creation $this->assertEventually(function () use ($functionId) { $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([ @@ -2282,4 +2375,45 @@ class FunctionsCustomServerTest extends Scope $this->cleanupFunction($functionId); } + + public function testLogAndErrorTruncation(): void + { + $functionId = $this->setupFunction([ + 'functionId' => ID::unique(), + 'name' => 'Test Log Truncation', + 'runtime' => 'node-22', + 'entrypoint' => 'index.js', + 'timeout' => 15, + ]); + + $this->setupDeployment($functionId, [ + 'code' => $this->packageFunction('log-error-truncation'), + 'activate' => true + ]); + + $execution = $this->createExecution($functionId, [ + 'async' => 'false' + ]); + + $this->assertEquals(201, $execution['headers']['status-code']); + $this->assertEquals(200, $execution['body']['responseStatusCode']); + + // Verify logs are truncated and warning message is present at the beginning + $logs = $execution['body']['logs']; + $this->assertLessThanOrEqual(APP_FUNCTION_LOG_LENGTH_LIMIT, strlen($logs)); + $this->assertStringStartsWith('[WARNING] Logs truncated', $logs); + + $this->assertStringNotContainsString('z', $logs); + $this->assertStringContainsString('a', $logs); + + // Verify errors are truncated and warning message is present at the beginning + $errors = $execution['body']['errors']; + $this->assertLessThanOrEqual(APP_FUNCTION_ERROR_LENGTH_LIMIT, strlen($errors)); + $this->assertStringStartsWith('[WARNING] Errors truncated', $errors); + + $this->assertStringNotContainsString('z', $errors); + $this->assertStringContainsString('a', $errors); + + $this->cleanupFunction($functionId); + } } diff --git a/tests/e2e/Services/FunctionsSchedule/FunctionsScheduleTest.php b/tests/e2e/Services/FunctionsSchedule/FunctionsScheduleTest.php index c3dd2c7fc8..c9ec978cba 100644 --- a/tests/e2e/Services/FunctionsSchedule/FunctionsScheduleTest.php +++ b/tests/e2e/Services/FunctionsSchedule/FunctionsScheduleTest.php @@ -62,6 +62,9 @@ class FunctionsScheduleTest extends Scope $this->assertNotEmpty($asyncExecution['logs']); $this->assertNotEmpty($asyncExecution['errors']); $this->assertGreaterThan(0, $asyncExecution['duration']); + $this->assertNotEmpty($asyncExecution['$id']); + $headers = array_column($asyncExecution['requestHeaders'] ?? [], 'value', 'name'); + $this->assertEmpty($headers['x-appwrite-client-ip'] ?? ''); }, 60000, 500); $this->cleanupFunction($functionId); @@ -118,7 +121,9 @@ class FunctionsScheduleTest extends Scope $this->assertEquals('scheduled', $execution['body']['status']); $this->assertEquals('PATCH', $execution['body']['requestMethod']); $this->assertEquals('/custom-path', $execution['body']['requestPath']); - $this->assertCount(0, $execution['body']['requestHeaders']); + $this->assertCount(1, $execution['body']['requestHeaders']); + $this->assertEquals('x-appwrite-client-ip', $execution['body']['requestHeaders'][0]['name']); + $this->assertNotEmpty($execution['body']['requestHeaders'][0]['value']); \sleep(120); diff --git a/tests/e2e/Services/GraphQL/AccountTest.php b/tests/e2e/Services/GraphQL/AccountTest.php index c17b8a5c24..9dd224f1a1 100644 --- a/tests/e2e/Services/GraphQL/AccountTest.php +++ b/tests/e2e/Services/GraphQL/AccountTest.php @@ -17,7 +17,7 @@ class AccountTest extends Scope public function testCreateAccount(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ACCOUNT); + $query = $this->getQuery(self::CREATE_ACCOUNT); $email = 'test' . \rand() . '@test.com'; $graphQLPayload = [ 'query' => $query, @@ -45,7 +45,7 @@ class AccountTest extends Scope public function testCreateAccountSession() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ACCOUNT_SESSION); + $query = $this->getQuery(self::CREATE_ACCOUNT_SESSION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -70,7 +70,7 @@ class AccountTest extends Scope public function testCreateMagicURLSession(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_MAGIC_URL); + $query = $this->getQuery(self::CREATE_MAGIC_URL); $email = 'test' . \rand() . '@test.com'; $graphQLPayload = [ 'query' => $query, @@ -95,7 +95,7 @@ class AccountTest extends Scope public function testCreateEmailVerification(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_EMAIL_VERIFICATION); + $query = $this->getQuery(self::CREATE_EMAIL_VERIFICATION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -124,7 +124,7 @@ class AccountTest extends Scope { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_PHONE_VERIFICATION); + $query = $this->getQuery(self::CREATE_PHONE_VERIFICATION); $graphQLPayload = [ 'query' => $query, ]; @@ -144,7 +144,7 @@ class AccountTest extends Scope public function testCreatePasswordRecovery(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_PASSWORD_RECOVERY); + $query = $this->getQuery(self::CREATE_PASSWORD_RECOVERY); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -168,7 +168,7 @@ class AccountTest extends Scope public function testCreateAnonymousSession(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ANONYMOUS_SESSION); + $query = $this->getQuery(self::CREATE_ANONYMOUS_SESSION); $graphQLPayload = [ 'query' => $query, ]; @@ -188,7 +188,7 @@ class AccountTest extends Scope public function testCreateAccountJWT(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ACCOUNT_JWT); + $query = $this->getQuery(self::CREATE_ACCOUNT_JWT); $graphQLPayload = [ 'query' => $query, ]; @@ -207,7 +207,7 @@ class AccountTest extends Scope public function testGetAccount(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ACCOUNT); + $query = $this->getQuery(self::GET_ACCOUNT); $graphQLPayload = [ 'query' => $query, ]; @@ -230,7 +230,7 @@ class AccountTest extends Scope public function testGetAccountPreferences(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ACCOUNT_PREFS); + $query = $this->getQuery(self::GET_ACCOUNT_PREFS); $graphQLPayload = [ 'query' => $query, ]; @@ -250,7 +250,7 @@ class AccountTest extends Scope public function testGetAccountSessions(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ACCOUNT_SESSIONS); + $query = $this->getQuery(self::GET_ACCOUNT_SESSIONS); $graphQLPayload = [ 'query' => $query, ]; @@ -270,7 +270,7 @@ class AccountTest extends Scope public function testGetAccountSession(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ACCOUNT_SESSION); + $query = $this->getQuery(self::GET_ACCOUNT_SESSION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -294,7 +294,7 @@ class AccountTest extends Scope public function testGetAccountLogs(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ACCOUNT_LOGS); + $query = $this->getQuery(self::GET_ACCOUNT_LOGS); $graphQLPayload = [ 'query' => $query, ]; @@ -314,7 +314,7 @@ class AccountTest extends Scope public function testUpdateAccountName(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ACCOUNT_NAME); + $query = $this->getQuery(self::UPDATE_ACCOUNT_NAME); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -338,7 +338,7 @@ class AccountTest extends Scope public function testUpdateAccountEmail(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ACCOUNT_EMAIL); + $query = $this->getQuery(self::UPDATE_ACCOUNT_EMAIL); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -363,7 +363,7 @@ class AccountTest extends Scope public function testUpdateAccountPassword(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ACCOUNT_PASSWORD); + $query = $this->getQuery(self::UPDATE_ACCOUNT_PASSWORD); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -387,7 +387,7 @@ class AccountTest extends Scope public function testUpdateAccountPhone(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ACCOUNT_PHONE); + $query = $this->getQuery(self::UPDATE_ACCOUNT_PHONE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -412,7 +412,7 @@ class AccountTest extends Scope public function testUpdateAccountStatus(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ACCOUNT_STATUS); + $query = $this->getQuery(self::UPDATE_ACCOUNT_STATUS); $graphQLPayload = [ 'query' => $query, ]; @@ -436,7 +436,7 @@ class AccountTest extends Scope public function testUpdateAccountPrefs(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ACCOUNT_PREFS); + $query = $this->getQuery(self::UPDATE_ACCOUNT_PREFS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -462,7 +462,7 @@ class AccountTest extends Scope public function testDeleteAccountSessions(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ACCOUNT_SESSIONS); + $query = $this->getQuery(self::DELETE_ACCOUNT_SESSIONS); $graphQLPayload = [ 'query' => $query ]; @@ -484,7 +484,7 @@ class AccountTest extends Scope public function testDeleteAccountSession(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ACCOUNT_SESSION); + $query = $this->getQuery(self::DELETE_ACCOUNT_SESSION); $graphQLPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/AvatarsTest.php b/tests/e2e/Services/GraphQL/AvatarsTest.php index f805d965e2..4c33aedcd7 100644 --- a/tests/e2e/Services/GraphQL/AvatarsTest.php +++ b/tests/e2e/Services/GraphQL/AvatarsTest.php @@ -16,7 +16,7 @@ class AvatarsTest extends Scope public function testGetCreditCardIcon() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_CREDIT_CARD_ICON); + $query = $this->getQuery(self::GET_CREDIT_CARD_ICON); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -39,7 +39,7 @@ class AvatarsTest extends Scope public function testGetBrowserIcon() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_BROWSER_ICON); + $query = $this->getQuery(self::GET_BROWSER_ICON); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -62,7 +62,7 @@ class AvatarsTest extends Scope public function testGetCountryFlag() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COUNTRY_FLAG); + $query = $this->getQuery(self::GET_COUNTRY_FLAG); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -85,7 +85,7 @@ class AvatarsTest extends Scope public function testGetImageFromURL() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_IMAGE_FROM_URL); + $query = $this->getQuery(self::GET_IMAGE_FROM_URL); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -108,7 +108,7 @@ class AvatarsTest extends Scope public function testGetFavicon() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FAVICON); + $query = $this->getQuery(self::GET_FAVICON); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -131,7 +131,7 @@ class AvatarsTest extends Scope public function testGetQRCode() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_QRCODE); + $query = $this->getQuery(self::GET_QRCODE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -154,7 +154,7 @@ class AvatarsTest extends Scope public function testGetInitials() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER_INITIALS); + $query = $this->getQuery(self::GET_USER_INITIALS); $graphQLPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index 8b6f85a1b1..46effc795a 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -8,330 +8,330 @@ use Utopia\CLI\Console; trait Base { // Databases - public static string $CREATE_DATABASE = 'create_database'; - public static string $GET_DATABASES = 'get_databases'; - public static string $GET_DATABASE = 'get_database'; - public static string $UPDATE_DATABASE = 'update_database'; - public static string $DELETE_DATABASE = 'delete_database'; + public const string CREATE_DATABASE = 'create_database'; + public const string GET_DATABASES = 'get_databases'; + public const string GET_DATABASE = 'get_database'; + public const string UPDATE_DATABASE = 'update_database'; + public const 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'; + public const string CREATE_COLLECTION = 'create_collection'; + public const string GET_COLLECTION = 'get_collection'; + public const string GET_COLLECTIONS = 'list_collections'; + public const string UPDATE_COLLECTION = 'update_collection'; + public const string DELETE_COLLECTION = 'delete_collection'; // 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'; + public const string TABLESDB_CREATE_DATABASE = 'tablesdb_create_database'; + public const string TABLESDB_GET_DATABASES = 'tablesdb_get_databases'; + public const string TABLESDB_GET_DATABASE = 'tablesdb_get_database'; + public const string TABLESDB_UPDATE_DATABASE = 'tablesdb_update_database'; + public const string TABLESDB_DELETE_DATABASE = 'tablesdb_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'; - public static string $UPDATE_TABLE = 'update_table'; - public static string $DELETE_TABLE = 'delete_table'; + public const string CREATE_TABLE = 'create_table'; + public const string GET_TABLE = 'get_table'; + public const string GET_TABLES = 'list_tables'; + public const string UPDATE_TABLE = 'update_table'; + public const string DELETE_TABLE = 'delete_table'; // 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 const string CREATE_STRING_ATTRIBUTE = 'create_string_attribute'; + public const string CREATE_INTEGER_ATTRIBUTE = 'create_integer_attribute'; + public const string CREATE_FLOAT_ATTRIBUTE = 'create_float_attribute'; + public const string CREATE_BOOLEAN_ATTRIBUTE = 'create_boolean_attribute'; + public const string CREATE_URL_ATTRIBUTE = 'create_url_attribute'; + public const string CREATE_EMAIL_ATTRIBUTE = 'create_email_attribute'; + public const string CREATE_IP_ATTRIBUTE = 'create_ip_attribute'; + public const string CREATE_ENUM_ATTRIBUTE = 'create_enum_attribute'; + public const string CREATE_DATETIME_ATTRIBUTE = 'create_datetime_attribute'; - 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 const string CREATE_RELATIONSHIP_ATTRIBUTE = 'create_relationship_attribute'; + public const string UPDATE_STRING_ATTRIBUTE = 'update_string_attribute'; + public const string UPDATE_INTEGER_ATTRIBUTE = 'update_integer_attribute'; + public const string UPDATE_FLOAT_ATTRIBUTE = 'update_float_attribute'; + public const string UPDATE_BOOLEAN_ATTRIBUTE = 'update_boolean_attribute'; + public const string UPDATE_URL_ATTRIBUTE = 'update_url_attribute'; + public const string UPDATE_EMAIL_ATTRIBUTE = 'update_email_attribute'; + public const string UPDATE_IP_ATTRIBUTE = 'update_ip_attribute'; + public const string UPDATE_ENUM_ATTRIBUTE = 'update_enum_attribute'; + public const string UPDATE_DATETIME_ATTRIBUTE = 'update_datetime_attribute'; - 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 const string UPDATE_RELATIONSHIP_ATTRIBUTE = 'update_relationship_attribute'; + public const string GET_ATTRIBUTES = 'get_attributes'; + public const string GET_ATTRIBUTE = 'get_attribute'; + public const string DELETE_ATTRIBUTE = 'delete_attribute'; - // 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'; - 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'; + // TablesDB columns + public const string CREATE_STRING_COLUMN = 'create_string_column'; + public const string CREATE_INTEGER_COLUMN = 'create_integer_column'; + public const string CREATE_FLOAT_COLUMN = 'create_float_column'; + public const string CREATE_BOOLEAN_COLUMN = 'create_boolean_column'; + public const string CREATE_URL_COLUMN = 'create_url_column'; + public const string CREATE_EMAIL_COLUMN = 'create_email_column'; + public const string CREATE_IP_COLUMN = 'create_ip_column'; + public const string CREATE_ENUM_COLUMN = 'create_enum_column'; + public const 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 const string CREATE_RELATIONSHIP_COLUMN = 'create_relationship_column'; + public const string UPDATE_STRING_COLUMN = 'update_string_column'; + public const string UPDATE_INTEGER_COLUMN = 'update_integer_column'; + public const string UPDATE_FLOAT_COLUMN = 'update_float_column'; + public const string UPDATE_BOOLEAN_COLUMN = 'update_boolean_column'; + public const string UPDATE_URL_COLUMN = 'update_url_column'; + public const string UPDATE_EMAIL_COLUMN = 'update_email_column'; + public const string UPDATE_IP_COLUMN = 'update_ip_column'; + public const string UPDATE_ENUM_COLUMN = 'update_enum_column'; + public const 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'; + public const string UPDATE_RELATIONSHIP_COLUMN = 'update_relationship_column'; + public const string GET_COLUMNS = 'get_columns'; + public const string GET_COLUMN = 'get_column'; + public const string DELETE_COLUMN = 'delete_column'; // 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'; + public const string CREATE_INDEX = 'create_attribute_index'; + public const string GET_INDEXES = 'get_attribute_indexes'; + public const string GET_INDEX = 'get_attribute_index'; + public const string DELETE_INDEX = 'delete_attribute_index'; // 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'; - public static string $DELETE_COLUMN_INDEX = 'delete_column_index'; + public const string CREATE_COLUMN_INDEX = 'create_column_index'; + public const string GET_COLUMN_INDEXES = 'get_column_indexes'; + public const string GET_COLUMN_INDEX = 'get_column_index'; + public const string DELETE_COLUMN_INDEX = 'delete_column_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 $UPSERT_DOCUMENT = 'upsert_document'; - public static string $DELETE_DOCUMENT = 'delete_document'; + public const string CREATE_DOCUMENT = 'create_document_rest'; + public const string GET_DOCUMENTS = 'list_documents'; + public const string GET_DOCUMENT = 'get_document'; + public const string UPDATE_DOCUMENT = 'update_document'; + public const string UPSERT_DOCUMENT = 'upsert_document'; + public const 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'; + public const string CREATE_DOCUMENTS = 'create_documents_rest'; + public const string UPDATE_DOCUMENTS = 'update_documents'; + public const string UPSERT_DOCUMENTS = 'upsert_documents'; + public const string DELETE_DOCUMENTS = 'delete_documents'; // Grid 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'; + public const string CREATE_ROW = 'create_row_rest'; + public const string GET_ROWS = 'list_rows'; + public const string GET_ROW = 'get_row'; + public const string UPDATE_ROW = 'update_row'; + public const string UPSERT_ROW = 'upsert_row'; + public const string DELETE_ROW = 'delete_row'; // 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'; - public static string $DELETE_ROWS = 'delete_rows'; + public const string CREATE_ROWS = 'create_rows_rest'; + public const string UPDATE_ROWS = 'update_rows'; + public const string UPSERT_ROWS = 'upsert_rows'; + public const 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'; - public static string $GET_CUSTOM_ENTITY = 'get_custom_entity'; - public static string $UPDATE_CUSTOM_ENTITY = 'update_custom_entity'; - public static string $DELETE_CUSTOM_ENTITY = 'delete_custom_entity'; + public const string CREATE_CUSTOM_ENTITY = 'create_custom_entity'; + public const string GET_CUSTOM_ENTITIES = 'get_custom_entities'; + public const string GET_CUSTOM_ENTITY = 'get_custom_entity'; + public const string UPDATE_CUSTOM_ENTITY = 'update_custom_entity'; + public const string DELETE_CUSTOM_ENTITY = 'delete_custom_entity'; // Account - public static string $CREATE_ACCOUNT = 'create_account'; - public static string $CREATE_ACCOUNT_SESSION = 'create_account_session'; - public static string $CREATE_ANONYMOUS_SESSION = 'create_anonymous_session'; - public static string $CREATE_ACCOUNT_JWT = 'create_account_jwt'; - public static string $CREATE_MAGIC_URL = 'create_magic_url'; - public static string $CREATE_PASSWORD_RECOVERY = 'create_password_recovery'; - public static string $CREATE_EMAIL_VERIFICATION = 'create_email_verification'; - public static string $CREATE_PHONE_VERIFICATION = 'create_phone_verification'; - public static string $GET_ACCOUNT = 'get_account'; - public static string $GET_ACCOUNT_SESSION = 'get_account_session'; - public static string $GET_ACCOUNT_SESSIONS = 'get_account_sessions'; - public static string $GET_ACCOUNT_PREFS = 'get_account_preferences'; - public static string $GET_ACCOUNT_LOGS = 'get_account_logs'; - public static string $UPDATE_ACCOUNT_NAME = 'update_account_name'; - public static string $UPDATE_ACCOUNT_EMAIL = 'update_account_email'; - public static string $UPDATE_ACCOUNT_PASSWORD = 'update_account_password'; - public static string $UPDATE_ACCOUNT_PREFS = 'update_account_prefs'; - public static string $UPDATE_ACCOUNT_PHONE = 'update_account_phone'; - public static string $UPDATE_ACCOUNT_STATUS = 'update_account_status'; - public static string $UPDATE_MAGIC_URL = 'confirm_magic_url'; - public static string $UPDATE_PASSWORD_RECOVERY = 'confirm_password_recovery'; - public static string $UPDATE_EMAIL_VERIFICATION = 'confirm_email_verification'; - public static string $UPDATE_PHONE_VERIFICATION = 'confirm_phone_verification'; - public static string $DELETE_ACCOUNT_SESSION = 'delete_account_session'; - public static string $DELETE_ACCOUNT_SESSIONS = 'delete_account_sessions'; + public const string CREATE_ACCOUNT = 'create_account'; + public const string CREATE_ACCOUNT_SESSION = 'create_account_session'; + public const string CREATE_ANONYMOUS_SESSION = 'create_anonymous_session'; + public const string CREATE_ACCOUNT_JWT = 'create_account_jwt'; + public const string CREATE_MAGIC_URL = 'create_magic_url'; + public const string CREATE_PASSWORD_RECOVERY = 'create_password_recovery'; + public const string CREATE_EMAIL_VERIFICATION = 'create_email_verification'; + public const string CREATE_PHONE_VERIFICATION = 'create_phone_verification'; + public const string GET_ACCOUNT = 'get_account'; + public const string GET_ACCOUNT_SESSION = 'get_account_session'; + public const string GET_ACCOUNT_SESSIONS = 'get_account_sessions'; + public const string GET_ACCOUNT_PREFS = 'get_account_preferences'; + public const string GET_ACCOUNT_LOGS = 'get_account_logs'; + public const string UPDATE_ACCOUNT_NAME = 'update_account_name'; + public const string UPDATE_ACCOUNT_EMAIL = 'update_account_email'; + public const string UPDATE_ACCOUNT_PASSWORD = 'update_account_password'; + public const string UPDATE_ACCOUNT_PREFS = 'update_account_prefs'; + public const string UPDATE_ACCOUNT_PHONE = 'update_account_phone'; + public const string UPDATE_ACCOUNT_STATUS = 'update_account_status'; + public const string UPDATE_MAGIC_URL = 'confirm_magic_url'; + public const string UPDATE_PASSWORD_RECOVERY = 'confirm_password_recovery'; + public const string UPDATE_EMAIL_VERIFICATION = 'confirm_email_verification'; + public const string UPDATE_PHONE_VERIFICATION = 'confirm_phone_verification'; + public const string DELETE_ACCOUNT_SESSION = 'delete_account_session'; + public const string DELETE_ACCOUNT_SESSIONS = 'delete_account_sessions'; // Users - public static string $CREATE_USER = 'create_user'; - public static string $GET_USER = 'get_user'; - public static string $GET_USERS = 'list_user'; - public static string $GET_USER_PREFERENCES = 'get_user_preferences'; - public static string $GET_USER_SESSIONS = 'get_user_sessions'; - public static string $GET_USER_MEMBERSHIPS = 'get_user_memberships'; - public static string $GET_USER_LOGS = 'get_user_logs'; - public static string $UPDATE_USER_STATUS = 'update_user_status'; - public static string $UPDATE_USER_NAME = 'update_user_name'; - public static string $UPDATE_USER_EMAIL = 'update_user_email'; - public static string $UPDATE_USER_EMAIL_VERIFICATION = 'update_email_verification'; - public static string $UPDATE_USER_PHONE_VERIFICATION = 'update_phone_verification'; - public static string $UPDATE_USER_PASSWORD = 'update_user_password'; - public static string $UPDATE_USER_PHONE = 'update_user_phone'; - public static string $UPDATE_USER_PREFS = 'update_user_prefs'; - public static string $DELETE_USER_SESSIONS = 'delete_user_sessions'; - public static string $DELETE_USER_SESSION = 'delete_user_session'; - public static string $DELETE_USER = 'delete_user'; - public static string $CREATE_USER_TARGET = 'create_user_target'; - public static string $LIST_USER_TARGETS = 'list_user_targets'; - public static string $GET_USER_TARGET = 'get_user_target'; - public static string $UPDATE_USER_TARGET = 'update_user_target'; - public static string $DELETE_USER_TARGET = 'delete_user_target'; + public const string CREATE_USER = 'create_user'; + public const string GET_USER = 'get_user'; + public const string GET_USERS = 'list_user'; + public const string GET_USER_PREFERENCES = 'get_user_preferences'; + public const string GET_USER_SESSIONS = 'get_user_sessions'; + public const string GET_USER_MEMBERSHIPS = 'get_user_memberships'; + public const string GET_USER_LOGS = 'get_user_logs'; + public const string UPDATE_USER_STATUS = 'update_user_status'; + public const string UPDATE_USER_NAME = 'update_user_name'; + public const string UPDATE_USER_EMAIL = 'update_user_email'; + public const string UPDATE_USER_EMAIL_VERIFICATION = 'update_email_verification'; + public const string UPDATE_USER_PHONE_VERIFICATION = 'update_phone_verification'; + public const string UPDATE_USER_PASSWORD = 'update_user_password'; + public const string UPDATE_USER_PHONE = 'update_user_phone'; + public const string UPDATE_USER_PREFS = 'update_user_prefs'; + public const string DELETE_USER_SESSIONS = 'delete_user_sessions'; + public const string DELETE_USER_SESSION = 'delete_user_session'; + public const string DELETE_USER = 'delete_user'; + public const string CREATE_USER_TARGET = 'create_user_target'; + public const string LIST_USER_TARGETS = 'list_user_targets'; + public const string GET_USER_TARGET = 'get_user_target'; + public const string UPDATE_USER_TARGET = 'update_user_target'; + public const string DELETE_USER_TARGET = 'delete_user_target'; // Teams - public static string $GET_TEAM = 'get_team'; - public static string $GET_TEAM_PREFERENCES = 'get_team_preferences'; - public static string $GET_TEAMS = 'list_teams'; - public static string $CREATE_TEAM = 'create_team'; - public static string $UPDATE_TEAM_NAME = 'update_team_name'; - public static string $UPDATE_TEAM_PREFERENCES = 'update_team_preferences'; + public const string GET_TEAM = 'get_team'; + public const string GET_TEAM_PREFERENCES = 'get_team_preferences'; + public const string GET_TEAMS = 'list_teams'; + public const string CREATE_TEAM = 'create_team'; + public const string UPDATE_TEAM_NAME = 'update_team_name'; + public const string UPDATE_TEAM_PREFERENCES = 'update_team_preferences'; - public static string $DELETE_TEAM = 'delete_team'; - public static string $GET_TEAM_MEMBERSHIP = 'get_team_membership'; - public static string $GET_TEAM_MEMBERSHIPS = 'list_team_memberships'; - public static string $CREATE_TEAM_MEMBERSHIP = 'create_team_membership'; - public static string $UPDATE_TEAM_MEMBERSHIP = 'update_team_membership'; - public static string $UPDATE_TEAM_MEMBERSHIP_STATUS = 'update_membership_status'; - public static string $DELETE_TEAM_MEMBERSHIP = 'delete_team_membership'; + public const string DELETE_TEAM = 'delete_team'; + public const string GET_TEAM_MEMBERSHIP = 'get_team_membership'; + public const string GET_TEAM_MEMBERSHIPS = 'list_team_memberships'; + public const string CREATE_TEAM_MEMBERSHIP = 'create_team_membership'; + public const string UPDATE_TEAM_MEMBERSHIP = 'update_team_membership'; + public const string UPDATE_TEAM_MEMBERSHIP_STATUS = 'update_membership_status'; + public const string DELETE_TEAM_MEMBERSHIP = 'delete_team_membership'; // Functions - public static string $CREATE_FUNCTION = 'create_function'; - public static string $GET_FUNCTIONS = 'list_functions'; - public static string $GET_FUNCTION = 'get_function'; - public static string $GET_RUNTIMES = 'list_runtimes'; - public static string $UPDATE_FUNCTION = 'update_function'; - public static string $DELETE_FUNCTION = 'delete_function'; + public const string CREATE_FUNCTION = 'create_function'; + public const string GET_FUNCTIONS = 'list_functions'; + public const string GET_FUNCTION = 'get_function'; + public const string GET_RUNTIMES = 'list_runtimes'; + public const string UPDATE_FUNCTION = 'update_function'; + public const string DELETE_FUNCTION = 'delete_function'; // Variables - public static string $CREATE_VARIABLE = 'create_variable'; - public static string $GET_VARIABLES = 'list_variables'; - public static string $GET_VARIABLE = 'get_variable'; - public static string $UPDATE_VARIABLE = 'update_variable'; - public static string $DELETE_VARIABLE = 'delete_variable'; + public const string CREATE_VARIABLE = 'create_variable'; + public const string GET_VARIABLES = 'list_variables'; + public const string GET_VARIABLE = 'get_variable'; + public const string UPDATE_VARIABLE = 'update_variable'; + public const string DELETE_VARIABLE = 'delete_variable'; //Deployments - public static string $CREATE_DEPLOYMENT = 'create_deployment'; - public static string $GET_DEPLOYMENTS = 'list_deployments'; - public static string $GET_DEPLOYMENT = 'get_deployment'; - public static string $UPDATE_DEPLOYMENT = 'update_deployment'; - public static string $DELETE_DEPLOYMENT = 'delete_deployment'; + public const string CREATE_DEPLOYMENT = 'create_deployment'; + public const string GET_DEPLOYMENTS = 'list_deployments'; + public const string GET_DEPLOYMENT = 'get_deployment'; + public const string UPDATE_DEPLOYMENT = 'update_deployment'; + public const string DELETE_DEPLOYMENT = 'delete_deployment'; // Executions - public static string $GET_EXECUTIONS = 'list_executions'; - public static string $GET_EXECUTION = 'get_execution'; - public static string $CREATE_EXECUTION = 'create_execution'; - public static string $DELETE_EXECUTION = 'delete_execution'; - public static string $RETRY_BUILD = 'retry_build'; + public const string GET_EXECUTIONS = 'list_executions'; + public const string GET_EXECUTION = 'get_execution'; + public const string CREATE_EXECUTION = 'create_execution'; + public const string DELETE_EXECUTION = 'delete_execution'; + public const string RETRY_BUILD = 'retry_build'; // Buckets - public static string $CREATE_BUCKET = 'create_bucket'; - public static string $GET_BUCKETS = 'list_buckets'; - public static string $GET_BUCKET = 'get_bucket'; - public static string $UPDATE_BUCKET = 'update_bucket'; - public static string $DELETE_BUCKET = 'delete_bucket'; + public const string CREATE_BUCKET = 'create_bucket'; + public const string GET_BUCKETS = 'list_buckets'; + public const string GET_BUCKET = 'get_bucket'; + public const string UPDATE_BUCKET = 'update_bucket'; + public const string DELETE_BUCKET = 'delete_bucket'; // Files - public static string $CREATE_FILE = 'create_file'; - public static string $GET_FILES = 'list_files'; - public static string $GET_FILE = 'get_file'; - public static string $GET_FILE_PREVIEW = 'get_file_preview'; - public static string $GET_FILE_DOWNLOAD = 'get_file_download'; - public static string $GET_FILE_VIEW = 'get_file_view'; - public static string $UPDATE_FILE = 'update_file'; - public static string $DELETE_FILE = 'delete_file'; + public const string CREATE_FILE = 'create_file'; + public const string GET_FILES = 'list_files'; + public const string GET_FILE = 'get_file'; + public const string GET_FILE_PREVIEW = 'get_file_preview'; + public const string GET_FILE_DOWNLOAD = 'get_file_download'; + public const string GET_FILE_VIEW = 'get_file_view'; + public const string UPDATE_FILE = 'update_file'; + public const string DELETE_FILE = 'delete_file'; // Health - public static string $GET_HTTP_HEALTH = 'get_http_health'; - public static string $GET_DB_HEALTH = 'get_db_health'; - public static string $GET_CACHE_HEALTH = 'get_cache_health'; - public static string $GET_TIME_HEALTH = 'get_time_health'; - public static string $GET_WEBHOOKS_QUEUE_HEALTH = 'get_webhooks_queue_health'; - public static string $GET_LOGS_QUEUE_HEALTH = 'get_logs_queue_health'; - public static string $GET_CERTIFICATES_QUEUE_HEALTH = 'get_certificates_queue_health'; - public static string $GET_FUNCTION_QUEUE_HEALTH = 'get_functions_queue_health'; - public static string $GET_LOCAL_STORAGE_HEALTH = 'get_local_storage_health'; - public static string $GET_ANITVIRUS_HEALTH = 'get_antivirus_health'; + public const string GET_HTTP_HEALTH = 'get_http_health'; + public const string GET_DB_HEALTH = 'get_db_health'; + public const string GET_CACHE_HEALTH = 'get_cache_health'; + public const string GET_TIME_HEALTH = 'get_time_health'; + public const string GET_WEBHOOKS_QUEUE_HEALTH = 'get_webhooks_queue_health'; + public const string GET_LOGS_QUEUE_HEALTH = 'get_logs_queue_health'; + public const string GET_CERTIFICATES_QUEUE_HEALTH = 'get_certificates_queue_health'; + public const string GET_FUNCTION_QUEUE_HEALTH = 'get_functions_queue_health'; + public const string GET_LOCAL_STORAGE_HEALTH = 'get_local_storage_health'; + public const string GET_ANITVIRUS_HEALTH = 'get_antivirus_health'; // Localization - public static string $GET_LOCALE = 'get_locale'; - public static string $LIST_COUNTRIES = 'list_countries'; - public static string $LIST_EU_COUNTRIES = 'list_eu_countries'; - public static string $LIST_COUNTRY_PHONE_CODES = 'list_country_phone_codes'; - public static string $LIST_CONTINENTS = 'list_continents'; - public static string $LIST_CURRENCIES = 'list_currencies'; - public static string $LIST_LANGUAGES = 'list_languages'; + public const string GET_LOCALE = 'get_locale'; + public const string LIST_COUNTRIES = 'list_countries'; + public const string LIST_EU_COUNTRIES = 'list_eu_countries'; + public const string LIST_COUNTRY_PHONE_CODES = 'list_country_phone_codes'; + public const string LIST_CONTINENTS = 'list_continents'; + public const string LIST_CURRENCIES = 'list_currencies'; + public const string LIST_LANGUAGES = 'list_languages'; // Avatars - public static string $GET_CREDIT_CARD_ICON = 'get_credit_card_icon'; - public static string $GET_BROWSER_ICON = 'get_browser_icon'; - public static string $GET_COUNTRY_FLAG = 'get_country_flag'; - public static string $GET_IMAGE_FROM_URL = 'get_image_from_url'; - public static string $GET_FAVICON = 'get_favicon'; - public static string $GET_QRCODE = 'get_qrcode'; - public static string $GET_USER_INITIALS = 'get_user_initials'; + public const string GET_CREDIT_CARD_ICON = 'get_credit_card_icon'; + public const string GET_BROWSER_ICON = 'get_browser_icon'; + public const string GET_COUNTRY_FLAG = 'get_country_flag'; + public const string GET_IMAGE_FROM_URL = 'get_image_from_url'; + public const string GET_FAVICON = 'get_favicon'; + public const string GET_QRCODE = 'get_qrcode'; + public const string GET_USER_INITIALS = 'get_user_initials'; // Providers - public static string $CREATE_MAILGUN_PROVIDER = 'create_mailgun_provider'; - public static string $CREATE_SENDGRID_PROVIDER = 'create_sendgrid_provider'; - public static string $CREATE_SMTP_PROVIDER = 'create_smtp_provider'; - public static string $CREATE_TWILIO_PROVIDER = 'create_twilio_provider'; - public static string $CREATE_TELESIGN_PROVIDER = 'create_telesign_provider'; - public static string $CREATE_TEXTMAGIC_PROVIDER = 'create_textmagic_provider'; - public static string $CREATE_MSG91_PROVIDER = 'create_msg91_provider'; - public static string $CREATE_VONAGE_PROVIDER = 'create_vonage_provider'; - public static string $CREATE_FCM_PROVIDER = 'create_fcm_provider'; - public static string $CREATE_APNS_PROVIDER = 'create_apns_provider'; - public static string $LIST_PROVIDERS = 'list_providers'; - public static string $GET_PROVIDER = 'get_provider'; - public static string $UPDATE_MAILGUN_PROVIDER = 'update_mailgun_provider'; - public static string $UPDATE_SENDGRID_PROVIDER = 'update_sendgrid_provider'; - public static string $UPDATE_SMTP_PROVIDER = 'update_smtp_provider'; - public static string $UPDATE_TWILIO_PROVIDER = 'update_twilio_provider'; - public static string $UPDATE_TELESIGN_PROVIDER = 'update_telesign_provider'; - public static string $UPDATE_TEXTMAGIC_PROVIDER = 'update_textmagic_provider'; - public static string $UPDATE_MSG91_PROVIDER = 'update_msg91_provider'; - public static string $UPDATE_VONAGE_PROVIDER = 'update_vonage_provider'; - public static string $UPDATE_FCM_PROVIDER = 'update_fcm_provider'; - public static string $UPDATE_APNS_PROVIDER = 'update_apns_provider'; - public static string $DELETE_PROVIDER = 'delete_provider'; + public const string CREATE_MAILGUN_PROVIDER = 'create_mailgun_provider'; + public const string CREATE_SENDGRID_PROVIDER = 'create_sendgrid_provider'; + public const string CREATE_SMTP_PROVIDER = 'create_smtp_provider'; + public const string CREATE_TWILIO_PROVIDER = 'create_twilio_provider'; + public const string CREATE_TELESIGN_PROVIDER = 'create_telesign_provider'; + public const string CREATE_TEXTMAGIC_PROVIDER = 'create_textmagic_provider'; + public const string CREATE_MSG91_PROVIDER = 'create_msg91_provider'; + public const string CREATE_VONAGE_PROVIDER = 'create_vonage_provider'; + public const string CREATE_FCM_PROVIDER = 'create_fcm_provider'; + public const string CREATE_APNS_PROVIDER = 'create_apns_provider'; + public const string LIST_PROVIDERS = 'list_providers'; + public const string GET_PROVIDER = 'get_provider'; + public const string UPDATE_MAILGUN_PROVIDER = 'update_mailgun_provider'; + public const string UPDATE_SENDGRID_PROVIDER = 'update_sendgrid_provider'; + public const string UPDATE_SMTP_PROVIDER = 'update_smtp_provider'; + public const string UPDATE_TWILIO_PROVIDER = 'update_twilio_provider'; + public const string UPDATE_TELESIGN_PROVIDER = 'update_telesign_provider'; + public const string UPDATE_TEXTMAGIC_PROVIDER = 'update_textmagic_provider'; + public const string UPDATE_MSG91_PROVIDER = 'update_msg91_provider'; + public const string UPDATE_VONAGE_PROVIDER = 'update_vonage_provider'; + public const string UPDATE_FCM_PROVIDER = 'update_fcm_provider'; + public const string UPDATE_APNS_PROVIDER = 'update_apns_provider'; + public const string DELETE_PROVIDER = 'delete_provider'; // Topics - public static string $CREATE_TOPIC = 'create_topic'; - public static string $LIST_TOPICS = 'list_topics'; - public static string $GET_TOPIC = 'get_topic'; - public static string $UPDATE_TOPIC = 'update_topic'; - public static string $DELETE_TOPIC = 'delete_topic'; + public const string CREATE_TOPIC = 'create_topic'; + public const string LIST_TOPICS = 'list_topics'; + public const string GET_TOPIC = 'get_topic'; + public const string UPDATE_TOPIC = 'update_topic'; + public const string DELETE_TOPIC = 'delete_topic'; // Subscriptions - public static string $CREATE_SUBSCRIBER = 'create_subscriber'; - public static string $LIST_SUBSCRIBERS = 'list_subscribers'; - public static string $GET_SUBSCRIBER = 'get_subscriber'; - public static string $DELETE_SUBSCRIBER = 'delete_subscriber'; + public const string CREATE_SUBSCRIBER = 'create_subscriber'; + public const string LIST_SUBSCRIBERS = 'list_subscribers'; + public const string GET_SUBSCRIBER = 'get_subscriber'; + public const string DELETE_SUBSCRIBER = 'delete_subscriber'; // Messages - public static string $CREATE_EMAIL = 'create_email'; - public static string $CREATE_SMS = 'create_sms'; - public static string $CREATE_PUSH_NOTIFICATION = 'create_push_notification'; - public static string $LIST_MESSAGES = 'list_messages'; - public static string $GET_MESSAGE = 'get_message'; + public const string CREATE_EMAIL = 'create_email'; + public const string CREATE_SMS = 'create_sms'; + public const string CREATE_PUSH_NOTIFICATION = 'create_push_notification'; + public const string LIST_MESSAGES = 'list_messages'; + public const string GET_MESSAGE = 'get_message'; - public static string $UPDATE_EMAIL = 'update_email'; - public static string $UPDATE_SMS = 'update_sms'; - public static string $UPDATE_PUSH_NOTIFICATION = 'update_push_notification'; + public const string UPDATE_EMAIL = 'update_email'; + public const string UPDATE_SMS = 'update_sms'; + public const string UPDATE_PUSH_NOTIFICATION = 'update_push_notification'; // Complex queries - public static string $COMPLEX_QUERY_TABLE = 'complex_query_table'; - public static string $COMPLEX_QUERY_COLLECTION = 'complex_query_collection'; + public const string COMPLEX_QUERY_TABLE = 'complex_query_table'; + public const string COMPLEX_QUERY_COLLECTION = 'complex_query_collection'; // Attribute Fragments - public static string $FRAGMENT_ATTRIBUTES = ' + public const string FRAGMENT_ATTRIBUTES = ' fragment attributeProperties on Attributes { ... on AttributeString { key @@ -406,7 +406,7 @@ trait Base '; // Column Fragments - public static string $FRAGMENT_COLUMNS = ' + public const string FRAGMENT_COLUMNS = ' fragment columnProperties on Columns { ... on ColumnString { key @@ -480,7 +480,7 @@ trait Base } '; - public static string $FRAGMENT_HASH_OPTIONS = ' + public const string FRAGMENT_HASH_OPTIONS = ' fragment options on HashOptions { ... on AlgoArgon2 { memoryCost @@ -504,14 +504,14 @@ trait Base public function getQuery(string $name): string { switch ($name) { - case self::$CREATE_DATABASE: + case self::CREATE_DATABASE: return 'mutation createDatabase($databaseId: String!, $name: String!) { databasesCreate(databaseId: $databaseId, name: $name) { _id name } }'; - case self::$GET_DATABASES: + case self::GET_DATABASES: return 'query listDatabases { databasesList { total @@ -521,36 +521,36 @@ trait Base } } }'; - case self::$GET_DATABASE: + case self::GET_DATABASE: return 'query getDatabase($databaseId: String!) { databasesGet(databaseId: $databaseId) { _id name } }'; - case self::$UPDATE_DATABASE: + case self::UPDATE_DATABASE: return 'mutation updateDatabase($databaseId: String!, $name: String!) { databasesUpdate(databaseId: $databaseId, name: $name) { _id name } }'; - case self::$DELETE_DATABASE: + case self::DELETE_DATABASE: return 'mutation deleteDatabase($databaseId: String!) { databasesDelete(databaseId: $databaseId) { status } }'; - case self::$GRIDS_CREATE_DATABASE: - return 'mutation gridsCreateDatabase($databaseId: String!, $name: String!) { - gridsCreateDatabase(databaseId: $databaseId, name: $name) { + case self::TABLESDB_CREATE_DATABASE: + return 'mutation tablesDBCreate($databaseId: String!, $name: String!) { + tablesDBCreate(databaseId: $databaseId, name: $name) { _id name } }'; - case self::$GRIDS_GET_DATABASES: - return 'query gridsListDatabases { - gridsListDatabases { + case self::TABLESDB_GET_DATABASES: + return 'query tablesDBList { + tablesDBList { total databases { _id @@ -558,27 +558,27 @@ trait Base } } }'; - case self::$GRIDS_GET_DATABASE: - return 'query gridsGetDatabase($databaseId: String!) { - gridsGetDatabase(databaseId: $databaseId) { + case self::TABLESDB_GET_DATABASE: + return 'query tablesDBGet($databaseId: String!) { + tablesDBGet(databaseId: $databaseId) { _id name } }'; - case self::$GRIDS_UPDATE_DATABASE: - return 'mutation gridsUpdateDatabase($databaseId: String!, $name: String!) { - gridsUpdateDatabase(databaseId: $databaseId, name: $name) { + case self::TABLESDB_UPDATE_DATABASE: + return 'mutation tablesDBUpdate($databaseId: String!, $name: String!) { + tablesDBUpdate(databaseId: $databaseId, name: $name) { _id name } }'; - case self::$GRIDS_DELETE_DATABASE: - return 'mutation gridsDeleteDatabase($databaseId: String!) { - gridsDeleteDatabase(databaseId: $databaseId) { + case self::TABLESDB_DELETE_DATABASE: + return 'mutation tablesDBDelete($databaseId: String!) { + tablesDBDelete(databaseId: $databaseId) { status } }'; - case self::$GET_COLLECTION: + case self::GET_COLLECTION: return 'query getCollection($databaseId: String!, $collectionId: String!) { databasesGetCollection(databaseId: $databaseId, collectionId: $collectionId) { _id @@ -587,7 +587,7 @@ trait Base name } }'; - case self::$GET_COLLECTIONS: + case self::GET_COLLECTIONS: return 'query listCollections($databaseId: String!) { databasesListCollections(databaseId: $databaseId) { total @@ -599,7 +599,7 @@ trait Base } } }'; - case self::$CREATE_COLLECTION: + 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 @@ -608,7 +608,7 @@ trait Base name } }'; - case self::$UPDATE_COLLECTION: + 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 @@ -617,24 +617,24 @@ trait Base name } }'; - case self::$DELETE_COLLECTION: + case self::DELETE_COLLECTION: return 'mutation deleteCollection($databaseId: String!, $collectionId: String!){ databasesDeleteCollection(databaseId: $databaseId, collectionId: $collectionId) { status } }'; - case self::$GET_TABLE: - return 'query gridsGetTable($databaseId: String!, $tableId: String!) { - gridsGetTable(databaseId: $databaseId, tableId: $tableId) { + case self::GET_TABLE: + return 'query tablesDBGetTable($databaseId: String!, $tableId: String!) { + tablesDBGetTable(databaseId: $databaseId, tableId: $tableId) { _id _permissions rowSecurity name } }'; - case self::$GET_TABLES: - return 'query gridsListTables($databaseId: String!) { - gridsListTables(databaseId: $databaseId) { + case self::GET_TABLES: + return 'query tablesDBListTables($databaseId: String!) { + tablesDBListTables(databaseId: $databaseId) { total tables { _id @@ -644,31 +644,31 @@ trait Base } } }'; - case self::$CREATE_TABLE: - return 'mutation gridsCreateTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!]!) { - gridsCreateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions) { + case self::CREATE_TABLE: + return 'mutation tablesDBCreateTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!]!) { + tablesDBCreateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions) { _id _permissions rowSecurity name } }'; - case self::$UPDATE_TABLE: - 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) { + case self::UPDATE_TABLE: + return 'mutation tablesDBUpdateTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!], $enabled: Boolean) { + tablesDBUpdateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions, enabled: $enabled) { _id _permissions rowSecurity name } }'; - case self::$DELETE_TABLE: - return 'mutation gridsDeleteTable($databaseId: String!, $tableId: String!) { - gridsDeleteTable(databaseId: $databaseId, tableId: $tableId) { + case self::DELETE_TABLE: + return 'mutation tablesDBDeleteTable($databaseId: String!, $tableId: String!) { + tablesDBDeleteTable(databaseId: $databaseId, tableId: $tableId) { status } }'; - case self::$CREATE_STRING_ATTRIBUTE: + 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 @@ -677,7 +677,7 @@ trait Base array } }'; - case self::$CREATE_INTEGER_ATTRIBUTE: + 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 @@ -688,7 +688,7 @@ trait Base array } }'; - case self::$CREATE_FLOAT_ATTRIBUTE: + 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 @@ -699,7 +699,7 @@ trait Base array } }'; - case self::$CREATE_BOOLEAN_ATTRIBUTE: + 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 @@ -708,7 +708,7 @@ trait Base array } }'; - case self::$CREATE_URL_ATTRIBUTE: + 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 @@ -717,7 +717,7 @@ trait Base array } }'; - case self::$CREATE_EMAIL_ATTRIBUTE: + 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 @@ -726,7 +726,7 @@ trait Base array } }'; - case self::$CREATE_IP_ATTRIBUTE: + 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 @@ -735,7 +735,7 @@ trait Base array } }'; - case self::$CREATE_ENUM_ATTRIBUTE: + 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 @@ -745,7 +745,7 @@ trait Base array } }'; - case self::$CREATE_DATETIME_ATTRIBUTE: + 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 @@ -754,7 +754,7 @@ trait Base array } }'; - case self::$CREATE_RELATIONSHIP_ATTRIBUTE: + 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 @@ -765,14 +765,14 @@ trait Base onDelete } }'; - case self::$UPDATE_STRING_ATTRIBUTE: + 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_ATTRIBUTE: + 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 @@ -781,7 +781,7 @@ trait Base default } }'; - case self::$UPDATE_FLOAT_ATTRIBUTE: + 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 @@ -790,35 +790,35 @@ trait Base default } }'; - case self::$UPDATE_BOOLEAN_ATTRIBUTE: + 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_ATTRIBUTE: + 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_ATTRIBUTE: + 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_ATTRIBUTE: + 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_ATTRIBUTE: + 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 @@ -826,14 +826,14 @@ trait Base default } }'; - case self::$UPDATE_DATETIME_ATTRIBUTE: + 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_ATTRIBUTE: + 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 @@ -844,18 +844,18 @@ trait Base onDelete } }'; - case self::$CREATE_STRING_COLUMN: + case self::CREATE_STRING_COLUMN: return 'mutation createStringColumn($databaseId: String!, $tableId: String!, $key: String!, $size: Int!, $required: Boolean!, $default: String, $array: Boolean){ - gridsCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, size: $size, required: $required, default: $default, array: $array) { + tablesDBCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, size: $size, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_INTEGER_COLUMN: + case self::CREATE_INTEGER_COLUMN: return 'mutation createIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int, $max: Int, $default: Int, $array: Boolean){ - gridsCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + tablesDBCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -864,9 +864,9 @@ trait Base array } }'; - case self::$CREATE_FLOAT_COLUMN: + case self::CREATE_FLOAT_COLUMN: return 'mutation createFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float, $max: Float, $default: Float, $array: Boolean){ - gridsCreateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + tablesDBCreateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -875,45 +875,45 @@ trait Base array } }'; - case self::$CREATE_BOOLEAN_COLUMN: + case self::CREATE_BOOLEAN_COLUMN: return 'mutation createBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean, $array: Boolean){ - gridsCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + tablesDBCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_URL_COLUMN: + case self::CREATE_URL_COLUMN: return 'mutation createUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - gridsCreateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + tablesDBCreateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_EMAIL_COLUMN: + case self::CREATE_EMAIL_COLUMN: return 'mutation createEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - gridsCreateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + tablesDBCreateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_IP_COLUMN: + case self::CREATE_IP_COLUMN: return 'mutation createIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - gridsCreateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + tablesDBCreateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_ENUM_COLUMN: + case self::CREATE_ENUM_COLUMN: return 'mutation createEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String, $array: Boolean){ - gridsCreateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { + tablesDBCreateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { key elements required @@ -921,18 +921,18 @@ trait Base array } }'; - case self::$CREATE_DATETIME_COLUMN: + case self::CREATE_DATETIME_COLUMN: return 'mutation createDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - gridsCreateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + tablesDBCreateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_RELATIONSHIP_COLUMN: + case self::CREATE_RELATIONSHIP_COLUMN: return 'mutation createRelationshipColumn($databaseId: String!, $tableId: String!, $relatedTableId: String!, $type: String!, $twoWay: Boolean, $key: String, $twoWayKey: String, $onDelete: String){ - gridsCreateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, relatedTableId: $relatedTableId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { + tablesDBCreateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, relatedTableId: $relatedTableId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { relatedTable relationType twoWay @@ -941,77 +941,77 @@ trait Base onDelete } }'; - case self::$UPDATE_STRING_COLUMN: + case self::UPDATE_STRING_COLUMN: return 'mutation updateStringColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - gridsUpdateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + tablesDBUpdateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_INTEGER_COLUMN: + case self::UPDATE_INTEGER_COLUMN: return 'mutation updateIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int!, $max: Int!, $default: Int){ - gridsUpdateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, min: $min, max: $max, default: $default) { + tablesDBUpdateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, min: $min, max: $max, default: $default) { required min max default } }'; - case self::$UPDATE_FLOAT_COLUMN: + case self::UPDATE_FLOAT_COLUMN: return 'mutation updateFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float!, $max: Float!, $default: Float){ - gridsUpdateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default) { + tablesDBUpdateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default) { required min max default } }'; - case self::$UPDATE_BOOLEAN_COLUMN: + case self::UPDATE_BOOLEAN_COLUMN: return 'mutation updateBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean){ - gridsUpdateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + tablesDBUpdateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_URL_COLUMN: + case self::UPDATE_URL_COLUMN: return 'mutation updateUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - gridsUpdateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + tablesDBUpdateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_EMAIL_COLUMN: + case self::UPDATE_EMAIL_COLUMN: return 'mutation updateEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - gridsUpdateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + tablesDBUpdateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_IP_COLUMN: + case self::UPDATE_IP_COLUMN: return 'mutation updateIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - gridsUpdateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + tablesDBUpdateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_ENUM_COLUMN: + case self::UPDATE_ENUM_COLUMN: return 'mutation updateEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String){ - gridsUpdateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default) { + tablesDBUpdateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default) { elements required default } }'; - case self::$UPDATE_DATETIME_COLUMN: + case self::UPDATE_DATETIME_COLUMN: return 'mutation updateDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - gridsUpdateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + tablesDBUpdateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_RELATIONSHIP_COLUMN: + case self::UPDATE_RELATIONSHIP_COLUMN: return 'mutation updateRelationshipColumn($databaseId: String!, $tableId: String!, $key: String!, $onDelete: String){ - gridsUpdateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, key: $key, onDelete: $onDelete) { + tablesDBUpdateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, key: $key, onDelete: $onDelete) { relatedTable relationType twoWay @@ -1020,7 +1020,7 @@ trait Base onDelete } }'; - case self::$CREATE_INDEX: + 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) { key @@ -1028,7 +1028,7 @@ trait Base status } }'; - case self::$GET_INDEXES: + case self::GET_INDEXES: return 'query listIndexes($databaseId: String!, $collectionId: String!) { databasesListIndexes(databaseId: $databaseId, collectionId: $collectionId) { total @@ -1039,7 +1039,7 @@ trait Base } } }'; - case self::$GET_INDEX: + case self::GET_INDEX: return 'query getIndex($databaseId: String!, $collectionId: String!, $key: String!) { databasesGetIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { key @@ -1047,23 +1047,23 @@ trait Base status } }'; - case self::$DELETE_INDEX: + case self::DELETE_INDEX: return 'mutation deleteIndex($databaseId: String!, $collectionId: String!, $key: String!) { databasesDeleteIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { status } }'; - case self::$CREATE_COLUMN_INDEX: + case self::CREATE_COLUMN_INDEX: return 'mutation createIndex($databaseId: String!, $tableId: String!, $key: String!, $type: String!, $columns: [String!]!, $orders: [String!]){ - gridsCreateIndex(databaseId: $databaseId, tableId: $tableId, key: $key, type: $type, columns: $columns, orders: $orders) { + tablesDBCreateIndex(databaseId: $databaseId, tableId: $tableId, key: $key, type: $type, columns: $columns, orders: $orders) { key type status } }'; - case self::$GET_COLUMN_INDEXES: + case self::GET_COLUMN_INDEXES: return 'query listIndexes($databaseId: String!, $tableId: String!) { - gridsListIndexes(databaseId: $databaseId, tableId: $tableId) { + tablesDBListIndexes(databaseId: $databaseId, tableId: $tableId) { total indexes { key @@ -1072,21 +1072,21 @@ trait Base } } }'; - case self::$GET_COLUMN_INDEX: + case self::GET_COLUMN_INDEX: return 'query getIndex($databaseId: String!, $tableId: String!, $key: String!) { - gridsGetIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { + tablesDBGetIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { key type status } }'; - case self::$DELETE_COLUMN_INDEX: + case self::DELETE_COLUMN_INDEX: return 'mutation deleteIndex($databaseId: String!, $tableId: String!, $key: String!) { - gridsDeleteIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { + tablesDBDeleteIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { status } }'; - case self::$GET_ATTRIBUTES: + case self::GET_ATTRIBUTES: return 'query listAttributes($databaseId: String!, $collectionId: String!) { databasesListAttributes(databaseId: $databaseId, collectionId: $collectionId) { total @@ -1094,42 +1094,42 @@ trait Base ...attributeProperties } } - }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; - case self::$GET_ATTRIBUTE: + }' . 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_ATTRIBUTES; - case self::$DELETE_ATTRIBUTE: + }' . 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_COLUMNS: + case self::GET_COLUMNS: return 'query listColumns($databaseId: String!, $tableId: String!) { - gridsListColumns(databaseId: $databaseId, tableId: $tableId) { + tablesDBListColumns(databaseId: $databaseId, tableId: $tableId) { total columns { ...columnProperties } } - }' . PHP_EOL . self::$FRAGMENT_COLUMNS; - case self::$GET_COLUMN: + }' . PHP_EOL . self::FRAGMENT_COLUMNS; + case self::GET_COLUMN: return 'query getColumn($databaseId: String!, $tableId: String!, $key: String!) { - gridsGetColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { + tablesDBGetColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { ...columnProperties } - }' . PHP_EOL . self::$FRAGMENT_COLUMNS; - case self::$DELETE_COLUMN: + }' . PHP_EOL . self::FRAGMENT_COLUMNS; + case self::DELETE_COLUMN: return 'mutation deleteColumn($databaseId: String!, $tableId: String!, $key: String!) { - gridsDeleteColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { + tablesDBDeleteColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { status } }'; - case self::$GET_DOCUMENT: + case self::GET_DOCUMENT: return 'query getDocument($databaseId: String!, $collectionId: String!, $documentId: String!) { databasesGetDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { _id @@ -1138,7 +1138,7 @@ trait Base data } }'; - case self::$GET_DOCUMENTS: + case self::GET_DOCUMENTS: return 'query listDocuments($databaseId: String!, $collectionId: String!){ databasesListDocuments(databaseId: $databaseId, collectionId: $collectionId) { total @@ -1150,7 +1150,7 @@ trait Base } } }'; - case self::$CREATE_DOCUMENT: + 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 @@ -1158,7 +1158,7 @@ trait Base _permissions } }'; - case self::$CREATE_DOCUMENTS: + case self::CREATE_DOCUMENTS: return 'mutation createDocuments($databaseId: String!, $collectionId: String!, $documents: [Json!]!) { databasesCreateDocuments(databaseId: $databaseId, collectionId: $collectionId, documents: $documents) { documents { @@ -1169,9 +1169,9 @@ trait Base } } }'; - case self::$CREATE_ROWS: + case self::CREATE_ROWS: return 'mutation createRows($databaseId: String!, $tableId: String!, $rows: [Json!]!) { - gridsCreateRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { + tablesDBCreateRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { rows { _id _tableId @@ -1180,18 +1180,18 @@ trait Base } } }'; - case self::$GET_ROW: + case self::GET_ROW: return 'query getRow($databaseId: String!, $tableId: String!, $rowId: String!) { - gridsGetRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { + tablesDBGetRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { _id _tableId _permissions data } }'; - case self::$GET_ROWS: + case self::GET_ROWS: return 'query listRows($databaseId: String!, $tableId: String!, $queries: [String!] = []) { - gridsListRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { + tablesDBListRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { total rows { _id @@ -1202,15 +1202,15 @@ trait Base } } }'; - case self::$CREATE_ROW: + case self::CREATE_ROW: return 'mutation createRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]) { - gridsCreateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + tablesDBCreateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _tableId _permissions } }'; - case self::$CREATE_CUSTOM_ENTITY: + 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) { _id @@ -1222,7 +1222,7 @@ trait Base role } }'; - case self::$GET_CUSTOM_ENTITIES: + case self::GET_CUSTOM_ENTITIES: return 'query getCustomEntities { actorsList { _id @@ -1237,7 +1237,7 @@ trait Base url } }'; - case self::$GET_CUSTOM_ENTITY: + case self::GET_CUSTOM_ENTITY: return 'query getCustomEntity($id: String!) { actorsGet(id: $id) { name @@ -1251,7 +1251,7 @@ trait Base url } }'; - case self::$UPDATE_CUSTOM_ENTITY: + case self::UPDATE_CUSTOM_ENTITY: return 'mutation updateCustomEntity($id: String!, $name: String, $age: Int, $alive: Boolean, $salary: Float, $email: String, $role: String, $dob: String, $ip: String, $url: String){ actorsUpdate(id: $id, name: $name, age: $age, alive: $alive, salary: $salary, email: $email, role: $role, dob: $dob, ip: $ip, url: $url) { name @@ -1265,11 +1265,11 @@ trait Base url } }'; - case self::$DELETE_CUSTOM_ENTITY: + case self::DELETE_CUSTOM_ENTITY: return 'mutation deleteCustomEntity($id: String!){ actorsDelete(id: $id) }'; - case self::$UPDATE_DOCUMENT: + 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 @@ -1277,7 +1277,7 @@ trait Base data } }'; - case self::$UPSERT_DOCUMENT: + case self::UPSERT_DOCUMENT: return 'mutation upsertDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!] = []) { databasesUpsertDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { _id @@ -1286,7 +1286,7 @@ trait Base data } }'; - case self::$UPDATE_DOCUMENTS: + case self::UPDATE_DOCUMENTS: return 'mutation updateDocuments($databaseId: String!, $collectionId: String!, $data: Json!, $queries: [String!]) { databasesUpdateDocuments(databaseId: $databaseId, collectionId: $collectionId, data: $data, queries: $queries) { total @@ -1299,7 +1299,7 @@ trait Base } } }'; - case self::$UPSERT_DOCUMENTS: + case self::UPSERT_DOCUMENTS: return 'mutation upsertDocuments($databaseId: String!, $collectionId: String!, $documents: [Json!]!) { databasesUpsertDocuments(databaseId: $databaseId, collectionId: $collectionId, documents: $documents) { total @@ -1312,7 +1312,7 @@ trait Base } } }'; - case self::$DELETE_DOCUMENTS: + case self::DELETE_DOCUMENTS: return 'mutation deleteDocuments($databaseId: String!, $collectionId: String!, $queries: [String!] = []) { databasesDeleteDocuments(databaseId: $databaseId, collectionId: $collectionId, queries: $queries) { total @@ -1324,38 +1324,38 @@ trait Base } } }'; - case self::$DELETE_DOCUMENT: + case self::DELETE_DOCUMENT: return 'mutation deleteDocument($databaseId: String!, $collectionId: String!, $documentId: String!){ databasesDeleteDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { status } }'; - case self::$UPDATE_ROW: + case self::UPDATE_ROW: return 'mutation updateRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]) { - gridsUpdateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + tablesDBUpdateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _tableId data } }'; - case self::$UPSERT_ROW: + case self::UPSERT_ROW: return 'mutation upsertRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!] = []) { - gridsUpsertRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + tablesDBUpsertRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _databaseId _tableId data } }'; - case self::$DELETE_ROW: + case self::DELETE_ROW: return 'mutation deleteRow($databaseId: String!, $tableId: String!, $rowId: String!) { - gridsDeleteRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { + tablesDBDeleteRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { status } }'; - case self::$UPDATE_ROWS: + case self::UPDATE_ROWS: return 'mutation updateRows($databaseId: String!, $tableId: String!, $data: Json!, $queries: [String!]) { - gridsUpdateRows(databaseId: $databaseId, tableId: $tableId, data: $data, queries: $queries) { + tablesDBUpdateRows(databaseId: $databaseId, tableId: $tableId, data: $data, queries: $queries) { total rows { _id @@ -1366,9 +1366,9 @@ trait Base } } }'; - case self::$UPSERT_ROWS: + case self::UPSERT_ROWS: return 'mutation upsertRows($databaseId: String!, $tableId: String!, $rows: [Json!]!) { - gridsUpsertRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { + tablesDBUpsertRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { total rows { _id @@ -1379,9 +1379,9 @@ trait Base } } }'; - case self::$DELETE_ROWS: + case self::DELETE_ROWS: return 'mutation deleteRows($databaseId: String!, $tableId: String!, $queries: [String!] = []) { - gridsDeleteRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { + tablesDBDeleteRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { total rows { _id @@ -1391,7 +1391,7 @@ trait Base } } }'; - case self::$GET_USER: + case self::GET_USER: return 'query getUser($userId : String!) { usersGet(userId : $userId) { _id @@ -1405,14 +1405,14 @@ trait Base ...options } } - }' . PHP_EOL . self::$FRAGMENT_HASH_OPTIONS; - case self::$GET_USER_PREFERENCES: + }' . PHP_EOL . self::FRAGMENT_HASH_OPTIONS; + case self::GET_USER_PREFERENCES: return 'query getUserPreferences($userId : String!) { usersGetPrefs(userId : $userId) { data } }'; - case self::$GET_USER_SESSIONS: + case self::GET_USER_SESSIONS: return 'query listUserSessions($userId : String!) { usersListSessions(userId : $userId) { total @@ -1422,7 +1422,7 @@ trait Base } } }'; - case self::$GET_USER_MEMBERSHIPS: + case self::GET_USER_MEMBERSHIPS: return 'query listUserMemberships($userId : String!) { usersListMemberships(userId : $userId) { total @@ -1433,7 +1433,7 @@ trait Base } } }'; - case self::$GET_USER_LOGS: + case self::GET_USER_LOGS: return 'query listUserLogs($userId : String!) { usersListLogs(userId : $userId) { total @@ -1443,7 +1443,7 @@ trait Base } } }'; - case self::$GET_USERS: + case self::GET_USERS: return 'query listUsers($queries: [String!], $search: String) { usersList(queries: $queries, search: $search) { total @@ -1457,7 +1457,7 @@ trait Base } } }'; - case self::$CREATE_USER: + case self::CREATE_USER: return 'mutation createUser($userId: String!, $email: String!, $password: String!, $name: String){ usersCreate(userId: $userId, email: $email, password: $password, name: $name) { _id @@ -1468,7 +1468,7 @@ trait Base emailVerification } }'; - case self::$UPDATE_USER_STATUS: + case self::UPDATE_USER_STATUS: return 'mutation updateUserStatus($userId: String!, $status: Boolean!){ usersUpdateStatus(userId: $userId, status: $status) { _id @@ -1476,7 +1476,7 @@ trait Base email } }'; - case self::$UPDATE_USER_NAME: + case self::UPDATE_USER_NAME: return 'mutation updateUserName($userId: String!, $name: String!){ usersUpdateName(userId: $userId, name: $name) { _id @@ -1487,7 +1487,7 @@ trait Base emailVerification } }'; - case self::$UPDATE_USER_EMAIL: + case self::UPDATE_USER_EMAIL: return 'mutation updateUserEmail($userId: String!, $email: String!){ usersUpdateEmail(userId: $userId, email: $email) { _id @@ -1498,7 +1498,7 @@ trait Base emailVerification } }'; - case self::$UPDATE_USER_PASSWORD: + case self::UPDATE_USER_PASSWORD: return 'mutation updateUserPassword($userId: String!, $password: String!){ usersUpdatePassword(userId: $userId, password: $password) { _id @@ -1509,7 +1509,7 @@ trait Base emailVerification } }'; - case self::$UPDATE_USER_PHONE: + case self::UPDATE_USER_PHONE: return 'mutation updateUserPhone($userId: String!, $number: String!){ usersUpdatePhone(userId: $userId, number: $number) { name @@ -1517,20 +1517,20 @@ trait Base email } }'; - case self::$UPDATE_USER_PREFS: + case self::UPDATE_USER_PREFS: return 'mutation updateUserPrefs($userId: String!, $prefs: Assoc!){ usersUpdatePrefs(userId: $userId, prefs: $prefs) { data } }'; - case self::$UPDATE_USER_EMAIL_VERIFICATION: + case self::UPDATE_USER_EMAIL_VERIFICATION: return 'mutation updateUserEmailVerification($userId: String!, $emailVerification: Boolean!){ usersUpdateEmailVerification(userId: $userId, emailVerification: $emailVerification) { name email } }'; - case self::$UPDATE_USER_PHONE_VERIFICATION: + case self::UPDATE_USER_PHONE_VERIFICATION: return 'mutation updateUserPhoneVerification($userId: String!, $phoneVerification: Boolean!){ usersUpdatePhoneVerification(userId: $userId, phoneVerification: $phoneVerification) { _id @@ -1538,25 +1538,25 @@ trait Base email } }'; - case self::$DELETE_USER_SESSIONS: + case self::DELETE_USER_SESSIONS: return 'mutation deleteUserSessions($userId: String!){ usersDeleteSessions(userId: $userId) { status } }'; - case self::$DELETE_USER_SESSION: + case self::DELETE_USER_SESSION: return 'mutation deleteUserSession($userId: String!, $sessionId: String!){ usersDeleteSession(userId: $userId, sessionId: $sessionId) { status } }'; - case self::$DELETE_USER: + case self::DELETE_USER: return 'mutation deleteUser($userId: String!) { usersDelete(userId: $userId) { status } }'; - case self::$CREATE_USER_TARGET: + case self::CREATE_USER_TARGET: return 'mutation createUserTarget($userId: String!, $targetId: String!, $providerType: String!, $identifier: String! $providerId: String){ usersCreateTarget(userId: $userId, targetId: $targetId, providerType: $providerType, identifier: $identifier, providerId: $providerId) { _id @@ -1566,7 +1566,7 @@ trait Base identifier } }'; - case self::$LIST_USER_TARGETS: + case self::LIST_USER_TARGETS: return 'query listUserTargets($userId: String!) { usersListTargets(userId: $userId) { total @@ -1579,7 +1579,7 @@ trait Base } } }'; - case self::$GET_USER_TARGET: + case self::GET_USER_TARGET: return 'query getUserTarget($userId: String!, $targetId: String!) { usersGetTarget(userId: $userId, targetId: $targetId) { _id @@ -1589,7 +1589,7 @@ trait Base identifier } }'; - case self::$UPDATE_USER_TARGET: + case self::UPDATE_USER_TARGET: return 'mutation updateUserTarget($userId: String!, $targetId: String!, $providerId: String, $identifier: String){ usersUpdateTarget(userId: $userId, targetId: $targetId, providerId: $providerId, identifier: $identifier) { _id @@ -1599,13 +1599,13 @@ trait Base identifier } }'; - case self::$DELETE_USER_TARGET: + case self::DELETE_USER_TARGET: return 'mutation deleteUserTarget($userId: String!, $targetId: String!){ usersDeleteTarget(userId: $userId, targetId: $targetId) { status } }'; - case self::$GET_LOCALE: + case self::GET_LOCALE: return 'query getLocale { localeGet { ip @@ -1614,7 +1614,7 @@ trait Base currency } }'; - case self::$LIST_COUNTRIES: + case self::LIST_COUNTRIES: return 'query listCountries { localeListCountries{ total @@ -1624,7 +1624,7 @@ trait Base } } }'; - case self::$LIST_EU_COUNTRIES: + case self::LIST_EU_COUNTRIES: return 'query listEuCountries { localeListCountriesEU{ total @@ -1634,7 +1634,7 @@ trait Base } } }'; - case self::$LIST_COUNTRY_PHONE_CODES: + case self::LIST_COUNTRY_PHONE_CODES: return 'query listCountryPhoneCodes { localeListCountriesPhones { total @@ -1644,7 +1644,7 @@ trait Base } } }'; - case self::$LIST_CONTINENTS: + case self::LIST_CONTINENTS: return 'query listContinents { localeListContinents{ total @@ -1654,7 +1654,7 @@ trait Base } } }'; - case self::$LIST_CURRENCIES: + case self::LIST_CURRENCIES: return 'query listCurrencies { localeListCurrencies{ total @@ -1665,7 +1665,7 @@ trait Base } } }'; - case self::$LIST_LANGUAGES: + case self::LIST_LANGUAGES: return 'query listLanguages { localeListLanguages{ total @@ -1675,49 +1675,49 @@ trait Base } } }'; - case self::$GET_CREDIT_CARD_ICON: + case self::GET_CREDIT_CARD_ICON: return 'query getCreditCardIcon($code: String!) { avatarsGetCreditCard(code: $code) { status } }'; - case self::$GET_BROWSER_ICON: + case self::GET_BROWSER_ICON: return 'query getBrowserIcon($code: String!) { avatarsGetBrowser(code: $code) { status } }'; - case self::$GET_COUNTRY_FLAG: + case self::GET_COUNTRY_FLAG: return 'query getCountryFlag($code: String!) { avatarsGetFlag(code: $code) { status } }'; - case self::$GET_IMAGE_FROM_URL: + case self::GET_IMAGE_FROM_URL: return 'query getImageFromUrl($url: String!) { avatarsGetImage(url: $url) { status } }'; - case self::$GET_FAVICON: + case self::GET_FAVICON: return 'query getFavicon($url: String!) { avatarsGetFavicon(url: $url) { status } }'; - case self::$GET_QRCODE: + case self::GET_QRCODE: return 'query getQrCode($text: String!) { avatarsGetQR(text: $text) { status } }'; - case self::$GET_USER_INITIALS: + case self::GET_USER_INITIALS: return 'query getUserInitials($name: String!) { avatarsGetInitials(name: $name) { status } }'; - case self::$GET_ACCOUNT: + case self::GET_ACCOUNT: return 'query getAccount { accountGet { _id @@ -1728,7 +1728,7 @@ trait Base emailVerification } }'; - case self::$CREATE_ACCOUNT: + case self::CREATE_ACCOUNT: return 'mutation createAccount($userId: String!, $email: String!, $password: String!, $name: String){ accountCreate(userId: $userId, email: $email, password: $password, name: $name) { _id @@ -1739,7 +1739,7 @@ trait Base emailVerification } }'; - case self::$UPDATE_ACCOUNT_NAME: + case self::UPDATE_ACCOUNT_NAME: return 'mutation updateAccountName($name: String!){ accountUpdateName(name: $name) { _id @@ -1749,7 +1749,7 @@ trait Base phone } }'; - case self::$UPDATE_ACCOUNT_EMAIL: + case self::UPDATE_ACCOUNT_EMAIL: return 'mutation updateAccountEmail($email: String!, $password: String!){ accountUpdateEmail(email: $email, password: $password) { _id @@ -1758,7 +1758,7 @@ trait Base email } }'; - case self::$UPDATE_ACCOUNT_PASSWORD: + case self::UPDATE_ACCOUNT_PASSWORD: return 'mutation updateAccountPassword($password: String!, $oldPassword: String!){ accountUpdatePassword(password: $password, oldPassword: $oldPassword) { _id @@ -1767,7 +1767,7 @@ trait Base email } }'; - case self::$UPDATE_ACCOUNT_PHONE: + case self::UPDATE_ACCOUNT_PHONE: return 'mutation updateAccountPhone($phone: String!, $password: String!){ accountUpdatePhone(phone: $phone, password: $password) { _id @@ -1777,7 +1777,7 @@ trait Base phone } }'; - case self::$UPDATE_ACCOUNT_PREFS: + case self::UPDATE_ACCOUNT_PREFS: return 'mutation updateAccountPrefs($prefs: Assoc!){ accountUpdatePrefs(prefs: $prefs) { _id @@ -1791,21 +1791,21 @@ trait Base } } }'; - case self::$UPDATE_ACCOUNT_STATUS: + case self::UPDATE_ACCOUNT_STATUS: return 'mutation updateAccountStatus{ accountUpdateStatus { status email } }'; - case self::$GET_ACCOUNT_SESSION: + case self::GET_ACCOUNT_SESSION: return 'query getAccountSession($sessionId: String!) { accountGetSession(sessionId: $sessionId) { _id userId } }'; - case self::$CREATE_ACCOUNT_SESSION: + case self::CREATE_ACCOUNT_SESSION: return 'mutation createAccountEmailSession($email: String!, $password: String!){ accountCreateEmailPasswordSession(email: $email, password: $password) { _id @@ -1815,26 +1815,26 @@ trait Base current } }'; - case self::$DELETE_ACCOUNT_SESSION: + case self::DELETE_ACCOUNT_SESSION: return 'mutation deleteAccountSession($sessionId: String!){ accountDeleteSession(sessionId: $sessionId) { status } }'; - case self::$DELETE_ACCOUNT_SESSIONS: + case self::DELETE_ACCOUNT_SESSIONS: return 'mutation deleteAccountSessions { accountDeleteSessions { status } }'; - case self::$CREATE_MAGIC_URL: + case self::CREATE_MAGIC_URL: return 'mutation createMagicURL($userId: String!, $email: String!){ accountCreateMagicURLToken(userId: $userId, email: $email) { userId expire } }'; - case self::$UPDATE_MAGIC_URL: + case self::UPDATE_MAGIC_URL: return 'mutation confirmMagicURL($userId: String!, $secret: String!){ accountUpdateMagicURLSession(userId: $userId, secret: $secret) { userId @@ -1843,26 +1843,26 @@ trait Base ip } }'; - case self::$CREATE_ANONYMOUS_SESSION: + case self::CREATE_ANONYMOUS_SESSION: return 'mutation createAnonymousSession { accountCreateAnonymousSession { _id userId } }'; - case self::$CREATE_ACCOUNT_JWT: + case self::CREATE_ACCOUNT_JWT: return 'mutation createJWT{ accountCreateJWT { jwt } }'; - case self::$GET_ACCOUNT_PREFS: + case self::GET_ACCOUNT_PREFS: return 'query getAccountPreferences { accountGetPrefs { data } }'; - case self::$GET_ACCOUNT_SESSIONS: + case self::GET_ACCOUNT_SESSIONS: return 'query listAccountSessions { accountListSessions { total @@ -1873,7 +1873,7 @@ trait Base } } }'; - case self::$GET_ACCOUNT_LOGS: + case self::GET_ACCOUNT_LOGS: return 'query getAccountLogs { accountListLogs { total @@ -1885,7 +1885,7 @@ trait Base } } }'; - case self::$CREATE_PASSWORD_RECOVERY: + case self::CREATE_PASSWORD_RECOVERY: return 'mutation createPasswordRecovery($email: String!, $url: String!){ accountCreateRecovery(email: $email, url: $url) { userId @@ -1893,7 +1893,7 @@ trait Base expire } }'; - case self::$UPDATE_PASSWORD_RECOVERY: + case self::UPDATE_PASSWORD_RECOVERY: return 'mutation confirmPasswordRecovery($userId: String!, $secret: String!, $password: String!) { accountUpdateRecovery(userId: $userId, secret: $secret, password: $password) { userId @@ -1901,7 +1901,7 @@ trait Base expire } }'; - case self::$CREATE_EMAIL_VERIFICATION: + case self::CREATE_EMAIL_VERIFICATION: return 'mutation createVerification($url: String!){ accountCreateVerification(url: $url) { userId @@ -1909,7 +1909,7 @@ trait Base expire } }'; - case self::$UPDATE_EMAIL_VERIFICATION: + case self::UPDATE_EMAIL_VERIFICATION: return 'mutation confirmVerification($userId: String!, $secret: String!) { accountUpdateVerification(userId: $userId, secret: $secret) { userId @@ -1917,7 +1917,7 @@ trait Base expire } }'; - case self::$CREATE_PHONE_VERIFICATION: + case self::CREATE_PHONE_VERIFICATION: return 'mutation createPhoneVerification { accountCreatePhoneVerification { userId @@ -1925,7 +1925,7 @@ trait Base expire } }'; - case self::$UPDATE_PHONE_VERIFICATION: + case self::UPDATE_PHONE_VERIFICATION: return 'mutation confirmPhoneVerification($userId: String!, $phoneVerification: Boolean!) { accountUpdatePhoneVerification(userId: $userId, phoneVerification: $phoneVerification) { userId @@ -1933,7 +1933,7 @@ trait Base expire } }'; - case self::$GET_TEAM: + case self::GET_TEAM: return 'query getTeam($teamId: String!){ teamsGet(teamId: $teamId) { _id @@ -1941,13 +1941,13 @@ trait Base total } }'; - case self::$GET_TEAM_PREFERENCES: + case self::GET_TEAM_PREFERENCES: return 'query getTeamPreferences($teamId: String!) { teamsGetPrefs(teamId: $teamId) { data } }'; - case self::$GET_TEAMS: + case self::GET_TEAMS: return 'query listTeams { teamsList { total @@ -1957,7 +1957,7 @@ trait Base } } }'; - case self::$CREATE_TEAM: + case self::CREATE_TEAM: return 'mutation createTeam($teamId: String!, $name: String!, $roles: [String]){ teamsCreate(teamId: $teamId, name : $name, roles: $roles) { _id @@ -1965,7 +1965,7 @@ trait Base total } }'; - case self::$UPDATE_TEAM_NAME: + case self::UPDATE_TEAM_NAME: return 'mutation updateTeamName($teamId: String!, $name: String!){ teamsUpdateName(teamId: $teamId, name : $name) { _id @@ -1973,19 +1973,19 @@ trait Base total } }'; - case self::$UPDATE_TEAM_PREFERENCES: + case self::UPDATE_TEAM_PREFERENCES: return 'mutation updateTeamPrefs($teamId: String!, $prefs: Assoc!){ teamsUpdatePrefs(teamId: $teamId, prefs: $prefs) { data } }'; - case self::$DELETE_TEAM: + case self::DELETE_TEAM: return 'mutation deleteTeam($teamId: String!){ teamsDelete(teamId: $teamId) { status } }'; - case self::$GET_TEAM_MEMBERSHIP: + case self::GET_TEAM_MEMBERSHIP: return 'query getTeamMembership($teamId: String!, $membershipId: String!){ teamsGetMembership(teamId: $teamId, membershipId: $membershipId) { _id @@ -1995,7 +1995,7 @@ trait Base userEmail } }'; - case self::$GET_TEAM_MEMBERSHIPS: + case self::GET_TEAM_MEMBERSHIPS: return 'query listTeamMemberships($teamId: String!){ teamsListMemberships(teamId: $teamId) { total @@ -2008,7 +2008,7 @@ trait Base } } }'; - case self::$CREATE_TEAM_MEMBERSHIP: + case self::CREATE_TEAM_MEMBERSHIP: return 'mutation createTeamMembership($teamId: String!, $email: String!, $name: String, $roles: [String!]!, $url: String!){ teamsCreateMembership(teamId: $teamId, email: $email, name : $name, roles: $roles, url: $url) { _id @@ -2022,7 +2022,7 @@ trait Base roles } }'; - case self::$UPDATE_TEAM_MEMBERSHIP: + case self::UPDATE_TEAM_MEMBERSHIP: return 'mutation updateTeamMembership($teamId: String!, $membershipId: String!, $roles: [String!]!){ teamsUpdateMembership(teamId: $teamId, membershipId: $membershipId, roles: $roles) { _id @@ -2036,7 +2036,7 @@ trait Base roles } }'; - case self::$UPDATE_TEAM_MEMBERSHIP_STATUS: + case self::UPDATE_TEAM_MEMBERSHIP_STATUS: return 'mutation updateTeamMembership($teamId: String!, $membershipId: String!, $userId: String!, $secret: String!){ teamsUpdateMembershipStatus(teamId: $teamId, membershipId: $membershipId, userId: $userId, secret: $secret ) { _id @@ -2050,13 +2050,13 @@ trait Base roles } }'; - case self::$DELETE_TEAM_MEMBERSHIP: + case self::DELETE_TEAM_MEMBERSHIP: return 'mutation deleteTeamMembership($teamId: String!, $membershipId: String!){ teamsDeleteMembership(teamId: $teamId, membershipId: $membershipId) { status } }'; - case self::$GET_FUNCTION: + case self::GET_FUNCTION: return 'query getFunction($functionId: String!) { functionsGet(functionId: $functionId) { _id @@ -2065,7 +2065,7 @@ trait Base execute } }'; - case self::$GET_FUNCTIONS: + case self::GET_FUNCTIONS: return 'query listFunctions { functionsList { total @@ -2077,7 +2077,7 @@ trait Base } } }'; - case self::$GET_RUNTIMES: + case self::GET_RUNTIMES: return 'query listRuntimes { functionsListRuntimes { total @@ -2088,7 +2088,7 @@ trait Base } } }'; - case self::$GET_DEPLOYMENTS: + case self::GET_DEPLOYMENTS: return 'query listDeployments($functionId: String!) { functionsListDeployments(functionId: $functionId) { total @@ -2098,7 +2098,7 @@ trait Base } } }'; - case self::$GET_DEPLOYMENT: + case self::GET_DEPLOYMENT: return 'query getDeployment($functionId: String!, $deploymentId: String!) { functionsGetDeployment(functionId: $functionId, deploymentId: $deploymentId) { _id @@ -2108,7 +2108,7 @@ trait Base status } }'; - case self::$CREATE_FUNCTION: + case self::CREATE_FUNCTION: return 'mutation createFunction($functionId: String!, $name: String!, $runtime: String!, $execute: [String!]!, $events: [String], $schedule: String, $timeout: Int, $entrypoint: String!) { functionsCreate(functionId: $functionId, name: $name, execute: $execute, runtime: $runtime, events: $events, schedule: $schedule, timeout: $timeout, entrypoint: $entrypoint) { _id @@ -2117,7 +2117,7 @@ trait Base execute } }'; - case self::$UPDATE_FUNCTION: + case self::UPDATE_FUNCTION: return 'mutation updateFunction($functionId: String!, $name: String!, $execute: [String!]!, $runtime: String!, $entrypoint: String!, $events: [String], $schedule: String, $timeout: Int) { functionsUpdate(functionId: $functionId, name: $name, execute: $execute, runtime: $runtime, entrypoint: $entrypoint, events: $events, schedule: $schedule, timeout: $timeout) { _id @@ -2126,7 +2126,7 @@ trait Base execute } }'; - case self::$UPDATE_DEPLOYMENT: + case self::UPDATE_DEPLOYMENT: return 'mutation updateFunctionDeployment($functionId: String!, $deploymentId: String!) { functionsUpdateDeployment(functionId: $functionId, deploymentId: $deploymentId) { _id @@ -2135,13 +2135,13 @@ trait Base execute } }'; - case self::$DELETE_FUNCTION: + case self::DELETE_FUNCTION: return 'mutation deleteFunction($functionId: String!) { functionsDelete(functionId: $functionId) { status } }'; - case self::$CREATE_VARIABLE: + case self::CREATE_VARIABLE: return 'mutation createVariable($functionId: String!, $key: String!, $value: String!) { functionsCreateVariable(functionId: $functionId, key: $key, value: $value) { _id @@ -2149,7 +2149,7 @@ trait Base value } }'; - case self::$GET_VARIABLES: + case self::GET_VARIABLES: return 'query listVariables($functionId: String!) { functionsListVariables(functionId: $functionId) { total @@ -2160,7 +2160,7 @@ trait Base } } }'; - case self::$GET_VARIABLE: + case self::GET_VARIABLE: return 'query getVariable($functionId: String!, $variableId: String!) { functionsGetVariable(functionId: $functionId, variableId: $variableId) { _id @@ -2168,7 +2168,7 @@ trait Base value } }'; - case self::$UPDATE_VARIABLE: + case self::UPDATE_VARIABLE: return 'mutation updateVariable($functionId: String!, $variableId: String!, $key: String!, $value: String) { functionsUpdateVariable(functionId: $functionId, variableId: $variableId, key: $key, value: $value) { _id @@ -2176,13 +2176,13 @@ trait Base value } }'; - case self::$DELETE_VARIABLE: + case self::DELETE_VARIABLE: return 'mutation deleteVariable($functionId: String!, $variableId: String!) { functionsDeleteVariable(functionId: $functionId, variableId: $variableId) { status } }'; - case self::$CREATE_DEPLOYMENT: + case self::CREATE_DEPLOYMENT: return 'mutation createDeployment($functionId: String!, $code: InputFile!, $activate: Boolean!) { functionsCreateDeployment(functionId: $functionId, code: $code, activate: $activate) { _id @@ -2193,13 +2193,13 @@ trait Base buildLogs } }'; - case self::$DELETE_DEPLOYMENT: + case self::DELETE_DEPLOYMENT: return 'mutation deleteDeployment($functionId: String!, $deploymentId: String!) { functionsDeleteDeployment(functionId: $functionId, deploymentId: $deploymentId) { status } }'; - case self::$GET_EXECUTION: + case self::GET_EXECUTION: return 'query getExecution($functionId: String!$executionId: String!) { functionsGetExecution(functionId: $functionId, executionId: $executionId) { _id @@ -2209,7 +2209,7 @@ trait Base errors } }'; - case self::$GET_EXECUTIONS: + case self::GET_EXECUTIONS: return 'query listExecutions($functionId: String!) { functionsListExecutions(functionId: $functionId) { total @@ -2222,7 +2222,7 @@ trait Base } } }'; - case self::$CREATE_EXECUTION: + case self::CREATE_EXECUTION: return 'mutation createExecution($functionId: String!, $body: String, $async: Boolean) { functionsCreateExecution(functionId: $functionId, body: $body, async: $async) { _id @@ -2232,19 +2232,19 @@ trait Base errors } }'; - case self::$DELETE_EXECUTION: + case self::DELETE_EXECUTION: return 'mutation deleteExecution($functionId: String!, $executionId: String!) { functionsDeleteExecution(functionId: $functionId, executionId: $executionId) { status } }'; - case self::$RETRY_BUILD: + case self::RETRY_BUILD: return 'mutation retryBuild($functionId: String!, $deploymentId: String!, $buildId: String!) { functionsCreateDuplicateDeployment(functionId: $functionId, deploymentId: $deploymentId, buildId: $buildId) { status } }'; - case self::$CREATE_BUCKET: + case self::CREATE_BUCKET: return 'mutation createBucket($bucketId: String!, $name: String!, $fileSecurity: Boolean, $permissions: [String!]) { storageCreateBucket(bucketId: $bucketId, name: $name, fileSecurity: $fileSecurity, permissions: $permissions) { _id @@ -2256,7 +2256,7 @@ trait Base fileSecurity } }'; - case self::$GET_BUCKETS: + case self::GET_BUCKETS: return 'query getBuckets { storageListBuckets { total @@ -2267,7 +2267,7 @@ trait Base } } }'; - case self::$GET_BUCKET: + case self::GET_BUCKET: return 'query getBucket($bucketId: String!) { storageGetBucket(bucketId: $bucketId) { _id @@ -2275,7 +2275,7 @@ trait Base enabled } }'; - case self::$UPDATE_BUCKET: + case self::UPDATE_BUCKET: return 'mutation updateBucket($bucketId: String!, $name: String!, $fileSecurity: Boolean, $permissions: [String!]) { storageUpdateBucket(bucketId: $bucketId, name: $name, fileSecurity: $fileSecurity, permissions: $permissions) { _id @@ -2283,13 +2283,13 @@ trait Base enabled } }'; - case self::$DELETE_BUCKET: + case self::DELETE_BUCKET: return 'mutation deleteBucket($bucketId: String!) { storageDeleteBucket(bucketId: $bucketId) { status } }'; - case self::$CREATE_FILE: + case self::CREATE_FILE: return 'mutation createFile($bucketId: String!, $fileId: String!, $file: InputFile!, $permissions: [String!]) { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file, permissions: $permissions) { _id @@ -2297,7 +2297,7 @@ trait Base name } }'; - case self::$GET_FILES: + case self::GET_FILES: return 'query getFiles($bucketId: String!) { storageListFiles(bucketId: $bucketId) { total @@ -2307,66 +2307,66 @@ trait Base } } }'; - case self::$GET_FILE: + case self::GET_FILE: return 'query getFile($bucketId: String!, $fileId: String!) { storageGetFile(bucketId: $bucketId, fileId: $fileId) { _id name } }'; - case self::$GET_FILE_PREVIEW: + case self::GET_FILE_PREVIEW: return 'query getFilePreview($bucketId: String!, $fileId: String!) { storageGetFilePreview(bucketId: $bucketId, fileId: $fileId) { status } }'; - case self::$GET_FILE_DOWNLOAD: + case self::GET_FILE_DOWNLOAD: return 'query getFileDownload($bucketId: String!, $fileId: String!) { storageGetFileDownload(bucketId: $bucketId, fileId: $fileId) { status } }'; - case self::$GET_FILE_VIEW: + case self::GET_FILE_VIEW: return 'query getFileView($bucketId: String!, $fileId: String!) { storageGetFileView(bucketId: $bucketId, fileId: $fileId) { status } }'; - case self::$UPDATE_FILE: + case self::UPDATE_FILE: return 'mutation updateFile($bucketId: String!, $fileId: String!, $permissions: [String!]) { storageUpdateFile(bucketId: $bucketId, fileId: $fileId, permissions: $permissions) { _id name } }'; - case self::$DELETE_FILE: + case self::DELETE_FILE: return 'mutation deleteFile($bucketId: String!, $fileId: String!) { storageDeleteFile(bucketId: $bucketId, fileId: $fileId) { status } }'; - case self::$GET_HTTP_HEALTH: + case self::GET_HTTP_HEALTH: return 'query getHttpHealth { healthGet { ping status } }'; - case self::$GET_DB_HEALTH: + case self::GET_DB_HEALTH: return 'query getDbHealth { healthGetDB { ping status } }'; - case self::$GET_CACHE_HEALTH: + case self::GET_CACHE_HEALTH: return 'query getCacheHealth { healthGetCache { ping status } }'; - case self::$GET_TIME_HEALTH: + case self::GET_TIME_HEALTH: return 'query getTimeHealth { healthGetTime { remoteTime @@ -2374,45 +2374,45 @@ trait Base diff } }'; - case self::$GET_WEBHOOKS_QUEUE_HEALTH: + case self::GET_WEBHOOKS_QUEUE_HEALTH: return 'query getWebhooksQueueHealth { healthGetQueueWebhooks { size } }'; - case self::$GET_LOGS_QUEUE_HEALTH: + case self::GET_LOGS_QUEUE_HEALTH: return 'query getLogsQueueHealth { healthGetQueueLogs { size } }'; - case self::$GET_CERTIFICATES_QUEUE_HEALTH: + case self::GET_CERTIFICATES_QUEUE_HEALTH: return 'query getCertificatesQueueHealth { healthGetQueueCertificates { size } }'; - case self::$GET_FUNCTION_QUEUE_HEALTH: + case self::GET_FUNCTION_QUEUE_HEALTH: return 'query getFunctionQueueHealth { healthGetQueueFunctions { size } }'; - case self::$GET_LOCAL_STORAGE_HEALTH: + case self::GET_LOCAL_STORAGE_HEALTH: return 'query getLocalStorageHealth { healthGetStorageLocal { ping status } }'; - case self::$GET_ANITVIRUS_HEALTH: + case self::GET_ANITVIRUS_HEALTH: return 'query getAntivirusHealth { healthGetAntivirus { version status } }'; - case self::$CREATE_MAILGUN_PROVIDER: + case self::CREATE_MAILGUN_PROVIDER: return 'mutation createMailgunProvider($providerId: String!, $name: String!, $domain: String!, $apiKey: String!, $fromName: String!, $fromEmail: String!, $isEuRegion: Boolean!, $replyToName: String, $replyToEmail: String) { messagingCreateMailgunProvider(providerId: $providerId, name: $name, domain: $domain, apiKey: $apiKey, fromName: $fromName, fromEmail: $fromEmail, isEuRegion: $isEuRegion, replyToName: $replyToName, replyToEmail: $replyToEmail) { _id @@ -2422,7 +2422,7 @@ trait Base enabled } }'; - case self::$CREATE_SENDGRID_PROVIDER: + case self::CREATE_SENDGRID_PROVIDER: return 'mutation createSendgridProvider($providerId: String!, $name: String!, $fromName: String!, $fromEmail: String!, $apiKey: String!, $replyToName: String, $replyToEmail: String) { messagingCreateSendgridProvider(providerId: $providerId, name: $name, fromName: $fromName, fromEmail: $fromEmail, apiKey: $apiKey, replyToName: $replyToName, replyToEmail: $replyToEmail) { _id @@ -2432,7 +2432,7 @@ trait Base enabled } }'; - case self::$CREATE_SMTP_PROVIDER: + case self::CREATE_SMTP_PROVIDER: return 'mutation createSmtpProvider($providerId: String!, $name: String!, $host: String!, $port: Int!, $username: String!, $password: String!, $encryption: String!, $autoTLS: Boolean! $fromName: String!, $fromEmail: String!, $replyToName: String, $replyToEmail: String) { messagingCreateSmtpProvider(providerId: $providerId, name: $name, host: $host, port: $port, username: $username, password: $password, encryption: $encryption, autoTLS: $autoTLS, fromName: $fromName, fromEmail: $fromEmail, replyToName: $replyToName, replyToEmail: $replyToEmail) { _id @@ -2442,7 +2442,7 @@ trait Base enabled } }'; - case self::$CREATE_TWILIO_PROVIDER: + case self::CREATE_TWILIO_PROVIDER: return 'mutation createTwilioProvider($providerId: String!, $name: String!, $from: String!, $accountSid: String!, $authToken: String!) { messagingCreateTwilioProvider(providerId: $providerId, name: $name, from: $from, accountSid: $accountSid, authToken: $authToken) { _id @@ -2452,7 +2452,7 @@ trait Base enabled } }'; - case self::$CREATE_TELESIGN_PROVIDER: + case self::CREATE_TELESIGN_PROVIDER: return 'mutation createTelesignProvider($providerId: String!, $name: String!, $from: String!, $customerId: String!, $apiKey: String!) { messagingCreateTelesignProvider(providerId: $providerId, name: $name, from: $from, customerId: $customerId, apiKey: $apiKey) { _id @@ -2462,7 +2462,7 @@ trait Base enabled } }'; - case self::$CREATE_TEXTMAGIC_PROVIDER: + case self::CREATE_TEXTMAGIC_PROVIDER: return 'mutation createTextmagicProvider($providerId: String!, $name: String!, $from: String!, $username: String!, $apiKey: String!) { messagingCreateTextmagicProvider(providerId: $providerId, name: $name, from: $from, username: $username, apiKey: $apiKey) { _id @@ -2472,7 +2472,7 @@ trait Base enabled } }'; - case self::$CREATE_MSG91_PROVIDER: + case self::CREATE_MSG91_PROVIDER: return 'mutation createMsg91Provider($providerId: String!, $name: String!, $templateId: String!, $senderId: String!, $authKey: String!, $enabled: Boolean) { messagingCreateMsg91Provider(providerId: $providerId, name: $name, templateId: $templateId, senderId: $senderId, authKey: $authKey, enabled: $enabled) { _id @@ -2482,7 +2482,7 @@ trait Base enabled } }'; - case self::$CREATE_VONAGE_PROVIDER: + case self::CREATE_VONAGE_PROVIDER: return 'mutation createVonageProvider($providerId: String!, $name: String!, $from: String!, $apiKey: String!, $apiSecret: String!) { messagingCreateVonageProvider(providerId: $providerId, name: $name, from: $from, apiKey: $apiKey, apiSecret: $apiSecret) { _id @@ -2492,7 +2492,7 @@ trait Base enabled } }'; - case self::$CREATE_FCM_PROVIDER: + case self::CREATE_FCM_PROVIDER: return 'mutation createFcmProvider($providerId: String!, $name: String!, $serviceAccountJSON: Json) { messagingCreateFcmProvider(providerId: $providerId, name: $name, serviceAccountJSON: $serviceAccountJSON) { _id @@ -2502,7 +2502,7 @@ trait Base enabled } }'; - case self::$CREATE_APNS_PROVIDER: + case self::CREATE_APNS_PROVIDER: return 'mutation createApnsProvider($providerId: String!, $name: String!, $authKey: String!, $authKeyId: String!, $teamId: String!, $bundleId: String!) { messagingCreateApnsProvider(providerId: $providerId, name: $name, authKey: $authKey, authKeyId: $authKeyId, teamId: $teamId, bundleId: $bundleId) { _id @@ -2512,7 +2512,7 @@ trait Base enabled } }'; - case self::$LIST_PROVIDERS: + case self::LIST_PROVIDERS: return 'query listProviders { messagingListProviders { total @@ -2526,7 +2526,7 @@ trait Base } } }'; - case self::$GET_PROVIDER: + case self::GET_PROVIDER: return 'query getProvider($providerId: String!) { messagingGetProvider(providerId: $providerId) { _id @@ -2536,7 +2536,7 @@ trait Base enabled } }'; - case self::$UPDATE_MAILGUN_PROVIDER: + case self::UPDATE_MAILGUN_PROVIDER: return 'mutation updateMailgunProvider($providerId: String!, $name: String!, $domain: String!, $apiKey: String!, $isEuRegion: Boolean, $enabled: Boolean, $fromName: String, $fromEmail: String) { messagingUpdateMailgunProvider(providerId: $providerId, name: $name, domain: $domain, apiKey: $apiKey, isEuRegion: $isEuRegion, enabled: $enabled, fromName: $fromName, fromEmail: $fromEmail) { _id @@ -2546,7 +2546,7 @@ trait Base enabled } }'; - case self::$UPDATE_SENDGRID_PROVIDER: + case self::UPDATE_SENDGRID_PROVIDER: return 'mutation messagingUpdateSendgridProvider($providerId: String!, $name: String!, $apiKey: String!, $enabled: Boolean, $fromName: String, $fromEmail: String) { messagingUpdateSendgridProvider(providerId: $providerId, name: $name, apiKey: $apiKey, enabled: $enabled, fromName: $fromName, fromEmail: $fromEmail) { _id @@ -2556,7 +2556,7 @@ trait Base enabled } }'; - case self::$UPDATE_SMTP_PROVIDER: + case self::UPDATE_SMTP_PROVIDER: return 'mutation updateSmtpProvider($providerId: String!, $name: String!, $host: String!, $port: Int!, $username: String!, $password: String!, $encryption: String!, $autoTLS: Boolean!, $fromName: String, $fromEmail: String, $enabled: Boolean) { messagingUpdateSmtpProvider(providerId: $providerId, name: $name, host: $host, port: $port, username: $username, password: $password, encryption: $encryption, autoTLS: $autoTLS, fromName: $fromName, fromEmail: $fromEmail, enabled: $enabled) { _id @@ -2566,7 +2566,7 @@ trait Base enabled } }'; - case self::$UPDATE_TWILIO_PROVIDER: + case self::UPDATE_TWILIO_PROVIDER: return 'mutation updateTwilioProvider($providerId: String!, $name: String!, $accountSid: String!, $authToken: String!) { messagingUpdateTwilioProvider(providerId: $providerId, name: $name, accountSid: $accountSid, authToken: $authToken) { _id @@ -2576,7 +2576,7 @@ trait Base enabled } }'; - case self::$UPDATE_TELESIGN_PROVIDER: + case self::UPDATE_TELESIGN_PROVIDER: return 'mutation updateTelesignProvider($providerId: String!, $name: String!, $customerId: String!, $apiKey: String!) { messagingUpdateTelesignProvider(providerId: $providerId, name: $name, customerId: $customerId, apiKey: $apiKey) { _id @@ -2586,7 +2586,7 @@ trait Base enabled } }'; - case self::$UPDATE_TEXTMAGIC_PROVIDER: + case self::UPDATE_TEXTMAGIC_PROVIDER: return 'mutation updateTextmagicProvider($providerId: String!, $name: String!, $username: String!, $apiKey: String!) { messagingUpdateTextmagicProvider(providerId: $providerId, name: $name, username: $username, apiKey: $apiKey) { _id @@ -2596,7 +2596,7 @@ trait Base enabled } }'; - case self::$UPDATE_MSG91_PROVIDER: + case self::UPDATE_MSG91_PROVIDER: return 'mutation updateMsg91Provider($providerId: String!, $name: String!, $templateId: String!, $senderId: String!, $authKey: String!) { messagingUpdateMsg91Provider(providerId: $providerId, name: $name, templateId: $templateId, senderId: $senderId, authKey: $authKey) { _id @@ -2606,7 +2606,7 @@ trait Base enabled } }'; - case self::$UPDATE_VONAGE_PROVIDER: + case self::UPDATE_VONAGE_PROVIDER: return 'mutation updateVonageProvider($providerId: String!, $name: String!, $apiKey: String!, $apiSecret: String!) { messagingUpdateVonageProvider(providerId: $providerId, name: $name, apiKey: $apiKey, apiSecret: $apiSecret) { _id @@ -2616,7 +2616,7 @@ trait Base enabled } }'; - case self::$UPDATE_FCM_PROVIDER: + case self::UPDATE_FCM_PROVIDER: return 'mutation updateFcmProvider($providerId: String!, $name: String!, $serviceAccountJSON: Json) { messagingUpdateFcmProvider(providerId: $providerId, name: $name, serviceAccountJSON: $serviceAccountJSON) { _id @@ -2626,7 +2626,7 @@ trait Base enabled } }'; - case self::$UPDATE_APNS_PROVIDER: + case self::UPDATE_APNS_PROVIDER: return 'mutation updateApnsProvider($providerId: String!, $name: String!, $authKey: String!, $authKeyId: String!, $teamId: String!, $bundleId: String!) { messagingUpdateApnsProvider(providerId: $providerId, name: $name, authKey: $authKey, authKeyId: $authKeyId, teamId: $teamId, bundleId: $bundleId) { _id @@ -2636,13 +2636,13 @@ trait Base enabled } }'; - case self::$DELETE_PROVIDER: + case self::DELETE_PROVIDER: return 'mutation deleteProvider($providerId: String!) { messagingDeleteProvider(providerId: $providerId) { status } }'; - case self::$CREATE_TOPIC: + case self::CREATE_TOPIC: return 'mutation createTopic($topicId: String!, $name: String!) { messagingCreateTopic(topicId: $topicId, name: $name) { _id @@ -2652,7 +2652,7 @@ trait Base pushTotal } }'; - case self::$LIST_TOPICS: + case self::LIST_TOPICS: return 'query listTopics { messagingListTopics { total @@ -2665,7 +2665,7 @@ trait Base } } }'; - case self::$GET_TOPIC: + case self::GET_TOPIC: return 'query getTopic($topicId: String!) { messagingGetTopic(topicId: $topicId) { _id @@ -2675,7 +2675,7 @@ trait Base pushTotal } }'; - case self::$UPDATE_TOPIC: + case self::UPDATE_TOPIC: return 'mutation updateTopic($topicId: String!, $name: String!) { messagingUpdateTopic(topicId: $topicId, name: $name) { _id @@ -2685,13 +2685,13 @@ trait Base pushTotal } }'; - case self::$DELETE_TOPIC: + case self::DELETE_TOPIC: return 'mutation deleteTopic($topicId: String!) { messagingDeleteTopic(topicId: $topicId) { status } }'; - case self::$CREATE_SUBSCRIBER: + case self::CREATE_SUBSCRIBER: return 'mutation createSubscriber($subscriberId: String!, $targetId: String!, $topicId: String!) { messagingCreateSubscriber(subscriberId: $subscriberId, targetId: $targetId, topicId: $topicId) { _id @@ -2707,7 +2707,7 @@ trait Base } } }'; - case self::$LIST_SUBSCRIBERS: + case self::LIST_SUBSCRIBERS: return 'query listSubscribers($topicId: String!) { messagingListSubscribers(topicId: $topicId) { total @@ -2726,7 +2726,7 @@ trait Base } } }'; - case self::$GET_SUBSCRIBER: + case self::GET_SUBSCRIBER: return 'query getSubscriber($topicId: String!, $subscriberId: String!) { messagingGetSubscriber(topicId: $topicId, subscriberId: $subscriberId) { _id @@ -2742,13 +2742,13 @@ trait Base } } }'; - case self::$DELETE_SUBSCRIBER: + case self::DELETE_SUBSCRIBER: return 'mutation deleteSubscriber($topicId: String!, $subscriberId: String!) { messagingDeleteSubscriber(topicId: $topicId, subscriberId: $subscriberId) { status } }'; - case self::$CREATE_EMAIL: + case self::CREATE_EMAIL: return 'mutation createEmail($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $subject: String!, $content: String!, $status: String, $html: Boolean, $cc: [String], $bcc: [String], $scheduledAt: String) { messagingCreateEmail(messageId: $messageId, topics: $topics, users: $users, targets: $targets, subject: $subject, content: $content, status: $status, html: $html, cc: $cc, bcc: $bcc, scheduledAt: $scheduledAt) { _id @@ -2762,7 +2762,7 @@ trait Base status } }'; - case self::$CREATE_SMS: + case self::CREATE_SMS: return 'mutation createSMS($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $content: String!, $status: String, $scheduledAt: String) { messagingCreateSMS(messageId: $messageId, topics: $topics, users: $users, targets: $targets, content: $content, status: $status, scheduledAt: $scheduledAt) { _id @@ -2776,7 +2776,7 @@ trait Base status } }'; - case self::$CREATE_PUSH_NOTIFICATION: + case self::CREATE_PUSH_NOTIFICATION: return 'mutation createPushNotification($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $title: String!, $body: String!, $data: Json, $action: String, $icon: String, $sound: String, $color: String, $tag: String, $badge: String, $status: String, $scheduledAt: String) { messagingCreatePushNotification(messageId: $messageId, topics: $topics, users: $users, targets: $targets, title: $title, body: $body, data: $data, action: $action, icon: $icon, sound: $sound, color: $color, tag: $tag, badge: $badge, status: $status, scheduledAt: $scheduledAt) { _id @@ -2790,7 +2790,7 @@ trait Base status } }'; - case self::$LIST_MESSAGES: + case self::LIST_MESSAGES: return 'query listMessages { messagingListMessages { total @@ -2808,7 +2808,7 @@ trait Base } } }'; - case self::$GET_MESSAGE: + case self::GET_MESSAGE: return 'query getMessage($messageId: String!) { messagingGetMessage(messageId: $messageId) { _id @@ -2823,8 +2823,8 @@ trait Base status } }'; - case self::$UPDATE_EMAIL: - return 'mutation updateEmail($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $subject: String, $content: String, $status: String, , $html: Boolean, $cc: [String], $bcc: [String], $scheduledAt: String) { + case self::UPDATE_EMAIL: + return 'mutation updateEmail($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $subject: String, $content: String, $status: String, $html: Boolean, $cc: [String], $bcc: [String], $scheduledAt: String) { messagingUpdateEmail(messageId: $messageId, topics: $topics, users: $users, targets: $targets, subject: $subject, content: $content, status: $status, html: $html, cc: $cc, bcc: $bcc, scheduledAt: $scheduledAt) { _id topics @@ -2837,7 +2837,7 @@ trait Base status } }'; - case self::$UPDATE_SMS: + case self::UPDATE_SMS: return 'mutation updateSMS($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $content: String, $status: String, $scheduledAt: String) { messagingUpdateSMS(messageId: $messageId, topics: $topics, users: $users, targets: $targets, content: $content, status: $status, scheduledAt: $scheduledAt) { _id @@ -2851,7 +2851,7 @@ trait Base status } }'; - case self::$UPDATE_PUSH_NOTIFICATION: + case self::UPDATE_PUSH_NOTIFICATION: return 'mutation updatePushNotification($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $title: String, $body: String, $data: Json, $action: String, $icon: String, $sound: String, $color: String, $tag: String, $badge: String, $status: String, $scheduledAt: String) { messagingUpdatePushNotification(messageId: $messageId, topics: $topics, users: $users, targets: $targets, title: $title, body: $body, data: $data, action: $action, icon: $icon, sound: $sound, color: $color, tag: $tag, badge: $badge, status: $status, scheduledAt: $scheduledAt) { _id @@ -2865,7 +2865,7 @@ trait Base status } }'; - case self::$COMPLEX_QUERY_COLLECTION: + 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 @@ -3107,14 +3107,14 @@ trait Base data } } - }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; - case self::$COMPLEX_QUERY_TABLE: + }' . 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 } - gridsCreate(databaseId: $databaseId, tableId: $tableId, name: $tableName, rowSecurity: $rowSecurity, permissions: $tablePermissions) { + tablesDBCreate(databaseId: $databaseId, tableId: $tableId, name: $tableName, rowSecurity: $rowSecurity, permissions: $tablePermissions) { _id _createdAt _updatedAt @@ -3131,7 +3131,7 @@ trait Base status } } - gridsCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: "name", size: 255, required: true) { + tablesDBCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: "name", size: 255, required: true) { key type status @@ -3140,7 +3140,7 @@ trait Base default array } - gridsCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: "age", min: 0, max: 150, required: true) { + tablesDBCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: "age", min: 0, max: 150, required: true) { key type status @@ -3150,7 +3150,7 @@ trait Base default array } - gridsCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: "alive", required: false, default: true) { + tablesDBCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: "alive", required: false, default: true) { key type status @@ -3350,7 +3350,7 @@ trait Base data } } - }' . PHP_EOL . self::$FRAGMENT_COLUMNS; + }' . PHP_EOL . self::FRAGMENT_COLUMNS; } throw new \InvalidArgumentException('Invalid query type'); diff --git a/tests/e2e/Services/GraphQL/ContentTypeTest.php b/tests/e2e/Services/GraphQL/ContentTypeTest.php index 190f1d4fcd..c1320cd47a 100644 --- a/tests/e2e/Services/GraphQL/ContentTypeTest.php +++ b/tests/e2e/Services/GraphQL/ContentTypeTest.php @@ -102,7 +102,7 @@ class ContentTypeTest extends Scope { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_BUCKET); + $query = $this->getQuery(self::CREATE_BUCKET); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -124,7 +124,7 @@ class ContentTypeTest extends Scope $bucket = $bucket['body']['data']['storageCreateBucket']; - $query = $this->getQuery(self::$CREATE_FILE); + $query = $this->getQuery(self::CREATE_FILE); $gqlPayload = [ 'operations' => \json_encode([ 'query' => $query, diff --git a/tests/e2e/Services/GraphQL/FunctionsClientTest.php b/tests/e2e/Services/GraphQL/FunctionsClientTest.php index ea2723b803..afb3afb428 100644 --- a/tests/e2e/Services/GraphQL/FunctionsClientTest.php +++ b/tests/e2e/Services/GraphQL/FunctionsClientTest.php @@ -20,7 +20,7 @@ class FunctionsClientTest extends Scope public function testCreateFunction(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FUNCTION); + $query = $this->getQuery(self::CREATE_FUNCTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -82,7 +82,7 @@ class FunctionsClientTest extends Scope public function testCreateDeployment($function): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DEPLOYMENT); + $query = $this->getQuery(self::CREATE_DEPLOYMENT); $gqlPayload = [ 'operations' => \json_encode([ @@ -112,7 +112,7 @@ class FunctionsClientTest extends Scope $deployment = $deployment['body']['data']['functionsCreateDeployment']; $deploymentId = $deployment['_id']; - $query = $this->getQuery(self::$GET_DEPLOYMENT); + $query = $this->getQuery(self::GET_DEPLOYMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -149,7 +149,7 @@ class FunctionsClientTest extends Scope public function testCreateExecution($function, $deployment): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_EXECUTION); + $query = $this->getQuery(self::CREATE_EXECUTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -176,7 +176,7 @@ class FunctionsClientTest extends Scope public function testGetExecutions($function): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_EXECUTIONS); + $query = $this->getQuery(self::GET_EXECUTIONS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -208,7 +208,7 @@ class FunctionsClientTest extends Scope public function testGetExecution($function, $execution): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_EXECUTION); + $query = $this->getQuery(self::GET_EXECUTION); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/FunctionsServerTest.php b/tests/e2e/Services/GraphQL/FunctionsServerTest.php index de419ebf0e..ed439f457f 100644 --- a/tests/e2e/Services/GraphQL/FunctionsServerTest.php +++ b/tests/e2e/Services/GraphQL/FunctionsServerTest.php @@ -20,7 +20,7 @@ class FunctionsServerTest extends Scope public function testCreateFunction(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FUNCTION); + $query = $this->getQuery(self::CREATE_FUNCTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -81,7 +81,7 @@ class FunctionsServerTest extends Scope public function testCreateDeployment($function): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DEPLOYMENT); + $query = $this->getQuery(self::CREATE_DEPLOYMENT); $gqlPayload = [ 'operations' => \json_encode([ @@ -110,7 +110,7 @@ class FunctionsServerTest extends Scope $deployment = $deployment['body']['data']['functionsCreateDeployment']; $deploymentId = $deployment['_id']; - $query = $this->getQuery(self::$GET_DEPLOYMENT); + $query = $this->getQuery(self::GET_DEPLOYMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -143,7 +143,7 @@ class FunctionsServerTest extends Scope public function testCreateExecution($deployment): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_EXECUTION); + $query = $this->getQuery(self::CREATE_EXECUTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -171,7 +171,7 @@ class FunctionsServerTest extends Scope public function testCreateRetryBuild($deployment): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$RETRY_BUILD); + $query = $this->getQuery(self::RETRY_BUILD); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -193,7 +193,7 @@ class FunctionsServerTest extends Scope public function testGetFunctions(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FUNCTIONS); + $query = $this->getQuery(self::GET_FUNCTIONS); $gqlPayload = [ 'query' => $query, ]; @@ -220,7 +220,7 @@ class FunctionsServerTest extends Scope public function testGetFunction($function): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FUNCTION); + $query = $this->getQuery(self::GET_FUNCTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -244,7 +244,7 @@ class FunctionsServerTest extends Scope public function testGetRuntimes(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_RUNTIMES); + $query = $this->getQuery(self::GET_RUNTIMES); $gqlPayload = [ 'query' => $query, ]; @@ -271,7 +271,7 @@ class FunctionsServerTest extends Scope public function testGetDeployments($function) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DEPLOYMENTS); + $query = $this->getQuery(self::GET_DEPLOYMENTS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -301,7 +301,7 @@ class FunctionsServerTest extends Scope public function testGetDeployment($deployment) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DEPLOYMENT); + $query = $this->getQuery(self::GET_DEPLOYMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -332,7 +332,7 @@ class FunctionsServerTest extends Scope public function testGetExecutions($function): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_EXECUTIONS); + $query = $this->getQuery(self::GET_EXECUTIONS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -362,7 +362,7 @@ class FunctionsServerTest extends Scope public function testGetExecution($execution): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_EXECUTION); + $query = $this->getQuery(self::GET_EXECUTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -393,7 +393,7 @@ class FunctionsServerTest extends Scope public function testUpdateFunction($function): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_FUNCTION); + $query = $this->getQuery(self::UPDATE_FUNCTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -430,7 +430,7 @@ class FunctionsServerTest extends Scope public function testDeleteDeployment($deployment): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_DEPLOYMENT); + $query = $this->getQuery(self::DELETE_DEPLOYMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -458,7 +458,7 @@ class FunctionsServerTest extends Scope public function testDeleteFunction($deployment): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_FUNCTION); + $query = $this->getQuery(self::DELETE_FUNCTION); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/HealthTest.php b/tests/e2e/Services/GraphQL/HealthTest.php index 76153a751c..484883f668 100644 --- a/tests/e2e/Services/GraphQL/HealthTest.php +++ b/tests/e2e/Services/GraphQL/HealthTest.php @@ -16,7 +16,7 @@ class HealthTest extends Scope public function testGetHTTPHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_HTTP_HEALTH); + $query = $this->getQuery(self::GET_HTTP_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -37,7 +37,7 @@ class HealthTest extends Scope public function testGetDBHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DB_HEALTH); + $query = $this->getQuery(self::GET_DB_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -58,7 +58,7 @@ class HealthTest extends Scope public function testGetCacheHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_CACHE_HEALTH); + $query = $this->getQuery(self::GET_CACHE_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -79,7 +79,7 @@ class HealthTest extends Scope public function testGetTimeHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TIME_HEALTH); + $query = $this->getQuery(self::GET_TIME_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -100,7 +100,7 @@ class HealthTest extends Scope public function testGetWebhooksQueueHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_WEBHOOKS_QUEUE_HEALTH); + $query = $this->getQuery(self::GET_WEBHOOKS_QUEUE_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -121,7 +121,7 @@ class HealthTest extends Scope public function testGetLogsQueueHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_LOGS_QUEUE_HEALTH); + $query = $this->getQuery(self::GET_LOGS_QUEUE_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -142,7 +142,7 @@ class HealthTest extends Scope public function testGetCertificatesQueueHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_CERTIFICATES_QUEUE_HEALTH); + $query = $this->getQuery(self::GET_CERTIFICATES_QUEUE_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -163,7 +163,7 @@ class HealthTest extends Scope public function testGetFunctionsQueueHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FUNCTION_QUEUE_HEALTH); + $query = $this->getQuery(self::GET_FUNCTION_QUEUE_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -184,7 +184,7 @@ class HealthTest extends Scope public function testGetLocalStorageHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_LOCAL_STORAGE_HEALTH); + $query = $this->getQuery(self::GET_LOCAL_STORAGE_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -205,7 +205,7 @@ class HealthTest extends Scope public function testGetAntiVirusHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ANITVIRUS_HEALTH); + $query = $this->getQuery(self::GET_ANITVIRUS_HEALTH); $graphQLPayload = [ 'query' => $query, ]; diff --git a/tests/e2e/Services/GraphQL/Legacy/AbuseTest.php b/tests/e2e/Services/GraphQL/Legacy/AbuseTest.php index d579ddb128..a5dc2ec685 100644 --- a/tests/e2e/Services/GraphQL/Legacy/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/Legacy/AbuseTest.php @@ -33,7 +33,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_DOCUMENT); $max = 120; for ($i = 0; $i <= $max + 1; $i++) { @@ -65,7 +65,7 @@ class AbuseTest extends Scope public function testComplexQueryBlocked() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$COMPLEX_QUERY_COLLECTION); + $query = $this->getQuery(self::COMPLEX_QUERY_COLLECTION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -103,7 +103,7 @@ class AbuseTest extends Scope $query = []; for ($i = 0; $i <= $maxQueries + 1; $i++) { - $query[] = ['query' => $this->getQuery(self::$LIST_COUNTRIES)]; + $query[] = ['query' => $this->getQuery(self::LIST_COUNTRIES)]; } $response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([ @@ -117,7 +117,7 @@ class AbuseTest extends Scope private function createCollection(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -134,7 +134,7 @@ class AbuseTest extends Scope $databaseId = $response['body']['data']['databasesCreate']['_id']; - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::CREATE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -157,7 +157,7 @@ class AbuseTest extends Scope $collectionId = $response['body']['data']['databasesCreateCollection']['_id']; - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_STRING_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/Legacy/AuthTest.php b/tests/e2e/Services/GraphQL/Legacy/AuthTest.php index 0560a0ad2d..560f0693ea 100644 --- a/tests/e2e/Services/GraphQL/Legacy/AuthTest.php +++ b/tests/e2e/Services/GraphQL/Legacy/AuthTest.php @@ -31,7 +31,7 @@ class AuthTest extends Scope parent::setUp(); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ACCOUNT); + $query = $this->getQuery(self::CREATE_ACCOUNT); $email1 = 'test' . \rand() . '@test.com'; $email2 = 'test' . \rand() . '@test.com'; @@ -61,7 +61,7 @@ class AuthTest extends Scope ], $graphQLPayload); // Create session 1 - $query = $this->getQuery(self::$CREATE_ACCOUNT_SESSION); + $query = $this->getQuery(self::CREATE_ACCOUNT_SESSION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -87,7 +87,7 @@ class AuthTest extends Scope $this->token2 = $session2['cookies']['a_session_' . $projectId]; // Create database - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -102,7 +102,7 @@ class AuthTest extends Scope ], $gqlPayload); // Create collection - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::CREATE_COLLECTION); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, @@ -123,7 +123,7 @@ class AuthTest extends Scope ], $gqlPayload); // Create string attribute - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_STRING_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -148,7 +148,7 @@ class AuthTest extends Scope $projectId = $this->getProject()['$id']; // Create document as account 1 - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::CREATE_DOCUMENT); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, @@ -173,7 +173,7 @@ class AuthTest extends Scope ], $gqlPayload); // Try to read as account 1 - $query = $this->getQuery(self::$GET_DOCUMENT); + $query = $this->getQuery(self::GET_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -207,7 +207,7 @@ class AuthTest extends Scope $projectId = $this->getProject()['$id']; // Create document as account 1 - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::CREATE_DOCUMENT); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, @@ -232,7 +232,7 @@ class AuthTest extends Scope ], $gqlPayload); // Try to delete as account 1 - $query = $this->getQuery(self::$DELETE_DOCUMENT); + $query = $this->getQuery(self::DELETE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php index c2c63e41c0..192cc8203c 100644 --- a/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php @@ -20,7 +20,7 @@ class DatabaseClientTest extends Scope public function testCreateDatabase(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -49,7 +49,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_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -89,7 +89,7 @@ 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_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -120,7 +120,7 @@ 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_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -155,7 +155,7 @@ class DatabaseClientTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::CREATE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -199,7 +199,7 @@ class DatabaseClientTest extends Scope public function testGetDocuments($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENTS); + $query = $this->getQuery(self::GET_DOCUMENTS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -225,7 +225,7 @@ class DatabaseClientTest extends Scope public function testGetDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENT); + $query = $this->getQuery(self::GET_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -252,7 +252,7 @@ class DatabaseClientTest extends Scope public function testUpdateDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DOCUMENT); + $query = $this->getQuery(self::UPDATE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -285,7 +285,7 @@ class DatabaseClientTest extends Scope public function testDeleteDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_DOCUMENT); + $query = $this->getQuery(self::DELETE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -318,7 +318,7 @@ class DatabaseClientTest extends Scope ]; // Step 1: Create database - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $payload = [ 'query' => $query, 'variables' => [ @@ -331,7 +331,7 @@ class DatabaseClientTest extends Scope $databaseId = $res['body']['data']['databasesCreate']['_id']; // Step 2: Create collection - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::CREATE_COLLECTION); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -349,7 +349,7 @@ class DatabaseClientTest extends Scope $collectionId = $res['body']['data']['databasesCreateCollection']['_id']; // Step 3: Create attribute - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_STRING_ATTRIBUTE); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -363,7 +363,7 @@ class DatabaseClientTest extends Scope sleep(1); // Step 4: Create documents - $query = $this->getQuery(self::$CREATE_DOCUMENTS); + $query = $this->getQuery(self::CREATE_DOCUMENTS); $documents = []; for ($i = 1; $i <= 10; $i++) { $documents[] = ['$id' => 'doc' . $i, 'name' => 'Doc #' . $i]; @@ -404,7 +404,7 @@ class DatabaseClientTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'], ]; - $query = $this->getQuery(self::$UPDATE_DOCUMENTS); + $query = $this->getQuery(self::UPDATE_DOCUMENTS); $payload = [ 'query' => $query, 'variables' => [ @@ -435,7 +435,7 @@ class DatabaseClientTest extends Scope ]; // Upsert: Update one, insert one - $query = $this->getQuery(self::$UPSERT_DOCUMENTS); + $query = $this->getQuery(self::UPSERT_DOCUMENTS); $payload = [ 'query' => $query, 'variables' => [ @@ -465,7 +465,7 @@ class DatabaseClientTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'], ]; - $query = $this->getQuery(self::$DELETE_DOCUMENTS); + $query = $this->getQuery(self::DELETE_DOCUMENTS); $payload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php index 3ecc96eaa0..799746ccc7 100644 --- a/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php @@ -22,7 +22,7 @@ class DatabaseServerTest extends Scope public function testCreateDatabase(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -50,7 +50,7 @@ class DatabaseServerTest extends Scope public function testCreateCollection($database): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::CREATE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -117,7 +117,7 @@ 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_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -152,7 +152,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_STRING_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -185,7 +185,7 @@ 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_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -220,7 +220,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_INTEGER_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_INTEGER_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -257,7 +257,7 @@ 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_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -290,7 +290,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_BOOLEAN_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_BOOLEAN_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -323,7 +323,7 @@ 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_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -359,7 +359,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_FLOAT_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_FLOAT_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -396,7 +396,7 @@ 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_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -429,7 +429,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_EMAIL_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_EMAIL_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -462,7 +462,7 @@ 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_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -501,7 +501,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ENUM_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_ENUM_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -541,7 +541,7 @@ 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_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -574,7 +574,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DATETIME_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_DATETIME_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -606,7 +606,7 @@ 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_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -640,7 +640,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_RELATIONSHIP_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_RELATIONSHIP_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -670,7 +670,7 @@ 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_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -704,7 +704,7 @@ class DatabaseServerTest extends Scope sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_IP_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_IP_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -737,7 +737,7 @@ 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_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -771,7 +771,7 @@ class DatabaseServerTest extends Scope sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_URL_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_URL_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -803,7 +803,7 @@ class DatabaseServerTest extends Scope public function testCreateIndex($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INDEX); + $query = $this->getQuery(self::CREATE_INDEX); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -844,7 +844,7 @@ class DatabaseServerTest extends Scope public function testCreateDocument($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::CREATE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -899,7 +899,7 @@ class DatabaseServerTest extends Scope // public function testCreateCustomEntity(): array // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$CREATE_CUSTOM_ENTITY); + // $query = $this->getQuery(self::CREATE_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -929,7 +929,7 @@ class DatabaseServerTest extends Scope public function testGetDatabases(): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DATABASES); + $query = $this->getQuery(self::GET_DATABASES); $gqlPayload = [ 'query' => $query, ]; @@ -951,7 +951,7 @@ class DatabaseServerTest extends Scope public function testGetDatabase($database): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DATABASE); + $query = $this->getQuery(self::GET_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -976,7 +976,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_COLLECTIONS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1001,7 +1001,7 @@ class DatabaseServerTest extends Scope public function testGetCollection($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLLECTION); + $query = $this->getQuery(self::GET_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1028,7 +1028,7 @@ class DatabaseServerTest extends Scope public function testGetAttributes($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ATTRIBUTES); + $query = $this->getQuery(self::GET_ATTRIBUTES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1054,7 +1054,7 @@ class DatabaseServerTest extends Scope public function testGetAttribute($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ATTRIBUTE); + $query = $this->getQuery(self::GET_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1081,7 +1081,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_INDEXES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1107,7 +1107,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_INDEX); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1134,7 +1134,7 @@ class DatabaseServerTest extends Scope public function testGetDocuments($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENTS); + $query = $this->getQuery(self::GET_DOCUMENTS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1160,7 +1160,7 @@ class DatabaseServerTest extends Scope public function testGetDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENT); + $query = $this->getQuery(self::GET_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1187,7 +1187,7 @@ class DatabaseServerTest extends Scope // public function testGetCustomEntities($data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$GET_CUSTOM_ENTITIES); + // $query = $this->getQuery(self::GET_CUSTOM_ENTITIES); // $gqlPayload = [ // 'query' => $query, // ]; @@ -1209,7 +1209,7 @@ class DatabaseServerTest extends Scope // public function testGetCustomEntity($data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$GET_CUSTOM_ENTITY); + // $query = $this->getQuery(self::GET_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -1234,7 +1234,7 @@ class DatabaseServerTest extends Scope public function testUpdateDatabase($database) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DATABASE); + $query = $this->getQuery(self::UPDATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1260,7 +1260,7 @@ class DatabaseServerTest extends Scope public function testUpdateCollection($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_COLLECTION); + $query = $this->getQuery(self::UPDATE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1288,7 +1288,7 @@ class DatabaseServerTest extends Scope public function testUpdateDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DOCUMENT); + $query = $this->getQuery(self::UPDATE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1320,7 +1320,7 @@ class DatabaseServerTest extends Scope // public function testUpdateCustomEntity(array $data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$UPDATE_CUSTOM_ENTITY); + // $query = $this->getQuery(self::UPDATE_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -1348,7 +1348,7 @@ class DatabaseServerTest extends Scope public function testDeleteDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_DOCUMENT); + $query = $this->getQuery(self::DELETE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1374,7 +1374,7 @@ class DatabaseServerTest extends Scope // public function testDeleteCustomEntity(array $data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$DELETE_CUSTOM_ENTITY); + // $query = $this->getQuery(self::DELETE_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -1398,7 +1398,7 @@ class DatabaseServerTest extends Scope public function testDeleteAttribute($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ATTRIBUTE); + $query = $this->getQuery(self::DELETE_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1424,7 +1424,7 @@ class DatabaseServerTest extends Scope public function testDeleteCollection($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_COLLECTION); + $query = $this->getQuery(self::DELETE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1449,7 +1449,7 @@ class DatabaseServerTest extends Scope public function testDeleteDatabase($database) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_DATABASE); + $query = $this->getQuery(self::DELETE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1479,7 +1479,7 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()); // Step 1: Create database - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $payload = [ 'query' => $query, 'variables' => [ @@ -1492,7 +1492,7 @@ class DatabaseServerTest extends Scope $databaseId = $res['body']['data']['databasesCreate']['_id']; // Step 2: Create collection - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::CREATE_COLLECTION); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -1510,7 +1510,7 @@ class DatabaseServerTest extends Scope $collectionId = $res['body']['data']['databasesCreateCollection']['_id']; // Step 3: Create attribute - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_STRING_ATTRIBUTE); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -1524,7 +1524,7 @@ class DatabaseServerTest extends Scope sleep(1); // Step 4: Create documents - $query = $this->getQuery(self::$CREATE_DOCUMENTS); + $query = $this->getQuery(self::CREATE_DOCUMENTS); $documents = []; for ($i = 1; $i <= 10; $i++) { $documents[] = ['$id' => 'doc' . $i, 'name' => 'Doc #' . $i]; @@ -1564,7 +1564,7 @@ class DatabaseServerTest extends Scope 'x-appwrite-project' => $data['projectId'], ], $this->getHeaders()); - $query = $this->getQuery(self::$UPDATE_DOCUMENTS); + $query = $this->getQuery(self::UPDATE_DOCUMENTS); $payload = [ 'query' => $query, 'variables' => [ @@ -1594,7 +1594,7 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()); // Upsert: Update one, insert one - $query = $this->getQuery(self::$UPSERT_DOCUMENTS); + $query = $this->getQuery(self::UPSERT_DOCUMENTS); $payload = [ 'query' => $query, 'variables' => [ @@ -1623,7 +1623,7 @@ class DatabaseServerTest extends Scope 'x-appwrite-project' => $data['projectId'], ], $this->getHeaders()); - $query = $this->getQuery(self::$DELETE_DOCUMENTS); + $query = $this->getQuery(self::DELETE_DOCUMENTS); $payload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/LocalizationTest.php b/tests/e2e/Services/GraphQL/LocalizationTest.php index 38200911c8..182cdaabae 100644 --- a/tests/e2e/Services/GraphQL/LocalizationTest.php +++ b/tests/e2e/Services/GraphQL/LocalizationTest.php @@ -16,7 +16,7 @@ class LocalizationTest extends Scope public function testGetLocale(): array { $projectId = $this->getProject()['$id']; - $query = \urlencode($this->getQuery(self::$GET_LOCALE)); + $query = \urlencode($this->getQuery(self::GET_LOCALE)); $locale = $this->client->call(Client::METHOD_GET, '/graphql?query=' . $query, \array_merge([ 'content-type' => 'application/json', @@ -34,7 +34,7 @@ class LocalizationTest extends Scope public function testGetCountries(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_COUNTRIES); + $query = $this->getQuery(self::LIST_COUNTRIES); $graphQLPayload = [ 'query' => $query, ]; @@ -56,7 +56,7 @@ class LocalizationTest extends Scope public function testGetCountriesEU(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_EU_COUNTRIES); + $query = $this->getQuery(self::LIST_EU_COUNTRIES); $graphQLPayload = [ 'query' => $query, ]; @@ -78,7 +78,7 @@ class LocalizationTest extends Scope public function testGetCountriesPhones(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_COUNTRY_PHONE_CODES); + $query = $this->getQuery(self::LIST_COUNTRY_PHONE_CODES); $graphQLPayload = [ 'query' => $query, ]; @@ -100,7 +100,7 @@ class LocalizationTest extends Scope public function testGetContinents(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_CONTINENTS); + $query = $this->getQuery(self::LIST_CONTINENTS); $graphQLPayload = [ 'query' => $query, ]; @@ -122,7 +122,7 @@ class LocalizationTest extends Scope public function testGetCurrencies(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_CURRENCIES); + $query = $this->getQuery(self::LIST_CURRENCIES); $graphQLPayload = [ 'query' => $query, ]; @@ -144,7 +144,7 @@ class LocalizationTest extends Scope public function testGetLanguages(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_LANGUAGES); + $query = $this->getQuery(self::LIST_LANGUAGES); $graphQLPayload = [ 'query' => $query, ]; diff --git a/tests/e2e/Services/GraphQL/MessagingTest.php b/tests/e2e/Services/GraphQL/MessagingTest.php index fecb1692a9..4fb3dac84f 100644 --- a/tests/e2e/Services/GraphQL/MessagingTest.php +++ b/tests/e2e/Services/GraphQL/MessagingTest.php @@ -225,7 +225,7 @@ class MessagingTest extends Scope */ public function testListProviders(array $providers) { - $query = $this->getQuery(self::$LIST_PROVIDERS); + $query = $this->getQuery(self::LIST_PROVIDERS); $graphQLPayload = [ 'query' => $query, ]; @@ -243,7 +243,7 @@ class MessagingTest extends Scope */ public function testGetProvider(array $providers) { - $query = $this->getQuery(self::$GET_PROVIDER); + $query = $this->getQuery(self::GET_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -265,7 +265,7 @@ class MessagingTest extends Scope public function testDeleteProvider(array $providers) { foreach ($providers as $provider) { - $query = $this->getQuery(self::$DELETE_PROVIDER); + $query = $this->getQuery(self::DELETE_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -283,7 +283,7 @@ class MessagingTest extends Scope public function testCreateTopic() { - $query = $this->getQuery(self::$CREATE_TOPIC); + $query = $this->getQuery(self::CREATE_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -309,7 +309,7 @@ class MessagingTest extends Scope public function testUpdateTopic(array $topic) { $topicId = $topic['_id']; - $query = $this->getQuery(self::$UPDATE_TOPIC); + $query = $this->getQuery(self::UPDATE_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -334,7 +334,7 @@ class MessagingTest extends Scope */ public function testListTopics() { - $query = $this->getQuery(self::$LIST_TOPICS); + $query = $this->getQuery(self::LIST_TOPICS); $graphQLPayload = [ 'query' => $query, ]; @@ -353,7 +353,7 @@ class MessagingTest extends Scope */ public function testGetTopic(string $topicId) { - $query = $this->getQuery(self::$GET_TOPIC); + $query = $this->getQuery(self::GET_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -388,7 +388,7 @@ class MessagingTest extends Scope 'fromEmail' => 'sender-email@my-domain.com', ] ]; - $query = $this->getQuery(self::$CREATE_SENDGRID_PROVIDER); + $query = $this->getQuery(self::CREATE_SENDGRID_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => $providerParam['sendgrid'], @@ -401,7 +401,7 @@ class MessagingTest extends Scope $providerId = $response['body']['data']['messagingCreateSendgridProvider']['_id']; - $query = $this->getQuery(self::$CREATE_USER_TARGET); + $query = $this->getQuery(self::CREATE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -424,7 +424,7 @@ class MessagingTest extends Scope $targetId = $response['body']['data']['usersCreateTarget']['_id']; - $query = $this->getQuery(self::$CREATE_SUBSCRIBER); + $query = $this->getQuery(self::CREATE_SUBSCRIBER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -451,7 +451,7 @@ class MessagingTest extends Scope */ public function testListSubscribers(array $subscriber) { - $query = $this->getQuery(self::$LIST_SUBSCRIBERS); + $query = $this->getQuery(self::LIST_SUBSCRIBERS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -479,7 +479,7 @@ class MessagingTest extends Scope $topicId = $subscriber['topicId']; $subscriberId = $subscriber['_id']; - $query = $this->getQuery(self::$GET_SUBSCRIBER); + $query = $this->getQuery(self::GET_SUBSCRIBER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -509,7 +509,7 @@ class MessagingTest extends Scope $topicId = $subscriber['topicId']; $subscriberId = $subscriber['_id']; - $query = $this->getQuery(self::$DELETE_SUBSCRIBER); + $query = $this->getQuery(self::DELETE_SUBSCRIBER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -530,7 +530,7 @@ class MessagingTest extends Scope */ public function testDeleteTopic(string $topicId) { - $query = $this->getQuery(self::$DELETE_TOPIC); + $query = $this->getQuery(self::DELETE_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -564,7 +564,7 @@ class MessagingTest extends Scope $this->markTestSkipped('Email provider not configured'); } - $query = $this->getQuery(self::$CREATE_MAILGUN_PROVIDER); + $query = $this->getQuery(self::CREATE_MAILGUN_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -587,7 +587,7 @@ class MessagingTest extends Scope $providerId = $provider['body']['data']['messagingCreateMailgunProvider']['_id']; - $query = $this->getQuery(self::$CREATE_TOPIC); + $query = $this->getQuery(self::CREATE_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -603,7 +603,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $topic['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER); + $query = $this->getQuery(self::CREATE_USER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -621,7 +621,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $user['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER_TARGET); + $query = $this->getQuery(self::CREATE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -640,7 +640,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $target['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_SUBSCRIBER); + $query = $this->getQuery(self::CREATE_SUBSCRIBER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -656,7 +656,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $subscriber['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_EMAIL); + $query = $this->getQuery(self::CREATE_EMAIL); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -676,7 +676,7 @@ class MessagingTest extends Scope \sleep(5); - $query = $this->getQuery(self::$GET_MESSAGE); + $query = $this->getQuery(self::GET_MESSAGE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -701,7 +701,7 @@ class MessagingTest extends Scope */ public function testUpdateEmail(array $email) { - $query = $this->getQuery(self::$CREATE_EMAIL); + $query = $this->getQuery(self::CREATE_EMAIL); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -720,7 +720,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $email['headers']['status-code']); - $query = $this->getQuery(self::$UPDATE_EMAIL); + $query = $this->getQuery(self::UPDATE_EMAIL); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -738,7 +738,7 @@ class MessagingTest extends Scope \sleep(5); - $query = $this->getQuery(self::$GET_MESSAGE); + $query = $this->getQuery(self::GET_MESSAGE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -772,7 +772,7 @@ class MessagingTest extends Scope $this->markTestSkipped('SMS provider not configured'); } - $query = $this->getQuery(self::$CREATE_MSG91_PROVIDER); + $query = $this->getQuery(self::CREATE_MSG91_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -793,7 +793,7 @@ class MessagingTest extends Scope $providerId = $provider['body']['data']['messagingCreateMsg91Provider']['_id']; - $query = $this->getQuery(self::$CREATE_TOPIC); + $query = $this->getQuery(self::CREATE_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -809,7 +809,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $topic['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER); + $query = $this->getQuery(self::CREATE_USER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -827,7 +827,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $user['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER_TARGET); + $query = $this->getQuery(self::CREATE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -846,7 +846,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $target['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_SUBSCRIBER); + $query = $this->getQuery(self::CREATE_SUBSCRIBER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -862,7 +862,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $subscriber['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_SMS); + $query = $this->getQuery(self::CREATE_SMS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -881,7 +881,7 @@ class MessagingTest extends Scope \sleep(5); - $query = $this->getQuery(self::$GET_MESSAGE); + $query = $this->getQuery(self::GET_MESSAGE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -905,7 +905,7 @@ class MessagingTest extends Scope */ public function testUpdateSMS(array $sms) { - $query = $this->getQuery(self::$CREATE_SMS); + $query = $this->getQuery(self::CREATE_SMS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -923,7 +923,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $sms['headers']['status-code']); - $query = $this->getQuery(self::$UPDATE_SMS); + $query = $this->getQuery(self::UPDATE_SMS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -941,7 +941,7 @@ class MessagingTest extends Scope \sleep(5); - $query = $this->getQuery(self::$GET_MESSAGE); + $query = $this->getQuery(self::GET_MESSAGE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -973,7 +973,7 @@ class MessagingTest extends Scope $this->markTestSkipped('Push provider not configured'); } - $query = $this->getQuery(self::$CREATE_FCM_PROVIDER); + $query = $this->getQuery(self::CREATE_FCM_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -997,7 +997,7 @@ class MessagingTest extends Scope $providerId = $provider['body']['data']['messagingCreateFcmProvider']['_id']; - $query = $this->getQuery(self::$CREATE_TOPIC); + $query = $this->getQuery(self::CREATE_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1013,7 +1013,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $topic['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER); + $query = $this->getQuery(self::CREATE_USER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1031,7 +1031,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $user['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER_TARGET); + $query = $this->getQuery(self::CREATE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1050,7 +1050,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $target['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_SUBSCRIBER); + $query = $this->getQuery(self::CREATE_SUBSCRIBER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1066,7 +1066,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $subscriber['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_PUSH_NOTIFICATION); + $query = $this->getQuery(self::CREATE_PUSH_NOTIFICATION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1086,7 +1086,7 @@ class MessagingTest extends Scope \sleep(5); - $query = $this->getQuery(self::$GET_MESSAGE); + $query = $this->getQuery(self::GET_MESSAGE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1111,7 +1111,7 @@ class MessagingTest extends Scope */ public function testUpdatePushNotification(array $push) { - $query = $this->getQuery(self::$CREATE_PUSH_NOTIFICATION); + $query = $this->getQuery(self::CREATE_PUSH_NOTIFICATION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1130,7 +1130,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $push['headers']['status-code']); - $query = $this->getQuery(self::$UPDATE_PUSH_NOTIFICATION); + $query = $this->getQuery(self::UPDATE_PUSH_NOTIFICATION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1148,7 +1148,7 @@ class MessagingTest extends Scope \sleep(5); - $query = $this->getQuery(self::$GET_MESSAGE); + $query = $this->getQuery(self::GET_MESSAGE); $graphQLPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/ScopeTest.php b/tests/e2e/Services/GraphQL/ScopeTest.php index a270d6e660..4020e8330a 100644 --- a/tests/e2e/Services/GraphQL/ScopeTest.php +++ b/tests/e2e/Services/GraphQL/ScopeTest.php @@ -18,7 +18,7 @@ class ScopeTest extends Scope { $projectId = $this->getProject()['$id']; $apiKey = $this->getNewKey(['databases.read']); - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -33,7 +33,7 @@ class ScopeTest extends Scope 'x-appwrite-key' => $apiKey, ], $gqlPayload); - $message = "app.{$projectId}@service.localhost (role: applications) missing scope (databases.write)"; + $message = "app.{$projectId}@service.localhost (role: applications) missing scopes ([\"databases.write\"])"; $this->assertArrayHasKey('errors', $database['body']); $this->assertEquals($message, $database['body']['errors'][0]['message']); } @@ -42,7 +42,7 @@ class ScopeTest extends Scope { $projectId = $this->getProject()['$id']; $apiKey = $this->getNewKey(['databases.read', 'databases.write']); - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/StorageClientTest.php b/tests/e2e/Services/GraphQL/StorageClientTest.php index 9896598c2d..e05a394d6f 100644 --- a/tests/e2e/Services/GraphQL/StorageClientTest.php +++ b/tests/e2e/Services/GraphQL/StorageClientTest.php @@ -20,7 +20,7 @@ class StorageClientTest extends Scope public function testCreateBucket(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_BUCKET); + $query = $this->getQuery(self::CREATE_BUCKET); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -56,7 +56,7 @@ class StorageClientTest extends Scope public function testCreateFile($bucket): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FILE); + $query = $this->getQuery(self::CREATE_FILE); $gqlPayload = [ 'operations' => \json_encode([ 'query' => $query, @@ -98,7 +98,7 @@ class StorageClientTest extends Scope public function testGetFiles($bucket): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILES); + $query = $this->getQuery(self::GET_FILES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -130,7 +130,7 @@ class StorageClientTest extends Scope public function testGetFile($bucket, $file) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE); + $query = $this->getQuery(self::GET_FILE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -159,7 +159,7 @@ class StorageClientTest extends Scope public function testGetFilePreview($file) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE_PREVIEW); + $query = $this->getQuery(self::GET_FILE_PREVIEW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -189,7 +189,7 @@ class StorageClientTest extends Scope public function testGetFileDownload($file) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE_DOWNLOAD); + $query = $this->getQuery(self::GET_FILE_DOWNLOAD); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -215,7 +215,7 @@ class StorageClientTest extends Scope public function testGetFileView($file): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE_VIEW); + $query = $this->getQuery(self::GET_FILE_VIEW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -241,7 +241,7 @@ class StorageClientTest extends Scope public function testUpdateFile($file): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_FILE); + $query = $this->getQuery(self::UPDATE_FILE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -276,7 +276,7 @@ class StorageClientTest extends Scope public function testDeleteFile($file): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_FILE); + $query = $this->getQuery(self::DELETE_FILE); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/StorageServerTest.php b/tests/e2e/Services/GraphQL/StorageServerTest.php index 7fea895b1c..37dba77ab3 100644 --- a/tests/e2e/Services/GraphQL/StorageServerTest.php +++ b/tests/e2e/Services/GraphQL/StorageServerTest.php @@ -20,7 +20,7 @@ class StorageServerTest extends Scope public function testCreateBucket(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_BUCKET); + $query = $this->getQuery(self::CREATE_BUCKET); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -55,7 +55,7 @@ class StorageServerTest extends Scope public function testCreateFile($bucket): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FILE); + $query = $this->getQuery(self::CREATE_FILE); $gqlPayload = [ 'operations' => \json_encode([ 'query' => $query, @@ -90,7 +90,7 @@ class StorageServerTest extends Scope public function testGetBuckets(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_BUCKETS); + $query = $this->getQuery(self::GET_BUCKETS); $gqlPayload = [ 'query' => $query, ]; @@ -117,7 +117,7 @@ class StorageServerTest extends Scope public function testGetBucket($bucket): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_BUCKET); + $query = $this->getQuery(self::GET_BUCKET); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -147,7 +147,7 @@ class StorageServerTest extends Scope public function testGetFiles($bucket): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILES); + $query = $this->getQuery(self::GET_FILES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -179,7 +179,7 @@ class StorageServerTest extends Scope public function testGetFile($bucket, $file) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE); + $query = $this->getQuery(self::GET_FILE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -208,7 +208,7 @@ class StorageServerTest extends Scope public function testGetFilePreview($file) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE_PREVIEW); + $query = $this->getQuery(self::GET_FILE_PREVIEW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -238,7 +238,7 @@ class StorageServerTest extends Scope public function testGetFileDownload($file) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE_DOWNLOAD); + $query = $this->getQuery(self::GET_FILE_DOWNLOAD); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -264,7 +264,7 @@ class StorageServerTest extends Scope public function testGetFileView($file): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE_VIEW); + $query = $this->getQuery(self::GET_FILE_VIEW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -290,7 +290,7 @@ class StorageServerTest extends Scope public function testUpdateBucket($bucket): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_BUCKET); + $query = $this->getQuery(self::UPDATE_BUCKET); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -322,7 +322,7 @@ class StorageServerTest extends Scope public function testUpdateFile($file): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_FILE); + $query = $this->getQuery(self::UPDATE_FILE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -357,7 +357,7 @@ class StorageServerTest extends Scope public function testDeleteFile($file): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_FILE); + $query = $this->getQuery(self::DELETE_FILE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -384,7 +384,7 @@ class StorageServerTest extends Scope public function testDeleteBucket($bucket): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_BUCKET); + $query = $this->getQuery(self::DELETE_BUCKET); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/Grids/AbuseTest.php b/tests/e2e/Services/GraphQL/TablesDB/AbuseTest.php similarity index 91% rename from tests/e2e/Services/GraphQL/Grids/AbuseTest.php rename to tests/e2e/Services/GraphQL/TablesDB/AbuseTest.php index 1a388871bf..9fab95a9ea 100644 --- a/tests/e2e/Services/GraphQL/Grids/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/TablesDB/AbuseTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\GraphQL\Grids; +namespace Tests\E2E\Services\GraphQL\TablesDB; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; @@ -33,7 +33,7 @@ class AbuseTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ROW); + $query = $this->getQuery(self::CREATE_ROW); $max = 120; for ($i = 0; $i <= $max + 1; $i++) { @@ -65,7 +65,7 @@ class AbuseTest extends Scope public function testComplexQueryBlocked() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$COMPLEX_QUERY_TABLE); + $query = $this->getQuery(self::COMPLEX_QUERY_TABLE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -103,7 +103,7 @@ class AbuseTest extends Scope $query = []; for ($i = 0; $i <= $maxQueries + 1; $i++) { - $query[] = ['query' => $this->getQuery(self::$LIST_COUNTRIES)]; + $query[] = ['query' => $this->getQuery(self::LIST_COUNTRIES)]; } $response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([ @@ -117,7 +117,7 @@ class AbuseTest extends Scope private function createTable(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -134,7 +134,7 @@ class AbuseTest extends Scope $databaseId = $response['body']['data']['databasesCreate']['_id']; - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::CREATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -155,9 +155,9 @@ class AbuseTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'], ], $gqlPayload); - $tableId = $response['body']['data']['gridsCreateTable']['_id']; + $tableId = $response['body']['data']['tablesDBCreateTable']['_id']; - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/Grids/AuthTest.php b/tests/e2e/Services/GraphQL/TablesDB/AuthTest.php similarity index 86% rename from tests/e2e/Services/GraphQL/Grids/AuthTest.php rename to tests/e2e/Services/GraphQL/TablesDB/AuthTest.php index fc6b76818c..5b5e721323 100644 --- a/tests/e2e/Services/GraphQL/Grids/AuthTest.php +++ b/tests/e2e/Services/GraphQL/TablesDB/AuthTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\GraphQL\Grids; +namespace Tests\E2E\Services\GraphQL\TablesDB; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; @@ -31,7 +31,7 @@ class AuthTest extends Scope parent::setUp(); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ACCOUNT); + $query = $this->getQuery(self::CREATE_ACCOUNT); $email1 = 'test' . \rand() . '@test.com'; $email2 = 'test' . \rand() . '@test.com'; @@ -61,7 +61,7 @@ class AuthTest extends Scope ], $graphQLPayload); // Create session 1 - $query = $this->getQuery(self::$CREATE_ACCOUNT_SESSION); + $query = $this->getQuery(self::CREATE_ACCOUNT_SESSION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -87,7 +87,7 @@ class AuthTest extends Scope $this->token2 = $session2['cookies']['a_session_' . $projectId]; // Create database - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -102,7 +102,7 @@ class AuthTest extends Scope ], $gqlPayload); // Create table - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::CREATE_TABLE); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, @@ -123,12 +123,12 @@ class AuthTest extends Scope ], $gqlPayload); // Create string attribute - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], + 'tableId' => $this->table['body']['data']['tablesDBCreateTable']['_id'], 'key' => 'name', 'size' => 256, 'required' => true, @@ -148,13 +148,13 @@ class AuthTest extends Scope $projectId = $this->getProject()['$id']; // Create row as account 1 - $query = $this->getQuery(self::$CREATE_ROW); + $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']['gridsCreateTable']['_id'], + 'tableId' => $this->table['body']['data']['tablesDBCreateTable']['_id'], 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', @@ -173,13 +173,13 @@ class AuthTest extends Scope ], $gqlPayload); // Try to read as account 1 - $query = $this->getQuery(self::$GET_ROW); + $query = $this->getQuery(self::GET_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], - 'rowId' => $row['body']['data']['gridsCreateRow']['_id'], + 'tableId' => $this->table['body']['data']['tablesDBCreateTable']['_id'], + 'rowId' => $row['body']['data']['tablesDBCreateRow']['_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']['gridsGetRow']); + $this->assertIsArray($row['body']['data']['tablesDBGetRow']); $this->assertArrayNotHasKey('errors', $row['body']); // Try to read as account 2 @@ -207,13 +207,13 @@ class AuthTest extends Scope $projectId = $this->getProject()['$id']; // Create row as account 1 - $query = $this->getQuery(self::$CREATE_ROW); + $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']['gridsCreateTable']['_id'], + 'tableId' => $this->table['body']['data']['tablesDBCreateTable']['_id'], 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', @@ -232,13 +232,13 @@ class AuthTest extends Scope ], $gqlPayload); // Try to delete as account 1 - $query = $this->getQuery(self::$DELETE_ROW); + $query = $this->getQuery(self::DELETE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], - 'rowId' => $row['body']['data']['gridsCreateRow']['_id'], + 'tableId' => $this->table['body']['data']['tablesDBCreateTable']['_id'], + 'rowId' => $row['body']['data']['tablesDBCreateRow']['_id'], ] ]; $row = $this->client->call(Client::METHOD_POST, '/graphql', [ diff --git a/tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/TablesDB/DatabaseClientTest.php similarity index 87% rename from tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php rename to tests/e2e/Services/GraphQL/TablesDB/DatabaseClientTest.php index 8095692b92..80d891125a 100644 --- a/tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/TablesDB/DatabaseClientTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\GraphQL\Grids; +namespace Tests\E2E\Services\GraphQL\TablesDB; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; @@ -21,7 +21,7 @@ class DatabaseClientTest extends Scope public function testCreateDatabase(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); + $query = $this->getQuery(self::TABLESDB_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']['gridsCreateDatabase']; + $database = $database['body']['data']['tablesDBCreate']; $this->assertEquals('Actors', $database['name']); return $database; @@ -50,7 +50,7 @@ class DatabaseClientTest extends Scope public function testCreateTable($database): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::CREATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -75,7 +75,7 @@ class DatabaseClientTest extends Scope $this->assertIsArray($table['body']['data']); $this->assertArrayNotHasKey('errors', $table['body']); - $table = $table['body']['data']['gridsCreateTable']; + $table = $table['body']['data']['tablesDBCreateTable']; $this->assertEquals('Actors', $table['name']); return [ @@ -90,7 +90,7 @@ class DatabaseClientTest extends Scope public function testCreateStringColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -110,7 +110,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateStringColumn']); + $this->assertIsArray($column['body']['data']['tablesDBCreateStringColumn']); return $data; } @@ -121,7 +121,7 @@ class DatabaseClientTest extends Scope public function testCreateIntegerColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INTEGER_COLUMN); + $query = $this->getQuery(self::CREATE_INTEGER_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -142,7 +142,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateIntegerColumn']); + $this->assertIsArray($column['body']['data']['tablesDBCreateIntegerColumn']); return $data; } @@ -156,7 +156,7 @@ class DatabaseClientTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ROW); + $query = $this->getQuery(self::CREATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -183,7 +183,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['gridsCreateRow']; + $row = $row['body']['data']['tablesDBCreateRow']; $this->assertIsArray($row); return [ @@ -200,7 +200,7 @@ class DatabaseClientTest extends Scope public function testGetRows($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -216,7 +216,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $rows['body']); $this->assertIsArray($rows['body']['data']); - $this->assertIsArray($rows['body']['data']['gridsListRows']); + $this->assertIsArray($rows['body']['data']['tablesDBListRows']); } /** @@ -226,7 +226,7 @@ class DatabaseClientTest extends Scope public function testGetDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ROW); + $query = $this->getQuery(self::GET_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -243,7 +243,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $this->assertIsArray($row['body']['data']['gridsGetRow']); + $this->assertIsArray($row['body']['data']['tablesDBGetRow']); } /** @@ -253,7 +253,7 @@ class DatabaseClientTest extends Scope public function testUpdateRow($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ROW); + $query = $this->getQuery(self::UPDATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -273,7 +273,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['gridsUpdateRow']; + $row = $row['body']['data']['tablesDBUpdateRow']; $this->assertIsArray($row); $this->assertStringContainsString('New Row Name', $row['data']); @@ -286,7 +286,7 @@ class DatabaseClientTest extends Scope public function testDeleteRow($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ROW); + $query = $this->getQuery(self::DELETE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -319,7 +319,7 @@ class DatabaseClientTest extends Scope ]; // Step 1: Create database - $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); + $query = $this->getQuery(self::TABLESDB_CREATE_DATABASE); $payload = [ 'query' => $query, 'variables' => [ @@ -330,10 +330,10 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $databaseId = $res['body']['data']['gridsCreateDatabase']['_id']; + $databaseId = $res['body']['data']['tablesDBCreate']['_id']; // Step 2: Create table - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::CREATE_TABLE); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -349,10 +349,10 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $tableId = $res['body']['data']['gridsCreateTable']['_id']; + $tableId = $res['body']['data']['tablesDBCreateTable']['_id']; // Step 3: Create column - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::CREATE_STRING_COLUMN); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -367,7 +367,7 @@ class DatabaseClientTest extends Scope sleep(1); // Step 4: Create rows - $query = $this->getQuery(self::$CREATE_ROWS); + $query = $this->getQuery(self::CREATE_ROWS); $rows = []; for ($i = 1; $i <= 10; $i++) { $rows[] = ['$id' => 'row' . $i, 'name' => 'Row #' . $i]; @@ -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']['gridsCreateRows']['rows']); + $this->assertCount(10, $res['body']['data']['tablesDBCreateRows']['rows']); return compact('databaseId', 'tableId', 'projectId'); } @@ -406,7 +406,7 @@ class DatabaseClientTest extends Scope ]; // Step 1: Bulk update rows - $query = $this->getQuery(self::$UPDATE_ROWS); + $query = $this->getQuery(self::UPDATE_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -421,10 +421,10 @@ 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']['gridsUpdateRows']['rows']); + $this->assertCount(10, $res['body']['data']['tablesDBUpdateRows']['rows']); // Step 2: Fetch and validate updated rows - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -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']['gridsListRows']; + $fetched = $res['body']['data']['tablesDBListRows']; $this->assertEquals(10, $fetched['total']); foreach ($fetched['rows'] as $row) { @@ -469,7 +469,7 @@ class DatabaseClientTest extends Scope ]; // Step 1: Mutate row 10 and add row 11 - $query = $this->getQuery(self::$UPSERT_ROWS); + $query = $this->getQuery(self::UPSERT_ROWS); $upsertPayload = [ 'query' => $query, 'variables' => [ @@ -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']['gridsUpsertRows']['rows']; + $rows = $response['body']['data']['tablesDBUpsertRows']['rows']; $this->assertCount(2, $rows); $rowMap = []; @@ -503,7 +503,7 @@ class DatabaseClientTest extends Scope $this->assertArrayHasKey('Row #11', $rowMap); // Step 2: Fetch all rows and confirm count is now 11 - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $fetchPayload = [ 'query' => $query, 'variables' => [ @@ -515,11 +515,11 @@ 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']['gridsListRows']; + $fetched = $res['body']['data']['tablesDBListRows']; $this->assertEquals(11, $fetched['total']); // Step 3: Upsert row with new permissions using `tablesUpsertRow` - $query = $this->getQuery(self::$UPSERT_ROW); + $query = $this->getQuery(self::UPSERT_ROW); $payload = [ 'query' => $query, 'variables' => [ @@ -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']['gridsUpsertRow']; + $updated = $res['body']['data']['tablesDBUpsertRow']; $this->assertEquals('Row #10 Patched', json_decode($updated['data'], true)['name']); $this->assertEquals($data['databaseId'], $updated['_databaseId']); $this->assertEquals($data['tableId'], $updated['_tableId']); @@ -554,7 +554,7 @@ class DatabaseClientTest extends Scope ]; // Step 1: Perform bulk delete - $query = $this->getQuery(self::$DELETE_ROWS); + $query = $this->getQuery(self::DELETE_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -566,12 +566,12 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $deleted = $res['body']['data']['gridsDeleteRows']['rows']; + $deleted = $res['body']['data']['tablesDBDeleteRows']['rows']; $this->assertIsArray($deleted); $this->assertCount(11, $deleted); // Step 2: Confirm deletion via refetch - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -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']['gridsListRows']['total']); + $this->assertEquals(0, $res['body']['data']['tablesDBListRows']['total']); return $data; } diff --git a/tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php similarity index 85% rename from tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php rename to tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php index aadee9749c..676d570d74 100644 --- a/tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\GraphQL\Grids; +namespace Tests\E2E\Services\GraphQL\TablesDB; use Exception; use Tests\E2E\Client; @@ -23,7 +23,7 @@ class DatabaseServerTest extends Scope public function testCreateDatabase(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); + $query = $this->getQuery(self::TABLESDB_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']['gridsCreateDatabase']; + $database = $database['body']['data']['tablesDBCreate']; $this->assertEquals('Actors', $database['name']); return $database; @@ -51,7 +51,7 @@ class DatabaseServerTest extends Scope public function testCreateTable($database): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::CREATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -75,7 +75,7 @@ class DatabaseServerTest extends Scope $this->assertIsArray($table['body']['data']); $this->assertArrayNotHasKey('errors', $table['body']); - $table = $table['body']['data']['gridsCreateTable']; + $table = $table['body']['data']['tablesDBCreateTable']; $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']['gridsCreateTable']; + $table2 = $table2['body']['data']['tablesDBCreateTable']; $this->assertEquals('Movies', $table2['name']); return [ @@ -118,7 +118,7 @@ class DatabaseServerTest extends Scope public function testCreateStringColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -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']['gridsCreateStringColumn']); + $this->assertIsArray($column['body']['data']['tablesDBCreateStringColumn']); return $data; } @@ -153,7 +153,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_STRING_COLUMN); + $query = $this->getQuery(self::UPDATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -171,9 +171,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateStringColumn']); - $this->assertFalse($column['body']['data']['gridsUpdateStringColumn']['required']); - $this->assertEquals('Default Value', $column['body']['data']['gridsUpdateStringColumn']['default']); + $this->assertIsArray($column['body']['data']['tablesDBUpdateStringColumn']); + $this->assertFalse($column['body']['data']['tablesDBUpdateStringColumn']['required']); + $this->assertEquals('Default Value', $column['body']['data']['tablesDBUpdateStringColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -186,7 +186,7 @@ class DatabaseServerTest extends Scope public function testCreateIntegerColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INTEGER_COLUMN); + $query = $this->getQuery(self::CREATE_INTEGER_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -206,7 +206,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateIntegerColumn']); + $this->assertIsArray($column['body']['data']['tablesDBCreateIntegerColumn']); return $data; } @@ -221,7 +221,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_INTEGER_COLUMN); + $query = $this->getQuery(self::UPDATE_INTEGER_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -241,11 +241,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $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->assertIsArray($column['body']['data']['tablesDBUpdateIntegerColumn']); + $this->assertFalse($column['body']['data']['tablesDBUpdateIntegerColumn']['required']); + $this->assertEquals(12, $column['body']['data']['tablesDBUpdateIntegerColumn']['min']); + $this->assertEquals(160, $column['body']['data']['tablesDBUpdateIntegerColumn']['max']); + $this->assertEquals(50, $column['body']['data']['tablesDBUpdateIntegerColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -258,7 +258,7 @@ class DatabaseServerTest extends Scope public function testCreateBooleanColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_BOOLEAN_COLUMN); + $query = $this->getQuery(self::CREATE_BOOLEAN_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -276,7 +276,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateBooleanColumn']); + $this->assertIsArray($column['body']['data']['tablesDBCreateBooleanColumn']); return $data; } @@ -291,7 +291,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_BOOLEAN_COLUMN); + $query = $this->getQuery(self::UPDATE_BOOLEAN_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -309,9 +309,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateBooleanColumn']); - $this->assertFalse($column['body']['data']['gridsUpdateBooleanColumn']['required']); - $this->assertTrue($column['body']['data']['gridsUpdateBooleanColumn']['default']); + $this->assertIsArray($column['body']['data']['tablesDBUpdateBooleanColumn']); + $this->assertFalse($column['body']['data']['tablesDBUpdateBooleanColumn']['required']); + $this->assertTrue($column['body']['data']['tablesDBUpdateBooleanColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -324,7 +324,7 @@ class DatabaseServerTest extends Scope public function testCreateFloatColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FLOAT_COLUMN); + $query = $this->getQuery(self::CREATE_FLOAT_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -345,7 +345,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateFloatColumn']); + $this->assertIsArray($column['body']['data']['tablesDBCreateFloatColumn']); return $data; } @@ -360,7 +360,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_FLOAT_COLUMN); + $query = $this->getQuery(self::UPDATE_FLOAT_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -380,11 +380,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $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->assertIsArray($column['body']['data']['tablesDBUpdateFloatColumn']); + $this->assertFalse($column['body']['data']['tablesDBUpdateFloatColumn']['required']); + $this->assertEquals(100.0, $column['body']['data']['tablesDBUpdateFloatColumn']['min']); + $this->assertEquals(1000000.0, $column['body']['data']['tablesDBUpdateFloatColumn']['max']); + $this->assertEquals(2500.0, $column['body']['data']['tablesDBUpdateFloatColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -397,7 +397,7 @@ class DatabaseServerTest extends Scope public function testCreateEmailColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_EMAIL_COLUMN); + $query = $this->getQuery(self::CREATE_EMAIL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -415,7 +415,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateEmailColumn']); + $this->assertIsArray($column['body']['data']['tablesDBCreateEmailColumn']); return $data; } @@ -430,7 +430,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_EMAIL_COLUMN); + $query = $this->getQuery(self::UPDATE_EMAIL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -448,9 +448,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateEmailColumn']); - $this->assertFalse($column['body']['data']['gridsUpdateEmailColumn']['required']); - $this->assertEquals('torsten@appwrite.io', $column['body']['data']['gridsUpdateEmailColumn']['default']); + $this->assertIsArray($column['body']['data']['tablesDBUpdateEmailColumn']); + $this->assertFalse($column['body']['data']['tablesDBUpdateEmailColumn']['required']); + $this->assertEquals('torsten@appwrite.io', $column['body']['data']['tablesDBUpdateEmailColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -463,7 +463,7 @@ class DatabaseServerTest extends Scope public function testCreateEnumColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ENUM_COLUMN); + $query = $this->getQuery(self::CREATE_ENUM_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -486,7 +486,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateEnumColumn']); + $this->assertIsArray($column['body']['data']['tablesDBCreateEnumColumn']); return $data; } @@ -502,7 +502,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ENUM_COLUMN); + $query = $this->getQuery(self::UPDATE_ENUM_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -525,11 +525,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $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->assertIsArray($column['body']['data']['tablesDBUpdateEnumColumn']); + $this->assertFalse($column['body']['data']['tablesDBUpdateEnumColumn']['required']); + $this->assertEquals('tech', $column['body']['data']['tablesDBUpdateEnumColumn']['default']); + $this->assertContains('tech', $column['body']['data']['tablesDBUpdateEnumColumn']['elements']); + $this->assertNotContains('guest', $column['body']['data']['tablesDBUpdateEnumColumn']['elements']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -542,7 +542,7 @@ class DatabaseServerTest extends Scope public function testCreateDatetimeColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATETIME_COLUMN); + $query = $this->getQuery(self::CREATE_DATETIME_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -560,7 +560,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateDatetimeColumn']); + $this->assertIsArray($column['body']['data']['tablesDBCreateDatetimeColumn']); return $data; } @@ -575,7 +575,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DATETIME_COLUMN); + $query = $this->getQuery(self::UPDATE_DATETIME_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -593,9 +593,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $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->assertIsArray($column['body']['data']['tablesDBUpdateDatetimeColumn']); + $this->assertFalse($column['body']['data']['tablesDBUpdateDatetimeColumn']['required']); + $this->assertEquals('2000-01-01T00:00:00Z', $column['body']['data']['tablesDBUpdateDatetimeColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -607,7 +607,7 @@ class DatabaseServerTest extends Scope public function testCreateRelationshipColumn(array $data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_RELATIONSHIP_COLUMN); + $query = $this->getQuery(self::CREATE_RELATIONSHIP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -628,7 +628,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateRelationshipColumn']); + $this->assertIsArray($column['body']['data']['tablesDBCreateRelationshipColumn']); return $data; } @@ -641,7 +641,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_RELATIONSHIP_COLUMN); + $query = $this->getQuery(self::UPDATE_RELATIONSHIP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -659,7 +659,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateRelationshipColumn']); + $this->assertIsArray($column['body']['data']['tablesDBUpdateRelationshipColumn']); return $data; } @@ -671,7 +671,7 @@ class DatabaseServerTest extends Scope public function testCreateIPColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_IP_COLUMN); + $query = $this->getQuery(self::CREATE_IP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -690,7 +690,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateIpColumn']); + $this->assertIsArray($column['body']['data']['tablesDBCreateIpColumn']); return $data; } @@ -705,7 +705,7 @@ class DatabaseServerTest extends Scope sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_IP_COLUMN); + $query = $this->getQuery(self::UPDATE_IP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -723,9 +723,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $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->assertIsArray($column['body']['data']['tablesDBUpdateIpColumn']); + $this->assertFalse($column['body']['data']['tablesDBUpdateIpColumn']['required']); + $this->assertEquals('127.0.0.1', $column['body']['data']['tablesDBUpdateIpColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -738,7 +738,7 @@ class DatabaseServerTest extends Scope public function testCreateURLColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_URL_COLUMN); + $query = $this->getQuery(self::CREATE_URL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -757,7 +757,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateUrlColumn']); + $this->assertIsArray($column['body']['data']['tablesDBCreateUrlColumn']); return $data; } @@ -772,7 +772,7 @@ class DatabaseServerTest extends Scope sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_URL_COLUMN); + $query = $this->getQuery(self::UPDATE_URL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -790,9 +790,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $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->assertIsArray($column['body']['data']['tablesDBUpdateUrlColumn']); + $this->assertFalse($column['body']['data']['tablesDBUpdateUrlColumn']['required']); + $this->assertEquals('https://cloud.appwrite.io', $column['body']['data']['tablesDBUpdateUrlColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); } @@ -804,7 +804,7 @@ class DatabaseServerTest extends Scope public function testCreateIndex($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_COLUMN_INDEX); + $query = $this->getQuery(self::CREATE_COLUMN_INDEX); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -826,12 +826,12 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['gridsCreateIndex']); + $this->assertIsArray($index['body']['data']['tablesDBCreateIndex']); return [ 'database' => $data['database'], 'table' => $data['table'], - 'index' => $index['body']['data']['gridsCreateIndex'], + 'index' => $index['body']['data']['tablesDBCreateIndex'], ]; } @@ -845,7 +845,7 @@ class DatabaseServerTest extends Scope public function testCreateRow($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ROW); + $query = $this->getQuery(self::CREATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -877,7 +877,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['gridsCreateRow']; + $row = $row['body']['data']['tablesDBCreateRow']; $this->assertIsArray($row); return [ @@ -900,7 +900,7 @@ class DatabaseServerTest extends Scope // public function testCreateCustomEntity(): array // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$CREATE_CUSTOM_ENTITY); + // $query = $this->getQuery(self::CREATE_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -930,7 +930,7 @@ class DatabaseServerTest extends Scope public function testGetDatabases(): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GRIDS_GET_DATABASES); + $query = $this->getQuery(self::TABLESDB_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']['gridsListDatabases']); + $this->assertIsArray($databases['body']['data']['tablesDBList']); } /** @@ -952,7 +952,7 @@ class DatabaseServerTest extends Scope public function testGetDatabase($database): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GRIDS_GET_DATABASE); + $query = $this->getQuery(self::TABLESDB_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']['gridsGetDatabase']); + $this->assertIsArray($database['body']['data']['tablesDBGet']); } /** @@ -977,7 +977,7 @@ class DatabaseServerTest extends Scope public function testGetTables($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TABLES); + $query = $this->getQuery(self::GET_TABLES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -994,7 +994,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $tables['body']); $this->assertIsArray($tables['body']['data']); - $this->assertIsArray($tables['body']['data']['gridsListTables']); + $this->assertIsArray($tables['body']['data']['tablesDBListTables']); } /** @@ -1004,7 +1004,7 @@ class DatabaseServerTest extends Scope public function testGetTable($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TABLE); + $query = $this->getQuery(self::GET_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1020,7 +1020,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $table['body']); $this->assertIsArray($table['body']['data']); - $this->assertIsArray($table['body']['data']['gridsGetTable']); + $this->assertIsArray($table['body']['data']['tablesDBGetTable']); } /** @@ -1031,7 +1031,7 @@ class DatabaseServerTest extends Scope public function testGetColumns($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLUMNS); + $query = $this->getQuery(self::GET_COLUMNS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1047,7 +1047,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $columns['body']); $this->assertIsArray($columns['body']['data']); - $this->assertIsArray($columns['body']['data']['gridsListColumns']); + $this->assertIsArray($columns['body']['data']['tablesDBListColumns']); } /** @@ -1057,7 +1057,7 @@ class DatabaseServerTest extends Scope public function testGetColumn($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLUMN); + $query = $this->getQuery(self::GET_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1074,7 +1074,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsGetColumn']); + $this->assertIsArray($column['body']['data']['tablesDBGetColumn']); } /** @@ -1084,7 +1084,7 @@ class DatabaseServerTest extends Scope public function testGetIndexes($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLUMN_INDEXES); + $query = $this->getQuery(self::GET_COLUMN_INDEXES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1100,7 +1100,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $indices['body']); $this->assertIsArray($indices['body']['data']); - $this->assertIsArray($indices['body']['data']['gridsListIndexes']); + $this->assertIsArray($indices['body']['data']['tablesDBListIndexes']); } /** @@ -1110,7 +1110,7 @@ class DatabaseServerTest extends Scope public function testGetIndex($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLUMN_INDEX); + $query = $this->getQuery(self::GET_COLUMN_INDEX); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1127,7 +1127,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['gridsGetIndex']); + $this->assertIsArray($index['body']['data']['tablesDBGetIndex']); } /** @@ -1137,7 +1137,7 @@ class DatabaseServerTest extends Scope public function testGetRows($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1153,7 +1153,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $rows['body']); $this->assertIsArray($rows['body']['data']); - $this->assertIsArray($rows['body']['data']['gridsListRows']); + $this->assertIsArray($rows['body']['data']['tablesDBListRows']); } /** @@ -1163,7 +1163,7 @@ class DatabaseServerTest extends Scope public function testGetRow($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ROW); + $query = $this->getQuery(self::GET_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1180,7 +1180,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $this->assertIsArray($row['body']['data']['gridsGetRow']); + $this->assertIsArray($row['body']['data']['tablesDBGetRow']); } // /** @@ -1190,7 +1190,7 @@ class DatabaseServerTest extends Scope // public function testGetCustomEntities($data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$GET_CUSTOM_ENTITIES); + // $query = $this->getQuery(self::GET_CUSTOM_ENTITIES); // $gqlPayload = [ // 'query' => $query, // ]; @@ -1212,7 +1212,7 @@ class DatabaseServerTest extends Scope // public function testGetCustomEntity($data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$GET_CUSTOM_ENTITY); + // $query = $this->getQuery(self::GET_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -1237,7 +1237,7 @@ class DatabaseServerTest extends Scope public function testUpdateDatabase($database) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GRIDS_UPDATE_DATABASE); + $query = $this->getQuery(self::TABLESDB_UPDATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1253,7 +1253,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $database['body']); $this->assertIsArray($database['body']['data']); - $this->assertIsArray($database['body']['data']['gridsUpdateDatabase']); + $this->assertIsArray($database['body']['data']['tablesDBUpdate']); } /** @@ -1263,7 +1263,7 @@ class DatabaseServerTest extends Scope public function testUpdateTable($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_TABLE); + $query = $this->getQuery(self::UPDATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1281,7 +1281,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $table['body']); $this->assertIsArray($table['body']['data']); - $this->assertIsArray($table['body']['data']['gridsUpdateTable']); + $this->assertIsArray($table['body']['data']['tablesDBUpdateTable']); } /** @@ -1291,7 +1291,7 @@ class DatabaseServerTest extends Scope public function testUpdateRow($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ROW); + $query = $this->getQuery(self::UPDATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1311,7 +1311,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['gridsUpdateRow']; + $row = $row['body']['data']['tablesDBUpdateRow']; $this->assertIsArray($row); $this->assertStringContainsString('New Row Name', $row['data']); } @@ -1323,7 +1323,7 @@ class DatabaseServerTest extends Scope // public function testUpdateCustomEntity(array $data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$UPDATE_CUSTOM_ENTITY); + // $query = $this->getQuery(self::UPDATE_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -1351,7 +1351,7 @@ class DatabaseServerTest extends Scope public function testDeleteRow($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ROW); + $query = $this->getQuery(self::DELETE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1377,7 +1377,7 @@ class DatabaseServerTest extends Scope // public function testDeleteCustomEntity(array $data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$DELETE_CUSTOM_ENTITY); + // $query = $this->getQuery(self::DELETE_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -1401,7 +1401,7 @@ class DatabaseServerTest extends Scope public function testDeleteColumn($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_COLUMN); + $query = $this->getQuery(self::DELETE_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1427,7 +1427,7 @@ class DatabaseServerTest extends Scope public function testDeleteTable($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_TABLE); + $query = $this->getQuery(self::DELETE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1452,7 +1452,7 @@ class DatabaseServerTest extends Scope public function testDeleteDatabase($database) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GRIDS_DELETE_DATABASE); + $query = $this->getQuery(self::TABLESDB_DELETE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1482,7 +1482,7 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()); // Step 1: Create database - $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); + $query = $this->getQuery(self::TABLESDB_CREATE_DATABASE); $payload = [ 'query' => $query, 'variables' => [ @@ -1493,10 +1493,10 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $databaseId = $res['body']['data']['gridsCreateDatabase']['_id']; + $databaseId = $res['body']['data']['tablesDBCreate']['_id']; // Step 2: Create table - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::CREATE_TABLE); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -1512,10 +1512,10 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $tableId = $res['body']['data']['gridsCreateTable']['_id']; + $tableId = $res['body']['data']['tablesDBCreateTable']['_id']; // Step 3: Create column - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::CREATE_STRING_COLUMN); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -1530,7 +1530,7 @@ class DatabaseServerTest extends Scope sleep(1); // Step 4: Create rows - $query = $this->getQuery(self::$CREATE_ROWS); + $query = $this->getQuery(self::CREATE_ROWS); $rows = []; for ($i = 1; $i <= 10; $i++) { $rows[] = ['$id' => 'row' . $i, 'name' => 'Row #' . $i]; @@ -1545,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']['gridsCreateRows']['rows']); + $this->assertCount(10, $res['body']['data']['tablesDBCreateRows']['rows']); return compact('databaseId', 'tableId', 'projectId'); } @@ -1568,7 +1568,7 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()); // Step 1: Bulk update rows - $query = $this->getQuery(self::$UPDATE_ROWS); + $query = $this->getQuery(self::UPDATE_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -1583,10 +1583,10 @@ 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']['gridsUpdateRows']['rows']); + $this->assertCount(10, $res['body']['data']['tablesDBUpdateRows']['rows']); // Step 2: Fetch and validate updated rows - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -1599,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']['gridsListRows']; + $fetched = $res['body']['data']['tablesDBListRows']; $this->assertEquals(10, $fetched['total']); foreach ($fetched['rows'] as $row) { @@ -1630,7 +1630,7 @@ class DatabaseServerTest extends Scope ]; // Step 1: Mutate row 10 and add row 11 - $query = $this->getQuery(self::$UPSERT_ROWS); + $query = $this->getQuery(self::UPSERT_ROWS); $upsertPayload = [ 'query' => $query, 'variables' => [ @@ -1651,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']['gridsUpsertRows']['rows']; + $rows = $response['body']['data']['tablesDBUpsertRows']['rows']; $this->assertCount(2, $rows); $rowMap = []; @@ -1664,7 +1664,7 @@ class DatabaseServerTest extends Scope $this->assertArrayHasKey('Row #11', $rowMap); // Step 2: Fetch all rows and confirm count is now 11 - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $fetchPayload = [ 'query' => $query, 'variables' => [ @@ -1676,11 +1676,11 @@ 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']['gridsListRows']; + $fetched = $res['body']['data']['tablesDBListRows']; $this->assertEquals(11, $fetched['total']); // Step 3: Upsert row with new permissions using `tablesUpsertRow` - $query = $this->getQuery(self::$UPSERT_ROW); + $query = $this->getQuery(self::UPSERT_ROW); $payload = [ 'query' => $query, 'variables' => [ @@ -1695,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']['gridsUpsertRow']; + $updated = $res['body']['data']['tablesDBUpsertRow']; $this->assertEquals('Row #10 Patched', json_decode($updated['data'], true)['name']); $this->assertEquals($data['databaseId'], $updated['_databaseId']); $this->assertEquals($data['tableId'], $updated['_tableId']); @@ -1714,7 +1714,7 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()); // Step 1: Perform bulk delete - $query = $this->getQuery(self::$DELETE_ROWS); + $query = $this->getQuery(self::DELETE_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -1726,12 +1726,12 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $deleted = $res['body']['data']['gridsDeleteRows']['rows']; + $deleted = $res['body']['data']['tablesDBDeleteRows']['rows']; $this->assertIsArray($deleted); $this->assertCount(11, $deleted); // Step 2: Confirm deletion via refetch - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -1742,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']['gridsListRows']['total']); + $this->assertEquals(0, $res['body']['data']['tablesDBListRows']['total']); return $data; } diff --git a/tests/e2e/Services/GraphQL/TeamsClientTest.php b/tests/e2e/Services/GraphQL/TeamsClientTest.php index 87dbfcca00..d077d3c87b 100644 --- a/tests/e2e/Services/GraphQL/TeamsClientTest.php +++ b/tests/e2e/Services/GraphQL/TeamsClientTest.php @@ -17,7 +17,7 @@ class TeamsClientTest extends Scope public function testCreateTeam(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TEAM); + $query = $this->getQuery(self::CREATE_TEAM); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -46,7 +46,7 @@ class TeamsClientTest extends Scope public function testCreateTeamMembership($team): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::CREATE_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -75,7 +75,7 @@ class TeamsClientTest extends Scope public function testGetTeams() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAMS); + $query = $this->getQuery(self::GET_TEAMS); $graphQLPayload = [ 'query' => $query, ]; @@ -95,7 +95,7 @@ class TeamsClientTest extends Scope public function testGetTeam($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM); + $query = $this->getQuery(self::GET_TEAM); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -120,7 +120,7 @@ class TeamsClientTest extends Scope public function testGetTeamMemberships($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM_MEMBERSHIPS); + $query = $this->getQuery(self::GET_TEAM_MEMBERSHIPS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -145,7 +145,7 @@ class TeamsClientTest extends Scope public function testGetTeamMembership($team, $membership) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::GET_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -170,7 +170,7 @@ class TeamsClientTest extends Scope public function testDeleteTeamMembership($team, $membership) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::DELETE_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/TeamsServerTest.php b/tests/e2e/Services/GraphQL/TeamsServerTest.php index d773dcef5d..d99ae99cf0 100644 --- a/tests/e2e/Services/GraphQL/TeamsServerTest.php +++ b/tests/e2e/Services/GraphQL/TeamsServerTest.php @@ -17,7 +17,7 @@ class TeamsServerTest extends Scope public function testCreateTeam(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TEAM); + $query = $this->getQuery(self::CREATE_TEAM); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -46,7 +46,7 @@ class TeamsServerTest extends Scope public function testCreateTeamMembership($team): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::CREATE_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -74,7 +74,7 @@ class TeamsServerTest extends Scope public function testGetTeams() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAMS); + $query = $this->getQuery(self::GET_TEAMS); $graphQLPayload = [ 'query' => $query, ]; @@ -94,7 +94,7 @@ class TeamsServerTest extends Scope public function testGetTeam($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM); + $query = $this->getQuery(self::GET_TEAM); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -121,7 +121,7 @@ class TeamsServerTest extends Scope public function testUpdateTeamPrefs($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_TEAM_PREFERENCES); + $query = $this->getQuery(self::UPDATE_TEAM_PREFERENCES); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -151,7 +151,7 @@ class TeamsServerTest extends Scope public function testGetTeamPreferences($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM_PREFERENCES); + $query = $this->getQuery(self::GET_TEAM_PREFERENCES); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -175,7 +175,7 @@ class TeamsServerTest extends Scope public function testGetTeamMemberships($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM_MEMBERSHIPS); + $query = $this->getQuery(self::GET_TEAM_MEMBERSHIPS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -200,7 +200,7 @@ class TeamsServerTest extends Scope public function testGetTeamMembership($team, $membership) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::GET_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -224,7 +224,7 @@ class TeamsServerTest extends Scope public function testUpdateTeam($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_TEAM_NAME); + $query = $this->getQuery(self::UPDATE_TEAM_NAME); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -251,7 +251,7 @@ class TeamsServerTest extends Scope public function testUpdateTeamMembershipRoles($team, $membership) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::UPDATE_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -279,7 +279,7 @@ class TeamsServerTest extends Scope public function testDeleteTeamMembership($team, $membership) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::DELETE_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -303,7 +303,7 @@ class TeamsServerTest extends Scope $team = $this->testCreateTeam(); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_TEAM); + $query = $this->getQuery(self::DELETE_TEAM); $graphQLPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/UsersTest.php b/tests/e2e/Services/GraphQL/UsersTest.php index 64d690a0fc..7093c354a0 100644 --- a/tests/e2e/Services/GraphQL/UsersTest.php +++ b/tests/e2e/Services/GraphQL/UsersTest.php @@ -18,7 +18,7 @@ class UsersTest extends Scope public function testCreateUser(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_USER); + $query = $this->getQuery(self::CREATE_USER); $email = 'users.service@example.com'; $graphQLPayload = [ 'query' => $query, @@ -52,7 +52,7 @@ class UsersTest extends Scope { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_MAILGUN_PROVIDER); + $query = $this->getQuery(self::CREATE_MAILGUN_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -73,7 +73,7 @@ class UsersTest extends Scope $this->assertEquals(200, $provider['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER_TARGET); + $query = $this->getQuery(self::CREATE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -99,7 +99,7 @@ class UsersTest extends Scope public function testGetUsers() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USERS); + $query = $this->getQuery(self::GET_USERS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -124,7 +124,7 @@ class UsersTest extends Scope public function testGetUser() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER); + $query = $this->getQuery(self::GET_USER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -146,7 +146,7 @@ class UsersTest extends Scope public function testGetUserPreferences() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER_PREFERENCES); + $query = $this->getQuery(self::GET_USER_PREFERENCES); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -167,7 +167,7 @@ class UsersTest extends Scope public function testGetUserSessions() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER_SESSIONS); + $query = $this->getQuery(self::GET_USER_SESSIONS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -188,7 +188,7 @@ class UsersTest extends Scope public function testGetUserMemberships() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER_MEMBERSHIPS); + $query = $this->getQuery(self::GET_USER_MEMBERSHIPS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -209,7 +209,7 @@ class UsersTest extends Scope public function testGetUserLogs() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER_LOGS); + $query = $this->getQuery(self::GET_USER_LOGS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -233,7 +233,7 @@ class UsersTest extends Scope public function testListUserTargets(array $target) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_USER_TARGETS); + $query = $this->getQuery(self::LIST_USER_TARGETS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -257,7 +257,7 @@ class UsersTest extends Scope public function testGetUserTarget(array $target) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER_TARGET); + $query = $this->getQuery(self::GET_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -278,7 +278,7 @@ class UsersTest extends Scope public function testUpdateUserStatus() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_STATUS); + $query = $this->getQuery(self::UPDATE_USER_STATUS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -301,7 +301,7 @@ class UsersTest extends Scope public function testUpdateUserEmailVerification() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_EMAIL_VERIFICATION); + $query = $this->getQuery(self::UPDATE_USER_EMAIL_VERIFICATION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -323,7 +323,7 @@ class UsersTest extends Scope public function testUpdateUserPhoneVerification() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_PHONE_VERIFICATION); + $query = $this->getQuery(self::UPDATE_USER_PHONE_VERIFICATION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -346,7 +346,7 @@ class UsersTest extends Scope public function testUpdateUserName() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_NAME); + $query = $this->getQuery(self::UPDATE_USER_NAME); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -369,7 +369,7 @@ class UsersTest extends Scope public function testUpdateUserEmail() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_EMAIL); + $query = $this->getQuery(self::UPDATE_USER_EMAIL); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -392,7 +392,7 @@ class UsersTest extends Scope public function testUpdateUserPassword() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_PASSWORD); + $query = $this->getQuery(self::UPDATE_USER_PASSWORD); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -414,7 +414,7 @@ class UsersTest extends Scope public function testUpdateUserPhone() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_PHONE); + $query = $this->getQuery(self::UPDATE_USER_PHONE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -437,7 +437,7 @@ class UsersTest extends Scope public function testUpdateUserPrefs() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_PREFS); + $query = $this->getQuery(self::UPDATE_USER_PREFS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -465,7 +465,7 @@ class UsersTest extends Scope public function testUpdateUserTarget(array $target) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_TARGET); + $query = $this->getQuery(self::UPDATE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -487,7 +487,7 @@ class UsersTest extends Scope public function testDeleteUserSessions() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_USER_SESSIONS); + $query = $this->getQuery(self::DELETE_USER_SESSIONS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -510,7 +510,7 @@ class UsersTest extends Scope public function testDeleteUserSession() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_USER_SESSION); + $query = $this->getQuery(self::DELETE_USER_SESSION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -537,7 +537,7 @@ class UsersTest extends Scope public function testDeleteUserTarget(array $target) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_USER_TARGET); + $query = $this->getQuery(self::DELETE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -557,7 +557,7 @@ class UsersTest extends Scope public function testDeleteUser() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_USER); + $query = $this->getQuery(self::DELETE_USER); $graphQLPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index 3166688db1..7a57b7f8f9 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -439,7 +439,7 @@ trait MigrationsBase { $databaseId = $data['databaseId']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', [ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -453,7 +453,7 @@ trait MigrationsBase $tableId = $table['body']['$id']; // Create Column - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -468,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 . '/grids/tables/' . $tableId . '/columns/name', [ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/name', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -501,7 +501,7 @@ trait MigrationsBase $this->assertEquals(0, $result['statusCounters'][$resource]['warning']); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, [ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -513,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 . '/grids/tables/' . $tableId . '/columns/name', [ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/name', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -547,7 +547,7 @@ trait MigrationsBase $table = $data['tableId']; $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table . '/rows', [ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -597,7 +597,7 @@ trait MigrationsBase $this->assertEquals(0, $result['statusCounters'][$resource]['warning']); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table . '/rows/' . $rowId, [ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table . '/rows/' . $rowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -919,7 +919,7 @@ trait MigrationsBase $databaseId = $response['body']['$id']; // make a table - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -934,7 +934,7 @@ trait MigrationsBase $tableId = $response['body']['$id']; // make columns - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -950,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 . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1144,7 +1144,7 @@ trait MigrationsBase }, 10_000, 500); // get rows count - $rows = $this->client->call(Client::METHOD_GET, '/databases/'.$databaseId.'/grids/tables/'.$tableId.'/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/'.$databaseId.'/tables/'.$tableId.'/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ diff --git a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php index ea310d5449..5a1cd1dea6 100644 --- a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php +++ b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php @@ -70,12 +70,29 @@ class ProxyCustomServerTest extends Scope $this->assertNotEmpty($siteId); $this->assertNotEmpty($deploymentId); + $rule = $this->createSiteRule('commit-' . $domain, $siteId); + $this->assertEquals(201, $rule['headers']['status-code']); + $this->cleanupRule($rule['body']['$id']); + + $rule = $this->createSiteRule('branch-' . $domain, $siteId); + $this->assertEquals(201, $rule['headers']['status-code']); + $this->cleanupRule($rule['body']['$id']); + + $rule = $this->createSiteRule('anything-' . $domain, $siteId); + $this->assertEquals(201, $rule['headers']['status-code']); + $this->cleanupRule($rule['body']['$id']); + + $domain = \uniqid() . '-vcs.' . System::getEnv('_APP_DOMAIN_SITES', ''); + $rule = $this->createSiteRule('commit-' . $domain, $siteId); $this->assertEquals(400, $rule['headers']['status-code']); $rule = $this->createSiteRule('branch-' . $domain, $siteId); $this->assertEquals(400, $rule['headers']['status-code']); + $rule = $this->createSiteRule('subdomain.anything-' . $domain, $siteId); + $this->assertEquals(400, $rule['headers']['status-code']); + $rule = $this->createSiteRule('anything-' . $domain, $siteId); $this->assertEquals(201, $rule['headers']['status-code']); $this->cleanupRule($rule['body']['$id']); @@ -109,15 +126,11 @@ class ProxyCustomServerTest extends Scope $rule = $this->createAPIRule('https://' . $domain); $this->assertEquals(400, $rule['headers']['status-code']); - // Unexpected I would say, but it is the current behaviour $rule = $this->createAPIRule('wss://' . $domain); - $this->assertEquals(201, $rule['headers']['status-code']); - $this->cleanupRule($rule['body']['$id']); + $this->assertEquals(400, $rule['headers']['status-code']); - // Unexpected I would say, but it is the current behaviour $rule = $this->createAPIRule($domain . '/some-path'); - $this->assertEquals(201, $rule['headers']['status-code']); - $this->cleanupRule($rule['body']['$id']); + $this->assertEquals(400, $rule['headers']['status-code']); } public function testCreateRedirectRule(): void diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index a318eb82ba..c2834a0228 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 . '/grids/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actorsId . '/columns/string', array_merge([ + $name = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actorsId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actorsId . '/indexes/' . $indexKey, array_merge([ + $attribute = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['actorsId'] . '/columns/' . $attributeKey, array_merge([ + $attribute = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/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/Sites/SitesBase.php b/tests/e2e/Services/Sites/SitesBase.php index 2054744863..93c55b82b7 100644 --- a/tests/e2e/Services/Sites/SitesBase.php +++ b/tests/e2e/Services/Sites/SitesBase.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\Sites; use Appwrite\Tests\Async; +use Appwrite\Tests\Async\Exceptions\Critical; use CURLFile; use Tests\E2E\Client; use Utopia\CLI\Console; @@ -48,8 +49,23 @@ trait SitesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], ])); + + if ($deployment['body']['status'] === 'failed') { + throw new Critical('Deployment failed: ' . json_encode($deployment['body'], JSON_PRETTY_PRINT)); + } + + Console::execute("docker inspect openruntimes-executor --format='{{.State.ExitCode}}'", '', $this->stdout, $this->stderr); + if (\trim($this->stdout) !== '0') { + $msg = 'Executor has a problem: ' . $this->stderr . ' (' . $this->stdout . '), current status: '; + + Console::execute("docker compose logs openruntimes-executor", '', $this->stdout, $this->stderr); + $msg .= $this->stdout . ' (' . $this->stderr . ')'; + + throw new Critical($msg . json_encode($deployment['body'], JSON_PRETTY_PRINT)); + } + $this->assertEquals('ready', $deployment['body']['status'], 'Deployment status is not ready, deployment: ' . json_encode($deployment['body'], JSON_PRETTY_PRINT)); - }, 150000, 500); + }, 300000, 500); // Not === so multipart/form-data works fine too if (($params['activate'] ?? false) == true) { diff --git a/tests/e2e/Services/Sites/SitesCustomServerTest.php b/tests/e2e/Services/Sites/SitesCustomServerTest.php index 8680ca191c..d28e2fe8b4 100644 --- a/tests/e2e/Services/Sites/SitesCustomServerTest.php +++ b/tests/e2e/Services/Sites/SitesCustomServerTest.php @@ -405,8 +405,10 @@ class SitesCustomServerTest extends Scope ]); $this->assertNotEmpty($deploymentId); - $site = $this->getSite($siteId); - $this->assertEquals('ssr', $site['body']['adapter']); + $this->assertEventually(function () use ($siteId, &$site) { + $site = $this->getSite($siteId); + $this->assertEquals('ssr', $site['body']['adapter']); + }); $proxyClient = new Client(); $proxyClient->setEndpoint('http://' . $domain); @@ -416,6 +418,7 @@ class SitesCustomServerTest extends Scope $this->cleanupSite($siteId); } + #[Retry(count: 3)] public function testAdapterDetectionAstroStatic(): void { $siteId = $this->setupSite([ @@ -1049,6 +1052,30 @@ class SitesCustomServerTest extends Scope $this->assertEquals($deployments['headers']['status-code'], 200); $this->assertCount(1, $deployments['body']['deployments']); + $deployments = $this->listDeployments($siteId, [ + 'queries' => [ + Query::select(['status'])->toString(), + ], + ]); + + $this->assertEquals($deployments['headers']['status-code'], 200); + $this->assertArrayHasKey('status', $deployments['body']['deployments'][0]); + $this->assertArrayHasKey('status', $deployments['body']['deployments'][1]); + $this->assertArrayNotHasKey('sourceSize', $deployments['body']['deployments'][0]); + $this->assertArrayNotHasKey('sourceSize', $deployments['body']['deployments'][1]); + + // Extra select query check, for attribute not allowed by filter queries + $deployments = $this->listDeployments($siteId, [ + 'queries' => [ + Query::select(['buildLogs'])->toString(), + ], + ]); + $this->assertEquals($deployments['headers']['status-code'], 200); + $this->assertArrayHasKey('buildLogs', $deployments['body']['deployments'][0]); + $this->assertArrayHasKey('buildLogs', $deployments['body']['deployments'][1]); + $this->assertArrayNotHasKey('sourceSize', $deployments['body']['deployments'][0]); + $this->assertArrayNotHasKey('sourceSize', $deployments['body']['deployments'][1]); + $deployments = $this->listDeployments($siteId, [ 'queries' => [ Query::offset(1)->toString(), @@ -1430,6 +1457,9 @@ class SitesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertStringContainsString("Index page", $response['body']); + $this->assertArrayHasKey('x-appwrite-log-id', $response['headers']); + $this->assertNotEmpty($response['headers']['x-appwrite-log-id']); + $response = $proxyClient->call(Client::METHOD_GET, '/contact', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1507,6 +1537,7 @@ class SitesCustomServerTest extends Scope $this->cleanupSite($siteId); } + #[Retry(count: 3)] public function testSiteTemplate(): void { $template = $this->getTemplate('playground-for-astro'); @@ -1883,6 +1914,7 @@ class SitesCustomServerTest extends Scope Query::limit(1)->toString(), ]); $this->assertEquals(200, $logs['headers']['status-code']); + $this->assertStringContainsString($deploymentId, $logs['body']['executions'][0]['deploymentId']); $this->assertStringContainsString("GET", $logs['body']['executions'][0]['requestMethod']); $this->assertStringContainsString("/logs-inline", $logs['body']['executions'][0]['requestPath']); $this->assertStringContainsString("Log1", $logs['body']['executions'][0]['logs']); @@ -1892,6 +1924,24 @@ class SitesCustomServerTest extends Scope $log1Id = $logs['body']['executions'][0]['$id']; $this->assertNotEmpty($log1Id); + $logs = $this->listLogs($siteId, [ + Query::orderDesc('$createdAt')->toString(), + Query::limit(1)->toString(), + Query::equal('deploymentId', [$deploymentId])->toString() + ]); + $this->assertEquals(200, $logs['headers']['status-code']); + $this->assertGreaterThanOrEqual(1, $logs['body']['total']); + $this->assertCount(1, $logs['body']['executions']); + + $logs = $this->listLogs($siteId, [ + Query::orderDesc('$createdAt')->toString(), + Query::limit(1)->toString(), + Query::equal('deploymentId', ['some-random-id'])->toString() + ]); + $this->assertEquals(200, $logs['headers']['status-code']); + $this->assertEquals(0, $logs['body']['total']); + $this->assertCount(0, $logs['body']['executions']); + $response = $proxyClient->call(Client::METHOD_GET, '/logs-action'); $this->assertEquals(200, $response['headers']['status-code']); $this->assertStringContainsString("Action logs printed.", $response['body']); @@ -1901,6 +1951,7 @@ class SitesCustomServerTest extends Scope Query::limit(1)->toString(), ]); $this->assertEquals(200, $logs['headers']['status-code']); + $this->assertStringContainsString($deploymentId, $logs['body']['executions'][0]['deploymentId']); $this->assertStringContainsString("GET", $logs['body']['executions'][0]['requestMethod']); $this->assertStringContainsString("/logs-action", $logs['body']['executions'][0]['requestPath']); $this->assertStringContainsString("Log1", $logs['body']['executions'][0]['logs']); @@ -2693,4 +2744,43 @@ class SitesCustomServerTest extends Scope $this->cleanupSite($siteId); } + + public function testCookieHeader() + { + $siteId = $this->setupSite([ + 'siteId' => ID::unique(), + 'name' => 'Astro site', + 'framework' => 'astro', + 'adapter' => 'ssr', + 'buildRuntime' => 'node-22', + 'outputDirectory' => './dist', + 'buildCommand' => 'npm run build', + 'installCommand' => 'npm install', + 'fallbackFile' => '', + ]); + + $this->assertNotEmpty($siteId); + + $domain = $this->setupSiteDomain($siteId); + + $deploymentId = $this->setupDeployment($siteId, [ + 'code' => $this->packageSite('astro'), + 'activate' => 'true' + ]); + + $this->assertNotEmpty($deploymentId); + + $domain = $this->getSiteDomain($siteId); + $proxyClient = new Client(); + $proxyClient->setEndpoint('http://' . $domain); + + $response = $proxyClient->call(Client::METHOD_GET, '/cookies', [ + 'cookie' => 'custom-session-id=abcd123' + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals("abcd123", $response['body']); + + $this->cleanupSite($siteId); + } } diff --git a/tests/e2e/Services/Tokens/TokensConsoleClientTest.php b/tests/e2e/Services/Tokens/TokensConsoleClientTest.php index 4a7aab474a..c0f94a55bf 100644 --- a/tests/e2e/Services/Tokens/TokensConsoleClientTest.php +++ b/tests/e2e/Services/Tokens/TokensConsoleClientTest.php @@ -2,6 +2,8 @@ namespace Tests\E2E\Services\Tokens; +use Ahc\Jwt\JWT; +use Ahc\Jwt\JWTException; use CURLFile; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; @@ -12,6 +14,7 @@ use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Datetime as DatetimeValidator; +use Utopia\System\System; class TokensConsoleClientTest extends Scope { @@ -67,6 +70,28 @@ class TokensConsoleClientTest extends Scope $this->assertEquals(201, $token['headers']['status-code']); $this->assertEquals('files', $token['body']['resourceType']); + $this->assertNotEmpty($token['body']['$id']); + $this->assertNotEmpty($token['body']['secret']); + + // Verify the generated token JWT contains correct resource information + $jwt = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 86400 * 365 * 10, 10); // 10 years maxAge + try { + $payload = $jwt->decode($token['body']['secret']); + $this->assertIsArray($payload, 'JWT payload should decode to an array'); + $this->assertArrayHasKey('tokenId', $payload, 'JWT payload should contain tokenId'); + $this->assertArrayHasKey('resourceId', $payload, 'JWT payload should contain resourceId'); + $this->assertArrayHasKey('resourceType', $payload, 'JWT payload should contain resourceType'); + $this->assertArrayHasKey('resourceInternalId', $payload, 'JWT payload should contain resourceInternalId'); + + $this->assertEquals($token['body']['$id'], $payload['tokenId'], 'JWT tokenId should match token ID'); + $this->assertEquals($bucketId . ':' . $fileId, $payload['resourceId'], 'JWT resourceId should match bucketId:fileId format'); + $this->assertEquals('files', $payload['resourceType'], 'JWT resourceType should be files'); + + // For newly created tokens without expiry, should not have exp field + $this->assertArrayNotHasKey('exp', $payload, 'JWT payload should not contain exp field for tokens without expiry'); + } catch (JWTException $e) { + $this->fail('Failed to decode JWT: ' . $e->getMessage()); + } return [ 'fileId' => $fileId, @@ -94,6 +119,21 @@ class TokensConsoleClientTest extends Scope $dateValidator = new DatetimeValidator(); $this->assertTrue($dateValidator->isValid($token['body']['expire'])); + // Verify JWT contains correct expiration using native JWT decode + $this->assertNotEmpty($token['body']['secret']); + + $jwt = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 86400 * 365 * 10, 10); // 10 years maxAge + try { + $payload = $jwt->decode($token['body']['secret']); + $this->assertIsArray($payload, 'JWT payload should decode to an array'); + $this->assertArrayHasKey('exp', $payload, 'JWT payload should contain exp field'); + + $expectedExp = (new \DateTime($expiry))->getTimestamp(); + $this->assertEquals($expectedExp, $payload['exp'], 'JWT exp should match token expiry'); + } catch (JWTException $e) { + $this->fail('Failed to decode JWT: ' . $e->getMessage()); + } + // Infinite expiry $token = $this->client->call(Client::METHOD_PATCH, '/tokens/' . $tokenId, array_merge([ 'content-type' => 'application/json', @@ -104,6 +144,15 @@ class TokensConsoleClientTest extends Scope $this->assertEmpty($token['body']['expire']); + // Verify JWT does not contain exp for infinite expiry using native JWT decode + try { + $payload = $jwt->decode($token['body']['secret']); + $this->assertIsArray($payload, 'JWT payload should decode to an array'); + $this->assertArrayNotHasKey('exp', $payload, 'JWT payload should not contain exp field for infinite expiry'); + } catch (JWTException $e) { + $this->fail('Failed to decode JWT: ' . $e->getMessage()); + } + return $data; } @@ -123,6 +172,38 @@ class TokensConsoleClientTest extends Scope $this->assertIsArray($res['body']); $this->assertEquals(200, $res['headers']['status-code']); + $this->assertArrayHasKey('tokens', $res['body']); + $this->assertIsArray($res['body']['tokens']); + $this->assertGreaterThan(0, count($res['body']['tokens']), 'Should have at least one token'); + + // Verify each token in the list + $jwt = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 86400 * 365 * 10, 10); // 10 years maxAge + foreach ($res['body']['tokens'] as $token) { + $this->assertArrayHasKey('$id', $token, 'Token should have an ID'); + $this->assertArrayHasKey('secret', $token, 'Token should have a secret'); + $this->assertArrayHasKey('resourceType', $token, 'Token should have resourceType'); + $this->assertArrayHasKey('resourceId', $token, 'Token should have resourceId'); + + $this->assertEquals('files', $token['resourceType'], 'Token resourceType should be files'); + $this->assertEquals($data['bucketId'] . ':' . $data['fileId'], $token['resourceId'], 'Token resourceId should match bucketId:fileId format'); + + // Verify the JWT token is valid and contains correct information + try { + $payload = $jwt->decode($token['secret']); + $this->assertIsArray($payload, 'JWT payload should decode to an array'); + $this->assertArrayHasKey('tokenId', $payload, 'JWT payload should contain tokenId'); + $this->assertArrayHasKey('resourceId', $payload, 'JWT payload should contain resourceId'); + $this->assertArrayHasKey('resourceType', $payload, 'JWT payload should contain resourceType'); + $this->assertArrayHasKey('resourceInternalId', $payload, 'JWT payload should contain resourceInternalId'); + + $this->assertEquals($token['$id'], $payload['tokenId'], 'JWT tokenId should match token ID'); + $this->assertEquals($data['bucketId'] . ':' . $data['fileId'], $payload['resourceId'], 'JWT resourceId should match bucketId:fileId format'); + $this->assertEquals('files', $payload['resourceType'], 'JWT resourceType should be files'); + } catch (JWTException $e) { + $this->fail('Failed to decode JWT for token ' . $token['$id'] . ': ' . $e->getMessage()); + } + } + return $data; } diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index 0aa5784930..2cf1e4c65d 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -445,6 +445,19 @@ trait UsersBase $user1 = $response['body']['users'][1]; + // This test ensures that by default, endpoints dont support select queries + // If we add select query to this endpoint, you will need to remove this test + // Please make sure to add it to another place, unless all endpoints support select queries + $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['name'])->toString() + ] + ]); + $this->assertEquals($response['headers']['status-code'], 400); + $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index 35cf003586..41f6c03c35 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 . '/grids/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actorsId . '/columns/string', array_merge([ + $firstName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actorsId . '/columns/string', array_merge([ + $lastName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actorsId . '/columns/string', array_merge([ + $extra = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['actorsId'] . '/columns/' . $extra['body']['key'], array_merge([ + $removed = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $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'] @@ -558,7 +558,7 @@ trait WebhooksBase /** * Test for SUCCESS */ - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actorsId . '/rows/' . $data['rowId'], array_merge([ + $document = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actorsId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actorsId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/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 1d9b9061d9..1df6dfe9ae 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 . '/grids/tables/' . $id, array_merge([ + $actors = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['actorsId'] . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $data['actorsId'] . '/indexes/' . $index['body']['key'], array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $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'] @@ -341,7 +341,7 @@ class WebhooksCustomServerTest extends Scope /** * Test for SUCCESS */ - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/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 . '/grids/tables/' . $actors['body']['$id'], array_merge([ + $actors = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] diff --git a/tests/extensions/Async/Eventually.php b/tests/extensions/Async/Eventually.php index 9840b1a114..10f6b41eee 100644 --- a/tests/extensions/Async/Eventually.php +++ b/tests/extensions/Async/Eventually.php @@ -2,6 +2,7 @@ namespace Appwrite\Tests\Async; +use Appwrite\Tests\Async\Exceptions\Critical; use PHPUnit\Framework\Constraint\Constraint; final class Eventually extends Constraint @@ -23,6 +24,8 @@ final class Eventually extends Constraint try { $probe(); return true; + } catch (Critical $exception) { + throw $exception; } catch (\Exception $exception) { $lastException = $exception; } diff --git a/tests/extensions/Async/Exceptions/Critical.php b/tests/extensions/Async/Exceptions/Critical.php new file mode 100644 index 0000000000..92b6feb97e --- /dev/null +++ b/tests/extensions/Async/Exceptions/Critical.php @@ -0,0 +1,7 @@ +<?php + +namespace Appwrite\Tests\Async\Exceptions; + +class Critical extends \Exception +{ +} diff --git a/tests/resources/functions/basic/index.js b/tests/resources/functions/basic/index.js index 1eb9d38c58..47f7100b5b 100644 --- a/tests/resources/functions/basic/index.js +++ b/tests/resources/functions/basic/index.js @@ -41,6 +41,8 @@ module.exports = async(context) => { 'APPWRITE_FUNCTION_PROJECT_ID' : process.env.APPWRITE_FUNCTION_PROJECT_ID, 'APPWRITE_FUNCTION_MEMORY' : process.env.APPWRITE_FUNCTION_MEMORY, 'APPWRITE_FUNCTION_CPUS' : process.env.APPWRITE_FUNCTION_CPUS, + 'APPWRITE_FUNCTION_EXECUTION_ID': context.req.headers['x-appwrite-execution-id'] ?? '', + 'APPWRITE_FUNCTION_CLIENT_IP': context.req.headers['x-appwrite-client-ip'] ?? '', 'CUSTOM_VARIABLE' : process.env.CUSTOM_VARIABLE }, +statusCode); } \ No newline at end of file diff --git a/tests/resources/functions/log-error-truncation/index.js b/tests/resources/functions/log-error-truncation/index.js new file mode 100644 index 0000000000..7e94fa5028 --- /dev/null +++ b/tests/resources/functions/log-error-truncation/index.js @@ -0,0 +1,14 @@ +module.exports = async(context) => { + // Create a string that is 1000001 characters long (exceeds the 1000000 limit) + const longString = 'z' + 'a'.repeat(1000000); + + context.log(longString); + context.error(longString); + + return context.res.json({ + motto: 'Build like a team of hundreds_', + learn: 'https://appwrite.io/docs', + connect: 'https://appwrite.io/discord', + getInspired: 'https://builtwith.appwrite.io', + }); + }; \ No newline at end of file diff --git a/tests/resources/sites/astro/src/pages/cookies.js b/tests/resources/sites/astro/src/pages/cookies.js new file mode 100644 index 0000000000..5f5efac833 --- /dev/null +++ b/tests/resources/sites/astro/src/pages/cookies.js @@ -0,0 +1,4 @@ +export async function GET(context) { + const sessionId = context.cookies.get("custom-session-id")?.value ?? 'Custom session ID missing'; + return new Response(sessionId); +}