From ac66cde3f5c3c965a49c3da61e8e99928836870f Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 20 Aug 2025 03:10:28 +1200 Subject: [PATCH 1/6] Add 1.8.x support --- README.md | 10 +- docs/examples/databases/create.md | 1 + docs/examples/databases/get-usage.md | 1 + docs/examples/databases/list-usage.md | 2 + .../migrations/create-csv-migration.md | 3 +- .../projects/update-session-invalidation.md | 3 + .../tablesdb/create-boolean-column.md | 7 + .../tablesdb/create-datetime-column.md | 7 + docs/examples/tablesdb/create-email-column.md | 7 + docs/examples/tablesdb/create-enum-column.md | 8 + docs/examples/tablesdb/create-float-column.md | 9 + docs/examples/tablesdb/create-index.md | 8 + .../tablesdb/create-integer-column.md | 9 + docs/examples/tablesdb/create-ip-column.md | 7 + .../tablesdb/create-relationship-column.md | 9 + docs/examples/tablesdb/create-row.md | 6 + docs/examples/tablesdb/create-rows.md | 4 + .../examples/tablesdb/create-string-column.md | 9 + docs/examples/tablesdb/create-table.md | 7 + docs/examples/tablesdb/create-url-column.md | 7 + docs/examples/tablesdb/create.md | 5 + .../examples/tablesdb/decrement-row-column.md | 7 + docs/examples/tablesdb/delete-column.md | 4 + docs/examples/tablesdb/delete-index.md | 4 + docs/examples/tablesdb/delete-row.md | 4 + docs/examples/tablesdb/delete-rows.md | 4 + docs/examples/tablesdb/delete-table.md | 3 + docs/examples/tablesdb/delete.md | 2 + docs/examples/tablesdb/get-column.md | 4 + docs/examples/tablesdb/get-index.md | 4 + docs/examples/tablesdb/get-row.md | 5 + docs/examples/tablesdb/get-table-usage.md | 4 + docs/examples/tablesdb/get-table.md | 3 + .../get-usage.md} | 2 +- docs/examples/tablesdb/get.md | 2 + .../examples/tablesdb/increment-row-column.md | 7 + docs/examples/tablesdb/list-columns.md | 4 + docs/examples/tablesdb/list-indexes.md | 4 + docs/examples/tablesdb/list-row-logs.md | 5 + docs/examples/tablesdb/list-rows.md | 4 + docs/examples/tablesdb/list-table-logs.md | 4 + docs/examples/tablesdb/list-tables.md | 4 + docs/examples/tablesdb/list-usage.md | 2 + docs/examples/tablesdb/list.md | 3 + .../tablesdb/update-boolean-column.md | 7 + .../tablesdb/update-datetime-column.md | 7 + docs/examples/tablesdb/update-email-column.md | 7 + docs/examples/tablesdb/update-enum-column.md | 8 + docs/examples/tablesdb/update-float-column.md | 9 + .../tablesdb/update-integer-column.md | 9 + docs/examples/tablesdb/update-ip-column.md | 7 + .../tablesdb/update-relationship-column.md | 6 + docs/examples/tablesdb/update-row.md | 6 + docs/examples/tablesdb/update-rows.md | 5 + .../examples/tablesdb/update-string-column.md | 8 + docs/examples/tablesdb/update-table.md | 7 + docs/examples/tablesdb/update-url-column.md | 7 + docs/examples/tablesdb/update.md | 4 + docs/examples/tablesdb/upsert-row.md | 6 + docs/examples/tablesdb/upsert-rows.md | 4 + index.js | 40 + install.ps1 | 4 +- install.sh | 2 +- lib/client.js | 11 +- lib/commands/account.js | 6 +- lib/commands/avatars.js | 2 +- lib/commands/console.js | 2 +- lib/commands/databases.js | 363 +- lib/commands/functions.js | 6 +- lib/commands/graphql.js | 2 +- lib/commands/health.js | 2 +- lib/commands/init.js | 2 +- lib/commands/locale.js | 2 +- lib/commands/messaging.js | 2 +- lib/commands/migrations.js | 9 +- lib/commands/project.js | 2 +- lib/commands/projects.js | 45 +- lib/commands/proxy.js | 2 +- lib/commands/pull.js | 63 +- lib/commands/push.js | 171 +- lib/commands/run.js | 2 +- lib/commands/sites.js | 6 +- lib/commands/storage.js | 6 +- lib/commands/tables-db.js | 2955 +++++++++++++++++ lib/commands/teams.js | 2 +- lib/commands/tokens.js | 2 +- lib/commands/update.js | 218 ++ lib/commands/users.js | 4 +- lib/commands/vcs.js | 2 +- lib/config.js | 73 + lib/parser.js | 3 +- lib/questions.js | 39 +- lib/utils.js | 41 +- package.json | 2 +- scoop/{appwrite.json => appwrite.config.json} | 6 +- 95 files changed, 4174 insertions(+), 250 deletions(-) create mode 100644 docs/examples/databases/list-usage.md create mode 100644 docs/examples/projects/update-session-invalidation.md create mode 100644 docs/examples/tablesdb/create-boolean-column.md create mode 100644 docs/examples/tablesdb/create-datetime-column.md create mode 100644 docs/examples/tablesdb/create-email-column.md create mode 100644 docs/examples/tablesdb/create-enum-column.md create mode 100644 docs/examples/tablesdb/create-float-column.md create mode 100644 docs/examples/tablesdb/create-index.md create mode 100644 docs/examples/tablesdb/create-integer-column.md create mode 100644 docs/examples/tablesdb/create-ip-column.md create mode 100644 docs/examples/tablesdb/create-relationship-column.md create mode 100644 docs/examples/tablesdb/create-row.md create mode 100644 docs/examples/tablesdb/create-rows.md create mode 100644 docs/examples/tablesdb/create-string-column.md create mode 100644 docs/examples/tablesdb/create-table.md create mode 100644 docs/examples/tablesdb/create-url-column.md create mode 100644 docs/examples/tablesdb/create.md create mode 100644 docs/examples/tablesdb/decrement-row-column.md create mode 100644 docs/examples/tablesdb/delete-column.md create mode 100644 docs/examples/tablesdb/delete-index.md create mode 100644 docs/examples/tablesdb/delete-row.md create mode 100644 docs/examples/tablesdb/delete-rows.md create mode 100644 docs/examples/tablesdb/delete-table.md create mode 100644 docs/examples/tablesdb/delete.md create mode 100644 docs/examples/tablesdb/get-column.md create mode 100644 docs/examples/tablesdb/get-index.md create mode 100644 docs/examples/tablesdb/get-row.md create mode 100644 docs/examples/tablesdb/get-table-usage.md create mode 100644 docs/examples/tablesdb/get-table.md rename docs/examples/{databases/get-database-usage.md => tablesdb/get-usage.md} (50%) create mode 100644 docs/examples/tablesdb/get.md create mode 100644 docs/examples/tablesdb/increment-row-column.md create mode 100644 docs/examples/tablesdb/list-columns.md create mode 100644 docs/examples/tablesdb/list-indexes.md create mode 100644 docs/examples/tablesdb/list-row-logs.md create mode 100644 docs/examples/tablesdb/list-rows.md create mode 100644 docs/examples/tablesdb/list-table-logs.md create mode 100644 docs/examples/tablesdb/list-tables.md create mode 100644 docs/examples/tablesdb/list-usage.md create mode 100644 docs/examples/tablesdb/list.md create mode 100644 docs/examples/tablesdb/update-boolean-column.md create mode 100644 docs/examples/tablesdb/update-datetime-column.md create mode 100644 docs/examples/tablesdb/update-email-column.md create mode 100644 docs/examples/tablesdb/update-enum-column.md create mode 100644 docs/examples/tablesdb/update-float-column.md create mode 100644 docs/examples/tablesdb/update-integer-column.md create mode 100644 docs/examples/tablesdb/update-ip-column.md create mode 100644 docs/examples/tablesdb/update-relationship-column.md create mode 100644 docs/examples/tablesdb/update-row.md create mode 100644 docs/examples/tablesdb/update-rows.md create mode 100644 docs/examples/tablesdb/update-string-column.md create mode 100644 docs/examples/tablesdb/update-table.md create mode 100644 docs/examples/tablesdb/update-url-column.md create mode 100644 docs/examples/tablesdb/update.md create mode 100644 docs/examples/tablesdb/upsert-row.md create mode 100644 docs/examples/tablesdb/upsert-rows.md create mode 100644 lib/commands/tables-db.js create mode 100644 lib/commands/update.js rename scoop/{appwrite.json => appwrite.config.json} (88%) diff --git a/README.md b/README.md index 8a70dd4..ab30255 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Appwrite Command Line SDK ![License](https://img.shields.io/github/license/appwrite/sdk-for-cli.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.8.0-blue.svg?style=flat-square) [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) -**This SDK is compatible with Appwrite server version 1.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-cli/releases).** +**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-cli/releases).** Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Command Line SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) @@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using ```sh $ appwrite -v -8.3.0 +9.0.0 ``` ### Install using prebuilt binaries @@ -54,13 +54,13 @@ $ iwr -useb https://appwrite.io/cli/install.ps1 | iex ``` Via [Scoop](https://scoop.sh) ```powershell -$ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/scoop/appwrite.json +$ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/scoop/appwrite.config.json ``` Once the installation completes, you can verify your install using ``` $ appwrite -v -8.3.0 +9.0.0 ``` ## Getting Started diff --git a/docs/examples/databases/create.md b/docs/examples/databases/create.md index 9e75239..8317504 100644 --- a/docs/examples/databases/create.md +++ b/docs/examples/databases/create.md @@ -2,3 +2,4 @@ appwrite databases create \ --databaseId \ --name \ + diff --git a/docs/examples/databases/get-usage.md b/docs/examples/databases/get-usage.md index 53c85fc..9526345 100644 --- a/docs/examples/databases/get-usage.md +++ b/docs/examples/databases/get-usage.md @@ -1,2 +1,3 @@ appwrite databases getUsage \ + --databaseId \ diff --git a/docs/examples/databases/list-usage.md b/docs/examples/databases/list-usage.md new file mode 100644 index 0000000..aad19fd --- /dev/null +++ b/docs/examples/databases/list-usage.md @@ -0,0 +1,2 @@ +appwrite databases listUsage \ + diff --git a/docs/examples/migrations/create-csv-migration.md b/docs/examples/migrations/create-csv-migration.md index 594bc85..f80c9e9 100644 --- a/docs/examples/migrations/create-csv-migration.md +++ b/docs/examples/migrations/create-csv-migration.md @@ -1,4 +1,5 @@ appwrite migrations createCsvMigration \ --bucketId \ --fileId \ - --resourceId [ID1:ID2] + --resourceId [ID1:ID2] \ + diff --git a/docs/examples/projects/update-session-invalidation.md b/docs/examples/projects/update-session-invalidation.md new file mode 100644 index 0000000..21e8511 --- /dev/null +++ b/docs/examples/projects/update-session-invalidation.md @@ -0,0 +1,3 @@ +appwrite projects updateSessionInvalidation \ + --projectId \ + --enabled false diff --git a/docs/examples/tablesdb/create-boolean-column.md b/docs/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000..3e21a3a --- /dev/null +++ b/docs/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb createBooleanColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/tablesdb/create-datetime-column.md b/docs/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000..bee46cb --- /dev/null +++ b/docs/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb createDatetimeColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/tablesdb/create-email-column.md b/docs/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000..3d0d4d6 --- /dev/null +++ b/docs/examples/tablesdb/create-email-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb createEmailColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/tablesdb/create-enum-column.md b/docs/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000..6a8ea71 --- /dev/null +++ b/docs/examples/tablesdb/create-enum-column.md @@ -0,0 +1,8 @@ +appwrite tablesDb createEnumColumn \ + --databaseId \ + --tableId \ + --key '' \ + --elements one two three \ + --required false \ + + diff --git a/docs/examples/tablesdb/create-float-column.md b/docs/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000..a4f7b00 --- /dev/null +++ b/docs/examples/tablesdb/create-float-column.md @@ -0,0 +1,9 @@ +appwrite tablesDb createFloatColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/tablesdb/create-index.md b/docs/examples/tablesdb/create-index.md new file mode 100644 index 0000000..3da867e --- /dev/null +++ b/docs/examples/tablesdb/create-index.md @@ -0,0 +1,8 @@ +appwrite tablesDb createIndex \ + --databaseId \ + --tableId \ + --key '' \ + --type key \ + --columns one two three \ + + diff --git a/docs/examples/tablesdb/create-integer-column.md b/docs/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000..a5f9a7a --- /dev/null +++ b/docs/examples/tablesdb/create-integer-column.md @@ -0,0 +1,9 @@ +appwrite tablesDb createIntegerColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/tablesdb/create-ip-column.md b/docs/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000..aa93727 --- /dev/null +++ b/docs/examples/tablesdb/create-ip-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb createIpColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/tablesdb/create-relationship-column.md b/docs/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000..c7897d6 --- /dev/null +++ b/docs/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,9 @@ +appwrite tablesDb createRelationshipColumn \ + --databaseId \ + --tableId \ + --relatedTableId \ + --type oneToOne \ + + + + diff --git a/docs/examples/tablesdb/create-row.md b/docs/examples/tablesdb/create-row.md new file mode 100644 index 0000000..0a04030 --- /dev/null +++ b/docs/examples/tablesdb/create-row.md @@ -0,0 +1,6 @@ +appwrite tablesDb createRow \ + --databaseId \ + --tableId \ + --rowId \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/tablesdb/create-rows.md b/docs/examples/tablesdb/create-rows.md new file mode 100644 index 0000000..d8158ad --- /dev/null +++ b/docs/examples/tablesdb/create-rows.md @@ -0,0 +1,4 @@ +appwrite tablesDb createRows \ + --databaseId \ + --tableId \ + --rows one two three diff --git a/docs/examples/tablesdb/create-string-column.md b/docs/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000..e285015 --- /dev/null +++ b/docs/examples/tablesdb/create-string-column.md @@ -0,0 +1,9 @@ +appwrite tablesDb createStringColumn \ + --databaseId \ + --tableId \ + --key '' \ + --size 1 \ + --required false \ + + + diff --git a/docs/examples/tablesdb/create-table.md b/docs/examples/tablesdb/create-table.md new file mode 100644 index 0000000..9ae952a --- /dev/null +++ b/docs/examples/tablesdb/create-table.md @@ -0,0 +1,7 @@ +appwrite tablesDb createTable \ + --databaseId \ + --tableId \ + --name \ + + + diff --git a/docs/examples/tablesdb/create-url-column.md b/docs/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000..9d22982 --- /dev/null +++ b/docs/examples/tablesdb/create-url-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb createUrlColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/tablesdb/create.md b/docs/examples/tablesdb/create.md new file mode 100644 index 0000000..e9176db --- /dev/null +++ b/docs/examples/tablesdb/create.md @@ -0,0 +1,5 @@ +appwrite tablesDb create \ + --databaseId \ + --name \ + + diff --git a/docs/examples/tablesdb/decrement-row-column.md b/docs/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000..d232f98 --- /dev/null +++ b/docs/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb decrementRowColumn \ + --databaseId \ + --tableId \ + --rowId \ + --column '' \ + + diff --git a/docs/examples/tablesdb/delete-column.md b/docs/examples/tablesdb/delete-column.md new file mode 100644 index 0000000..a1e43d4 --- /dev/null +++ b/docs/examples/tablesdb/delete-column.md @@ -0,0 +1,4 @@ +appwrite tablesDb deleteColumn \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/tablesdb/delete-index.md b/docs/examples/tablesdb/delete-index.md new file mode 100644 index 0000000..ecd9afe --- /dev/null +++ b/docs/examples/tablesdb/delete-index.md @@ -0,0 +1,4 @@ +appwrite tablesDb deleteIndex \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/tablesdb/delete-row.md b/docs/examples/tablesdb/delete-row.md new file mode 100644 index 0000000..c9e849b --- /dev/null +++ b/docs/examples/tablesdb/delete-row.md @@ -0,0 +1,4 @@ +appwrite tablesDb deleteRow \ + --databaseId \ + --tableId \ + --rowId diff --git a/docs/examples/tablesdb/delete-rows.md b/docs/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000..f381316 --- /dev/null +++ b/docs/examples/tablesdb/delete-rows.md @@ -0,0 +1,4 @@ +appwrite tablesDb deleteRows \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/tablesdb/delete-table.md b/docs/examples/tablesdb/delete-table.md new file mode 100644 index 0000000..ae48ae5 --- /dev/null +++ b/docs/examples/tablesdb/delete-table.md @@ -0,0 +1,3 @@ +appwrite tablesDb deleteTable \ + --databaseId \ + --tableId diff --git a/docs/examples/tablesdb/delete.md b/docs/examples/tablesdb/delete.md new file mode 100644 index 0000000..a41c3ec --- /dev/null +++ b/docs/examples/tablesdb/delete.md @@ -0,0 +1,2 @@ +appwrite tablesDb delete \ + --databaseId diff --git a/docs/examples/tablesdb/get-column.md b/docs/examples/tablesdb/get-column.md new file mode 100644 index 0000000..1027098 --- /dev/null +++ b/docs/examples/tablesdb/get-column.md @@ -0,0 +1,4 @@ +appwrite tablesDb getColumn \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/tablesdb/get-index.md b/docs/examples/tablesdb/get-index.md new file mode 100644 index 0000000..cf5d2bd --- /dev/null +++ b/docs/examples/tablesdb/get-index.md @@ -0,0 +1,4 @@ +appwrite tablesDb getIndex \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/tablesdb/get-row.md b/docs/examples/tablesdb/get-row.md new file mode 100644 index 0000000..655c7d6 --- /dev/null +++ b/docs/examples/tablesdb/get-row.md @@ -0,0 +1,5 @@ +appwrite tablesDb getRow \ + --databaseId \ + --tableId \ + --rowId \ + diff --git a/docs/examples/tablesdb/get-table-usage.md b/docs/examples/tablesdb/get-table-usage.md new file mode 100644 index 0000000..3d2aab1 --- /dev/null +++ b/docs/examples/tablesdb/get-table-usage.md @@ -0,0 +1,4 @@ +appwrite tablesDb getTableUsage \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/tablesdb/get-table.md b/docs/examples/tablesdb/get-table.md new file mode 100644 index 0000000..60c3a5a --- /dev/null +++ b/docs/examples/tablesdb/get-table.md @@ -0,0 +1,3 @@ +appwrite tablesDb getTable \ + --databaseId \ + --tableId diff --git a/docs/examples/databases/get-database-usage.md b/docs/examples/tablesdb/get-usage.md similarity index 50% rename from docs/examples/databases/get-database-usage.md rename to docs/examples/tablesdb/get-usage.md index 1001e9c..90be79b 100644 --- a/docs/examples/databases/get-database-usage.md +++ b/docs/examples/tablesdb/get-usage.md @@ -1,3 +1,3 @@ -appwrite databases getDatabaseUsage \ +appwrite tablesDb getUsage \ --databaseId \ diff --git a/docs/examples/tablesdb/get.md b/docs/examples/tablesdb/get.md new file mode 100644 index 0000000..46cec46 --- /dev/null +++ b/docs/examples/tablesdb/get.md @@ -0,0 +1,2 @@ +appwrite tablesDb get \ + --databaseId diff --git a/docs/examples/tablesdb/increment-row-column.md b/docs/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000..317fe89 --- /dev/null +++ b/docs/examples/tablesdb/increment-row-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb incrementRowColumn \ + --databaseId \ + --tableId \ + --rowId \ + --column '' \ + + diff --git a/docs/examples/tablesdb/list-columns.md b/docs/examples/tablesdb/list-columns.md new file mode 100644 index 0000000..0f5812c --- /dev/null +++ b/docs/examples/tablesdb/list-columns.md @@ -0,0 +1,4 @@ +appwrite tablesDb listColumns \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/tablesdb/list-indexes.md b/docs/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000..a226483 --- /dev/null +++ b/docs/examples/tablesdb/list-indexes.md @@ -0,0 +1,4 @@ +appwrite tablesDb listIndexes \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/tablesdb/list-row-logs.md b/docs/examples/tablesdb/list-row-logs.md new file mode 100644 index 0000000..baa7e90 --- /dev/null +++ b/docs/examples/tablesdb/list-row-logs.md @@ -0,0 +1,5 @@ +appwrite tablesDb listRowLogs \ + --databaseId \ + --tableId \ + --rowId \ + diff --git a/docs/examples/tablesdb/list-rows.md b/docs/examples/tablesdb/list-rows.md new file mode 100644 index 0000000..496ba61 --- /dev/null +++ b/docs/examples/tablesdb/list-rows.md @@ -0,0 +1,4 @@ +appwrite tablesDb listRows \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/tablesdb/list-table-logs.md b/docs/examples/tablesdb/list-table-logs.md new file mode 100644 index 0000000..71647b2 --- /dev/null +++ b/docs/examples/tablesdb/list-table-logs.md @@ -0,0 +1,4 @@ +appwrite tablesDb listTableLogs \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/tablesdb/list-tables.md b/docs/examples/tablesdb/list-tables.md new file mode 100644 index 0000000..6d4eb7b --- /dev/null +++ b/docs/examples/tablesdb/list-tables.md @@ -0,0 +1,4 @@ +appwrite tablesDb listTables \ + --databaseId \ + + diff --git a/docs/examples/tablesdb/list-usage.md b/docs/examples/tablesdb/list-usage.md new file mode 100644 index 0000000..9622b7a --- /dev/null +++ b/docs/examples/tablesdb/list-usage.md @@ -0,0 +1,2 @@ +appwrite tablesDb listUsage \ + diff --git a/docs/examples/tablesdb/list.md b/docs/examples/tablesdb/list.md new file mode 100644 index 0000000..dd10ab3 --- /dev/null +++ b/docs/examples/tablesdb/list.md @@ -0,0 +1,3 @@ +appwrite tablesDb list \ + + diff --git a/docs/examples/tablesdb/update-boolean-column.md b/docs/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000..c3a2994 --- /dev/null +++ b/docs/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb updateBooleanColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default false \ + diff --git a/docs/examples/tablesdb/update-datetime-column.md b/docs/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000..301d5d2 --- /dev/null +++ b/docs/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb updateDatetimeColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/tablesdb/update-email-column.md b/docs/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000..d9fb449 --- /dev/null +++ b/docs/examples/tablesdb/update-email-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb updateEmailColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default email@example.com \ + diff --git a/docs/examples/tablesdb/update-enum-column.md b/docs/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000..f5879d1 --- /dev/null +++ b/docs/examples/tablesdb/update-enum-column.md @@ -0,0 +1,8 @@ +appwrite tablesDb updateEnumColumn \ + --databaseId \ + --tableId \ + --key '' \ + --elements one two three \ + --required false \ + --default \ + diff --git a/docs/examples/tablesdb/update-float-column.md b/docs/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000..9c6de6f --- /dev/null +++ b/docs/examples/tablesdb/update-float-column.md @@ -0,0 +1,9 @@ +appwrite tablesDb updateFloatColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/tablesdb/update-integer-column.md b/docs/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000..cf0d04e --- /dev/null +++ b/docs/examples/tablesdb/update-integer-column.md @@ -0,0 +1,9 @@ +appwrite tablesDb updateIntegerColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/tablesdb/update-ip-column.md b/docs/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000..81f5f93 --- /dev/null +++ b/docs/examples/tablesdb/update-ip-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb updateIpColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/tablesdb/update-relationship-column.md b/docs/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000..e079f77 --- /dev/null +++ b/docs/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,6 @@ +appwrite tablesDb updateRelationshipColumn \ + --databaseId \ + --tableId \ + --key '' \ + + diff --git a/docs/examples/tablesdb/update-row.md b/docs/examples/tablesdb/update-row.md new file mode 100644 index 0000000..891d91c --- /dev/null +++ b/docs/examples/tablesdb/update-row.md @@ -0,0 +1,6 @@ +appwrite tablesDb updateRow \ + --databaseId \ + --tableId \ + --rowId \ + + diff --git a/docs/examples/tablesdb/update-rows.md b/docs/examples/tablesdb/update-rows.md new file mode 100644 index 0000000..993c7a3 --- /dev/null +++ b/docs/examples/tablesdb/update-rows.md @@ -0,0 +1,5 @@ +appwrite tablesDb updateRows \ + --databaseId \ + --tableId \ + + diff --git a/docs/examples/tablesdb/update-string-column.md b/docs/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000..0d1d6de --- /dev/null +++ b/docs/examples/tablesdb/update-string-column.md @@ -0,0 +1,8 @@ +appwrite tablesDb updateStringColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default \ + + diff --git a/docs/examples/tablesdb/update-table.md b/docs/examples/tablesdb/update-table.md new file mode 100644 index 0000000..81eced6 --- /dev/null +++ b/docs/examples/tablesdb/update-table.md @@ -0,0 +1,7 @@ +appwrite tablesDb updateTable \ + --databaseId \ + --tableId \ + --name \ + + + diff --git a/docs/examples/tablesdb/update-url-column.md b/docs/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000..07be8e8 --- /dev/null +++ b/docs/examples/tablesdb/update-url-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb updateUrlColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default https://example.com \ + diff --git a/docs/examples/tablesdb/update.md b/docs/examples/tablesdb/update.md new file mode 100644 index 0000000..5b1d733 --- /dev/null +++ b/docs/examples/tablesdb/update.md @@ -0,0 +1,4 @@ +appwrite tablesDb update \ + --databaseId \ + --name \ + diff --git a/docs/examples/tablesdb/upsert-row.md b/docs/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000..c3a2633 --- /dev/null +++ b/docs/examples/tablesdb/upsert-row.md @@ -0,0 +1,6 @@ +appwrite tablesDb upsertRow \ + --databaseId \ + --tableId \ + --rowId \ + + diff --git a/docs/examples/tablesdb/upsert-rows.md b/docs/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000..42693ac --- /dev/null +++ b/docs/examples/tablesdb/upsert-rows.md @@ -0,0 +1,4 @@ +appwrite tablesDb upsertRows \ + --databaseId \ + --tableId \ + --rows one two three diff --git a/index.js b/index.js index bac9834..5b79e2e 100644 --- a/index.js +++ b/index.js @@ -10,6 +10,7 @@ const chalk = require("chalk"); const { version } = require("./package.json"); const { commandDescriptions, cliConfig } = require("./lib/parser"); const { client } = require("./lib/commands/generic"); +const { getLatestVersion, compareVersions } = require("./lib/utils"); const inquirer = require("inquirer"); const { login, logout, whoami, migrate, register } = require("./lib/commands/generic"); const { init } = require("./lib/commands/init"); @@ -17,6 +18,7 @@ const { types } = require("./lib/commands/types"); const { pull } = require("./lib/commands/pull"); const { run } = require("./lib/commands/run"); const { push, deploy } = require("./lib/commands/push"); +const { update } = require("./lib/commands/update"); const { account } = require("./lib/commands/account"); const { avatars } = require("./lib/commands/avatars"); const { console } = require("./lib/commands/console"); @@ -32,6 +34,7 @@ const { projects } = require("./lib/commands/projects"); const { proxy } = require("./lib/commands/proxy"); const { sites } = require("./lib/commands/sites"); const { storage } = require("./lib/commands/storage"); +const { tablesdb } = require("./lib/commands/tablesdb"); const { teams } = require("./lib/commands/teams"); const { tokens } = require("./lib/commands/tokens"); const { users } = require("./lib/commands/users"); @@ -39,6 +42,41 @@ const { vcs } = require("./lib/commands/vcs"); inquirer.registerPrompt('search-list', require('inquirer-search-list')); +/** + * Check for updates and show version information + */ +async function checkVersion() { + process.stdout.write(chalk.bold(`appwrite version ${version}`) + '\n'); + + try { + const latestVersion = await getLatestVersion(); + const comparison = compareVersions(version, latestVersion); + + if (comparison > 0) { + // Current version is older than latest + process.stdout.write(chalk.yellow(`\n⚠️ A newer version is available: ${chalk.bold(latestVersion)}`) + '\n'); + process.stdout.write(chalk.cyan(`💡 Run '${chalk.bold('appwrite update')}' to update to the latest version.`) + '\n'); + } else if (comparison === 0) { + process.stdout.write(chalk.green('\n✅ You are running the latest version!') + '\n'); + } else { + // Current version is newer than latest (pre-release/dev) + process.stdout.write(chalk.blue('\n🚀 You are running a pre-release or development version.') + '\n'); + } + } catch (error) { + // Silently fail version check, just show current version + process.stdout.write(chalk.gray('\n(Unable to check for updates)') + '\n'); + } +} + +// Intercept version flag before Commander.js processes it +if (process.argv.includes('-v') || process.argv.includes('--version')) { + (async () => { + await checkVersion(); + process.exit(0); + })(); + return; +} + program .description(commandDescriptions['main']) .configureHelp({ @@ -83,6 +121,7 @@ program .addCommand(types) .addCommand(deploy) .addCommand(run) + .addCommand(update) .addCommand(logout) .addCommand(account) .addCommand(avatars) @@ -99,6 +138,7 @@ program .addCommand(proxy) .addCommand(sites) .addCommand(storage) + .addCommand(tablesdb) .addCommand(teams) .addCommand(tokens) .addCommand(users) diff --git a/install.ps1 b/install.ps1 index 8e49237..d052cbd 100644 --- a/install.ps1 +++ b/install.ps1 @@ -13,8 +13,8 @@ # You can use "View source" of this page to see the full script. # REPO -$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/8.3.0/appwrite-cli-win-x64.exe" -$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/8.3.0/appwrite-cli-win-arm64.exe" +$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/9.0.0/appwrite-cli-win-x64.exe" +$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/9.0.0/appwrite-cli-win-arm64.exe" $APPWRITE_BINARY_NAME = "appwrite.exe" diff --git a/install.sh b/install.sh index e14bc63..1e11ebd 100644 --- a/install.sh +++ b/install.sh @@ -97,7 +97,7 @@ printSuccess() { downloadBinary() { echo "[2/4] Downloading executable for $OS ($ARCH) ..." - GITHUB_LATEST_VERSION="8.3.0" + GITHUB_LATEST_VERSION="9.0.0" GITHUB_FILE="appwrite-cli-${OS}-${ARCH}" GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE" diff --git a/lib/client.js b/lib/client.js index 89c3ccd..8701217 100644 --- a/lib/client.js +++ b/lib/client.js @@ -16,9 +16,9 @@ class Client { 'x-sdk-name': 'Command Line', 'x-sdk-platform': 'console', 'x-sdk-language': 'cli', - 'x-sdk-version': '8.3.0', - 'user-agent' : `AppwriteCLI/8.3.0 (${os.type()} ${os.version()}; ${os.arch()})`, - 'X-Appwrite-Response-Format' : '1.7.0', + 'x-sdk-version': '9.0.0', + 'user-agent' : `AppwriteCLI/9.0.0 (${os.type()} ${os.version()}; ${os.arch()})`, + 'X-Appwrite-Response-Format' : '1.8.0', }; } @@ -186,11 +186,6 @@ class Client { }, }), }); - - const warnings = response.headers.get('x-appwrite-warning'); - if (warnings) { - warnings.split(';').forEach((warning) => console.warn(warning)); - } } catch (error) { throw new AppwriteException(error.message); } diff --git a/lib/commands/account.js b/lib/commands/account.js index 25308c1..7d9e389 100644 --- a/lib/commands/account.js +++ b/lib/commands/account.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); @@ -1891,7 +1891,7 @@ account account .command(`update-magic-url-session`) - .description(`Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`) + .description(`[**DEPRECATED** - This command is deprecated.] Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`) .requiredOption(`--user-id `, `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.`) .requiredOption(`--secret `, `Valid verification token.`) .action(actionRunner(accountUpdateMagicURLSession)) @@ -1907,7 +1907,7 @@ account account .command(`update-phone-session`) - .description(`Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`) + .description(`[**DEPRECATED** - This command is deprecated.] Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`) .requiredOption(`--user-id `, `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.`) .requiredOption(`--secret `, `Valid verification token.`) .action(actionRunner(accountUpdatePhoneSession)) diff --git a/lib/commands/avatars.js b/lib/commands/avatars.js index c7abadb..5707995 100644 --- a/lib/commands/avatars.js +++ b/lib/commands/avatars.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); diff --git a/lib/commands/console.js b/lib/commands/console.js index 5b9d210..8fa5e22 100644 --- a/lib/commands/console.js +++ b/lib/commands/console.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); diff --git a/lib/commands/databases.js b/lib/commands/databases.js index 88c25fe..80fb1b0 100644 --- a/lib/commands/databases.js +++ b/lib/commands/databases.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); @@ -85,6 +85,7 @@ const databasesList = async ({queries,search,parseOutput = true, overrideForCli * @property {string} databaseId 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. * @property {string} name Database name. Max length: 128 chars. * @property {boolean} enabled 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. + * @property {Type} type Database type. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -93,7 +94,7 @@ const databasesList = async ({queries,search,parseOutput = true, overrideForCli /** * @param {DatabasesCreateRequestParams} params */ -const databasesCreate = async ({databaseId,name,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const databasesCreate = async ({databaseId,name,enabled,type,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/databases'; @@ -107,6 +108,9 @@ const databasesCreate = async ({databaseId,name,enabled,parseOutput = true, over if (typeof enabled !== 'undefined') { payload['enabled'] = enabled; } + if (typeof type !== 'undefined') { + payload['type'] = type; + } let response = undefined; @@ -123,17 +127,17 @@ const databasesCreate = async ({databaseId,name,enabled,parseOutput = true, over } /** - * @typedef {Object} DatabasesGetUsageRequestParams - * @property {DatabaseUsageRange} range 'Date range. + * @typedef {Object} DatabasesListUsageRequestParams + * @property {UsageRange} range Date range. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk */ /** - * @param {DatabasesGetUsageRequestParams} params + * @param {DatabasesListUsageRequestParams} params */ -const databasesGetUsage = async ({range,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const databasesListUsage = async ({range,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/databases/usage'; @@ -148,7 +152,11 @@ const databasesGetUsage = async ({range,parseOutput = true, overrideForCli = fal }, payload); if (parseOutput) { - parse(response) + if(console) { + showConsoleLink('databases', 'listUsage'); + } else { + parse(response) + } } return response; @@ -472,7 +480,7 @@ const databasesDeleteCollection = async ({databaseId,collectionId,parseOutput = /** * @typedef {Object} DatabasesListAttributesRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string[]} queries 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 * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -511,7 +519,7 @@ const databasesListAttributes = async ({databaseId,collectionId,queries,parseOut /** * @typedef {Object} DatabasesCreateBooleanAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? * @property {boolean} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. @@ -559,7 +567,7 @@ const databasesCreateBooleanAttribute = async ({databaseId,collectionId,key,requ /** * @typedef {Object} DatabasesUpdateBooleanAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? * @property {boolean} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. @@ -604,7 +612,7 @@ const databasesUpdateBooleanAttribute = async ({databaseId,collectionId,key,requ /** * @typedef {Object} DatabasesCreateDatetimeAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? * @property {string} xdefault Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required. @@ -652,7 +660,7 @@ const databasesCreateDatetimeAttribute = async ({databaseId,collectionId,key,req /** * @typedef {Object} DatabasesUpdateDatetimeAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. @@ -697,7 +705,7 @@ const databasesUpdateDatetimeAttribute = async ({databaseId,collectionId,key,req /** * @typedef {Object} DatabasesCreateEmailAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. @@ -745,11 +753,11 @@ const databasesCreateEmailAttribute = async ({databaseId,collectionId,key,requir /** * @typedef {Object} DatabasesUpdateEmailAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. - * @property {string} newKey New attribute key. + * @property {string} newKey New Attribute Key. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -790,9 +798,9 @@ const databasesUpdateEmailAttribute = async ({databaseId,collectionId,key,requir /** * @typedef {Object} DatabasesCreateEnumAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. - * @property {string[]} elements Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long. + * @property {string[]} elements Array of enum values. * @property {boolean} required Is attribute required? * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. * @property {boolean} array Is attribute an array? @@ -843,12 +851,12 @@ const databasesCreateEnumAttribute = async ({databaseId,collectionId,key,element /** * @typedef {Object} DatabasesUpdateEnumAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. - * @property {string[]} elements Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long. + * @property {string[]} elements Updated list of enum values. * @property {boolean} required Is attribute required? * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. - * @property {string} newKey New attribute key. + * @property {string} newKey New Attribute Key. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -893,12 +901,12 @@ const databasesUpdateEnumAttribute = async ({databaseId,collectionId,key,element /** * @typedef {Object} DatabasesCreateFloatAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? - * @property {number} min Minimum value to enforce on new documents - * @property {number} max Maximum value to enforce on new documents - * @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. + * @property {number} min Minimum value. + * @property {number} max Maximum value. + * @property {number} xdefault Default value. Cannot be set when required. * @property {boolean} array Is attribute an array? * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -949,13 +957,13 @@ const databasesCreateFloatAttribute = async ({databaseId,collectionId,key,requir /** * @typedef {Object} DatabasesUpdateFloatAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? - * @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. - * @property {number} min Minimum value to enforce on new documents - * @property {number} max Maximum value to enforce on new documents - * @property {string} newKey New attribute key. + * @property {number} xdefault Default value. Cannot be set when required. + * @property {number} min Minimum value. + * @property {number} max Maximum value. + * @property {string} newKey New Attribute Key. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1002,12 +1010,12 @@ const databasesUpdateFloatAttribute = async ({databaseId,collectionId,key,requir /** * @typedef {Object} DatabasesCreateIntegerAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? - * @property {number} min Minimum value to enforce on new documents - * @property {number} max Maximum value to enforce on new documents - * @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. + * @property {number} min Minimum value + * @property {number} max Maximum value + * @property {number} xdefault Default value. Cannot be set when attribute is required. * @property {boolean} array Is attribute an array? * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -1058,13 +1066,13 @@ const databasesCreateIntegerAttribute = async ({databaseId,collectionId,key,requ /** * @typedef {Object} DatabasesUpdateIntegerAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? - * @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. - * @property {number} min Minimum value to enforce on new documents - * @property {number} max Maximum value to enforce on new documents - * @property {string} newKey New attribute key. + * @property {number} xdefault Default value. Cannot be set when attribute is required. + * @property {number} min Minimum value + * @property {number} max Maximum value + * @property {string} newKey New Attribute Key. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1111,10 +1119,10 @@ const databasesUpdateIntegerAttribute = async ({databaseId,collectionId,key,requ /** * @typedef {Object} DatabasesCreateIpAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? - * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. + * @property {string} xdefault Default value. Cannot be set when attribute is required. * @property {boolean} array Is attribute an array? * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -1159,11 +1167,11 @@ const databasesCreateIpAttribute = async ({databaseId,collectionId,key,required, /** * @typedef {Object} DatabasesUpdateIpAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? - * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. - * @property {string} newKey New attribute key. + * @property {string} xdefault Default value. Cannot be set when attribute is required. + * @property {string} newKey New Attribute Key. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1204,8 +1212,8 @@ const databasesUpdateIpAttribute = async ({databaseId,collectionId,key,required, /** * @typedef {Object} DatabasesCreateRelationshipAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). - * @property {string} relatedCollectionId Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. + * @property {string} relatedCollectionId Related Collection ID. * @property {RelationshipType} type Relation type * @property {boolean} twoWay Is Two Way? * @property {string} key Attribute Key. @@ -1260,7 +1268,7 @@ const databasesCreateRelationshipAttribute = async ({databaseId,collectionId,rel /** * @typedef {Object} DatabasesCreateStringAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @property {string} key Attribute Key. * @property {number} size Attribute size for text attributes, in number of characters. * @property {boolean} required Is attribute required? @@ -1316,12 +1324,12 @@ const databasesCreateStringAttribute = async ({databaseId,collectionId,key,size, /** * @typedef {Object} DatabasesUpdateStringAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. * @property {number} size Maximum size of the string attribute. - * @property {string} newKey New attribute key. + * @property {string} newKey New Attribute Key. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1365,7 +1373,7 @@ const databasesUpdateStringAttribute = async ({databaseId,collectionId,key,requi /** * @typedef {Object} DatabasesCreateUrlAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. @@ -1413,11 +1421,11 @@ const databasesCreateUrlAttribute = async ({databaseId,collectionId,key,required /** * @typedef {Object} DatabasesUpdateUrlAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {boolean} required Is attribute required? * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required. - * @property {string} newKey New attribute key. + * @property {string} newKey New Attribute Key. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1458,7 +1466,7 @@ const databasesUpdateUrlAttribute = async ({databaseId,collectionId,key,required /** * @typedef {Object} DatabasesGetAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -1490,7 +1498,7 @@ const databasesGetAttribute = async ({databaseId,collectionId,key,parseOutput = /** * @typedef {Object} DatabasesDeleteAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -1523,10 +1531,10 @@ const databasesDeleteAttribute = async ({databaseId,collectionId,key,parseOutput /** * @typedef {Object} DatabasesUpdateRelationshipAttributeRequestParams * @property {string} databaseId Database ID. - * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @property {string} collectionId Collection ID. * @property {string} key Attribute Key. * @property {RelationMutate} onDelete Constraints option - * @property {string} newKey New attribute key. + * @property {string} newKey New Attribute Key. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1996,7 +2004,7 @@ const databasesListDocumentLogs = async ({databaseId,collectionId,documentId,que * @property {string} collectionId Collection ID. * @property {string} documentId Document ID. * @property {string} attribute Attribute key. - * @property {number} value Value to decrement the attribute by. The value must be a number. + * @property {number} value Value to increment the attribute by. The value must be a number. * @property {number} min Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -2272,7 +2280,7 @@ const databasesListCollectionLogs = async ({databaseId,collectionId,queries,pars * @typedef {Object} DatabasesGetCollectionUsageRequestParams * @property {string} databaseId Database ID. * @property {string} collectionId Collection ID. - * @property {DatabaseUsageRange} range Date range. + * @property {UsageRange} range Date range. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -2338,18 +2346,18 @@ const databasesListLogs = async ({databaseId,queries,parseOutput = true, overrid } /** - * @typedef {Object} DatabasesGetDatabaseUsageRequestParams + * @typedef {Object} DatabasesGetUsageRequestParams * @property {string} databaseId Database ID. - * @property {DatabaseUsageRange} range 'Date range. + * @property {UsageRange} range Date range. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk */ /** - * @param {DatabasesGetDatabaseUsageRequestParams} params + * @param {DatabasesGetUsageRequestParams} params */ -const databasesGetDatabaseUsage = async ({databaseId,range,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const databasesGetUsage = async ({databaseId,range,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/databases/{databaseId}/usage'.replace('{databaseId}', databaseId); @@ -2364,11 +2372,7 @@ const databasesGetDatabaseUsage = async ({databaseId,range,parseOutput = true, o }, payload); if (parseOutput) { - if(console) { - showConsoleLink('databases', 'getDatabaseUsage', databaseId); - } else { - parse(response) - } + parse(response) } return response; @@ -2377,7 +2381,7 @@ const databasesGetDatabaseUsage = async ({databaseId,range,parseOutput = true, o databases .command(`list`) - .description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list' instead] Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`) .option(`--queries [queries...]`, `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`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option(`--console`, `Get the resource console url`) @@ -2385,28 +2389,30 @@ databases databases .command(`create`) - .description(`Create a new Database. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-database' instead] Create a new Database. `) .requiredOption(`--database-id `, `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.`) .requiredOption(`--name `, `Database name. Max length: 128 chars.`) .option(`--enabled [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) + .option(`--type `, `Database type.`) .action(actionRunner(databasesCreate)) databases - .command(`get-usage`) - .description(`Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`) - .option(`--range `, `'Date range.`) - .action(actionRunner(databasesGetUsage)) + .command(`list-usage`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-usage' instead] 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.`) + .option(`--range `, `Date range.`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(databasesListUsage)) databases .command(`get`) - .description(`Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get' instead] Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.`) .requiredOption(`--database-id `, `Database ID.`) .option(`--console`, `Get the resource console url`) .action(actionRunner(databasesGet)) databases .command(`update`) - .description(`Update a database by its unique ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update' instead] Update a database by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--name `, `Database name. Max length: 128 chars.`) .option(`--enabled [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) @@ -2414,13 +2420,13 @@ databases databases .command(`delete`) - .description(`Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete' instead] Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.`) .requiredOption(`--database-id `, `Database ID.`) .action(actionRunner(databasesDelete)) databases .command(`list-collections`) - .description(`Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-tables' instead] Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.`) .requiredOption(`--database-id `, `Database ID.`) .option(`--queries [queries...]`, `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, documentSecurity`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) @@ -2429,7 +2435,7 @@ databases databases .command(`create-collection`) - .description(`Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-table' instead] Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `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.`) .requiredOption(`--name `, `Collection name. Max length: 128 chars.`) @@ -2440,7 +2446,7 @@ databases databases .command(`get-collection`) - .description(`Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-table' instead] Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .option(`--console`, `Get the resource console url`) @@ -2448,7 +2454,7 @@ databases databases .command(`update-collection`) - .description(`Update a collection by its unique ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-table' instead] Update a collection by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--name `, `Collection name. Max length: 128 chars.`) @@ -2459,25 +2465,25 @@ databases databases .command(`delete-collection`) - .description(`Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete-table' instead] Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .action(actionRunner(databasesDeleteCollection)) databases .command(`list-attributes`) - .description(`List attributes in the collection.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-columns' instead] List attributes in the collection.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .option(`--queries [queries...]`, `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`) .option(`--console`, `Get the resource console url`) .action(actionRunner(databasesListAttributes)) databases .command(`create-boolean-attribute`) - .description(`Create a boolean attribute. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-boolean-column' instead] Create a boolean attribute. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault [value]`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, (value) => value === undefined ? true : parseBool(value)) @@ -2486,9 +2492,9 @@ databases databases .command(`update-boolean-attribute`) - .description(`Update a boolean attribute. Changing the 'default' value will not update already existing documents.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-boolean-column' instead] Update a boolean attribute. Changing the 'default' value will not update already existing documents.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault [value]`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, (value) => value === undefined ? true : parseBool(value)) @@ -2497,9 +2503,9 @@ databases databases .command(`create-datetime-attribute`) - .description(`Create a date time attribute according to the ISO 8601 standard.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-datetime-column' instead] Create a date time attribute according to the ISO 8601 standard.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.`) @@ -2508,9 +2514,9 @@ databases databases .command(`update-datetime-attribute`) - .description(`Update a date time attribute. Changing the 'default' value will not update already existing documents.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-datetime-column' instead] Update a date time attribute. Changing the 'default' value will not update already existing documents.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) @@ -2519,9 +2525,9 @@ databases databases .command(`create-email-attribute`) - .description(`Create an email attribute. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-email-column' instead] Create an email attribute. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) @@ -2530,22 +2536,22 @@ databases databases .command(`update-email-attribute`) - .description(`Update an email attribute. Changing the 'default' value will not update already existing documents. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-email-column' instead] Update an email attribute. Changing the 'default' value will not update already existing documents. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) - .option(`--new-key `, `New attribute key.`) + .option(`--new-key `, `New Attribute Key.`) .action(actionRunner(databasesUpdateEmailAttribute)) databases .command(`create-enum-attribute`) - .description(`Create an enumeration attribute. The 'elements' param acts as a white-list of accepted values for this attribute. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-enum-column' instead] Create an enum attribute. The 'elements' param acts as a white-list of accepted values for this attribute. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) - .requiredOption(`--elements [elements...]`, `Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.`) + .requiredOption(`--elements [elements...]`, `Array of enum values.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) .option(`--array [value]`, `Is attribute an array?`, (value) => value === undefined ? true : parseBool(value)) @@ -2553,96 +2559,96 @@ databases databases .command(`update-enum-attribute`) - .description(`Update an enum attribute. Changing the 'default' value will not update already existing documents. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-enum-column' instead] Update an enum attribute. Changing the 'default' value will not update already existing documents. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) - .requiredOption(`--elements [elements...]`, `Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.`) + .requiredOption(`--elements [elements...]`, `Updated list of enum values.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) - .option(`--new-key `, `New attribute key.`) + .option(`--new-key `, `New Attribute Key.`) .action(actionRunner(databasesUpdateEnumAttribute)) databases .command(`create-float-attribute`) - .description(`Create a float attribute. Optionally, minimum and maximum values can be provided. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-float-column' instead] Create a float attribute. Optionally, minimum and maximum values can be provided. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) - .option(`--min `, `Minimum value to enforce on new documents`, parseInteger) - .option(`--max `, `Maximum value to enforce on new documents`, parseInteger) - .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger) + .option(`--min `, `Minimum value.`, parseInteger) + .option(`--max `, `Maximum value.`, parseInteger) + .option(`--xdefault `, `Default value. Cannot be set when required.`, parseInteger) .option(`--array [value]`, `Is attribute an array?`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(databasesCreateFloatAttribute)) databases .command(`update-float-attribute`) - .description(`Update a float attribute. Changing the 'default' value will not update already existing documents. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-float-column' instead] Update a float attribute. Changing the 'default' value will not update already existing documents. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) - .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger) - .option(`--min `, `Minimum value to enforce on new documents`, parseInteger) - .option(`--max `, `Maximum value to enforce on new documents`, parseInteger) - .option(`--new-key `, `New attribute key.`) + .option(`--xdefault `, `Default value. Cannot be set when required.`, parseInteger) + .option(`--min `, `Minimum value.`, parseInteger) + .option(`--max `, `Maximum value.`, parseInteger) + .option(`--new-key `, `New Attribute Key.`) .action(actionRunner(databasesUpdateFloatAttribute)) databases .command(`create-integer-attribute`) - .description(`Create an integer attribute. Optionally, minimum and maximum values can be provided. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-integer-column' instead] Create an integer attribute. Optionally, minimum and maximum values can be provided. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) - .option(`--min `, `Minimum value to enforce on new documents`, parseInteger) - .option(`--max `, `Maximum value to enforce on new documents`, parseInteger) - .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger) + .option(`--min `, `Minimum value`, parseInteger) + .option(`--max `, `Maximum value`, parseInteger) + .option(`--xdefault `, `Default value. Cannot be set when attribute is required.`, parseInteger) .option(`--array [value]`, `Is attribute an array?`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(databasesCreateIntegerAttribute)) databases .command(`update-integer-attribute`) - .description(`Update an integer attribute. Changing the 'default' value will not update already existing documents. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-integer-column' instead] Update an integer attribute. Changing the 'default' value will not update already existing documents. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) - .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger) - .option(`--min `, `Minimum value to enforce on new documents`, parseInteger) - .option(`--max `, `Maximum value to enforce on new documents`, parseInteger) - .option(`--new-key `, `New attribute key.`) + .option(`--xdefault `, `Default value. Cannot be set when attribute is required.`, parseInteger) + .option(`--min `, `Minimum value`, parseInteger) + .option(`--max `, `Maximum value`, parseInteger) + .option(`--new-key `, `New Attribute Key.`) .action(actionRunner(databasesUpdateIntegerAttribute)) databases .command(`create-ip-attribute`) - .description(`Create IP address attribute. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-ip-column' instead] Create IP address attribute. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) - .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) + .option(`--xdefault `, `Default value. Cannot be set when attribute is required.`) .option(`--array [value]`, `Is attribute an array?`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(databasesCreateIpAttribute)) databases .command(`update-ip-attribute`) - .description(`Update an ip attribute. Changing the 'default' value will not update already existing documents. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-ip-column' instead] Update an ip attribute. Changing the 'default' value will not update already existing documents. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) - .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) - .option(`--new-key `, `New attribute key.`) + .option(`--xdefault `, `Default value. Cannot be set when attribute is required.`) + .option(`--new-key `, `New Attribute Key.`) .action(actionRunner(databasesUpdateIpAttribute)) databases .command(`create-relationship-attribute`) - .description(`Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-relationship-column' instead] Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) - .requiredOption(`--related-collection-id `, `Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) + .requiredOption(`--related-collection-id `, `Related Collection ID.`) .requiredOption(`--type `, `Relation type`) .option(`--two-way [value]`, `Is Two Way?`, (value) => value === undefined ? true : parseBool(value)) .option(`--key `, `Attribute Key.`) @@ -2652,9 +2658,9 @@ databases databases .command(`create-string-attribute`) - .description(`Create a string attribute. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-string-column' instead] Create a string attribute. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--size `, `Attribute size for text attributes, in number of characters.`, parseInteger) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) @@ -2665,21 +2671,21 @@ databases databases .command(`update-string-attribute`) - .description(`Update a string attribute. Changing the 'default' value will not update already existing documents. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-string-column' instead] Update a string attribute. Changing the 'default' value will not update already existing documents. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) .option(`--size `, `Maximum size of the string attribute.`, parseInteger) - .option(`--new-key `, `New attribute key.`) + .option(`--new-key `, `New Attribute Key.`) .action(actionRunner(databasesUpdateStringAttribute)) databases .command(`create-url-attribute`) - .description(`Create a URL attribute. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-url-column' instead] Create a URL attribute. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) @@ -2688,44 +2694,44 @@ databases databases .command(`update-url-attribute`) - .description(`Update an url attribute. Changing the 'default' value will not update already existing documents. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-url-column' instead] Update an url attribute. Changing the 'default' value will not update already existing documents. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) - .option(`--new-key `, `New attribute key.`) + .option(`--new-key `, `New Attribute Key.`) .action(actionRunner(databasesUpdateUrlAttribute)) databases .command(`get-attribute`) - .description(`Get attribute by ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-column' instead] Get attribute by ID.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .action(actionRunner(databasesGetAttribute)) databases .command(`delete-attribute`) - .description(`Deletes an attribute.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete-column' instead] Deletes an attribute.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .action(actionRunner(databasesDeleteAttribute)) databases .command(`update-relationship-attribute`) - .description(`Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-relationship-column' instead] Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--key `, `Attribute Key.`) .option(`--on-delete `, `Constraints option`) - .option(`--new-key `, `New attribute key.`) + .option(`--new-key `, `New Attribute Key.`) .action(actionRunner(databasesUpdateRelationshipAttribute)) databases .command(`list-documents`) - .description(`Get a list of all the user's documents in a given collection. You can use the query params to filter your results.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-rows' instead] Get a list of all the user's documents in a given collection. You can use the query params to filter your results.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .option(`--queries [queries...]`, `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.`) @@ -2734,7 +2740,7 @@ databases databases .command(`create-document`) - .description(`Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-row' instead] 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.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.`) .requiredOption(`--document-id `, `Document ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) @@ -2744,7 +2750,7 @@ databases databases .command(`create-documents`) - .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. Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-rows' instead] 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.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.`) .requiredOption(`--documents [documents...]`, `Array of documents data as JSON objects.`) @@ -2752,7 +2758,7 @@ databases databases .command(`upsert-documents`) - .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. 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. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db upsert-rows' instead] 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. `) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--documents [documents...]`, `Array of document data as JSON objects. May contain partial documents.`) @@ -2760,7 +2766,7 @@ databases databases .command(`update-documents`) - .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. Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-rows' instead] 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.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .option(`--data `, `Document data as JSON object. Include only attribute and value pairs to be updated.`) @@ -2769,7 +2775,7 @@ databases databases .command(`delete-documents`) - .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. Bulk delete documents using queries, if no queries are passed then all documents are deleted.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete-rows' instead] Bulk delete documents using queries, if no queries are passed then all documents are deleted.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .option(`--queries [queries...]`, `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.`) @@ -2777,7 +2783,7 @@ databases databases .command(`get-document`) - .description(`Get a document by its unique ID. This endpoint response returns a JSON object with the document data.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-row' instead] Get a document by its unique ID. This endpoint response returns a JSON object with the document data.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--document-id `, `Document ID.`) @@ -2787,7 +2793,7 @@ databases databases .command(`upsert-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. Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db upsert-row' instead] 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.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--document-id `, `Document ID.`) @@ -2797,7 +2803,7 @@ databases databases .command(`update-document`) - .description(`Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-row' instead] Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--document-id `, `Document ID.`) @@ -2807,7 +2813,7 @@ databases databases .command(`delete-document`) - .description(`Delete a document by its unique ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete-row' instead] Delete a document by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--document-id `, `Document ID.`) @@ -2815,7 +2821,7 @@ databases databases .command(`list-document-logs`) - .description(`Get the document activity logs list by its unique ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-row-logs' instead] Get the document activity logs list by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--document-id `, `Document ID.`) @@ -2824,18 +2830,18 @@ databases databases .command(`decrement-document-attribute`) - .description(`Decrement a specific attribute of a document by a given value.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db decrement-row-column' instead] Decrement a specific attribute of a document by a given value.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--document-id `, `Document ID.`) .requiredOption(`--attribute `, `Attribute key.`) - .option(`--value `, `Value to decrement the attribute by. The value must be a number.`, parseInteger) + .option(`--value `, `Value to increment the attribute by. The value must be a number.`, parseInteger) .option(`--min `, `Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.`, parseInteger) .action(actionRunner(databasesDecrementDocumentAttribute)) databases .command(`increment-document-attribute`) - .description(`Increment a specific attribute of a document by a given value.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db increment-row-column' instead] Increment a specific attribute of a document by a given value.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--document-id `, `Document ID.`) @@ -2846,7 +2852,7 @@ databases databases .command(`list-indexes`) - .description(`List indexes in the collection.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-indexes' instead] List indexes in the collection.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .option(`--queries [queries...]`, `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`) @@ -2855,7 +2861,7 @@ databases databases .command(`create-index`) - .description(`Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. Attributes can be 'key', 'fulltext', and 'unique'.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-index' instead] Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. Attributes can be 'key', 'fulltext', and 'unique'.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Index Key.`) @@ -2867,7 +2873,7 @@ databases databases .command(`get-index`) - .description(`Get index by ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-index' instead] Get index by ID.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Index Key.`) @@ -2875,7 +2881,7 @@ databases databases .command(`delete-index`) - .description(`Delete an index.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete-index' instead] Delete an index.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Index Key.`) @@ -2883,7 +2889,7 @@ databases databases .command(`list-collection-logs`) - .description(`Get the collection activity logs list by its unique ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-table-logs' instead] Get the collection activity logs list by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .option(`--queries [queries...]`, `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`) @@ -2891,7 +2897,7 @@ databases databases .command(`get-collection-usage`) - .description(`Get usage metrics and statistics for a collection. Returning the total number of documents. 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(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-table-usage' instead] Get usage metrics and statistics for a collection. Returning the total number of documents. 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.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .option(`--range `, `Date range.`) @@ -2899,24 +2905,23 @@ databases databases .command(`list-logs`) - .description(`Get the database activity logs list by its unique ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-database-logs' instead] Get the database activity logs list by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) .option(`--queries [queries...]`, `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`) .action(actionRunner(databasesListLogs)) databases - .command(`get-database-usage`) - .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.`) + .command(`get-usage`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-usage' instead] 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.`) .requiredOption(`--database-id `, `Database ID.`) - .option(`--range `, `'Date range.`) - .option(`--console`, `Get the resource console url`) - .action(actionRunner(databasesGetDatabaseUsage)) + .option(`--range `, `Date range.`) + .action(actionRunner(databasesGetUsage)) module.exports = { databases, databasesList, databasesCreate, - databasesGetUsage, + databasesListUsage, databasesGet, databasesUpdate, databasesDelete, @@ -2968,5 +2973,5 @@ module.exports = { databasesListCollectionLogs, databasesGetCollectionUsage, databasesListLogs, - databasesGetDatabaseUsage + databasesGetUsage }; diff --git a/lib/commands/functions.js b/lib/commands/functions.js index ffc50fe..8d4e384 100644 --- a/lib/commands/functions.js +++ b/lib/commands/functions.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); @@ -332,7 +332,7 @@ const functionsGetTemplate = async ({templateId,parseOutput = true, overrideForC /** * @typedef {Object} FunctionsListUsageRequestParams - * @property {FunctionUsageRange} range Date range. + * @property {UsageRange} range Date range. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1222,7 +1222,7 @@ const functionsDeleteExecution = async ({functionId,executionId,parseOutput = tr /** * @typedef {Object} FunctionsGetUsageRequestParams * @property {string} functionId Function ID. - * @property {FunctionUsageRange} range Date range. + * @property {UsageRange} range Date range. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk diff --git a/lib/commands/graphql.js b/lib/commands/graphql.js index c3c6c0c..6970756 100644 --- a/lib/commands/graphql.js +++ b/lib/commands/graphql.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); diff --git a/lib/commands/health.js b/lib/commands/health.js index 5422e2a..9867c22 100644 --- a/lib/commands/health.js +++ b/lib/commands/health.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); diff --git a/lib/commands/init.js b/lib/commands/init.js index b3d8a92..7cbfd43 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -117,7 +117,7 @@ const initProject = async ({ organizationId, projectId, projectName } = {}) => { } } - success(`Project successfully ${answers.start === 'existing' ? 'linked' : 'created'}. Details are now stored in appwrite.json file.`); + success(`Project successfully ${answers.start === 'existing' ? 'linked' : 'created'}. Details are now stored in appwrite.config.json file.`); if(answers.start === 'existing') { answers = await inquirer.prompt(questionsInitProjectAutopull); diff --git a/lib/commands/locale.js b/lib/commands/locale.js index 1bd2681..fcfb022 100644 --- a/lib/commands/locale.js +++ b/lib/commands/locale.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); diff --git a/lib/commands/messaging.js b/lib/commands/messaging.js index 2949a07..f1c4867 100644 --- a/lib/commands/messaging.js +++ b/lib/commands/messaging.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); diff --git a/lib/commands/migrations.js b/lib/commands/migrations.js index 41d4670..0e43f5d 100644 --- a/lib/commands/migrations.js +++ b/lib/commands/migrations.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); @@ -173,6 +173,7 @@ const migrationsGetAppwriteReport = async ({resources,endpoint,projectID,key,par * @property {string} bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @property {string} fileId File ID. * @property {string} resourceId Composite ID in the format {databaseId:collectionId}, identifying a collection within a database. + * @property {boolean} internalFile Is the file stored in an internal bucket? * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -181,7 +182,7 @@ const migrationsGetAppwriteReport = async ({resources,endpoint,projectID,key,par /** * @param {MigrationsCreateCsvMigrationRequestParams} params */ -const migrationsCreateCsvMigration = async ({bucketId,fileId,resourceId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const migrationsCreateCsvMigration = async ({bucketId,fileId,resourceId,internalFile,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/migrations/csv'; @@ -195,6 +196,9 @@ const migrationsCreateCsvMigration = async ({bucketId,fileId,resourceId,parseOut if (typeof resourceId !== 'undefined') { payload['resourceId'] = resourceId; } + if (typeof internalFile !== 'undefined') { + payload['internalFile'] = internalFile; + } let response = undefined; @@ -649,6 +653,7 @@ migrations .requiredOption(`--bucket-id `, `Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`) .requiredOption(`--file-id `, `File ID.`) .requiredOption(`--resource-id `, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.`) + .option(`--internal-file [value]`, `Is the file stored in an internal bucket?`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(migrationsCreateCsvMigration)) migrations diff --git a/lib/commands/project.js b/lib/commands/project.js index f162089..950c5cb 100644 --- a/lib/commands/project.js +++ b/lib/commands/project.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); diff --git a/lib/commands/projects.js b/lib/commands/projects.js index bee0765..5314134 100644 --- a/lib/commands/projects.js +++ b/lib/commands/projects.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); @@ -696,6 +696,41 @@ const projectsUpdateSessionAlerts = async ({projectId,alerts,parseOutput = true, } +/** + * @typedef {Object} ProjectsUpdateSessionInvalidationRequestParams + * @property {string} projectId Project unique ID. + * @property {boolean} enabled Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {ProjectsUpdateSessionInvalidationRequestParams} params + */ +const projectsUpdateSessionInvalidation = async ({projectId,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForConsole() : + sdk; + let apiPath = '/projects/{projectId}/auth/session-invalidation'.replace('{projectId}', projectId); + let payload = {}; + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} ProjectsUpdateAuthStatusRequestParams * @property {string} projectId Project unique ID. @@ -2246,6 +2281,13 @@ projects .requiredOption(`--alerts [value]`, `Set to true to enable session emails.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(projectsUpdateSessionAlerts)) +projects + .command(`update-session-invalidation`) + .description(`Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.`) + .requiredOption(`--project-id `, `Project unique ID.`) + .requiredOption(`--enabled [value]`, `Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(projectsUpdateSessionInvalidation)) + projects .command(`update-auth-status`) .description(`Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. `) @@ -2577,6 +2619,7 @@ module.exports = { projectsUpdateAuthPasswordHistory, projectsUpdatePersonalDataCheck, projectsUpdateSessionAlerts, + projectsUpdateSessionInvalidation, projectsUpdateAuthStatus, projectsListDevKeys, projectsCreateDevKey, diff --git a/lib/commands/proxy.js b/lib/commands/proxy.js index 555408d..008b186 100644 --- a/lib/commands/proxy.js +++ b/lib/commands/proxy.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); diff --git a/lib/commands/pull.js b/lib/commands/pull.js index 573a252..79de142 100644 --- a/lib/commands/pull.js +++ b/lib/commands/pull.js @@ -9,6 +9,7 @@ const { projectsGet } = require("./projects"); const { functionsList, functionsGetDeploymentDownload, functionsListDeployments } = require("./functions"); const { sitesList, sitesGetDeploymentDownload, sitesListDeployments } = require("./sites"); const { databasesGet, databasesListCollections, databasesList } = require("./databases"); +const { gridsListDatabases, gridsGetDatabase, gridsListTables } = require("./grids"); const { storageListBuckets } = require("./storage"); const { localConfig } = require("../config"); const { paginate } = require("../paginate"); @@ -21,6 +22,7 @@ const pullResources = async () => { functions: pullFunctions, sites: pullSites, collections: pullCollection, + tables: pullTable, buckets: pullBucket, teams: pullTeam, messages: pullMessagingTopic @@ -285,6 +287,7 @@ const pullSites = async ({ code, withVariables }) => { } const pullCollection = async () => { + warn("appwrite pull collection has been deprecated. Please consider using 'appwrite pull tables' instead"); log("Fetching collections ..."); let total = 0; @@ -336,6 +339,58 @@ const pullCollection = async () => { success(`Successfully pulled ${chalk.bold(total)} collections.`); } +const pullTable = async () => { + log("Fetching tables ..."); + let total = 0; + + const fetchResponse = await gridsListDatabases({ + queries: [JSON.stringify({ method: 'limit', values: [1] })], + parseOutput: false + }); + if (fetchResponse["databases"].length <= 0) { + log("No tables found."); + success(`Successfully pulled ${chalk.bold(total)} tables.`); + return; + } + + let databases = cliConfig.ids; + + if (databases.length === 0) { + if (cliConfig.all) { + databases = (await paginate(gridsListDatabases, { parseOutput: false }, 100, 'databases')).databases.map(database => database.$id); + } else { + databases = (await inquirer.prompt(questionsPullCollection)).databases; + } + } + + for (const databaseId of databases) { + const database = await gridsGetDatabase({ + databaseId, + parseOutput: false + }); + + total++; + log(`Pulling all tables from ${chalk.bold(database['name'])} database ...`); + + localConfig.addDatabase(database); + + const { tables } = await paginate(gridsListTables, { + databaseId, + parseOutput: false + }, 100, 'tables'); + + for (const table of tables) { + localConfig.addTable({ + ...table, + '$createdAt': undefined, + '$updatedAt': undefined + }); + } + } + + success(`Successfully pulled ${chalk.bold(total)} tables.`); +} + const pullBucket = async () => { log("Fetching buckets ..."); let total = 0; @@ -447,9 +502,15 @@ pull pull .command("collection") .alias("collections") - .description("Pull your Appwrite collections") + .description("Pull your Appwrite collections (deprecated, please use 'pull tables' instead)") .action(actionRunner(pullCollection)) +pull + .command("table") + .alias("tables") + .description("Pull your Appwrite tables") + .action(actionRunner(pullTable)) + pull .command("bucket") .alias("buckets") diff --git a/lib/commands/push.js b/lib/commands/push.js index 03fd7d8..87a7b5f 100644 --- a/lib/commands/push.js +++ b/lib/commands/push.js @@ -6,10 +6,10 @@ const inquirer = require("inquirer"); const JSONbig = require("json-bigint")({ storeAsString: false }); const { Command } = require("commander"); const ID = require("../id"); -const { localConfig, globalConfig, KeysAttributes, KeysFunction, KeysSite, whitelistKeys, KeysTopics, KeysStorage, KeysTeams, KeysCollection } = require("../config"); +const { localConfig, globalConfig, KeysAttributes, KeysFunction, KeysSite, whitelistKeys, KeysTopics, KeysStorage, KeysTeams, KeysCollection, KeysTable } = require("../config"); const { Spinner, SPINNER_ARC, SPINNER_DOTS } = require('../spinner'); const { paginate } = require('../paginate'); -const { questionsPushBuckets, questionsPushTeams, questionsPushFunctions, questionsPushSites, questionsGetEntrypoint, questionsPushCollections, questionPushChanges, questionPushChangesConfirmation, questionsPushMessagingTopics, questionsPushResources } = require("../questions"); +const { questionsPushBuckets, questionsPushTeams, questionsPushFunctions, questionsPushSites, questionsGetEntrypoint, questionsPushCollections, questionsPushTables, questionPushChanges, questionPushChangesConfirmation, questionsPushMessagingTopics, questionsPushResources } = require("../questions"); const { cliConfig, actionRunner, success, warn, log, hint, error, commandDescriptions, drawTable } = require("../parser"); const { proxyCreateFunctionRule, proxyCreateSiteRule, proxyListRules } = require('./proxy'); const { consoleVariables } = require('./console'); @@ -49,6 +49,10 @@ const { databasesListIndexes, databasesUpdateCollection } = require("./databases"); +const { + gridsGetDatabase, + gridsGetTable +} = require("./grids"); const { storageGetBucket, storageUpdateBucket, storageCreateBucket } = require("./storage"); @@ -792,7 +796,7 @@ const generateChangesObject = (attribute, collection, isAdding) => { return { key: `${chalk.yellow(attribute.key)} in ${collection.name} (${collection['$id']})`, attribute: attribute, - reason: isAdding ? 'Field isn\'t present on the remote server' : 'Field isn\'t present on the appwrite.json file', + reason: isAdding ? 'Field isn\'t present on the remote server' : 'Field isn\'t present on the appwrite.config.json file', action: isAdding ? chalk.green('adding') : chalk.red('deleting') }; @@ -919,6 +923,7 @@ const pushResources = async () => { functions: pushFunction, sites: pushSite, collections: pushCollection, + tables: pushTable, buckets: pushBucket, teams: pushTeam, messages: pushMessagingTopic @@ -1094,7 +1099,7 @@ const pushSite = async({ siteId, async, code, withVariables } = { returnOnZero: await Promise.all(sites.map(async (site) => { let response = {}; - const ignore = site.ignore ? 'appwrite.json' : '.gitignore'; + const ignore = site.ignore ? 'appwrite.config.json' : '.gitignore'; let siteExists = false; let deploymentCreated = false; @@ -1109,7 +1114,7 @@ const pushSite = async({ siteId, async, code, withVariables } = { returnOnZero: }); siteExists = true; if (response.framework !== site.framework) { - updaterRow.fail({ errorMessage: `Framework mismatch! (local=${site.framework},remote=${response.framework}) Please delete remote site or update your appwrite.json` }) + updaterRow.fail({ errorMessage: `Framework mismatch! (local=${site.framework},remote=${response.framework}) Please delete remote site or update your appwrite.config.json` }) return; } @@ -1417,7 +1422,7 @@ const pushFunction = async ({ functionId, async, code, withVariables } = { retur await Promise.all(functions.map(async (func) => { let response = {}; - const ignore = func.ignore ? 'appwrite.json' : '.gitignore'; + const ignore = func.ignore ? 'appwrite.config.json' : '.gitignore'; let functionExists = false; let deploymentCreated = false; @@ -1431,7 +1436,7 @@ const pushFunction = async ({ functionId, async, code, withVariables } = { retur }); functionExists = true; if (response.runtime !== func.runtime) { - updaterRow.fail({ errorMessage: `Runtime mismatch! (local=${func.runtime},remote=${response.runtime}) Please delete remote function or update your appwrite.json` }) + updaterRow.fail({ errorMessage: `Runtime mismatch! (local=${func.runtime},remote=${response.runtime}) Please delete remote function or update your appwrite.config.json` }) return; } @@ -1672,7 +1677,150 @@ const pushFunction = async ({ functionId, async, code, withVariables } = { retur } } +const pushTable = async ({ returnOnZero, attempts } = { returnOnZero: false }) => { + const tables = []; + + if (attempts) { + pollMaxDebounces = attempts; + } + + if (cliConfig.all) { + checkDeployConditions(localConfig); + tables.push(...localConfig.getTables()); + } else { + const answers = await inquirer.prompt(questionsPushTables) + if (answers.tables) { + const configTables = new Map(); + localConfig.getTables().forEach((c) => { + configTables.set(`${c['databaseId']}|${c['$id']}`, c); + }); + answers.tables.forEach((a) => { + const table = configTables.get(a); + tables.push(table); + }) + } + } + + if (tables.length === 0) { + log("No tables found."); + hint("Use 'appwrite pull tables' to synchronize existing one, or use 'appwrite init table' to create a new one."); + return; + } + + const databases = Array.from(new Set(tables.map(table => table['databaseId']))); + + // Parallel db actions + await Promise.all(databases.map(async (databaseId) => { + const localDatabase = localConfig.getDatabase(databaseId); + + try { + const database = await gridsGetDatabase({ + databaseId: databaseId, + parseOutput: false, + }); + + if (database.name !== (localDatabase.name ?? databaseId)) { + await databasesUpdate({ + databaseId: databaseId, + name: localDatabase.name ?? databaseId, + parseOutput: false + }) + + success(`Updated ${localDatabase.name} ( ${databaseId} ) name`); + } + } catch (err) { + log(`Database ${databaseId} not found. Creating it now ...`); + + await databasesCreate({ + databaseId: databaseId, + name: localDatabase.name ?? databaseId, + parseOutput: false, + }); + } + })); + + + if (!(await approveChanges(tables, gridsGetTable, KeysTable, 'tableId', 'tables', ['columns', 'indexes'], 'databaseId', 'databaseId',))) { + return; + } + // Parallel collection actions + await Promise.all(tables.map(async (table) => { + try { + const remoteTable = await gridsGetTable({ + databaseId: table['databaseId'], + tableId: table['$id'], + parseOutput: false, + }); + + if (remoteTable.name !== table.name) { + await databasesUpdateTable({ + databaseId: table['databaseId'], + tableId: table['$id'], + name: table.name, + name: table.name, + parseOutput: false + }) + + success(`Updated ${table.name} ( ${table['$id']} ) name`); + } + table.remoteVersion = remoteTable; + + table.isExisted = true; + } catch + (e) { + if (Number(e.code) === 404) { + log(`Table ${table.name} does not exist in the project. Creating ... `); + await databasesCreateTable({ + databaseId: table['databaseId'], + tableId: table['$id'], + name: table.name, + documentSecurity: table.documentSecurity, + permissions: table['$permissions'], + parseOutput: false + }) + } else { + throw e; + } + } + })) + let numberOfTables = 0; + // Serialize attribute actions + for (let table of tables) { + let columns = table.columns; + let indexes = table.indexes; + + if (table.isExisted) { + columns = await attributesToCreate(table.remoteVersion.columns, table.columns, table); + indexes = await attributesToCreate(table.remoteVersion.indexes, table.indexes, table, true); + + if ((Array.isArray(columns) && columns.length <= 0) && (Array.isArray(indexes) && indexes.length <= 0)) { + continue; + } + + } + + log(`Pushing table ${table.name} ( ${table['databaseId']} - ${table['$id']} ) attributes`) + + try { + await createAttributes(columns, table) + } catch (e) { + throw e; + } + + try { + await createIndexes(indexes, table); + } catch (e) { + throw e; + } + numberOfTables++; + success(`Successfully pushed ${table.name} ( ${table['$id']} )`); + } + + success(`Successfully pushed ${numberOfTables} tables`); +} + const pushCollection = async ({ returnOnZero, attempts } = { returnOnZero: false }) => { + warn("appwrite push collection has been deprecated. Please consider using 'appwrite push tables' instead"); const collections = []; if (attempts) { @@ -2083,10 +2231,17 @@ push push .command("collection") .alias("collections") - .description("Push collections in the current project.") + .description("Push collections in the current project. (deprecated, please use 'push tables' instead)") .option(`-a, --attempts `, `Max number of attempts before timing out. default: 30.`) .action(actionRunner(pushCollection)); +push + .command("table") + .alias("tables") + .description("Push tables in the current project.") + .option(`-a, --attempts `, `Max number of attempts before timing out. default: 30.`) + .action(actionRunner(pushTable)); + push .command("bucket") .alias("buckets") diff --git a/lib/commands/run.js b/lib/commands/run.js index 1fae14f..3338bda 100644 --- a/lib/commands/run.js +++ b/lib/commands/run.js @@ -85,7 +85,7 @@ const runFunction = async ({ port, functionId, withVariables, reload, userId } = }; drawTable([settings]); - log("If you wish to change your local settings, update the appwrite.json file and rerun the 'appwrite run' command."); + log("If you wish to change your local settings, update the appwrite.config.json file and rerun the 'appwrite run' command."); hint("Permissions, events, CRON and timeouts dont apply when running locally."); await dockerCleanup(func.$id); diff --git a/lib/commands/sites.js b/lib/commands/sites.js index 681353d..d41bff4 100644 --- a/lib/commands/sites.js +++ b/lib/commands/sites.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); @@ -333,7 +333,7 @@ const sitesGetTemplate = async ({templateId,parseOutput = true, overrideForCli = /** * @typedef {Object} SitesListUsageRequestParams - * @property {SiteUsageRange} range Date range. + * @property {UsageRange} range Date range. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1161,7 +1161,7 @@ const sitesDeleteLog = async ({siteId,logId,parseOutput = true, overrideForCli = /** * @typedef {Object} SitesGetUsageRequestParams * @property {string} siteId Site ID. - * @property {SiteUsageRange} range Date range. + * @property {UsageRange} range Date range. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk diff --git a/lib/commands/storage.js b/lib/commands/storage.js index 7b28544..bcef8ee 100644 --- a/lib/commands/storage.js +++ b/lib/commands/storage.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); @@ -756,7 +756,7 @@ const storageGetFileView = async ({bucketId,fileId,token,parseOutput = true, ove /** * @typedef {Object} StorageGetUsageRequestParams - * @property {StorageUsageRange} range Date range. + * @property {UsageRange} range Date range. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -790,7 +790,7 @@ const storageGetUsage = async ({range,parseOutput = true, overrideForCli = false /** * @typedef {Object} StorageGetBucketUsageRequestParams * @property {string} bucketId Bucket ID. - * @property {StorageUsageRange} range Date range. + * @property {UsageRange} range Date range. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk diff --git a/lib/commands/tables-db.js b/lib/commands/tables-db.js new file mode 100644 index 0000000..4461177 --- /dev/null +++ b/lib/commands/tables-db.js @@ -0,0 +1,2955 @@ +const fs = require('fs'); +const pathLib = require('path'); +const tar = require("tar"); +const ignore = require("ignore"); +const { promisify } = require('util'); +const libClient = require('../client.js'); +const { getAllFiles, showConsoleLink } = require('../utils.js'); +const { Command } = require('commander'); +const { sdkForProject, sdkForConsole } = require('../sdks') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') +const { localConfig, globalConfig } = require("../config"); +const { File } = require('undici'); +const { ReadableStream } = require('stream/web'); + +/** + * @param {fs.ReadStream} readStream + * @returns {ReadableStream} + */ +function convertReadStreamToReadableStream(readStream) { + return new ReadableStream({ + start(controller) { + readStream.on("data", (chunk) => { + controller.enqueue(chunk); + }); + readStream.on("end", () => { + controller.close(); + }); + readStream.on("error", (err) => { + controller.error(err); + }); + }, + cancel() { + readStream.destroy(); + }, + }); +} + +const tablesdb = new Command("tablesdb").description(commandDescriptions['tablesdb'] ?? '').configureHelp({ + helpWidth: process.stdout.columns || 80 +}) + +/** + * @typedef {Object} TablesDbListRequestParams + * @property {string[]} queries 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 + * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbListRequestParams} params + */ +const tablesdbList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb'; + let payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof search !== 'undefined') { + payload['search'] = search; + } + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + if(console) { + showConsoleLink('tablesDb', 'list'); + } else { + parse(response) + } + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateRequestParams + * @property {string} databaseId 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. + * @property {string} name Database name. Max length: 128 chars. + * @property {boolean} enabled 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. + * @property {Type} type Database type. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateRequestParams} params + */ +const tablesdbCreate = async ({databaseId,name,enabled,type,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb'; + let payload = {}; + if (typeof databaseId !== 'undefined') { + payload['databaseId'] = databaseId; + } + if (typeof name !== 'undefined') { + payload['name'] = name; + } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + if (typeof type !== 'undefined') { + payload['type'] = type; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbListUsageRequestParams + * @property {UsageRange} range Date range. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbListUsageRequestParams} params + */ +const tablesdbListUsage = async ({range,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/usage'; + let payload = {}; + if (typeof range !== 'undefined') { + payload['range'] = range; + } + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + if(console) { + showConsoleLink('tablesDb', 'listUsage'); + } else { + parse(response) + } + } + + return response; + +} + +/** + * @typedef {Object} TablesDbGetRequestParams + * @property {string} databaseId Database ID. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbGetRequestParams} params + */ +const tablesdbGet = async ({databaseId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId); + let payload = {}; + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + if(console) { + showConsoleLink('tablesDb', 'get', databaseId); + } else { + parse(response) + } + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateRequestParams + * @property {string} databaseId Database ID. + * @property {string} name Database name. Max length: 128 chars. + * @property {boolean} enabled 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. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateRequestParams} params + */ +const tablesdbUpdate = async ({databaseId,name,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId); + let payload = {}; + if (typeof name !== 'undefined') { + payload['name'] = name; + } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + + let response = undefined; + + response = await client.call('put', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbDeleteRequestParams + * @property {string} databaseId Database ID. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbDeleteRequestParams} params + */ +const tablesdbDelete = async ({databaseId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId); + let payload = {}; + + let response = undefined; + + response = await client.call('delete', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbListTablesRequestParams + * @property {string} databaseId Database ID. + * @property {string[]} queries 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 + * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbListTablesRequestParams} params + */ +const tablesdbListTables = async ({databaseId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables'.replace('{databaseId}', databaseId); + let payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof search !== 'undefined') { + payload['search'] = search; + } + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + if(console) { + showConsoleLink('tablesDb', 'listTables', databaseId); + } else { + parse(response) + } + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateTableRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId 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. + * @property {string} name Table name. Max length: 128 chars. + * @property {string[]} permissions An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @property {boolean} rowSecurity 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). + * @property {boolean} enabled 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. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateTableRequestParams} params + */ +const tablesdbCreateTable = async ({databaseId,tableId,name,permissions,rowSecurity,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables'.replace('{databaseId}', databaseId); + let payload = {}; + if (typeof tableId !== 'undefined') { + payload['tableId'] = tableId; + } + if (typeof name !== 'undefined') { + payload['name'] = name; + } + permissions = permissions === true ? [] : permissions; + if (typeof permissions !== 'undefined') { + payload['permissions'] = permissions; + } + if (typeof rowSecurity !== 'undefined') { + payload['rowSecurity'] = rowSecurity; + } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbGetTableRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbGetTableRequestParams} params + */ +const tablesdbGetTable = async ({databaseId,tableId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + if(console) { + showConsoleLink('tablesDb', 'getTable', databaseId, tableId); + } else { + parse(response) + } + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateTableRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} name Table name. Max length: 128 chars. + * @property {string[]} permissions An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @property {boolean} rowSecurity 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). + * @property {boolean} enabled 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. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateTableRequestParams} params + */ +const tablesdbUpdateTable = async ({databaseId,tableId,name,permissions,rowSecurity,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof name !== 'undefined') { + payload['name'] = name; + } + permissions = permissions === true ? [] : permissions; + if (typeof permissions !== 'undefined') { + payload['permissions'] = permissions; + } + if (typeof rowSecurity !== 'undefined') { + payload['rowSecurity'] = rowSecurity; + } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + + let response = undefined; + + response = await client.call('put', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbDeleteTableRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbDeleteTableRequestParams} params + */ +const tablesdbDeleteTable = async ({databaseId,tableId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + + let response = undefined; + + response = await client.call('delete', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbListColumnsRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string[]} queries 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 + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbListColumnsRequestParams} params + */ +const tablesdbListColumns = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + if(console) { + showConsoleLink('tablesDb', 'listColumns', databaseId, tableId); + } else { + parse(response) + } + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateBooleanColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {boolean} xdefault Default value for column when not provided. Cannot be set when column is required. + * @property {boolean} array Is column an array? + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateBooleanColumnRequestParams} params + */ +const tablesdbCreateBooleanColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof key !== 'undefined') { + payload['key'] = key; + } + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof array !== 'undefined') { + payload['array'] = array; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateBooleanColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {boolean} xdefault Default value for column when not provided. Cannot be set when column is required. + * @property {string} newKey New Column Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateBooleanColumnRequestParams} params + */ +const tablesdbUpdateBooleanColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof newKey !== 'undefined') { + payload['newKey'] = newKey; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateDatetimeColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {string} xdefault 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. + * @property {boolean} array Is column an array? + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateDatetimeColumnRequestParams} params + */ +const tablesdbCreateDatetimeColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof key !== 'undefined') { + payload['key'] = key; + } + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof array !== 'undefined') { + payload['array'] = array; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateDatetimeColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {string} xdefault Default value for column when not provided. Cannot be set when column is required. + * @property {string} newKey New Column Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateDatetimeColumnRequestParams} params + */ +const tablesdbUpdateDatetimeColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof newKey !== 'undefined') { + payload['newKey'] = newKey; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateEmailColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {string} xdefault Default value for column when not provided. Cannot be set when column is required. + * @property {boolean} array Is column an array? + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateEmailColumnRequestParams} params + */ +const tablesdbCreateEmailColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof key !== 'undefined') { + payload['key'] = key; + } + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof array !== 'undefined') { + payload['array'] = array; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateEmailColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {string} xdefault Default value for column when not provided. Cannot be set when column is required. + * @property {string} newKey New Column Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateEmailColumnRequestParams} params + */ +const tablesdbUpdateEmailColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof newKey !== 'undefined') { + payload['newKey'] = newKey; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateEnumColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {string[]} elements Array of enum values. + * @property {boolean} required Is column required? + * @property {string} xdefault Default value for column when not provided. Cannot be set when column is required. + * @property {boolean} array Is column an array? + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateEnumColumnRequestParams} params + */ +const tablesdbCreateEnumColumn = async ({databaseId,tableId,key,elements,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof key !== 'undefined') { + payload['key'] = key; + } + elements = elements === true ? [] : elements; + if (typeof elements !== 'undefined') { + payload['elements'] = elements; + } + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof array !== 'undefined') { + payload['array'] = array; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateEnumColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {string[]} elements Updated list of enum values. + * @property {boolean} required Is column required? + * @property {string} xdefault Default value for column when not provided. Cannot be set when column is required. + * @property {string} newKey New Column Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateEnumColumnRequestParams} params + */ +const tablesdbUpdateEnumColumn = async ({databaseId,tableId,key,elements,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + elements = elements === true ? [] : elements; + if (typeof elements !== 'undefined') { + payload['elements'] = elements; + } + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof newKey !== 'undefined') { + payload['newKey'] = newKey; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateFloatColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {number} min Minimum value + * @property {number} max Maximum value + * @property {number} xdefault Default value. Cannot be set when required. + * @property {boolean} array Is column an array? + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateFloatColumnRequestParams} params + */ +const tablesdbCreateFloatColumn = async ({databaseId,tableId,key,required,min,max,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof key !== 'undefined') { + payload['key'] = key; + } + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof min !== 'undefined') { + payload['min'] = min; + } + if (typeof max !== 'undefined') { + payload['max'] = max; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof array !== 'undefined') { + payload['array'] = array; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateFloatColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {number} xdefault Default value. Cannot be set when required. + * @property {number} min Minimum value + * @property {number} max Maximum value + * @property {string} newKey New Column Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateFloatColumnRequestParams} params + */ +const tablesdbUpdateFloatColumn = async ({databaseId,tableId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof min !== 'undefined') { + payload['min'] = min; + } + if (typeof max !== 'undefined') { + payload['max'] = max; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof newKey !== 'undefined') { + payload['newKey'] = newKey; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateIntegerColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {number} min Minimum value + * @property {number} max Maximum value + * @property {number} xdefault Default value. Cannot be set when column is required. + * @property {boolean} array Is column an array? + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateIntegerColumnRequestParams} params + */ +const tablesdbCreateIntegerColumn = async ({databaseId,tableId,key,required,min,max,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof key !== 'undefined') { + payload['key'] = key; + } + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof min !== 'undefined') { + payload['min'] = min; + } + if (typeof max !== 'undefined') { + payload['max'] = max; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof array !== 'undefined') { + payload['array'] = array; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateIntegerColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {number} xdefault Default value. Cannot be set when column is required. + * @property {number} min Minimum value + * @property {number} max Maximum value + * @property {string} newKey New Column Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateIntegerColumnRequestParams} params + */ +const tablesdbUpdateIntegerColumn = async ({databaseId,tableId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof min !== 'undefined') { + payload['min'] = min; + } + if (typeof max !== 'undefined') { + payload['max'] = max; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof newKey !== 'undefined') { + payload['newKey'] = newKey; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateIpColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {string} xdefault Default value. Cannot be set when column is required. + * @property {boolean} array Is column an array? + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateIpColumnRequestParams} params + */ +const tablesdbCreateIpColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof key !== 'undefined') { + payload['key'] = key; + } + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof array !== 'undefined') { + payload['array'] = array; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateIpColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {string} xdefault Default value. Cannot be set when column is required. + * @property {string} newKey New Column Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateIpColumnRequestParams} params + */ +const tablesdbUpdateIpColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof newKey !== 'undefined') { + payload['newKey'] = newKey; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateRelationshipColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} relatedTableId Related Table ID. + * @property {RelationshipType} type Relation type + * @property {boolean} twoWay Is Two Way? + * @property {string} key Column Key. + * @property {string} twoWayKey Two Way Column Key. + * @property {RelationMutate} onDelete Constraints option + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateRelationshipColumnRequestParams} params + */ +const tablesdbCreateRelationshipColumn = async ({databaseId,tableId,relatedTableId,type,twoWay,key,twoWayKey,onDelete,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof relatedTableId !== 'undefined') { + payload['relatedTableId'] = relatedTableId; + } + if (typeof type !== 'undefined') { + payload['type'] = type; + } + if (typeof twoWay !== 'undefined') { + payload['twoWay'] = twoWay; + } + if (typeof key !== 'undefined') { + payload['key'] = key; + } + if (typeof twoWayKey !== 'undefined') { + payload['twoWayKey'] = twoWayKey; + } + if (typeof onDelete !== 'undefined') { + payload['onDelete'] = onDelete; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateStringColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} key Column Key. + * @property {number} size Attribute size for text attributes, in number of characters. + * @property {boolean} required Is column required? + * @property {string} xdefault Default value for column when not provided. Cannot be set when column is required. + * @property {boolean} array Is column an array? + * @property {boolean} encrypt Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateStringColumnRequestParams} params + */ +const tablesdbCreateStringColumn = async ({databaseId,tableId,key,size,required,xdefault,array,encrypt,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof key !== 'undefined') { + payload['key'] = key; + } + if (typeof size !== 'undefined') { + payload['size'] = size; + } + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof array !== 'undefined') { + payload['array'] = array; + } + if (typeof encrypt !== 'undefined') { + payload['encrypt'] = encrypt; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateStringColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {string} xdefault Default value for column when not provided. Cannot be set when column is required. + * @property {number} size Maximum size of the string column. + * @property {string} newKey New Column Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateStringColumnRequestParams} params + */ +const tablesdbUpdateStringColumn = async ({databaseId,tableId,key,required,xdefault,size,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof size !== 'undefined') { + payload['size'] = size; + } + if (typeof newKey !== 'undefined') { + payload['newKey'] = newKey; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateUrlColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {string} xdefault Default value for column when not provided. Cannot be set when column is required. + * @property {boolean} array Is column an array? + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateUrlColumnRequestParams} params + */ +const tablesdbCreateUrlColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof key !== 'undefined') { + payload['key'] = key; + } + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof array !== 'undefined') { + payload['array'] = array; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateUrlColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} required Is column required? + * @property {string} xdefault Default value for column when not provided. Cannot be set when column is required. + * @property {string} newKey New Column Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateUrlColumnRequestParams} params + */ +const tablesdbUpdateUrlColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + if (typeof required !== 'undefined') { + payload['required'] = required; + } + if (typeof xdefault !== 'undefined') { + payload['default'] = xdefault; + } + if (typeof newKey !== 'undefined') { + payload['newKey'] = newKey; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbGetColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbGetColumnRequestParams} params + */ +const tablesdbGetColumn = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + if(console) { + showConsoleLink('tablesDb', 'getColumn', databaseId, tableId); + } else { + parse(response) + } + } + + return response; + +} + +/** + * @typedef {Object} TablesDbDeleteColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbDeleteColumnRequestParams} params + */ +const tablesdbDeleteColumn = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + + let response = undefined; + + response = await client.call('delete', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateRelationshipColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} key Column Key. + * @property {RelationMutate} onDelete Constraints option + * @property {string} newKey New Column Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateRelationshipColumnRequestParams} params + */ +const tablesdbUpdateRelationshipColumn = async ({databaseId,tableId,key,onDelete,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + if (typeof onDelete !== 'undefined') { + payload['onDelete'] = onDelete; + } + if (typeof newKey !== 'undefined') { + payload['newKey'] = newKey; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbListIndexesRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string[]} queries 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 + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbListIndexesRequestParams} params + */ +const tablesdbListIndexes = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + if(console) { + showConsoleLink('tablesDb', 'listIndexes', databaseId, tableId); + } else { + parse(response) + } + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateIndexRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} key Index Key. + * @property {IndexType} type Index type. + * @property {string[]} columns Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long. + * @property {string[]} orders Array of index orders. Maximum of 100 orders are allowed. + * @property {number[]} lengths Length of index. Maximum of 100 + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateIndexRequestParams} params + */ +const tablesdbCreateIndex = async ({databaseId,tableId,key,type,columns,orders,lengths,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof key !== 'undefined') { + payload['key'] = key; + } + if (typeof type !== 'undefined') { + payload['type'] = type; + } + columns = columns === true ? [] : columns; + if (typeof columns !== 'undefined') { + payload['columns'] = columns; + } + orders = orders === true ? [] : orders; + if (typeof orders !== 'undefined') { + payload['orders'] = orders; + } + lengths = lengths === true ? [] : lengths; + if (typeof lengths !== 'undefined') { + payload['lengths'] = lengths; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbGetIndexRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} key Index Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbGetIndexRequestParams} params + */ +const tablesdbGetIndex = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbDeleteIndexRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} key Index Key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbDeleteIndexRequestParams} params + */ +const tablesdbDeleteIndex = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + let payload = {}; + + let response = undefined; + + response = await client.call('delete', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbListTableLogsRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string[]} queries 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 + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbListTableLogsRequestParams} params + */ +const tablesdbListTableLogs = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/logs'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + if(console) { + showConsoleLink('tablesDb', 'listTableLogs', databaseId, tableId); + } else { + parse(response) + } + } + + return response; + +} + +/** + * @typedef {Object} TablesDbListRowsRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string[]} queries 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. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbListRowsRequestParams} params + */ +const tablesdbListRows = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + if(console) { + showConsoleLink('tablesDb', 'listRows', databaseId, tableId); + } else { + parse(response) + } + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateRowRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId 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. + * @property {string} rowId 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. + * @property {object} data Row data as JSON object. + * @property {string[]} permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateRowRequestParams} params + */ +const tablesdbCreateRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof rowId !== 'undefined') { + payload['rowId'] = rowId; + } + if (typeof data !== 'undefined') { + payload['data'] = JSON.parse(data); + } + permissions = permissions === true ? [] : permissions; + if (typeof permissions !== 'undefined') { + payload['permissions'] = permissions; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbCreateRowsRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId 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. + * @property {object[]} rows Array of documents data as JSON objects. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbCreateRowsRequestParams} params + */ +const tablesdbCreateRows = async ({databaseId,tableId,rows,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + rows = rows === true ? [] : rows; + if (typeof rows !== 'undefined') { + payload['rows'] = rows; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpsertRowsRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {object[]} rows Array of row data as JSON objects. May contain partial rows. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpsertRowsRequestParams} params + */ +const tablesdbUpsertRows = async ({databaseId,tableId,rows,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + rows = rows === true ? [] : rows; + if (typeof rows !== 'undefined') { + payload['rows'] = rows; + } + + let response = undefined; + + response = await client.call('put', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateRowsRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {object} data Row data as JSON object. Include only column and value pairs to be updated. + * @property {string[]} queries 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. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateRowsRequestParams} params + */ +const tablesdbUpdateRows = async ({databaseId,tableId,data,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof data !== 'undefined') { + payload['data'] = JSON.parse(data); + } + queries = queries === true ? [] : queries; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbDeleteRowsRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string[]} queries 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. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbDeleteRowsRequestParams} params + */ +const tablesdbDeleteRows = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + queries = queries === true ? [] : queries; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + + let response = undefined; + + response = await client.call('delete', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbGetRowRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} rowId Row ID. + * @property {string[]} queries 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. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbGetRowRequestParams} params + */ +const tablesdbGetRow = async ({databaseId,tableId,rowId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId); + let payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + if(console) { + showConsoleLink('tablesDb', 'getRow', databaseId, tableId, rowId); + } else { + parse(response) + } + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpsertRowRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} rowId Row ID. + * @property {object} data Row data as JSON object. Include all required columns of the row to be created or updated. + * @property {string[]} permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpsertRowRequestParams} params + */ +const tablesdbUpsertRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId); + let payload = {}; + if (typeof data !== 'undefined') { + payload['data'] = JSON.parse(data); + } + permissions = permissions === true ? [] : permissions; + if (typeof permissions !== 'undefined') { + payload['permissions'] = permissions; + } + + let response = undefined; + + response = await client.call('put', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbUpdateRowRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} rowId Row ID. + * @property {object} data Row data as JSON object. Include only columns and value pairs to be updated. + * @property {string[]} permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbUpdateRowRequestParams} params + */ +const tablesdbUpdateRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId); + let payload = {}; + if (typeof data !== 'undefined') { + payload['data'] = JSON.parse(data); + } + permissions = permissions === true ? [] : permissions; + if (typeof permissions !== 'undefined') { + payload['permissions'] = permissions; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbDeleteRowRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} rowId Row ID. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbDeleteRowRequestParams} params + */ +const tablesdbDeleteRow = async ({databaseId,tableId,rowId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId); + let payload = {}; + + let response = undefined; + + response = await client.call('delete', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbListRowLogsRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} rowId Row ID. + * @property {string[]} queries 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 + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbListRowLogsRequestParams} params + */ +const tablesdbListRowLogs = async ({databaseId,tableId,rowId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/logs'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId); + let payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + if(console) { + showConsoleLink('tablesDb', 'listRowLogs', databaseId, tableId, rowId); + } else { + parse(response) + } + } + + return response; + +} + +/** + * @typedef {Object} TablesDbDecrementRowColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} rowId Row ID. + * @property {string} column Column key. + * @property {number} value Value to increment the column by. The value must be a number. + * @property {number} min Minimum value for the column. If the current value is lesser than this value, an exception will be thrown. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbDecrementRowColumnRequestParams} params + */ +const tablesdbDecrementRowColumn = async ({databaseId,tableId,rowId,column,value,min,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId).replace('{column}', column); + let payload = {}; + if (typeof value !== 'undefined') { + payload['value'] = value; + } + if (typeof min !== 'undefined') { + payload['min'] = min; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbIncrementRowColumnRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {string} rowId Row ID. + * @property {string} column Column key. + * @property {number} value Value to increment the column by. The value must be a number. + * @property {number} max Maximum value for the column. If the current value is greater than this value, an error will be thrown. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbIncrementRowColumnRequestParams} params + */ +const tablesdbIncrementRowColumn = async ({databaseId,tableId,rowId,column,value,max,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId).replace('{column}', column); + let payload = {}; + if (typeof value !== 'undefined') { + payload['value'] = value; + } + if (typeof max !== 'undefined') { + payload['max'] = max; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} TablesDbGetTableUsageRequestParams + * @property {string} databaseId Database ID. + * @property {string} tableId Table ID. + * @property {UsageRange} range Date range. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbGetTableUsageRequestParams} params + */ +const tablesdbGetTableUsage = async ({databaseId,tableId,range,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/usage'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + let payload = {}; + if (typeof range !== 'undefined') { + payload['range'] = range; + } + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + if(console) { + showConsoleLink('tablesDb', 'getTableUsage', databaseId, tableId); + } else { + parse(response) + } + } + + return response; + +} + +/** + * @typedef {Object} TablesDbGetUsageRequestParams + * @property {string} databaseId Database ID. + * @property {UsageRange} range Date range. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {TablesDbGetUsageRequestParams} params + */ +const tablesdbGetUsage = async ({databaseId,range,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/tablesdb/{databaseId}/usage'.replace('{databaseId}', databaseId); + let payload = {}; + if (typeof range !== 'undefined') { + payload['range'] = range; + } + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +tablesdb + .command(`list`) + .description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`) + .option(`--queries [queries...]`, `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`) + .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(tablesdbList)) + +tablesdb + .command(`create`) + .description(`Create a new Database. `) + .requiredOption(`--database-id `, `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.`) + .requiredOption(`--name `, `Database name. Max length: 128 chars.`) + .option(`--enabled [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) + .option(`--type `, `Database type.`) + .action(actionRunner(tablesdbCreate)) + +tablesdb + .command(`list-usage`) + .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.`) + .option(`--range `, `Date range.`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(tablesdbListUsage)) + +tablesdb + .command(`get`) + .description(`Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.`) + .requiredOption(`--database-id `, `Database ID.`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(tablesdbGet)) + +tablesdb + .command(`update`) + .description(`Update a database by its unique ID.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--name `, `Database name. Max length: 128 chars.`) + .option(`--enabled [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(tablesdbUpdate)) + +tablesdb + .command(`delete`) + .description(`Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.`) + .requiredOption(`--database-id `, `Database ID.`) + .action(actionRunner(tablesdbDelete)) + +tablesdb + .command(`list-tables`) + .description(`Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.`) + .requiredOption(`--database-id `, `Database ID.`) + .option(`--queries [queries...]`, `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`) + .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(tablesdbListTables)) + +tablesdb + .command(`create-table`) + .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.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `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.`) + .requiredOption(`--name `, `Table name. Max length: 128 chars.`) + .option(`--permissions [permissions...]`, `An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--row-security [value]`, `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).`, (value) => value === undefined ? true : parseBool(value)) + .option(`--enabled [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(tablesdbCreateTable)) + +tablesdb + .command(`get-table`) + .description(`Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(tablesdbGetTable)) + +tablesdb + .command(`update-table`) + .description(`Update a table by its unique ID.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--name `, `Table name. Max length: 128 chars.`) + .option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--row-security [value]`, `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).`, (value) => value === undefined ? true : parseBool(value)) + .option(`--enabled [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(tablesdbUpdateTable)) + +tablesdb + .command(`delete-table`) + .description(`Delete a table by its unique ID. Only users with write permissions have access to delete this resource.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .action(actionRunner(tablesdbDeleteTable)) + +tablesdb + .command(`list-columns`) + .description(`List columns in the table.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .option(`--queries [queries...]`, `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`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(tablesdbListColumns)) + +tablesdb + .command(`create-boolean-column`) + .description(`Create a boolean column. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault [value]`, `Default value for column when not provided. Cannot be set when column is required.`, (value) => value === undefined ? true : parseBool(value)) + .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(tablesdbCreateBooleanColumn)) + +tablesdb + .command(`update-boolean-column`) + .description(`Update a boolean column. Changing the 'default' value will not update already existing rows.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault [value]`, `Default value for column when not provided. Cannot be set when column is required.`, (value) => value === undefined ? true : parseBool(value)) + .option(`--new-key `, `New Column Key.`) + .action(actionRunner(tablesdbUpdateBooleanColumn)) + +tablesdb + .command(`create-datetime-column`) + .description(`Create a date time column according to the ISO 8601 standard.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `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.`) + .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(tablesdbCreateDatetimeColumn)) + +tablesdb + .command(`update-datetime-column`) + .description(`Update a date time column. Changing the 'default' value will not update already existing rows.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) + .option(`--new-key `, `New Column Key.`) + .action(actionRunner(tablesdbUpdateDatetimeColumn)) + +tablesdb + .command(`create-email-column`) + .description(`Create an email column. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) + .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(tablesdbCreateEmailColumn)) + +tablesdb + .command(`update-email-column`) + .description(`Update an email column. Changing the 'default' value will not update already existing rows. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) + .option(`--new-key `, `New Column Key.`) + .action(actionRunner(tablesdbUpdateEmailColumn)) + +tablesdb + .command(`create-enum-column`) + .description(`Create an enumeration column. The 'elements' param acts as a white-list of accepted values for this column.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--elements [elements...]`, `Array of enum values.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) + .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(tablesdbCreateEnumColumn)) + +tablesdb + .command(`update-enum-column`) + .description(`Update an enum column. Changing the 'default' value will not update already existing rows. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--elements [elements...]`, `Updated list of enum values.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) + .option(`--new-key `, `New Column Key.`) + .action(actionRunner(tablesdbUpdateEnumColumn)) + +tablesdb + .command(`create-float-column`) + .description(`Create a float column. Optionally, minimum and maximum values can be provided. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--min `, `Minimum value`, parseInteger) + .option(`--max `, `Maximum value`, parseInteger) + .option(`--xdefault `, `Default value. Cannot be set when required.`, parseInteger) + .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(tablesdbCreateFloatColumn)) + +tablesdb + .command(`update-float-column`) + .description(`Update a float column. Changing the 'default' value will not update already existing rows. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `Default value. Cannot be set when required.`, parseInteger) + .option(`--min `, `Minimum value`, parseInteger) + .option(`--max `, `Maximum value`, parseInteger) + .option(`--new-key `, `New Column Key.`) + .action(actionRunner(tablesdbUpdateFloatColumn)) + +tablesdb + .command(`create-integer-column`) + .description(`Create an integer column. Optionally, minimum and maximum values can be provided. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--min `, `Minimum value`, parseInteger) + .option(`--max `, `Maximum value`, parseInteger) + .option(`--xdefault `, `Default value. Cannot be set when column is required.`, parseInteger) + .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(tablesdbCreateIntegerColumn)) + +tablesdb + .command(`update-integer-column`) + .description(`Update an integer column. Changing the 'default' value will not update already existing rows. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `Default value. Cannot be set when column is required.`, parseInteger) + .option(`--min `, `Minimum value`, parseInteger) + .option(`--max `, `Maximum value`, parseInteger) + .option(`--new-key `, `New Column Key.`) + .action(actionRunner(tablesdbUpdateIntegerColumn)) + +tablesdb + .command(`create-ip-column`) + .description(`Create IP address column. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `Default value. Cannot be set when column is required.`) + .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(tablesdbCreateIpColumn)) + +tablesdb + .command(`update-ip-column`) + .description(`Update an ip column. Changing the 'default' value will not update already existing rows. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `Default value. Cannot be set when column is required.`) + .option(`--new-key `, `New Column Key.`) + .action(actionRunner(tablesdbUpdateIpColumn)) + +tablesdb + .command(`create-relationship-column`) + .description(`Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--related-table-id `, `Related Table ID.`) + .requiredOption(`--type `, `Relation type`) + .option(`--two-way [value]`, `Is Two Way?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--key `, `Column Key.`) + .option(`--two-way-key `, `Two Way Column Key.`) + .option(`--on-delete `, `Constraints option`) + .action(actionRunner(tablesdbCreateRelationshipColumn)) + +tablesdb + .command(`create-string-column`) + .description(`Create a string column. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--size `, `Attribute size for text attributes, in number of characters.`, parseInteger) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) + .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--encrypt [value]`, `Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(tablesdbCreateStringColumn)) + +tablesdb + .command(`update-string-column`) + .description(`Update a string column. Changing the 'default' value will not update already existing rows. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) + .option(`--size `, `Maximum size of the string column.`, parseInteger) + .option(`--new-key `, `New Column Key.`) + .action(actionRunner(tablesdbUpdateStringColumn)) + +tablesdb + .command(`create-url-column`) + .description(`Create a URL column. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) + .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(tablesdbCreateUrlColumn)) + +tablesdb + .command(`update-url-column`) + .description(`Update an url column. Changing the 'default' value will not update already existing rows. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) + .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) + .option(`--new-key `, `New Column Key.`) + .action(actionRunner(tablesdbUpdateUrlColumn)) + +tablesdb + .command(`get-column`) + .description(`Get column by ID.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(tablesdbGetColumn)) + +tablesdb + .command(`delete-column`) + .description(`Deletes a column.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .action(actionRunner(tablesdbDeleteColumn)) + +tablesdb + .command(`update-relationship-column`) + .description(`Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--key `, `Column Key.`) + .option(`--on-delete `, `Constraints option`) + .option(`--new-key `, `New Column Key.`) + .action(actionRunner(tablesdbUpdateRelationshipColumn)) + +tablesdb + .command(`list-indexes`) + .description(`List indexes in the collection.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .option(`--queries [queries...]`, `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`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(tablesdbListIndexes)) + +tablesdb + .command(`create-index`) + .description(`Creates an index on the columns listed. Your index should include all the columns you will query in a single request. Attributes can be 'key', 'fulltext', and 'unique'.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--key `, `Index Key.`) + .requiredOption(`--type `, `Index type.`) + .requiredOption(`--columns [columns...]`, `Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.`) + .option(`--orders [orders...]`, `Array of index orders. Maximum of 100 orders are allowed.`) + .option(`--lengths [lengths...]`, `Length of index. Maximum of 100`) + .action(actionRunner(tablesdbCreateIndex)) + +tablesdb + .command(`get-index`) + .description(`Get index by ID.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--key `, `Index Key.`) + .action(actionRunner(tablesdbGetIndex)) + +tablesdb + .command(`delete-index`) + .description(`Delete an index.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--key `, `Index Key.`) + .action(actionRunner(tablesdbDeleteIndex)) + +tablesdb + .command(`list-table-logs`) + .description(`Get the table activity logs list by its unique ID.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .option(`--queries [queries...]`, `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`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(tablesdbListTableLogs)) + +tablesdb + .command(`list-rows`) + .description(`Get a list of all the user's rows in a given table. You can use the query params to filter your results.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .option(`--queries [queries...]`, `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.`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(tablesdbListRows)) + +tablesdb + .command(`create-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.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `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.`) + .requiredOption(`--row-id `, `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.`) + .requiredOption(`--data `, `Row data as JSON object.`) + .option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .action(actionRunner(tablesdbCreateRow)) + +tablesdb + .command(`create-rows`) + .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.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `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.`) + .requiredOption(`--rows [rows...]`, `Array of documents data as JSON objects.`) + .action(actionRunner(tablesdbCreateRows)) + +tablesdb + .command(`upsert-rows`) + .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. `) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--rows [rows...]`, `Array of row data as JSON objects. May contain partial rows.`) + .action(actionRunner(tablesdbUpsertRows)) + +tablesdb + .command(`update-rows`) + .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.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .option(`--data `, `Row data as JSON object. Include only column and value pairs to be updated.`) + .option(`--queries [queries...]`, `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.`) + .action(actionRunner(tablesdbUpdateRows)) + +tablesdb + .command(`delete-rows`) + .description(`Bulk delete rows using queries, if no queries are passed then all rows are deleted.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .option(`--queries [queries...]`, `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.`) + .action(actionRunner(tablesdbDeleteRows)) + +tablesdb + .command(`get-row`) + .description(`Get a row by its unique ID. This endpoint response returns a JSON object with the row data.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--row-id `, `Row ID.`) + .option(`--queries [queries...]`, `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.`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(tablesdbGetRow)) + +tablesdb + .command(`upsert-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.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--row-id `, `Row ID.`) + .option(`--data `, `Row data as JSON object. Include all required columns of the row to be created or updated.`) + .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .action(actionRunner(tablesdbUpsertRow)) + +tablesdb + .command(`update-row`) + .description(`Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--row-id `, `Row ID.`) + .option(`--data `, `Row data as JSON object. Include only columns and value pairs to be updated.`) + .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .action(actionRunner(tablesdbUpdateRow)) + +tablesdb + .command(`delete-row`) + .description(`Delete a row by its unique ID.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--row-id `, `Row ID.`) + .action(actionRunner(tablesdbDeleteRow)) + +tablesdb + .command(`list-row-logs`) + .description(`Get the row activity logs list by its unique ID.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--row-id `, `Row ID.`) + .option(`--queries [queries...]`, `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`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(tablesdbListRowLogs)) + +tablesdb + .command(`decrement-row-column`) + .description(`Decrement a specific column of a row by a given value.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--row-id `, `Row ID.`) + .requiredOption(`--column `, `Column key.`) + .option(`--value `, `Value to increment the column by. The value must be a number.`, parseInteger) + .option(`--min `, `Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.`, parseInteger) + .action(actionRunner(tablesdbDecrementRowColumn)) + +tablesdb + .command(`increment-row-column`) + .description(`Increment a specific column of a row by a given value.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .requiredOption(`--row-id `, `Row ID.`) + .requiredOption(`--column `, `Column key.`) + .option(`--value `, `Value to increment the column by. The value must be a number.`, parseInteger) + .option(`--max `, `Maximum value for the column. If the current value is greater than this value, an error will be thrown.`, parseInteger) + .action(actionRunner(tablesdbIncrementRowColumn)) + +tablesdb + .command(`get-table-usage`) + .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.`) + .requiredOption(`--database-id `, `Database ID.`) + .requiredOption(`--table-id `, `Table ID.`) + .option(`--range `, `Date range.`) + .option(`--console`, `Get the resource console url`) + .action(actionRunner(tablesdbGetTableUsage)) + +tablesdb + .command(`get-usage`) + .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.`) + .requiredOption(`--database-id `, `Database ID.`) + .option(`--range `, `Date range.`) + .action(actionRunner(tablesdbGetUsage)) + +module.exports = { + tablesdb, + tablesdbList, + tablesdbCreate, + tablesdbListUsage, + tablesdbGet, + tablesdbUpdate, + tablesdbDelete, + tablesdbListTables, + tablesdbCreateTable, + tablesdbGetTable, + tablesdbUpdateTable, + tablesdbDeleteTable, + tablesdbListColumns, + tablesdbCreateBooleanColumn, + tablesdbUpdateBooleanColumn, + tablesdbCreateDatetimeColumn, + tablesdbUpdateDatetimeColumn, + tablesdbCreateEmailColumn, + tablesdbUpdateEmailColumn, + tablesdbCreateEnumColumn, + tablesdbUpdateEnumColumn, + tablesdbCreateFloatColumn, + tablesdbUpdateFloatColumn, + tablesdbCreateIntegerColumn, + tablesdbUpdateIntegerColumn, + tablesdbCreateIpColumn, + tablesdbUpdateIpColumn, + tablesdbCreateRelationshipColumn, + tablesdbCreateStringColumn, + tablesdbUpdateStringColumn, + tablesdbCreateUrlColumn, + tablesdbUpdateUrlColumn, + tablesdbGetColumn, + tablesdbDeleteColumn, + tablesdbUpdateRelationshipColumn, + tablesdbListIndexes, + tablesdbCreateIndex, + tablesdbGetIndex, + tablesdbDeleteIndex, + tablesdbListTableLogs, + tablesdbListRows, + tablesdbCreateRow, + tablesdbCreateRows, + tablesdbUpsertRows, + tablesdbUpdateRows, + tablesdbDeleteRows, + tablesdbGetRow, + tablesdbUpsertRow, + tablesdbUpdateRow, + tablesdbDeleteRow, + tablesdbListRowLogs, + tablesdbDecrementRowColumn, + tablesdbIncrementRowColumn, + tablesdbGetTableUsage, + tablesdbGetUsage +}; diff --git a/lib/commands/teams.js b/lib/commands/teams.js index 5e769be..c3e7d87 100644 --- a/lib/commands/teams.js +++ b/lib/commands/teams.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); diff --git a/lib/commands/tokens.js b/lib/commands/tokens.js index 8e5e147..5d3d1b4 100644 --- a/lib/commands/tokens.js +++ b/lib/commands/tokens.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); diff --git a/lib/commands/update.js b/lib/commands/update.js new file mode 100644 index 0000000..2c7cfc5 --- /dev/null +++ b/lib/commands/update.js @@ -0,0 +1,218 @@ +const fs = require("fs"); +const path = require("path"); +const { spawn } = require("child_process"); +const { Command } = require("commander"); +const { fetch } = require("undici"); +const chalk = require("chalk"); +const inquirer = require("inquirer"); +const { success, log, warn, error, hint, actionRunner, commandDescriptions } = require("../parser"); +const { getLatestVersion, compareVersions } = require("../utils"); +const { version } = require("../../package.json"); + +/** + * Check if the CLI was installed via npm + */ +const isInstalledViaNpm = () => { + try { + const scriptPath = process.argv[1]; + + if (scriptPath.includes('node_modules') && scriptPath.includes('appwrite-cli')) { + return true; + } + + if (scriptPath.includes('/usr/local/lib/node_modules/') || + scriptPath.includes('/opt/homebrew/lib/node_modules/') || + scriptPath.includes('/.npm-global/') || + scriptPath.includes('/node_modules/.bin/')) { + return true; + } + + return false; + } catch (e) { + return false; + } +}; + +/** + * Check if the CLI was installed via Homebrew + */ +const isInstalledViaHomebrew = () => { + try { + const scriptPath = process.argv[1]; + return scriptPath.includes('/opt/homebrew/') || scriptPath.includes('/usr/local/Cellar/'); + } catch (e) { + return false; + } +}; + + + +/** + * Execute command and return promise + */ +const execCommand = (command, args = [], options = {}) => { + return new Promise((resolve, reject) => { + const child = spawn(command, args, { + stdio: 'inherit', + shell: true, + ...options + }); + + child.on('close', (code) => { + if (code === 0) { + resolve(); + } else { + reject(new Error(`Command failed with exit code ${code}`)); + } + }); + + child.on('error', (err) => { + reject(err); + }); + }); +}; + +/** + * Update via npm + */ +const updateViaNpm = async () => { + try { + await execCommand('npm', ['install', '-g', 'appwrite-cli@latest']); + console.log(""); + success("Updated to latest version via npm!"); + hint("Run 'appwrite --version' to verify the new version."); + } catch (e) { + if (e.message.includes('EEXIST') || e.message.includes('file already exists')) { + console.log(""); + success("Latest version is already installed via npm!"); + hint("The CLI is up to date. Run 'appwrite --version' to verify."); + } else { + console.log(""); + error(`Failed to update via npm: ${e.message}`); + hint("Try running: npm install -g appwrite-cli@latest --force"); + } + } +}; + +/** + * Update via Homebrew + */ +const updateViaHomebrew = async () => { + try { + await execCommand('brew', ['upgrade', 'appwrite']); + console.log(""); + success("Updated to latest version via Homebrew!"); + hint("Run 'appwrite --version' to verify the new version."); + } catch (e) { + if (e.message.includes('already installed') || e.message.includes('up-to-date')) { + console.log(""); + success("Latest version is already installed via Homebrew!"); + hint("The CLI is up to date. Run 'appwrite --version' to verify."); + } else { + console.log(""); + error(`Failed to update via Homebrew: ${e.message}`); + hint("Try running: brew upgrade appwrite"); + } + } +}; + +/** + * Show manual update instructions + */ +const showManualInstructions = (latestVersion) => { + log("Manual update options:"); + console.log(""); + + log(`${chalk.bold("Option 1: NPM")}`); + console.log(` npm install -g appwrite-cli@latest`); + console.log(""); + + log(`${chalk.bold("Option 2: Homebrew")}`); + console.log(` brew upgrade appwrite`); + console.log(""); + + log(`${chalk.bold("Option 3: Download Binary")}`); + console.log(` Visit: https://github.com/appwrite-cli/releases/tag/${latestVersion}`); +}; + +/** + * Show interactive menu for choosing update method + */ +const chooseUpdateMethod = async (latestVersion) => { + const choices = [ + { name: 'NPM', value: 'npm' }, + { name: 'Homebrew', value: 'homebrew' }, + { name: 'Show manual instructions', value: 'manual' } + ]; + + const { method } = await inquirer.prompt([ + { + type: 'list', + name: 'method', + message: 'Could not detect installation method. How would you like to update?', + choices: choices + } + ]); + + switch (method) { + case 'npm': + await updateViaNpm(); + break; + case 'homebrew': + await updateViaHomebrew(); + break; + case 'manual': + showManualInstructions(latestVersion); + break; + } +}; + +/** + * Main update function + */ +const updateCli = async ({ manual } = {}) => { + try { + const latestVersion = await getLatestVersion(); + + const comparison = compareVersions(version, latestVersion); + + if (comparison === 0) { + success(`You're already running the latest version (${chalk.bold(version)})!`); + return; + } else if (comparison < 0) { + warn(`You're running a newer version (${chalk.bold(version)}) than the latest released version (${chalk.bold(latestVersion)}).`); + hint("This might be a pre-release or development version."); + return; + } + + log(`Updating from ${chalk.blue(version)} to ${chalk.green(latestVersion)}...`); + console.log(""); + + if (manual) { + showManualInstructions(latestVersion); + return; + } + + if (isInstalledViaNpm()) { + await updateViaNpm(); + } else if (isInstalledViaHomebrew()) { + await updateViaHomebrew(); + } else { + await chooseUpdateMethod(latestVersion); + } + + } catch (e) { + console.log(""); + error(`Failed to check for updates: ${e.message}`); + hint("You can manually check for updates at: https://github.com/appwrite-cli/releases"); + } +}; + +const update = new Command("update") + .description("Update the Appwrite CLI to the latest version") + .option("--manual", "Show manual update instructions instead of auto-updating") + .action(actionRunner(updateCli)); + +module.exports = { + update +}; diff --git a/lib/commands/users.js b/lib/commands/users.js index f9eab2a..8285cd5 100644 --- a/lib/commands/users.js +++ b/lib/commands/users.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); @@ -558,7 +558,7 @@ const usersCreateSHAUser = async ({userId,email,password,passwordVersion,name,pa /** * @typedef {Object} UsersGetUsageRequestParams - * @property {UserUsageRange} range Date range. + * @property {UsageRange} range Date range. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk diff --git a/lib/commands/vcs.js b/lib/commands/vcs.js index 0fe6698..7beebaf 100644 --- a/lib/commands/vcs.js +++ b/lib/commands/vcs.js @@ -7,7 +7,7 @@ const libClient = require('../client.js'); const { getAllFiles, showConsoleLink } = require('../utils.js'); const { Command } = require('commander'); const { sdkForProject, sdkForConsole } = require('../sdks') -const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser') +const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser') const { localConfig, globalConfig } = require("../config"); const { File } = require('undici'); const { ReadableStream } = require('stream/web'); diff --git a/lib/config.js b/lib/config.js index 44cdf31..a67976a 100644 --- a/lib/config.js +++ b/lib/config.js @@ -9,6 +9,7 @@ const KeysSite = new Set(["path", "$id", "name", "enabled", "logging", "timeout" const KeysFunction = new Set(["path", "$id", "execute", "name", "enabled", "logging", "runtime", "specification", "scopes", "events", "schedule", "timeout", "entrypoint", "commands", "vars"]); const KeysDatabase = new Set(["$id", "name", "enabled"]); const KeysCollection = new Set(["$id", "$permissions", "databaseId", "name", "enabled", "documentSecurity", "attributes", "indexes"]); +const KeysTable = new Set(["$id", "$permissions", "databaseId", "name", "enabled", "documentSecurity", "columns", "indexes"]); const KeysStorage = new Set(["$id", "$permissions", "fileSecurity", "name", "enabled", "maximumFileSize", "allowedFileExtensions", "compression", "encryption", "antivirus"]); const KeysTopics = new Set(["$id", "name", "subscribe"]); const KeysTeams = new Set(["$id", "name"]); @@ -39,6 +40,33 @@ const KeysAttributes = new Set([ // Strings "encrypt", ]); +const KeysColumns = new Set([ + "key", + "type", + "required", + "array", + "size", + "default", + // integer and float + "min", + "max", + // email, enum, URL, IP, and datetime + "format", + // enum + "elements", + // relationship + "relatedCollection", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side", + // Indexes + "attributes", + "orders", + // Strings + "encrypt", +]); const KeyIndexes = new Set(["key", "type", "status", "attributes", "orders"]); function whitelistKeys(value, keys, nestedKeys = {}) { @@ -310,6 +338,50 @@ class Local extends Config { this.set("collections", collections); } + getTables() { + if (!this.has("tables")) { + return []; + } + return this.get("tables"); + } + + getTable($id) { + if (!this.has("tables")) { + return {}; + } + + let tables = this.get("tables"); + for (let i = 0; i < tables.length; i++) { + if (tables[i]['$id'] == $id) { + return tables[i]; + } + } + + return {}; + } + + addTable(props) { + props = whitelistKeys(props, KeysTable, { + columns: KeysColumns, + indexes: KeyIndexes + }); + + if (!this.has("tables")) { + this.set("tables", []); + } + + let tables = this.get("tables"); + for (let i = 0; i < tables.length; i++) { + if (tables[i]['$id'] == props['$id'] && tables[i]['databaseId'] == props['databaseId']) { + tables[i] = props; + this.set("tables", tables); + return; + } + } + tables.push(props); + this.set("tables", tables); + } + getBuckets() { if (!this.has("buckets")) { return []; @@ -713,5 +785,6 @@ module.exports = { KeysStorage, KeysTeams, KeysCollection, + KeysTable, whitelistKeys }; diff --git a/lib/parser.js b/lib/parser.js index 35bc491..2b7b8af 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -122,7 +122,7 @@ const parseError = (err) => { } catch { } - const version = '8.3.0'; + const version = '9.0.0'; const stepsToReproduce = `Running \`appwrite ${cliConfig.reportData.data.args.join(' ')}\``; const yourEnvironment = `CLI version: ${version}\nOperation System: ${os.type()}\nAppwrite version: ${appwriteVersion}\nIs Cloud: ${isCloud()}`; @@ -216,6 +216,7 @@ const commandDescriptions = { "sites": `The sites command allows you to view, create and manage your Appwrite Sites.`, "storage": `The storage command allows you to manage your project files.`, "teams": `The teams command allows you to group users of your project to enable them to share read and write access to your project resources.`, + "update": `The update command allows you to update the Appwrite CLI to the latest version.`, "users": `The users command allows you to manage your project users.`, "client": `The client command allows you to configure your CLI`, "login": `The login command allows you to authenticate and manage a user account.`, diff --git a/lib/questions.js b/lib/questions.js index 3075c60..5462e3f 100644 --- a/lib/questions.js +++ b/lib/questions.js @@ -255,10 +255,11 @@ const questionsPullResources = [ choices: [ { name: `Settings ${chalk.blackBright(`(Project)`)}`, value: 'settings' }, { name: `Functions ${chalk.blackBright(`(Deployment)`)}`, value: 'functions' }, - { name: `Collections ${chalk.blackBright(`(Databases)`)}`, value: 'collections' }, + { name: `Tables ${chalk.blackBright(`(Grids)`)}`, value: 'tables' }, { name: `Buckets ${chalk.blackBright(`(Storage)`)}`, value: 'buckets' }, { name: `Teams ${chalk.blackBright(`(Auth)`)}`, value: 'teams' }, - { name: `Topics ${chalk.blackBright(`(Messaging)`)}`, value: 'messages' } + { name: `Topics ${chalk.blackBright(`(Messaging)`)}`, value: 'messages' }, + { name: `Collections ${chalk.blackBright(`(Database)`)}`, value: 'collections' } ] } ] @@ -666,10 +667,11 @@ const questionsPushResources = [ choices: [ { name: `Settings ${chalk.blackBright(`(Project)`)}`, value: 'settings' }, { name: `Functions ${chalk.blackBright(`(Deployment)`)}`, value: 'functions' }, - { name: `Collections ${chalk.blackBright(`(Databases)`)}`, value: 'collections' }, + { name: `Tables ${chalk.blackBright(`(Grids)`)}`, value: 'tables' }, { name: `Buckets ${chalk.blackBright(`(Storage)`)}`, value: 'buckets' }, { name: `Teams ${chalk.blackBright(`(Auth)`)}`, value: 'teams' }, - { name: `Topics ${chalk.blackBright(`(Messaging)`)}`, value: 'messages' } + { name: `Topics ${chalk.blackBright(`(Messaging)`)}`, value: 'messages' }, + { name: `Collections ${chalk.blackBright(`(Database)`)}`, value: 'collections' } ] } ]; @@ -682,10 +684,11 @@ const questionsInitResources = [ choices: [ { name: 'Function', value: 'function' }, { name: 'Site', value: 'site' }, - { name: 'Collection', value: 'collection' }, + { name: 'Table', value: 'table' }, { name: 'Bucket', value: 'bucket' }, { name: 'Team', value: 'team' }, - { name: 'Topic', value: 'message' } + { name: 'Topic', value: 'message' }, + { name: 'Collection', value: 'collection' } ] } ]; @@ -753,6 +756,27 @@ const questionsPushCollections = [ } ]; +const questionsPushTables = [ + { + type: "checkbox", + name: "tables", + message: "Which tables would you like to push?", + validate: (value) => validateRequired('table', value), + when: () => localConfig.getTables().length > 0, + choices: () => { + let tables = localConfig.getTables(); + checkDeployConditions(localConfig) + + return tables.map(table => { + return { + name: `${table.name} (${table['databaseId']} - ${table['$id']})`, + value: `${table['databaseId']}|${table['$id']}` + } + }); + } + } +]; + const questionPushChanges = [ { type: "input", @@ -1002,5 +1026,6 @@ module.exports = { questionsCreateTeam, questionPushChanges, questionPushChangesConfirmation, - questionsCreateSite + questionsCreateSite, + questionsPushTables }; diff --git a/lib/utils.js b/lib/utils.js index 5655b21..ee9f22f 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -3,8 +3,43 @@ const path = require("path"); const net = require("net"); const childProcess = require('child_process'); const chalk = require('chalk'); +const { fetch } = require("undici"); const { localConfig, globalConfig } = require("./config"); +/** + * Get the latest version from npm registry + */ +async function getLatestVersion() { + try { + const response = await fetch('https://registry.npmjs.org/appwrite-cli/latest'); + if (!response.ok) { + throw new Error(`HTTP ${response.status}`); + } + const data = await response.json(); + return data.version; + } catch (e) { + throw new Error(`Failed to fetch latest version: ${e.message}`); + } +} + +/** + * Compare versions using semantic versioning + */ +function compareVersions(current, latest) { + const currentParts = current.split('.').map(Number); + const latestParts = latest.split('.').map(Number); + + for (let i = 0; i < Math.max(currentParts.length, latestParts.length); i++) { + const currentPart = currentParts[i] || 0; + const latestPart = latestParts[i] || 0; + + if (latestPart > currentPart) return 1; // Latest is newer + if (latestPart < currentPart) return -1; // Current is newer + } + + return 0; // Same version +} + function getAllFiles(folder) { const files = []; for (const pathDir of fs.readdirSync(folder)) { @@ -60,7 +95,7 @@ function systemHasCommand(command) { const checkDeployConditions = (localConfig) => { if (Object.keys(localConfig.data).length === 0) { - throw new Error("No appwrite.json file found in the current directory. Please run this command again in the folder containing your appwrite.json file, or run 'appwrite init project' to link current directory to an Appwrite project."); + throw new Error("No appwrite.config.json file found in the current directory. Please run this command again in the folder containing your appwrite.config.json file, or run 'appwrite init project' to link current directory to an Appwrite project."); } } @@ -285,5 +320,7 @@ module.exports = { systemHasCommand, checkDeployConditions, showConsoleLink, - isCloud + isCloud, + getLatestVersion, + compareVersions }; diff --git a/package.json b/package.json index 5b4dc35..470c285 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "appwrite-cli", "homepage": "https://appwrite.io/support", "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", - "version": "8.3.0", + "version": "9.0.0", "license": "BSD-3-Clause", "main": "index.js", "bin": { diff --git a/scoop/appwrite.json b/scoop/appwrite.config.json similarity index 88% rename from scoop/appwrite.json rename to scoop/appwrite.config.json index 533c04a..a302dac 100644 --- a/scoop/appwrite.json +++ b/scoop/appwrite.config.json @@ -1,12 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json", - "version": "8.3.0", + "version": "9.0.0", "description": "The Appwrite CLI is a command-line application that allows you to interact with Appwrite and perform server-side tasks using your terminal.", "homepage": "https://github.com/appwrite/sdk-for-cli", "license": "BSD-3-Clause", "architecture": { "64bit": { - "url": "https://github.com/appwrite/sdk-for-cli/releases/download/8.3.0/appwrite-cli-win-x64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/9.0.0/appwrite-cli-win-x64.exe", "bin": [ [ "appwrite-cli-win-x64.exe", @@ -15,7 +15,7 @@ ] }, "arm64": { - "url": "https://github.com/appwrite/sdk-for-cli/releases/download/8.3.0/appwrite-cli-win-arm64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/9.0.0/appwrite-cli-win-arm64.exe", "bin": [ [ "appwrite-cli-win-arm64.exe", From 2a101b8769689ed5c14e27d2dc2c06d76e87e5bd Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 20 Aug 2025 18:23:48 +1200 Subject: [PATCH 2/6] Add 1.8.x support --- docs/examples/databases/create.md | 1 - docs/examples/tablesdb/create.md | 1 - lib/commands/databases.js | 9 ++------- lib/commands/tables-db.js | 13 ++++--------- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/docs/examples/databases/create.md b/docs/examples/databases/create.md index 8317504..9e75239 100644 --- a/docs/examples/databases/create.md +++ b/docs/examples/databases/create.md @@ -2,4 +2,3 @@ appwrite databases create \ --databaseId \ --name \ - diff --git a/docs/examples/tablesdb/create.md b/docs/examples/tablesdb/create.md index e9176db..894dee5 100644 --- a/docs/examples/tablesdb/create.md +++ b/docs/examples/tablesdb/create.md @@ -2,4 +2,3 @@ appwrite tablesDb create \ --databaseId \ --name \ - diff --git a/lib/commands/databases.js b/lib/commands/databases.js index 80fb1b0..4aadcb7 100644 --- a/lib/commands/databases.js +++ b/lib/commands/databases.js @@ -85,7 +85,6 @@ const databasesList = async ({queries,search,parseOutput = true, overrideForCli * @property {string} databaseId 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. * @property {string} name Database name. Max length: 128 chars. * @property {boolean} enabled 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. - * @property {Type} type Database type. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -94,7 +93,7 @@ const databasesList = async ({queries,search,parseOutput = true, overrideForCli /** * @param {DatabasesCreateRequestParams} params */ -const databasesCreate = async ({databaseId,name,enabled,type,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const databasesCreate = async ({databaseId,name,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/databases'; @@ -108,9 +107,6 @@ const databasesCreate = async ({databaseId,name,enabled,type,parseOutput = true, if (typeof enabled !== 'undefined') { payload['enabled'] = enabled; } - if (typeof type !== 'undefined') { - payload['type'] = type; - } let response = undefined; @@ -2393,12 +2389,11 @@ databases .requiredOption(`--database-id `, `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.`) .requiredOption(`--name `, `Database name. Max length: 128 chars.`) .option(`--enabled [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) - .option(`--type `, `Database type.`) .action(actionRunner(databasesCreate)) databases .command(`list-usage`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-usage' instead] 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(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-usage' instead] 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.`) .option(`--range `, `Date range.`) .option(`--console`, `Get the resource console url`) .action(actionRunner(databasesListUsage)) diff --git a/lib/commands/tables-db.js b/lib/commands/tables-db.js index 4461177..c8638e6 100644 --- a/lib/commands/tables-db.js +++ b/lib/commands/tables-db.js @@ -85,7 +85,6 @@ const tablesdbList = async ({queries,search,parseOutput = true, overrideForCli = * @property {string} databaseId 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. * @property {string} name Database name. Max length: 128 chars. * @property {boolean} enabled 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. - * @property {Type} type Database type. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -94,7 +93,7 @@ const tablesdbList = async ({queries,search,parseOutput = true, overrideForCli = /** * @param {TablesDbCreateRequestParams} params */ -const tablesdbCreate = async ({databaseId,name,enabled,type,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesdbCreate = async ({databaseId,name,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb'; @@ -108,9 +107,6 @@ const tablesdbCreate = async ({databaseId,name,enabled,type,parseOutput = true, if (typeof enabled !== 'undefined') { payload['enabled'] = enabled; } - if (typeof type !== 'undefined') { - payload['type'] = type; - } let response = undefined; @@ -2375,7 +2371,6 @@ tablesdb .requiredOption(`--database-id `, `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.`) .requiredOption(`--name `, `Database name. Max length: 128 chars.`) .option(`--enabled [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) - .option(`--type `, `Database type.`) .action(actionRunner(tablesdbCreate)) tablesdb @@ -2714,7 +2709,7 @@ tablesdb tablesdb .command(`list-indexes`) - .description(`List indexes in the collection.`) + .description(`List indexes on the table.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) .option(`--queries [queries...]`, `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`) @@ -2723,7 +2718,7 @@ tablesdb tablesdb .command(`create-index`) - .description(`Creates an index on the columns listed. Your index should include all the columns you will query in a single request. Attributes can be 'key', 'fulltext', and 'unique'.`) + .description(`Creates an index on the columns listed. Your index should include all the columns you will query in a single request. Type can be 'key', 'fulltext', or 'unique'.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) .requiredOption(`--key `, `Index Key.`) @@ -2891,7 +2886,7 @@ tablesdb tablesdb .command(`get-usage`) - .description(`Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`) + .description(`Get usage metrics and statistics for a database. You can view the total number of 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.`) .requiredOption(`--database-id `, `Database ID.`) .option(`--range `, `Date range.`) .action(actionRunner(tablesdbGetUsage)) From 32ce7d580a5989ee7c6d66d902761c2970f3e5dc Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 21 Aug 2025 22:16:46 +1200 Subject: [PATCH 3/6] Fix casing --- .../account/create-m-f-a-authenticator.md | 2 + .../account/create-m-f-a-challenge.md | 2 + .../account/create-m-f-a-recovery-codes.md | 1 + .../account/delete-m-f-a-authenticator.md | 2 + .../account/get-m-f-a-recovery-codes.md | 1 + docs/examples/account/list-m-f-a-factors.md | 1 + .../account/update-m-f-a-authenticator.md | 3 + .../account/update-m-f-a-challenge.md | 3 + .../account/update-m-f-a-recovery-codes.md | 1 + .../messaging/create-a-p-n-s-provider.md | 9 + .../messaging/create-f-c-m-provider.md | 5 + docs/examples/messaging/create-s-m-s.md | 8 + .../messaging/create-s-m-t-p-provider.md | 15 + .../messaging/update-a-p-n-s-provider.md | 9 + .../messaging/update-f-c-m-provider.md | 5 + docs/examples/messaging/update-s-m-s.md | 8 + .../messaging/update-s-m-t-p-provider.md | 15 + docs/examples/projects/create-s-m-t-p-test.md | 11 + .../projects/delete-s-m-s-template.md | 4 + docs/examples/projects/get-s-m-s-template.md | 4 + .../projects/update-a-p-i-status-all.md | 3 + docs/examples/projects/update-a-p-i-status.md | 4 + .../projects/update-s-m-s-template.md | 5 + docs/examples/projects/update-s-m-t-p.md | 11 + .../tablesdb/create-boolean-column.md | 2 +- .../tablesdb/create-datetime-column.md | 2 +- docs/examples/tablesdb/create-email-column.md | 2 +- docs/examples/tablesdb/create-enum-column.md | 2 +- docs/examples/tablesdb/create-float-column.md | 2 +- docs/examples/tablesdb/create-index.md | 2 +- .../tablesdb/create-integer-column.md | 2 +- docs/examples/tablesdb/create-ip-column.md | 2 +- .../tablesdb/create-relationship-column.md | 2 +- docs/examples/tablesdb/create-row.md | 2 +- docs/examples/tablesdb/create-rows.md | 2 +- .../examples/tablesdb/create-string-column.md | 2 +- docs/examples/tablesdb/create-table.md | 2 +- docs/examples/tablesdb/create-url-column.md | 2 +- docs/examples/tablesdb/create.md | 2 +- .../examples/tablesdb/decrement-row-column.md | 2 +- docs/examples/tablesdb/delete-column.md | 2 +- docs/examples/tablesdb/delete-index.md | 2 +- docs/examples/tablesdb/delete-row.md | 2 +- docs/examples/tablesdb/delete-rows.md | 2 +- docs/examples/tablesdb/delete-table.md | 2 +- docs/examples/tablesdb/delete.md | 2 +- docs/examples/tablesdb/get-column.md | 2 +- docs/examples/tablesdb/get-index.md | 2 +- docs/examples/tablesdb/get-row.md | 2 +- docs/examples/tablesdb/get-table-usage.md | 2 +- docs/examples/tablesdb/get-table.md | 2 +- docs/examples/tablesdb/get-usage.md | 2 +- docs/examples/tablesdb/get.md | 2 +- .../examples/tablesdb/increment-row-column.md | 2 +- docs/examples/tablesdb/list-columns.md | 2 +- docs/examples/tablesdb/list-indexes.md | 2 +- docs/examples/tablesdb/list-row-logs.md | 2 +- docs/examples/tablesdb/list-rows.md | 2 +- docs/examples/tablesdb/list-table-logs.md | 2 +- docs/examples/tablesdb/list-tables.md | 2 +- docs/examples/tablesdb/list-usage.md | 2 +- docs/examples/tablesdb/list.md | 2 +- .../tablesdb/update-boolean-column.md | 2 +- .../tablesdb/update-datetime-column.md | 2 +- docs/examples/tablesdb/update-email-column.md | 2 +- docs/examples/tablesdb/update-enum-column.md | 2 +- docs/examples/tablesdb/update-float-column.md | 2 +- .../tablesdb/update-integer-column.md | 2 +- docs/examples/tablesdb/update-ip-column.md | 2 +- .../tablesdb/update-relationship-column.md | 2 +- docs/examples/tablesdb/update-row.md | 2 +- docs/examples/tablesdb/update-rows.md | 2 +- .../examples/tablesdb/update-string-column.md | 2 +- docs/examples/tablesdb/update-table.md | 2 +- docs/examples/tablesdb/update-url-column.md | 2 +- docs/examples/tablesdb/update.md | 2 +- docs/examples/tablesdb/upsert-row.md | 2 +- docs/examples/tablesdb/upsert-rows.md | 2 +- .../users/create-m-f-a-recovery-codes.md | 2 + .../users/delete-m-f-a-authenticator.md | 3 + .../users/get-m-f-a-recovery-codes.md | 2 + docs/examples/users/list-m-f-a-factors.md | 2 + .../users/update-m-f-a-recovery-codes.md | 2 + docs/examples/users/update-m-f-a.md | 3 + lib/commands/account.js | 366 ++++++++- lib/commands/messaging.js | 728 ++++++++++++++++-- lib/commands/projects.js | 402 +++++++++- lib/commands/{tables-db.js => tables-d-b.js} | 308 ++++---- lib/commands/users.js | 245 +++++- 89 files changed, 2015 insertions(+), 288 deletions(-) create mode 100644 docs/examples/account/create-m-f-a-authenticator.md create mode 100644 docs/examples/account/create-m-f-a-challenge.md create mode 100644 docs/examples/account/create-m-f-a-recovery-codes.md create mode 100644 docs/examples/account/delete-m-f-a-authenticator.md create mode 100644 docs/examples/account/get-m-f-a-recovery-codes.md create mode 100644 docs/examples/account/list-m-f-a-factors.md create mode 100644 docs/examples/account/update-m-f-a-authenticator.md create mode 100644 docs/examples/account/update-m-f-a-challenge.md create mode 100644 docs/examples/account/update-m-f-a-recovery-codes.md create mode 100644 docs/examples/messaging/create-a-p-n-s-provider.md create mode 100644 docs/examples/messaging/create-f-c-m-provider.md create mode 100644 docs/examples/messaging/create-s-m-s.md create mode 100644 docs/examples/messaging/create-s-m-t-p-provider.md create mode 100644 docs/examples/messaging/update-a-p-n-s-provider.md create mode 100644 docs/examples/messaging/update-f-c-m-provider.md create mode 100644 docs/examples/messaging/update-s-m-s.md create mode 100644 docs/examples/messaging/update-s-m-t-p-provider.md create mode 100644 docs/examples/projects/create-s-m-t-p-test.md create mode 100644 docs/examples/projects/delete-s-m-s-template.md create mode 100644 docs/examples/projects/get-s-m-s-template.md create mode 100644 docs/examples/projects/update-a-p-i-status-all.md create mode 100644 docs/examples/projects/update-a-p-i-status.md create mode 100644 docs/examples/projects/update-s-m-s-template.md create mode 100644 docs/examples/projects/update-s-m-t-p.md create mode 100644 docs/examples/users/create-m-f-a-recovery-codes.md create mode 100644 docs/examples/users/delete-m-f-a-authenticator.md create mode 100644 docs/examples/users/get-m-f-a-recovery-codes.md create mode 100644 docs/examples/users/list-m-f-a-factors.md create mode 100644 docs/examples/users/update-m-f-a-recovery-codes.md create mode 100644 docs/examples/users/update-m-f-a.md rename lib/commands/{tables-db.js => tables-d-b.js} (92%) diff --git a/docs/examples/account/create-m-f-a-authenticator.md b/docs/examples/account/create-m-f-a-authenticator.md new file mode 100644 index 0000000..a976bc8 --- /dev/null +++ b/docs/examples/account/create-m-f-a-authenticator.md @@ -0,0 +1,2 @@ +appwrite account createMFAAuthenticator \ + --type totp diff --git a/docs/examples/account/create-m-f-a-challenge.md b/docs/examples/account/create-m-f-a-challenge.md new file mode 100644 index 0000000..13e38e8 --- /dev/null +++ b/docs/examples/account/create-m-f-a-challenge.md @@ -0,0 +1,2 @@ +appwrite account createMFAChallenge \ + --factor email diff --git a/docs/examples/account/create-m-f-a-recovery-codes.md b/docs/examples/account/create-m-f-a-recovery-codes.md new file mode 100644 index 0000000..7c80d88 --- /dev/null +++ b/docs/examples/account/create-m-f-a-recovery-codes.md @@ -0,0 +1 @@ +appwrite account createMFARecoveryCodes diff --git a/docs/examples/account/delete-m-f-a-authenticator.md b/docs/examples/account/delete-m-f-a-authenticator.md new file mode 100644 index 0000000..67f278f --- /dev/null +++ b/docs/examples/account/delete-m-f-a-authenticator.md @@ -0,0 +1,2 @@ +appwrite account deleteMFAAuthenticator \ + --type totp diff --git a/docs/examples/account/get-m-f-a-recovery-codes.md b/docs/examples/account/get-m-f-a-recovery-codes.md new file mode 100644 index 0000000..d4e274c --- /dev/null +++ b/docs/examples/account/get-m-f-a-recovery-codes.md @@ -0,0 +1 @@ +appwrite account getMFARecoveryCodes diff --git a/docs/examples/account/list-m-f-a-factors.md b/docs/examples/account/list-m-f-a-factors.md new file mode 100644 index 0000000..3f2b6d7 --- /dev/null +++ b/docs/examples/account/list-m-f-a-factors.md @@ -0,0 +1 @@ +appwrite account listMFAFactors diff --git a/docs/examples/account/update-m-f-a-authenticator.md b/docs/examples/account/update-m-f-a-authenticator.md new file mode 100644 index 0000000..d38af3d --- /dev/null +++ b/docs/examples/account/update-m-f-a-authenticator.md @@ -0,0 +1,3 @@ +appwrite account updateMFAAuthenticator \ + --type totp \ + --otp diff --git a/docs/examples/account/update-m-f-a-challenge.md b/docs/examples/account/update-m-f-a-challenge.md new file mode 100644 index 0000000..f6c3dcf --- /dev/null +++ b/docs/examples/account/update-m-f-a-challenge.md @@ -0,0 +1,3 @@ +appwrite account updateMFAChallenge \ + --challengeId \ + --otp diff --git a/docs/examples/account/update-m-f-a-recovery-codes.md b/docs/examples/account/update-m-f-a-recovery-codes.md new file mode 100644 index 0000000..d3b398b --- /dev/null +++ b/docs/examples/account/update-m-f-a-recovery-codes.md @@ -0,0 +1 @@ +appwrite account updateMFARecoveryCodes diff --git a/docs/examples/messaging/create-a-p-n-s-provider.md b/docs/examples/messaging/create-a-p-n-s-provider.md new file mode 100644 index 0000000..e49870d --- /dev/null +++ b/docs/examples/messaging/create-a-p-n-s-provider.md @@ -0,0 +1,9 @@ +appwrite messaging createAPNSProvider \ + --providerId \ + --name \ + + + + + + diff --git a/docs/examples/messaging/create-f-c-m-provider.md b/docs/examples/messaging/create-f-c-m-provider.md new file mode 100644 index 0000000..897d1af --- /dev/null +++ b/docs/examples/messaging/create-f-c-m-provider.md @@ -0,0 +1,5 @@ +appwrite messaging createFCMProvider \ + --providerId \ + --name \ + + diff --git a/docs/examples/messaging/create-s-m-s.md b/docs/examples/messaging/create-s-m-s.md new file mode 100644 index 0000000..b1345cf --- /dev/null +++ b/docs/examples/messaging/create-s-m-s.md @@ -0,0 +1,8 @@ +appwrite messaging createSMS \ + --messageId \ + --content \ + + + + + diff --git a/docs/examples/messaging/create-s-m-t-p-provider.md b/docs/examples/messaging/create-s-m-t-p-provider.md new file mode 100644 index 0000000..3e4e7de --- /dev/null +++ b/docs/examples/messaging/create-s-m-t-p-provider.md @@ -0,0 +1,15 @@ +appwrite messaging createSMTPProvider \ + --providerId \ + --name \ + --host \ + + + + + + + + + + + diff --git a/docs/examples/messaging/update-a-p-n-s-provider.md b/docs/examples/messaging/update-a-p-n-s-provider.md new file mode 100644 index 0000000..1af2622 --- /dev/null +++ b/docs/examples/messaging/update-a-p-n-s-provider.md @@ -0,0 +1,9 @@ +appwrite messaging updateAPNSProvider \ + --providerId \ + + + + + + + diff --git a/docs/examples/messaging/update-f-c-m-provider.md b/docs/examples/messaging/update-f-c-m-provider.md new file mode 100644 index 0000000..529ad4c --- /dev/null +++ b/docs/examples/messaging/update-f-c-m-provider.md @@ -0,0 +1,5 @@ +appwrite messaging updateFCMProvider \ + --providerId \ + + + diff --git a/docs/examples/messaging/update-s-m-s.md b/docs/examples/messaging/update-s-m-s.md new file mode 100644 index 0000000..1db1aba --- /dev/null +++ b/docs/examples/messaging/update-s-m-s.md @@ -0,0 +1,8 @@ +appwrite messaging updateSMS \ + --messageId \ + + + + + + diff --git a/docs/examples/messaging/update-s-m-t-p-provider.md b/docs/examples/messaging/update-s-m-t-p-provider.md new file mode 100644 index 0000000..4cc7990 --- /dev/null +++ b/docs/examples/messaging/update-s-m-t-p-provider.md @@ -0,0 +1,15 @@ +appwrite messaging updateSMTPProvider \ + --providerId \ + + + + + + + + + + + + + diff --git a/docs/examples/projects/create-s-m-t-p-test.md b/docs/examples/projects/create-s-m-t-p-test.md new file mode 100644 index 0000000..9a4dd99 --- /dev/null +++ b/docs/examples/projects/create-s-m-t-p-test.md @@ -0,0 +1,11 @@ +appwrite projects createSMTPTest \ + --projectId \ + --emails one two three \ + --senderName \ + --senderEmail email@example.com \ + --host '' \ + + + + + diff --git a/docs/examples/projects/delete-s-m-s-template.md b/docs/examples/projects/delete-s-m-s-template.md new file mode 100644 index 0000000..69fa595 --- /dev/null +++ b/docs/examples/projects/delete-s-m-s-template.md @@ -0,0 +1,4 @@ +appwrite projects deleteSMSTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/projects/get-s-m-s-template.md b/docs/examples/projects/get-s-m-s-template.md new file mode 100644 index 0000000..c61ca69 --- /dev/null +++ b/docs/examples/projects/get-s-m-s-template.md @@ -0,0 +1,4 @@ +appwrite projects getSMSTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/projects/update-a-p-i-status-all.md b/docs/examples/projects/update-a-p-i-status-all.md new file mode 100644 index 0000000..02adf9c --- /dev/null +++ b/docs/examples/projects/update-a-p-i-status-all.md @@ -0,0 +1,3 @@ +appwrite projects updateAPIStatusAll \ + --projectId \ + --status false diff --git a/docs/examples/projects/update-a-p-i-status.md b/docs/examples/projects/update-a-p-i-status.md new file mode 100644 index 0000000..de4261e --- /dev/null +++ b/docs/examples/projects/update-a-p-i-status.md @@ -0,0 +1,4 @@ +appwrite projects updateAPIStatus \ + --projectId \ + --api rest \ + --status false diff --git a/docs/examples/projects/update-s-m-s-template.md b/docs/examples/projects/update-s-m-s-template.md new file mode 100644 index 0000000..c69ac85 --- /dev/null +++ b/docs/examples/projects/update-s-m-s-template.md @@ -0,0 +1,5 @@ +appwrite projects updateSMSTemplate \ + --projectId \ + --type verification \ + --locale af \ + --message diff --git a/docs/examples/projects/update-s-m-t-p.md b/docs/examples/projects/update-s-m-t-p.md new file mode 100644 index 0000000..e39a811 --- /dev/null +++ b/docs/examples/projects/update-s-m-t-p.md @@ -0,0 +1,11 @@ +appwrite projects updateSMTP \ + --projectId \ + --enabled false \ + + + + + + + + diff --git a/docs/examples/tablesdb/create-boolean-column.md b/docs/examples/tablesdb/create-boolean-column.md index 3e21a3a..2503836 100644 --- a/docs/examples/tablesdb/create-boolean-column.md +++ b/docs/examples/tablesdb/create-boolean-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb createBooleanColumn \ +appwrite tablesDB createBooleanColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/create-datetime-column.md b/docs/examples/tablesdb/create-datetime-column.md index bee46cb..a01b64f 100644 --- a/docs/examples/tablesdb/create-datetime-column.md +++ b/docs/examples/tablesdb/create-datetime-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb createDatetimeColumn \ +appwrite tablesDB createDatetimeColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/create-email-column.md b/docs/examples/tablesdb/create-email-column.md index 3d0d4d6..003f437 100644 --- a/docs/examples/tablesdb/create-email-column.md +++ b/docs/examples/tablesdb/create-email-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb createEmailColumn \ +appwrite tablesDB createEmailColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/create-enum-column.md b/docs/examples/tablesdb/create-enum-column.md index 6a8ea71..14edc02 100644 --- a/docs/examples/tablesdb/create-enum-column.md +++ b/docs/examples/tablesdb/create-enum-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb createEnumColumn \ +appwrite tablesDB createEnumColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/create-float-column.md b/docs/examples/tablesdb/create-float-column.md index a4f7b00..3e86dc7 100644 --- a/docs/examples/tablesdb/create-float-column.md +++ b/docs/examples/tablesdb/create-float-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb createFloatColumn \ +appwrite tablesDB createFloatColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/create-index.md b/docs/examples/tablesdb/create-index.md index 3da867e..816e807 100644 --- a/docs/examples/tablesdb/create-index.md +++ b/docs/examples/tablesdb/create-index.md @@ -1,4 +1,4 @@ -appwrite tablesDb createIndex \ +appwrite tablesDB createIndex \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/create-integer-column.md b/docs/examples/tablesdb/create-integer-column.md index a5f9a7a..fdb7565 100644 --- a/docs/examples/tablesdb/create-integer-column.md +++ b/docs/examples/tablesdb/create-integer-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb createIntegerColumn \ +appwrite tablesDB createIntegerColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/create-ip-column.md b/docs/examples/tablesdb/create-ip-column.md index aa93727..b84f4ba 100644 --- a/docs/examples/tablesdb/create-ip-column.md +++ b/docs/examples/tablesdb/create-ip-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb createIpColumn \ +appwrite tablesDB createIpColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/create-relationship-column.md b/docs/examples/tablesdb/create-relationship-column.md index c7897d6..deca698 100644 --- a/docs/examples/tablesdb/create-relationship-column.md +++ b/docs/examples/tablesdb/create-relationship-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb createRelationshipColumn \ +appwrite tablesDB createRelationshipColumn \ --databaseId \ --tableId \ --relatedTableId \ diff --git a/docs/examples/tablesdb/create-row.md b/docs/examples/tablesdb/create-row.md index 0a04030..a991611 100644 --- a/docs/examples/tablesdb/create-row.md +++ b/docs/examples/tablesdb/create-row.md @@ -1,4 +1,4 @@ -appwrite tablesDb createRow \ +appwrite tablesDB createRow \ --databaseId \ --tableId \ --rowId \ diff --git a/docs/examples/tablesdb/create-rows.md b/docs/examples/tablesdb/create-rows.md index d8158ad..d1c4320 100644 --- a/docs/examples/tablesdb/create-rows.md +++ b/docs/examples/tablesdb/create-rows.md @@ -1,4 +1,4 @@ -appwrite tablesDb createRows \ +appwrite tablesDB createRows \ --databaseId \ --tableId \ --rows one two three diff --git a/docs/examples/tablesdb/create-string-column.md b/docs/examples/tablesdb/create-string-column.md index e285015..188aa26 100644 --- a/docs/examples/tablesdb/create-string-column.md +++ b/docs/examples/tablesdb/create-string-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb createStringColumn \ +appwrite tablesDB createStringColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/create-table.md b/docs/examples/tablesdb/create-table.md index 9ae952a..ce5b3c2 100644 --- a/docs/examples/tablesdb/create-table.md +++ b/docs/examples/tablesdb/create-table.md @@ -1,4 +1,4 @@ -appwrite tablesDb createTable \ +appwrite tablesDB createTable \ --databaseId \ --tableId \ --name \ diff --git a/docs/examples/tablesdb/create-url-column.md b/docs/examples/tablesdb/create-url-column.md index 9d22982..649e203 100644 --- a/docs/examples/tablesdb/create-url-column.md +++ b/docs/examples/tablesdb/create-url-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb createUrlColumn \ +appwrite tablesDB createUrlColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/create.md b/docs/examples/tablesdb/create.md index 894dee5..b1b6946 100644 --- a/docs/examples/tablesdb/create.md +++ b/docs/examples/tablesdb/create.md @@ -1,4 +1,4 @@ -appwrite tablesDb create \ +appwrite tablesDB create \ --databaseId \ --name \ diff --git a/docs/examples/tablesdb/decrement-row-column.md b/docs/examples/tablesdb/decrement-row-column.md index d232f98..3d8dc8c 100644 --- a/docs/examples/tablesdb/decrement-row-column.md +++ b/docs/examples/tablesdb/decrement-row-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb decrementRowColumn \ +appwrite tablesDB decrementRowColumn \ --databaseId \ --tableId \ --rowId \ diff --git a/docs/examples/tablesdb/delete-column.md b/docs/examples/tablesdb/delete-column.md index a1e43d4..edcff27 100644 --- a/docs/examples/tablesdb/delete-column.md +++ b/docs/examples/tablesdb/delete-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb deleteColumn \ +appwrite tablesDB deleteColumn \ --databaseId \ --tableId \ --key '' diff --git a/docs/examples/tablesdb/delete-index.md b/docs/examples/tablesdb/delete-index.md index ecd9afe..70e50aa 100644 --- a/docs/examples/tablesdb/delete-index.md +++ b/docs/examples/tablesdb/delete-index.md @@ -1,4 +1,4 @@ -appwrite tablesDb deleteIndex \ +appwrite tablesDB deleteIndex \ --databaseId \ --tableId \ --key '' diff --git a/docs/examples/tablesdb/delete-row.md b/docs/examples/tablesdb/delete-row.md index c9e849b..e26f8e2 100644 --- a/docs/examples/tablesdb/delete-row.md +++ b/docs/examples/tablesdb/delete-row.md @@ -1,4 +1,4 @@ -appwrite tablesDb deleteRow \ +appwrite tablesDB deleteRow \ --databaseId \ --tableId \ --rowId diff --git a/docs/examples/tablesdb/delete-rows.md b/docs/examples/tablesdb/delete-rows.md index f381316..456c706 100644 --- a/docs/examples/tablesdb/delete-rows.md +++ b/docs/examples/tablesdb/delete-rows.md @@ -1,4 +1,4 @@ -appwrite tablesDb deleteRows \ +appwrite tablesDB deleteRows \ --databaseId \ --tableId \ diff --git a/docs/examples/tablesdb/delete-table.md b/docs/examples/tablesdb/delete-table.md index ae48ae5..cd21870 100644 --- a/docs/examples/tablesdb/delete-table.md +++ b/docs/examples/tablesdb/delete-table.md @@ -1,3 +1,3 @@ -appwrite tablesDb deleteTable \ +appwrite tablesDB deleteTable \ --databaseId \ --tableId diff --git a/docs/examples/tablesdb/delete.md b/docs/examples/tablesdb/delete.md index a41c3ec..2ba8a45 100644 --- a/docs/examples/tablesdb/delete.md +++ b/docs/examples/tablesdb/delete.md @@ -1,2 +1,2 @@ -appwrite tablesDb delete \ +appwrite tablesDB delete \ --databaseId diff --git a/docs/examples/tablesdb/get-column.md b/docs/examples/tablesdb/get-column.md index 1027098..63d618b 100644 --- a/docs/examples/tablesdb/get-column.md +++ b/docs/examples/tablesdb/get-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb getColumn \ +appwrite tablesDB getColumn \ --databaseId \ --tableId \ --key '' diff --git a/docs/examples/tablesdb/get-index.md b/docs/examples/tablesdb/get-index.md index cf5d2bd..208fccd 100644 --- a/docs/examples/tablesdb/get-index.md +++ b/docs/examples/tablesdb/get-index.md @@ -1,4 +1,4 @@ -appwrite tablesDb getIndex \ +appwrite tablesDB getIndex \ --databaseId \ --tableId \ --key '' diff --git a/docs/examples/tablesdb/get-row.md b/docs/examples/tablesdb/get-row.md index 655c7d6..cb26107 100644 --- a/docs/examples/tablesdb/get-row.md +++ b/docs/examples/tablesdb/get-row.md @@ -1,4 +1,4 @@ -appwrite tablesDb getRow \ +appwrite tablesDB getRow \ --databaseId \ --tableId \ --rowId \ diff --git a/docs/examples/tablesdb/get-table-usage.md b/docs/examples/tablesdb/get-table-usage.md index 3d2aab1..ccaac73 100644 --- a/docs/examples/tablesdb/get-table-usage.md +++ b/docs/examples/tablesdb/get-table-usage.md @@ -1,4 +1,4 @@ -appwrite tablesDb getTableUsage \ +appwrite tablesDB getTableUsage \ --databaseId \ --tableId \ diff --git a/docs/examples/tablesdb/get-table.md b/docs/examples/tablesdb/get-table.md index 60c3a5a..2aa2de3 100644 --- a/docs/examples/tablesdb/get-table.md +++ b/docs/examples/tablesdb/get-table.md @@ -1,3 +1,3 @@ -appwrite tablesDb getTable \ +appwrite tablesDB getTable \ --databaseId \ --tableId diff --git a/docs/examples/tablesdb/get-usage.md b/docs/examples/tablesdb/get-usage.md index 90be79b..e98fd43 100644 --- a/docs/examples/tablesdb/get-usage.md +++ b/docs/examples/tablesdb/get-usage.md @@ -1,3 +1,3 @@ -appwrite tablesDb getUsage \ +appwrite tablesDB getUsage \ --databaseId \ diff --git a/docs/examples/tablesdb/get.md b/docs/examples/tablesdb/get.md index 46cec46..9323fad 100644 --- a/docs/examples/tablesdb/get.md +++ b/docs/examples/tablesdb/get.md @@ -1,2 +1,2 @@ -appwrite tablesDb get \ +appwrite tablesDB get \ --databaseId diff --git a/docs/examples/tablesdb/increment-row-column.md b/docs/examples/tablesdb/increment-row-column.md index 317fe89..9c97422 100644 --- a/docs/examples/tablesdb/increment-row-column.md +++ b/docs/examples/tablesdb/increment-row-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb incrementRowColumn \ +appwrite tablesDB incrementRowColumn \ --databaseId \ --tableId \ --rowId \ diff --git a/docs/examples/tablesdb/list-columns.md b/docs/examples/tablesdb/list-columns.md index 0f5812c..b6b7ce4 100644 --- a/docs/examples/tablesdb/list-columns.md +++ b/docs/examples/tablesdb/list-columns.md @@ -1,4 +1,4 @@ -appwrite tablesDb listColumns \ +appwrite tablesDB listColumns \ --databaseId \ --tableId \ diff --git a/docs/examples/tablesdb/list-indexes.md b/docs/examples/tablesdb/list-indexes.md index a226483..6e506cf 100644 --- a/docs/examples/tablesdb/list-indexes.md +++ b/docs/examples/tablesdb/list-indexes.md @@ -1,4 +1,4 @@ -appwrite tablesDb listIndexes \ +appwrite tablesDB listIndexes \ --databaseId \ --tableId \ diff --git a/docs/examples/tablesdb/list-row-logs.md b/docs/examples/tablesdb/list-row-logs.md index baa7e90..2dc6fbe 100644 --- a/docs/examples/tablesdb/list-row-logs.md +++ b/docs/examples/tablesdb/list-row-logs.md @@ -1,4 +1,4 @@ -appwrite tablesDb listRowLogs \ +appwrite tablesDB listRowLogs \ --databaseId \ --tableId \ --rowId \ diff --git a/docs/examples/tablesdb/list-rows.md b/docs/examples/tablesdb/list-rows.md index 496ba61..5b06216 100644 --- a/docs/examples/tablesdb/list-rows.md +++ b/docs/examples/tablesdb/list-rows.md @@ -1,4 +1,4 @@ -appwrite tablesDb listRows \ +appwrite tablesDB listRows \ --databaseId \ --tableId \ diff --git a/docs/examples/tablesdb/list-table-logs.md b/docs/examples/tablesdb/list-table-logs.md index 71647b2..9135168 100644 --- a/docs/examples/tablesdb/list-table-logs.md +++ b/docs/examples/tablesdb/list-table-logs.md @@ -1,4 +1,4 @@ -appwrite tablesDb listTableLogs \ +appwrite tablesDB listTableLogs \ --databaseId \ --tableId \ diff --git a/docs/examples/tablesdb/list-tables.md b/docs/examples/tablesdb/list-tables.md index 6d4eb7b..5a7b3ba 100644 --- a/docs/examples/tablesdb/list-tables.md +++ b/docs/examples/tablesdb/list-tables.md @@ -1,4 +1,4 @@ -appwrite tablesDb listTables \ +appwrite tablesDB listTables \ --databaseId \ diff --git a/docs/examples/tablesdb/list-usage.md b/docs/examples/tablesdb/list-usage.md index 9622b7a..3b5c6fa 100644 --- a/docs/examples/tablesdb/list-usage.md +++ b/docs/examples/tablesdb/list-usage.md @@ -1,2 +1,2 @@ -appwrite tablesDb listUsage \ +appwrite tablesDB listUsage \ diff --git a/docs/examples/tablesdb/list.md b/docs/examples/tablesdb/list.md index dd10ab3..591d65d 100644 --- a/docs/examples/tablesdb/list.md +++ b/docs/examples/tablesdb/list.md @@ -1,3 +1,3 @@ -appwrite tablesDb list \ +appwrite tablesDB list \ diff --git a/docs/examples/tablesdb/update-boolean-column.md b/docs/examples/tablesdb/update-boolean-column.md index c3a2994..911bb9f 100644 --- a/docs/examples/tablesdb/update-boolean-column.md +++ b/docs/examples/tablesdb/update-boolean-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb updateBooleanColumn \ +appwrite tablesDB updateBooleanColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/update-datetime-column.md b/docs/examples/tablesdb/update-datetime-column.md index 301d5d2..874c240 100644 --- a/docs/examples/tablesdb/update-datetime-column.md +++ b/docs/examples/tablesdb/update-datetime-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb updateDatetimeColumn \ +appwrite tablesDB updateDatetimeColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/update-email-column.md b/docs/examples/tablesdb/update-email-column.md index d9fb449..72757f3 100644 --- a/docs/examples/tablesdb/update-email-column.md +++ b/docs/examples/tablesdb/update-email-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb updateEmailColumn \ +appwrite tablesDB updateEmailColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/update-enum-column.md b/docs/examples/tablesdb/update-enum-column.md index f5879d1..216610e 100644 --- a/docs/examples/tablesdb/update-enum-column.md +++ b/docs/examples/tablesdb/update-enum-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb updateEnumColumn \ +appwrite tablesDB updateEnumColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/update-float-column.md b/docs/examples/tablesdb/update-float-column.md index 9c6de6f..984903f 100644 --- a/docs/examples/tablesdb/update-float-column.md +++ b/docs/examples/tablesdb/update-float-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb updateFloatColumn \ +appwrite tablesDB updateFloatColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/update-integer-column.md b/docs/examples/tablesdb/update-integer-column.md index cf0d04e..a2252ab 100644 --- a/docs/examples/tablesdb/update-integer-column.md +++ b/docs/examples/tablesdb/update-integer-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb updateIntegerColumn \ +appwrite tablesDB updateIntegerColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/update-ip-column.md b/docs/examples/tablesdb/update-ip-column.md index 81f5f93..b96c4cf 100644 --- a/docs/examples/tablesdb/update-ip-column.md +++ b/docs/examples/tablesdb/update-ip-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb updateIpColumn \ +appwrite tablesDB updateIpColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/update-relationship-column.md b/docs/examples/tablesdb/update-relationship-column.md index e079f77..d5b7197 100644 --- a/docs/examples/tablesdb/update-relationship-column.md +++ b/docs/examples/tablesdb/update-relationship-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb updateRelationshipColumn \ +appwrite tablesDB updateRelationshipColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/update-row.md b/docs/examples/tablesdb/update-row.md index 891d91c..c9f1da4 100644 --- a/docs/examples/tablesdb/update-row.md +++ b/docs/examples/tablesdb/update-row.md @@ -1,4 +1,4 @@ -appwrite tablesDb updateRow \ +appwrite tablesDB updateRow \ --databaseId \ --tableId \ --rowId \ diff --git a/docs/examples/tablesdb/update-rows.md b/docs/examples/tablesdb/update-rows.md index 993c7a3..da78717 100644 --- a/docs/examples/tablesdb/update-rows.md +++ b/docs/examples/tablesdb/update-rows.md @@ -1,4 +1,4 @@ -appwrite tablesDb updateRows \ +appwrite tablesDB updateRows \ --databaseId \ --tableId \ diff --git a/docs/examples/tablesdb/update-string-column.md b/docs/examples/tablesdb/update-string-column.md index 0d1d6de..1132961 100644 --- a/docs/examples/tablesdb/update-string-column.md +++ b/docs/examples/tablesdb/update-string-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb updateStringColumn \ +appwrite tablesDB updateStringColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/update-table.md b/docs/examples/tablesdb/update-table.md index 81eced6..3c939b0 100644 --- a/docs/examples/tablesdb/update-table.md +++ b/docs/examples/tablesdb/update-table.md @@ -1,4 +1,4 @@ -appwrite tablesDb updateTable \ +appwrite tablesDB updateTable \ --databaseId \ --tableId \ --name \ diff --git a/docs/examples/tablesdb/update-url-column.md b/docs/examples/tablesdb/update-url-column.md index 07be8e8..c49abfe 100644 --- a/docs/examples/tablesdb/update-url-column.md +++ b/docs/examples/tablesdb/update-url-column.md @@ -1,4 +1,4 @@ -appwrite tablesDb updateUrlColumn \ +appwrite tablesDB updateUrlColumn \ --databaseId \ --tableId \ --key '' \ diff --git a/docs/examples/tablesdb/update.md b/docs/examples/tablesdb/update.md index 5b1d733..4e651e4 100644 --- a/docs/examples/tablesdb/update.md +++ b/docs/examples/tablesdb/update.md @@ -1,4 +1,4 @@ -appwrite tablesDb update \ +appwrite tablesDB update \ --databaseId \ --name \ diff --git a/docs/examples/tablesdb/upsert-row.md b/docs/examples/tablesdb/upsert-row.md index c3a2633..1143f40 100644 --- a/docs/examples/tablesdb/upsert-row.md +++ b/docs/examples/tablesdb/upsert-row.md @@ -1,4 +1,4 @@ -appwrite tablesDb upsertRow \ +appwrite tablesDB upsertRow \ --databaseId \ --tableId \ --rowId \ diff --git a/docs/examples/tablesdb/upsert-rows.md b/docs/examples/tablesdb/upsert-rows.md index 42693ac..53ec4e4 100644 --- a/docs/examples/tablesdb/upsert-rows.md +++ b/docs/examples/tablesdb/upsert-rows.md @@ -1,4 +1,4 @@ -appwrite tablesDb upsertRows \ +appwrite tablesDB upsertRows \ --databaseId \ --tableId \ --rows one two three diff --git a/docs/examples/users/create-m-f-a-recovery-codes.md b/docs/examples/users/create-m-f-a-recovery-codes.md new file mode 100644 index 0000000..b85c627 --- /dev/null +++ b/docs/examples/users/create-m-f-a-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users createMFARecoveryCodes \ + --userId diff --git a/docs/examples/users/delete-m-f-a-authenticator.md b/docs/examples/users/delete-m-f-a-authenticator.md new file mode 100644 index 0000000..8ef5597 --- /dev/null +++ b/docs/examples/users/delete-m-f-a-authenticator.md @@ -0,0 +1,3 @@ +appwrite users deleteMFAAuthenticator \ + --userId \ + --type totp diff --git a/docs/examples/users/get-m-f-a-recovery-codes.md b/docs/examples/users/get-m-f-a-recovery-codes.md new file mode 100644 index 0000000..6d5ccf3 --- /dev/null +++ b/docs/examples/users/get-m-f-a-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users getMFARecoveryCodes \ + --userId diff --git a/docs/examples/users/list-m-f-a-factors.md b/docs/examples/users/list-m-f-a-factors.md new file mode 100644 index 0000000..67a9c09 --- /dev/null +++ b/docs/examples/users/list-m-f-a-factors.md @@ -0,0 +1,2 @@ +appwrite users listMFAFactors \ + --userId diff --git a/docs/examples/users/update-m-f-a-recovery-codes.md b/docs/examples/users/update-m-f-a-recovery-codes.md new file mode 100644 index 0000000..ac70d85 --- /dev/null +++ b/docs/examples/users/update-m-f-a-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users updateMFARecoveryCodes \ + --userId diff --git a/docs/examples/users/update-m-f-a.md b/docs/examples/users/update-m-f-a.md new file mode 100644 index 0000000..2cf7b78 --- /dev/null +++ b/docs/examples/users/update-m-f-a.md @@ -0,0 +1,3 @@ +appwrite users updateMFA \ + --userId \ + --mfa false diff --git a/lib/commands/account.js b/lib/commands/account.js index 7d9e389..4de2f46 100644 --- a/lib/commands/account.js +++ b/lib/commands/account.js @@ -378,6 +378,37 @@ const accountCreateMfaAuthenticator = async ({type,parseOutput = true, overrideF } +/** + * @typedef {Object} AccountCreateMFAAuthenticatorRequestParams + * @property {AuthenticatorType} type Type of authenticator. Must be 'totp' + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {AccountCreateMFAAuthenticatorRequestParams} params + */ +const accountCreateMFAAuthenticator = async ({type,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type); + let payload = {}; + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} AccountUpdateMfaAuthenticatorRequestParams * @property {AuthenticatorType} type Type of authenticator. @@ -413,6 +444,41 @@ const accountUpdateMfaAuthenticator = async ({type,otp,parseOutput = true, overr } +/** + * @typedef {Object} AccountUpdateMFAAuthenticatorRequestParams + * @property {AuthenticatorType} type Type of authenticator. + * @property {string} otp Valid verification token. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {AccountUpdateMFAAuthenticatorRequestParams} params + */ +const accountUpdateMFAAuthenticator = async ({type,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type); + let payload = {}; + if (typeof otp !== 'undefined') { + payload['otp'] = otp; + } + + let response = undefined; + + response = await client.call('put', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} AccountDeleteMfaAuthenticatorRequestParams * @property {AuthenticatorType} type Type of authenticator. @@ -444,6 +510,37 @@ const accountDeleteMfaAuthenticator = async ({type,parseOutput = true, overrideF } +/** + * @typedef {Object} AccountDeleteMFAAuthenticatorRequestParams + * @property {AuthenticatorType} type Type of authenticator. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {AccountDeleteMFAAuthenticatorRequestParams} params + */ +const accountDeleteMFAAuthenticator = async ({type,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type); + let payload = {}; + + let response = undefined; + + response = await client.call('delete', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} AccountCreateMfaChallengeRequestParams * @property {AuthenticationFactor} factor Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'. @@ -478,6 +575,40 @@ const accountCreateMfaChallenge = async ({factor,parseOutput = true, overrideFor } +/** + * @typedef {Object} AccountCreateMFAChallengeRequestParams + * @property {AuthenticationFactor} factor Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {AccountCreateMFAChallengeRequestParams} params + */ +const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/account/mfa/challenge'; + let payload = {}; + if (typeof factor !== 'undefined') { + payload['factor'] = factor; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} AccountUpdateMfaChallengeRequestParams * @property {string} challengeId ID of the challenge. @@ -516,6 +647,44 @@ const accountUpdateMfaChallenge = async ({challengeId,otp,parseOutput = true, ov } +/** + * @typedef {Object} AccountUpdateMFAChallengeRequestParams + * @property {string} challengeId ID of the challenge. + * @property {string} otp Valid verification token. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {AccountUpdateMFAChallengeRequestParams} params + */ +const accountUpdateMFAChallenge = async ({challengeId,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/account/mfa/challenge'; + let payload = {}; + if (typeof challengeId !== 'undefined') { + payload['challengeId'] = challengeId; + } + if (typeof otp !== 'undefined') { + payload['otp'] = otp; + } + + let response = undefined; + + response = await client.call('put', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} AccountListMfaFactorsRequestParams * @property {boolean} overrideForCli @@ -545,6 +714,35 @@ const accountListMfaFactors = async ({parseOutput = true, overrideForCli = false } +/** + * @typedef {Object} AccountListMFAFactorsRequestParams + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {AccountListMFAFactorsRequestParams} params + */ +const accountListMFAFactors = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/account/mfa/factors'; + let payload = {}; + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} AccountGetMfaRecoveryCodesRequestParams * @property {boolean} overrideForCli @@ -574,6 +772,35 @@ const accountGetMfaRecoveryCodes = async ({parseOutput = true, overrideForCli = } +/** + * @typedef {Object} AccountGetMFARecoveryCodesRequestParams + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {AccountGetMFARecoveryCodesRequestParams} params + */ +const accountGetMFARecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/account/mfa/recovery-codes'; + let payload = {}; + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} AccountCreateMfaRecoveryCodesRequestParams * @property {boolean} overrideForCli @@ -604,6 +831,36 @@ const accountCreateMfaRecoveryCodes = async ({parseOutput = true, overrideForCli } +/** + * @typedef {Object} AccountCreateMFARecoveryCodesRequestParams + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {AccountCreateMFARecoveryCodesRequestParams} params + */ +const accountCreateMFARecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/account/mfa/recovery-codes'; + let payload = {}; + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} AccountUpdateMfaRecoveryCodesRequestParams * @property {boolean} overrideForCli @@ -634,6 +891,36 @@ const accountUpdateMfaRecoveryCodes = async ({parseOutput = true, overrideForCli } +/** + * @typedef {Object} AccountUpdateMFARecoveryCodesRequestParams + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {AccountUpdateMFARecoveryCodesRequestParams} params + */ +const accountUpdateMFARecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/account/mfa/recovery-codes'; + let payload = {}; + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} AccountUpdateNameRequestParams * @property {string} name User name. Max length: 128 chars. @@ -1770,56 +2057,108 @@ account account .command(`create-mfa-authenticator`) - .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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-mfa-authenticator' instead] 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.`) .requiredOption(`--type `, `Type of authenticator. Must be 'totp'`) .action(actionRunner(accountCreateMfaAuthenticator)) +account + .command(`create-mfa-authenticator`) + .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.`) + .requiredOption(`--type `, `Type of authenticator. Must be 'totp'`) + .action(actionRunner(accountCreateMFAAuthenticator)) + account .command(`update-mfa-authenticator`) - .description(`Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-mfa-authenticator' instead] Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.`) .requiredOption(`--type `, `Type of authenticator.`) .requiredOption(`--otp `, `Valid verification token.`) .action(actionRunner(accountUpdateMfaAuthenticator)) +account + .command(`update-mfa-authenticator`) + .description(`Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.`) + .requiredOption(`--type `, `Type of authenticator.`) + .requiredOption(`--otp `, `Valid verification token.`) + .action(actionRunner(accountUpdateMFAAuthenticator)) + account .command(`delete-mfa-authenticator`) - .description(`Delete an authenticator for a user by ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'delete-mfa-authenticator' instead] Delete an authenticator for a user by ID.`) .requiredOption(`--type `, `Type of authenticator.`) .action(actionRunner(accountDeleteMfaAuthenticator)) +account + .command(`delete-mfa-authenticator`) + .description(`Delete an authenticator for a user by ID.`) + .requiredOption(`--type `, `Type of authenticator.`) + .action(actionRunner(accountDeleteMFAAuthenticator)) + account .command(`create-mfa-challenge`) - .description(`Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-mfa-challenge' instead] Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.`) .requiredOption(`--factor `, `Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'.`) .action(actionRunner(accountCreateMfaChallenge)) +account + .command(`create-mfa-challenge`) + .description(`Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.`) + .requiredOption(`--factor `, `Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'.`) + .action(actionRunner(accountCreateMFAChallenge)) + account .command(`update-mfa-challenge`) - .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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-mfa-challenge' instead] 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.`) .requiredOption(`--challenge-id `, `ID of the challenge.`) .requiredOption(`--otp `, `Valid verification token.`) .action(actionRunner(accountUpdateMfaChallenge)) +account + .command(`update-mfa-challenge`) + .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.`) + .requiredOption(`--challenge-id `, `ID of the challenge.`) + .requiredOption(`--otp `, `Valid verification token.`) + .action(actionRunner(accountUpdateMFAChallenge)) + account .command(`list-mfa-factors`) - .description(`List the factors available on the account to be used as a MFA challange.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'list-mfa-factors' instead] List the factors available on the account to be used as a MFA challange.`) .action(actionRunner(accountListMfaFactors)) +account + .command(`list-mfa-factors`) + .description(`List the factors available on the account to be used as a MFA challange.`) + .action(actionRunner(accountListMFAFactors)) + account .command(`get-mfa-recovery-codes`) - .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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'get-mfa-recovery-codes' instead] 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.`) .action(actionRunner(accountGetMfaRecoveryCodes)) +account + .command(`get-mfa-recovery-codes`) + .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.`) + .action(actionRunner(accountGetMFARecoveryCodes)) + account .command(`create-mfa-recovery-codes`) - .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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-mfa-recovery-codes' instead] 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.`) .action(actionRunner(accountCreateMfaRecoveryCodes)) +account + .command(`create-mfa-recovery-codes`) + .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.`) + .action(actionRunner(accountCreateMFARecoveryCodes)) + account .command(`update-mfa-recovery-codes`) - .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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-mfa-recovery-codes' instead] 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.`) .action(actionRunner(accountUpdateMfaRecoveryCodes)) +account + .command(`update-mfa-recovery-codes`) + .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.`) + .action(actionRunner(accountUpdateMFARecoveryCodes)) + account .command(`update-name`) .description(`Update currently logged in user account name.`) @@ -2033,14 +2372,23 @@ module.exports = { accountListLogs, accountUpdateMFA, accountCreateMfaAuthenticator, + accountCreateMFAAuthenticator, accountUpdateMfaAuthenticator, + accountUpdateMFAAuthenticator, accountDeleteMfaAuthenticator, + accountDeleteMFAAuthenticator, accountCreateMfaChallenge, + accountCreateMFAChallenge, accountUpdateMfaChallenge, + accountUpdateMFAChallenge, accountListMfaFactors, + accountListMFAFactors, accountGetMfaRecoveryCodes, + accountGetMFARecoveryCodes, accountCreateMfaRecoveryCodes, + accountCreateMFARecoveryCodes, accountUpdateMfaRecoveryCodes, + accountUpdateMFARecoveryCodes, accountUpdateName, accountUpdatePassword, accountUpdatePhone, diff --git a/lib/commands/messaging.js b/lib/commands/messaging.js index f1c4867..2712673 100644 --- a/lib/commands/messaging.js +++ b/lib/commands/messaging.js @@ -521,6 +521,67 @@ const messagingCreateSms = async ({messageId,content,topics,users,targets,draft, } +/** + * @typedef {Object} MessagingCreateSMSRequestParams + * @property {string} messageId 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. + * @property {string} content SMS Content. + * @property {string[]} topics List of Topic IDs. + * @property {string[]} users List of User IDs. + * @property {string[]} targets List of Targets IDs. + * @property {boolean} draft Is message a draft + * @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {MessagingCreateSMSRequestParams} params + */ +const messagingCreateSMS = async ({messageId,content,topics,users,targets,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/messaging/messages/sms'; + let payload = {}; + if (typeof messageId !== 'undefined') { + payload['messageId'] = messageId; + } + if (typeof content !== 'undefined') { + payload['content'] = content; + } + topics = topics === true ? [] : topics; + if (typeof topics !== 'undefined') { + payload['topics'] = topics; + } + users = users === true ? [] : users; + if (typeof users !== 'undefined') { + payload['users'] = users; + } + targets = targets === true ? [] : targets; + if (typeof targets !== 'undefined') { + payload['targets'] = targets; + } + if (typeof draft !== 'undefined') { + payload['draft'] = draft; + } + if (typeof scheduledAt !== 'undefined') { + payload['scheduledAt'] = scheduledAt; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} MessagingUpdateSmsRequestParams * @property {string} messageId Message ID. @@ -579,6 +640,64 @@ const messagingUpdateSms = async ({messageId,topics,users,targets,content,draft, } +/** + * @typedef {Object} MessagingUpdateSMSRequestParams + * @property {string} messageId Message ID. + * @property {string[]} topics List of Topic IDs. + * @property {string[]} users List of User IDs. + * @property {string[]} targets List of Targets IDs. + * @property {string} content Email Content. + * @property {boolean} draft Is message a draft + * @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {MessagingUpdateSMSRequestParams} params + */ +const messagingUpdateSMS = async ({messageId,topics,users,targets,content,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/messaging/messages/sms/{messageId}'.replace('{messageId}', messageId); + let payload = {}; + topics = topics === true ? [] : topics; + if (typeof topics !== 'undefined') { + payload['topics'] = topics; + } + users = users === true ? [] : users; + if (typeof users !== 'undefined') { + payload['users'] = users; + } + targets = targets === true ? [] : targets; + if (typeof targets !== 'undefined') { + payload['targets'] = targets; + } + if (typeof content !== 'undefined') { + payload['content'] = content; + } + if (typeof draft !== 'undefined') { + payload['draft'] = draft; + } + if (typeof scheduledAt !== 'undefined') { + payload['scheduledAt'] = scheduledAt; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} MessagingGetMessageRequestParams * @property {string} messageId Message ID. @@ -819,6 +938,68 @@ const messagingCreateApnsProvider = async ({providerId,name,authKey,authKeyId,te } +/** + * @typedef {Object} MessagingCreateAPNSProviderRequestParams + * @property {string} providerId 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. + * @property {string} name Provider name. + * @property {string} authKey APNS authentication key. + * @property {string} authKeyId APNS authentication key ID. + * @property {string} teamId APNS team ID. + * @property {string} bundleId APNS bundle ID. + * @property {boolean} sandbox Use APNS sandbox environment. + * @property {boolean} enabled Set as enabled. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {MessagingCreateAPNSProviderRequestParams} params + */ +const messagingCreateAPNSProvider = async ({providerId,name,authKey,authKeyId,teamId,bundleId,sandbox,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/messaging/providers/apns'; + let payload = {}; + if (typeof providerId !== 'undefined') { + payload['providerId'] = providerId; + } + if (typeof name !== 'undefined') { + payload['name'] = name; + } + if (typeof authKey !== 'undefined') { + payload['authKey'] = authKey; + } + if (typeof authKeyId !== 'undefined') { + payload['authKeyId'] = authKeyId; + } + if (typeof teamId !== 'undefined') { + payload['teamId'] = teamId; + } + if (typeof bundleId !== 'undefined') { + payload['bundleId'] = bundleId; + } + if (typeof sandbox !== 'undefined') { + payload['sandbox'] = sandbox; + } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} MessagingUpdateApnsProviderRequestParams * @property {string} providerId Provider ID. @@ -878,6 +1059,65 @@ const messagingUpdateApnsProvider = async ({providerId,name,enabled,authKey,auth } +/** + * @typedef {Object} MessagingUpdateAPNSProviderRequestParams + * @property {string} providerId Provider ID. + * @property {string} name Provider name. + * @property {boolean} enabled Set as enabled. + * @property {string} authKey APNS authentication key. + * @property {string} authKeyId APNS authentication key ID. + * @property {string} teamId APNS team ID. + * @property {string} bundleId APNS bundle ID. + * @property {boolean} sandbox Use APNS sandbox environment. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {MessagingUpdateAPNSProviderRequestParams} params + */ +const messagingUpdateAPNSProvider = async ({providerId,name,enabled,authKey,authKeyId,teamId,bundleId,sandbox,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/messaging/providers/apns/{providerId}'.replace('{providerId}', providerId); + let payload = {}; + if (typeof name !== 'undefined') { + payload['name'] = name; + } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + if (typeof authKey !== 'undefined') { + payload['authKey'] = authKey; + } + if (typeof authKeyId !== 'undefined') { + payload['authKeyId'] = authKeyId; + } + if (typeof teamId !== 'undefined') { + payload['teamId'] = teamId; + } + if (typeof bundleId !== 'undefined') { + payload['bundleId'] = bundleId; + } + if (typeof sandbox !== 'undefined') { + payload['sandbox'] = sandbox; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} MessagingCreateFcmProviderRequestParams * @property {string} providerId 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. @@ -924,6 +1164,52 @@ const messagingCreateFcmProvider = async ({providerId,name,serviceAccountJSON,en } +/** + * @typedef {Object} MessagingCreateFCMProviderRequestParams + * @property {string} providerId 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. + * @property {string} name Provider name. + * @property {object} serviceAccountJSON FCM service account JSON. + * @property {boolean} enabled Set as enabled. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {MessagingCreateFCMProviderRequestParams} params + */ +const messagingCreateFCMProvider = async ({providerId,name,serviceAccountJSON,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/messaging/providers/fcm'; + let payload = {}; + if (typeof providerId !== 'undefined') { + payload['providerId'] = providerId; + } + if (typeof name !== 'undefined') { + payload['name'] = name; + } + if (typeof serviceAccountJSON !== 'undefined') { + payload['serviceAccountJSON'] = JSON.parse(serviceAccountJSON); + } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} MessagingUpdateFcmProviderRequestParams * @property {string} providerId Provider ID. @@ -967,6 +1253,49 @@ const messagingUpdateFcmProvider = async ({providerId,name,enabled,serviceAccoun } +/** + * @typedef {Object} MessagingUpdateFCMProviderRequestParams + * @property {string} providerId Provider ID. + * @property {string} name Provider name. + * @property {boolean} enabled Set as enabled. + * @property {object} serviceAccountJSON FCM service account JSON. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {MessagingUpdateFCMProviderRequestParams} params + */ +const messagingUpdateFCMProvider = async ({providerId,name,enabled,serviceAccountJSON,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/messaging/providers/fcm/{providerId}'.replace('{providerId}', providerId); + let payload = {}; + if (typeof name !== 'undefined') { + payload['name'] = name; + } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + if (typeof serviceAccountJSON !== 'undefined') { + payload['serviceAccountJSON'] = JSON.parse(serviceAccountJSON); + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} MessagingCreateMailgunProviderRequestParams * @property {string} providerId 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. @@ -1159,25 +1488,140 @@ const messagingCreateMsg91Provider = async ({providerId,name,templateId,senderId } /** - * @typedef {Object} MessagingUpdateMsg91ProviderRequestParams + * @typedef {Object} MessagingUpdateMsg91ProviderRequestParams + * @property {string} providerId Provider ID. + * @property {string} name Provider name. + * @property {boolean} enabled Set as enabled. + * @property {string} templateId Msg91 template ID. + * @property {string} senderId Msg91 sender ID. + * @property {string} authKey Msg91 auth key. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {MessagingUpdateMsg91ProviderRequestParams} params + */ +const messagingUpdateMsg91Provider = async ({providerId,name,enabled,templateId,senderId,authKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/messaging/providers/msg91/{providerId}'.replace('{providerId}', providerId); + let payload = {}; + if (typeof name !== 'undefined') { + payload['name'] = name; + } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + if (typeof templateId !== 'undefined') { + payload['templateId'] = templateId; + } + if (typeof senderId !== 'undefined') { + payload['senderId'] = senderId; + } + if (typeof authKey !== 'undefined') { + payload['authKey'] = authKey; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} MessagingCreateSendgridProviderRequestParams + * @property {string} providerId 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. + * @property {string} name Provider name. + * @property {string} apiKey Sendgrid API key. + * @property {string} fromName Sender Name. + * @property {string} fromEmail Sender email address. + * @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name. + * @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email. + * @property {boolean} enabled Set as enabled. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {MessagingCreateSendgridProviderRequestParams} params + */ +const messagingCreateSendgridProvider = async ({providerId,name,apiKey,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/messaging/providers/sendgrid'; + let payload = {}; + if (typeof providerId !== 'undefined') { + payload['providerId'] = providerId; + } + if (typeof name !== 'undefined') { + payload['name'] = name; + } + if (typeof apiKey !== 'undefined') { + payload['apiKey'] = apiKey; + } + if (typeof fromName !== 'undefined') { + payload['fromName'] = fromName; + } + if (typeof fromEmail !== 'undefined') { + payload['fromEmail'] = fromEmail; + } + if (typeof replyToName !== 'undefined') { + payload['replyToName'] = replyToName; + } + if (typeof replyToEmail !== 'undefined') { + payload['replyToEmail'] = replyToEmail; + } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + +/** + * @typedef {Object} MessagingUpdateSendgridProviderRequestParams * @property {string} providerId Provider ID. * @property {string} name Provider name. * @property {boolean} enabled Set as enabled. - * @property {string} templateId Msg91 template ID. - * @property {string} senderId Msg91 sender ID. - * @property {string} authKey Msg91 auth key. + * @property {string} apiKey Sendgrid API key. + * @property {string} fromName Sender Name. + * @property {string} fromEmail Sender email address. + * @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name. + * @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk */ /** - * @param {MessagingUpdateMsg91ProviderRequestParams} params + * @param {MessagingUpdateSendgridProviderRequestParams} params */ -const messagingUpdateMsg91Provider = async ({providerId,name,enabled,templateId,senderId,authKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,fromName,fromEmail,replyToName,replyToEmail,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; - let apiPath = '/messaging/providers/msg91/{providerId}'.replace('{providerId}', providerId); + let apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId); let payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -1185,14 +1629,20 @@ const messagingUpdateMsg91Provider = async ({providerId,name,enabled,templateId, if (typeof enabled !== 'undefined') { payload['enabled'] = enabled; } - if (typeof templateId !== 'undefined') { - payload['templateId'] = templateId; + if (typeof apiKey !== 'undefined') { + payload['apiKey'] = apiKey; } - if (typeof senderId !== 'undefined') { - payload['senderId'] = senderId; + if (typeof fromName !== 'undefined') { + payload['fromName'] = fromName; } - if (typeof authKey !== 'undefined') { - payload['authKey'] = authKey; + if (typeof fromEmail !== 'undefined') { + payload['fromEmail'] = fromEmail; + } + if (typeof replyToName !== 'undefined') { + payload['replyToName'] = replyToName; + } + if (typeof replyToEmail !== 'undefined') { + payload['replyToEmail'] = replyToEmail; } let response = undefined; @@ -1210,10 +1660,16 @@ const messagingUpdateMsg91Provider = async ({providerId,name,enabled,templateId, } /** - * @typedef {Object} MessagingCreateSendgridProviderRequestParams + * @typedef {Object} MessagingCreateSmtpProviderRequestParams * @property {string} providerId 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. * @property {string} name Provider name. - * @property {string} apiKey Sendgrid API key. + * @property {string} host 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. + * @property {number} port The default SMTP server port. + * @property {string} username Authentication username. + * @property {string} password Authentication password. + * @property {SmtpEncryption} encryption Encryption type. Can be omitted, 'ssl', or 'tls' + * @property {boolean} autoTLS Enable SMTP AutoTLS feature. + * @property {string} mailer The value to use for the X-Mailer header. * @property {string} fromName Sender Name. * @property {string} fromEmail Sender email address. * @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name. @@ -1225,12 +1681,12 @@ const messagingUpdateMsg91Provider = async ({providerId,name,enabled,templateId, */ /** - * @param {MessagingCreateSendgridProviderRequestParams} params + * @param {MessagingCreateSmtpProviderRequestParams} params */ -const messagingCreateSendgridProvider = async ({providerId,name,apiKey,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const messagingCreateSmtpProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; - let apiPath = '/messaging/providers/sendgrid'; + let apiPath = '/messaging/providers/smtp'; let payload = {}; if (typeof providerId !== 'undefined') { payload['providerId'] = providerId; @@ -1238,8 +1694,26 @@ const messagingCreateSendgridProvider = async ({providerId,name,apiKey,fromName, if (typeof name !== 'undefined') { payload['name'] = name; } - if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + if (typeof host !== 'undefined') { + payload['host'] = host; + } + if (typeof port !== 'undefined') { + payload['port'] = port; + } + if (typeof username !== 'undefined') { + payload['username'] = username; + } + if (typeof password !== 'undefined') { + payload['password'] = password; + } + if (typeof encryption !== 'undefined') { + payload['encryption'] = encryption; + } + if (typeof autoTLS !== 'undefined') { + payload['autoTLS'] = autoTLS; + } + if (typeof mailer !== 'undefined') { + payload['mailer'] = mailer; } if (typeof fromName !== 'undefined') { payload['fromName'] = fromName; @@ -1272,36 +1746,60 @@ const messagingCreateSendgridProvider = async ({providerId,name,apiKey,fromName, } /** - * @typedef {Object} MessagingUpdateSendgridProviderRequestParams - * @property {string} providerId Provider ID. + * @typedef {Object} MessagingCreateSMTPProviderRequestParams + * @property {string} providerId 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. * @property {string} name Provider name. - * @property {boolean} enabled Set as enabled. - * @property {string} apiKey Sendgrid API key. + * @property {string} host 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. + * @property {number} port The default SMTP server port. + * @property {string} username Authentication username. + * @property {string} password Authentication password. + * @property {SmtpEncryption} encryption Encryption type. Can be omitted, 'ssl', or 'tls' + * @property {boolean} autoTLS Enable SMTP AutoTLS feature. + * @property {string} mailer The value to use for the X-Mailer header. * @property {string} fromName Sender Name. * @property {string} fromEmail Sender email address. - * @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name. - * @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email. + * @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name. + * @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email. + * @property {boolean} enabled Set as enabled. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk */ /** - * @param {MessagingUpdateSendgridProviderRequestParams} params + * @param {MessagingCreateSMTPProviderRequestParams} params */ -const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,fromName,fromEmail,replyToName,replyToEmail,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const messagingCreateSMTPProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; - let apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId); + let apiPath = '/messaging/providers/smtp'; let payload = {}; + if (typeof providerId !== 'undefined') { + payload['providerId'] = providerId; + } if (typeof name !== 'undefined') { payload['name'] = name; } - if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + if (typeof host !== 'undefined') { + payload['host'] = host; } - if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + if (typeof port !== 'undefined') { + payload['port'] = port; + } + if (typeof username !== 'undefined') { + payload['username'] = username; + } + if (typeof password !== 'undefined') { + payload['password'] = password; + } + if (typeof encryption !== 'undefined') { + payload['encryption'] = encryption; + } + if (typeof autoTLS !== 'undefined') { + payload['autoTLS'] = autoTLS; + } + if (typeof mailer !== 'undefined') { + payload['mailer'] = mailer; } if (typeof fromName !== 'undefined') { payload['fromName'] = fromName; @@ -1315,10 +1813,13 @@ const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,f if (typeof replyToEmail !== 'undefined') { payload['replyToEmail'] = replyToEmail; } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } let response = undefined; - response = await client.call('patch', apiPath, { + response = await client.call('post', apiPath, { 'content-type': 'application/json', }, payload); @@ -1331,20 +1832,20 @@ const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,f } /** - * @typedef {Object} MessagingCreateSmtpProviderRequestParams - * @property {string} providerId 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. + * @typedef {Object} MessagingUpdateSmtpProviderRequestParams + * @property {string} providerId Provider ID. * @property {string} name Provider name. * @property {string} host 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. - * @property {number} port The default SMTP server port. + * @property {number} port SMTP port. * @property {string} username Authentication username. * @property {string} password Authentication password. - * @property {SmtpEncryption} encryption Encryption type. Can be omitted, 'ssl', or 'tls' + * @property {SmtpEncryption} encryption Encryption type. Can be 'ssl' or 'tls' * @property {boolean} autoTLS Enable SMTP AutoTLS feature. * @property {string} mailer The value to use for the X-Mailer header. * @property {string} fromName Sender Name. * @property {string} fromEmail Sender email address. - * @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name. - * @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email. + * @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name. + * @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email. * @property {boolean} enabled Set as enabled. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -1352,16 +1853,13 @@ const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,f */ /** - * @param {MessagingCreateSmtpProviderRequestParams} params + * @param {MessagingUpdateSmtpProviderRequestParams} params */ -const messagingCreateSmtpProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const messagingUpdateSmtpProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; - let apiPath = '/messaging/providers/smtp'; + let apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId); let payload = {}; - if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; - } if (typeof name !== 'undefined') { payload['name'] = name; } @@ -1404,7 +1902,7 @@ const messagingCreateSmtpProvider = async ({providerId,name,host,port,username,p let response = undefined; - response = await client.call('post', apiPath, { + response = await client.call('patch', apiPath, { 'content-type': 'application/json', }, payload); @@ -1417,7 +1915,7 @@ const messagingCreateSmtpProvider = async ({providerId,name,host,port,username,p } /** - * @typedef {Object} MessagingUpdateSmtpProviderRequestParams + * @typedef {Object} MessagingUpdateSMTPProviderRequestParams * @property {string} providerId Provider ID. * @property {string} name Provider name. * @property {string} host 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. @@ -1438,9 +1936,9 @@ const messagingCreateSmtpProvider = async ({providerId,name,host,port,username,p */ /** - * @param {MessagingUpdateSmtpProviderRequestParams} params + * @param {MessagingUpdateSMTPProviderRequestParams} params */ -const messagingUpdateSmtpProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const messagingUpdateSMTPProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId); @@ -2511,7 +3009,7 @@ messaging messaging .command(`create-sms`) - .description(`Create a new SMS message.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-sms' instead] Create a new SMS message.`) .requiredOption(`--message-id `, `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.`) .requiredOption(`--content `, `SMS Content.`) .option(`--topics [topics...]`, `List of Topic IDs.`) @@ -2521,9 +3019,21 @@ messaging .option(`--scheduled-at `, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) .action(actionRunner(messagingCreateSms)) +messaging + .command(`create-sms`) + .description(`Create a new SMS message.`) + .requiredOption(`--message-id `, `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.`) + .requiredOption(`--content `, `SMS Content.`) + .option(`--topics [topics...]`, `List of Topic IDs.`) + .option(`--users [users...]`, `List of User IDs.`) + .option(`--targets [targets...]`, `List of Targets IDs.`) + .option(`--draft [value]`, `Is message a draft`, (value) => value === undefined ? true : parseBool(value)) + .option(`--scheduled-at `, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) + .action(actionRunner(messagingCreateSMS)) + messaging .command(`update-sms`) - .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. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-sms' instead] 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. `) .requiredOption(`--message-id `, `Message ID.`) .option(`--topics [topics...]`, `List of Topic IDs.`) .option(`--users [users...]`, `List of User IDs.`) @@ -2533,6 +3043,18 @@ messaging .option(`--scheduled-at `, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) .action(actionRunner(messagingUpdateSms)) +messaging + .command(`update-sms`) + .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. `) + .requiredOption(`--message-id `, `Message ID.`) + .option(`--topics [topics...]`, `List of Topic IDs.`) + .option(`--users [users...]`, `List of User IDs.`) + .option(`--targets [targets...]`, `List of Targets IDs.`) + .option(`--content `, `Email Content.`) + .option(`--draft [value]`, `Is message a draft`, (value) => value === undefined ? true : parseBool(value)) + .option(`--scheduled-at `, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) + .action(actionRunner(messagingUpdateSMS)) + messaging .command(`get-message`) .description(`Get a message by its unique ID. `) @@ -2571,7 +3093,7 @@ messaging messaging .command(`create-apns-provider`) - .description(`Create a new Apple Push Notification service provider.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-apns-provider' instead] Create a new Apple Push Notification service provider.`) .requiredOption(`--provider-id `, `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.`) .requiredOption(`--name `, `Provider name.`) .option(`--auth-key `, `APNS authentication key.`) @@ -2582,9 +3104,22 @@ messaging .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(messagingCreateApnsProvider)) +messaging + .command(`create-apns-provider`) + .description(`Create a new Apple Push Notification service provider.`) + .requiredOption(`--provider-id `, `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.`) + .requiredOption(`--name `, `Provider name.`) + .option(`--auth-key `, `APNS authentication key.`) + .option(`--auth-key-id `, `APNS authentication key ID.`) + .option(`--team-id `, `APNS team ID.`) + .option(`--bundle-id `, `APNS bundle ID.`) + .option(`--sandbox [value]`, `Use APNS sandbox environment.`, (value) => value === undefined ? true : parseBool(value)) + .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(messagingCreateAPNSProvider)) + messaging .command(`update-apns-provider`) - .description(`Update a Apple Push Notification service provider by its unique ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-apns-provider' instead] Update a Apple Push Notification service provider by its unique ID.`) .requiredOption(`--provider-id `, `Provider ID.`) .option(`--name `, `Provider name.`) .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) @@ -2595,24 +3130,55 @@ messaging .option(`--sandbox [value]`, `Use APNS sandbox environment.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(messagingUpdateApnsProvider)) +messaging + .command(`update-apns-provider`) + .description(`Update a Apple Push Notification service provider by its unique ID.`) + .requiredOption(`--provider-id `, `Provider ID.`) + .option(`--name `, `Provider name.`) + .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) + .option(`--auth-key `, `APNS authentication key.`) + .option(`--auth-key-id `, `APNS authentication key ID.`) + .option(`--team-id `, `APNS team ID.`) + .option(`--bundle-id `, `APNS bundle ID.`) + .option(`--sandbox [value]`, `Use APNS sandbox environment.`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(messagingUpdateAPNSProvider)) + messaging .command(`create-fcm-provider`) - .description(`Create a new Firebase Cloud Messaging provider.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-fcm-provider' instead] Create a new Firebase Cloud Messaging provider.`) .requiredOption(`--provider-id `, `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.`) .requiredOption(`--name `, `Provider name.`) .option(`--service-account-json `, `FCM service account JSON.`) .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(messagingCreateFcmProvider)) +messaging + .command(`create-fcm-provider`) + .description(`Create a new Firebase Cloud Messaging provider.`) + .requiredOption(`--provider-id `, `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.`) + .requiredOption(`--name `, `Provider name.`) + .option(`--service-account-json `, `FCM service account JSON.`) + .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(messagingCreateFCMProvider)) + messaging .command(`update-fcm-provider`) - .description(`Update a Firebase Cloud Messaging provider by its unique ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-fcm-provider' instead] Update a Firebase Cloud Messaging provider by its unique ID.`) .requiredOption(`--provider-id `, `Provider ID.`) .option(`--name `, `Provider name.`) .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) .option(`--service-account-json `, `FCM service account JSON.`) .action(actionRunner(messagingUpdateFcmProvider)) +messaging + .command(`update-fcm-provider`) + .description(`Update a Firebase Cloud Messaging provider by its unique ID.`) + .requiredOption(`--provider-id `, `Provider ID.`) + .option(`--name `, `Provider name.`) + .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) + .option(`--service-account-json `, `FCM service account JSON.`) + .action(actionRunner(messagingUpdateFCMProvider)) + messaging .command(`create-mailgun-provider`) .description(`Create a new Mailgun provider.`) @@ -2693,7 +3259,7 @@ messaging messaging .command(`create-smtp-provider`) - .description(`Create a new SMTP provider.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-smtp-provider' instead] Create a new SMTP provider.`) .requiredOption(`--provider-id `, `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.`) .requiredOption(`--name `, `Provider name.`) .requiredOption(`--host `, `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.`) @@ -2710,9 +3276,28 @@ messaging .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(messagingCreateSmtpProvider)) +messaging + .command(`create-smtp-provider`) + .description(`Create a new SMTP provider.`) + .requiredOption(`--provider-id `, `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.`) + .requiredOption(`--name `, `Provider name.`) + .requiredOption(`--host `, `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.`) + .option(`--port `, `The default SMTP server port.`, parseInteger) + .option(`--username `, `Authentication username.`) + .option(`--password `, `Authentication password.`) + .option(`--encryption `, `Encryption type. Can be omitted, 'ssl', or 'tls'`) + .option(`--auto-tls [value]`, `Enable SMTP AutoTLS feature.`, (value) => value === undefined ? true : parseBool(value)) + .option(`--mailer `, `The value to use for the X-Mailer header.`) + .option(`--from-name `, `Sender Name.`) + .option(`--from-email `, `Sender email address.`) + .option(`--reply-to-name `, `Name set in the reply to field for the mail. Default value is sender name.`) + .option(`--reply-to-email `, `Email set in the reply to field for the mail. Default value is sender email.`) + .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(messagingCreateSMTPProvider)) + messaging .command(`update-smtp-provider`) - .description(`Update a SMTP provider by its unique ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-smtp-provider' instead] Update a SMTP provider by its unique ID.`) .requiredOption(`--provider-id `, `Provider ID.`) .option(`--name `, `Provider name.`) .option(`--host `, `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.`) @@ -2729,6 +3314,25 @@ messaging .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(messagingUpdateSmtpProvider)) +messaging + .command(`update-smtp-provider`) + .description(`Update a SMTP provider by its unique ID.`) + .requiredOption(`--provider-id `, `Provider ID.`) + .option(`--name `, `Provider name.`) + .option(`--host `, `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.`) + .option(`--port `, `SMTP port.`, parseInteger) + .option(`--username `, `Authentication username.`) + .option(`--password `, `Authentication password.`) + .option(`--encryption `, `Encryption type. Can be 'ssl' or 'tls'`) + .option(`--auto-tls [value]`, `Enable SMTP AutoTLS feature.`, (value) => value === undefined ? true : parseBool(value)) + .option(`--mailer `, `The value to use for the X-Mailer header.`) + .option(`--from-name `, `Sender Name.`) + .option(`--from-email `, `Sender email address.`) + .option(`--reply-to-name `, `Name set in the Reply To field for the mail. Default value is Sender Name.`) + .option(`--reply-to-email `, `Email set in the Reply To field for the mail. Default value is Sender Email.`) + .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(messagingUpdateSMTPProvider)) + messaging .command(`create-telesign-provider`) .description(`Create a new Telesign provider.`) @@ -2927,16 +3531,22 @@ module.exports = { messagingCreatePush, messagingUpdatePush, messagingCreateSms, + messagingCreateSMS, messagingUpdateSms, + messagingUpdateSMS, messagingGetMessage, messagingDelete, messagingListMessageLogs, messagingListTargets, messagingListProviders, messagingCreateApnsProvider, + messagingCreateAPNSProvider, messagingUpdateApnsProvider, + messagingUpdateAPNSProvider, messagingCreateFcmProvider, + messagingCreateFCMProvider, messagingUpdateFcmProvider, + messagingUpdateFCMProvider, messagingCreateMailgunProvider, messagingUpdateMailgunProvider, messagingCreateMsg91Provider, @@ -2944,7 +3554,9 @@ module.exports = { messagingCreateSendgridProvider, messagingUpdateSendgridProvider, messagingCreateSmtpProvider, + messagingCreateSMTPProvider, messagingUpdateSmtpProvider, + messagingUpdateSMTPProvider, messagingCreateTelesignProvider, messagingUpdateTelesignProvider, messagingCreateTextmagicProvider, diff --git a/lib/commands/projects.js b/lib/commands/projects.js index 5314134..fdbf6f7 100644 --- a/lib/commands/projects.js +++ b/lib/commands/projects.js @@ -337,6 +337,45 @@ const projectsUpdateApiStatus = async ({projectId,api,status,parseOutput = true, } +/** + * @typedef {Object} ProjectsUpdateAPIStatusRequestParams + * @property {string} projectId Project unique ID. + * @property {Api} api API name. + * @property {boolean} status API status. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {ProjectsUpdateAPIStatusRequestParams} params + */ +const projectsUpdateAPIStatus = async ({projectId,api,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForConsole() : + sdk; + let apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId); + let payload = {}; + if (typeof api !== 'undefined') { + payload['api'] = api; + } + if (typeof status !== 'undefined') { + payload['status'] = status; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} ProjectsUpdateApiStatusAllRequestParams * @property {string} projectId Project unique ID. @@ -372,6 +411,41 @@ const projectsUpdateApiStatusAll = async ({projectId,status,parseOutput = true, } +/** + * @typedef {Object} ProjectsUpdateAPIStatusAllRequestParams + * @property {string} projectId Project unique ID. + * @property {boolean} status API status. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {ProjectsUpdateAPIStatusAllRequestParams} params + */ +const projectsUpdateAPIStatusAll = async ({projectId,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForConsole() : + sdk; + let apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId); + let payload = {}; + if (typeof status !== 'undefined') { + payload['status'] = status; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} ProjectsUpdateAuthDurationRequestParams * @property {string} projectId Project unique ID. @@ -1569,6 +1643,73 @@ const projectsUpdateSmtp = async ({projectId,enabled,senderName,senderEmail,repl } +/** + * @typedef {Object} ProjectsUpdateSMTPRequestParams + * @property {string} projectId Project unique ID. + * @property {boolean} enabled Enable custom SMTP service + * @property {string} senderName Name of the email sender + * @property {string} senderEmail Email of the sender + * @property {string} replyTo Reply to email + * @property {string} host SMTP server host name + * @property {number} port SMTP server port + * @property {string} username SMTP server username + * @property {string} password SMTP server password + * @property {SMTPSecure} secure Does SMTP server use secure connection + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {ProjectsUpdateSMTPRequestParams} params + */ +const projectsUpdateSMTP = async ({projectId,enabled,senderName,senderEmail,replyTo,host,port,username,password,secure,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForConsole() : + sdk; + let apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId); + let payload = {}; + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + if (typeof senderName !== 'undefined') { + payload['senderName'] = senderName; + } + if (typeof senderEmail !== 'undefined') { + payload['senderEmail'] = senderEmail; + } + if (typeof replyTo !== 'undefined') { + payload['replyTo'] = replyTo; + } + if (typeof host !== 'undefined') { + payload['host'] = host; + } + if (typeof port !== 'undefined') { + payload['port'] = port; + } + if (typeof username !== 'undefined') { + payload['username'] = username; + } + if (typeof password !== 'undefined') { + payload['password'] = password; + } + if (typeof secure !== 'undefined') { + payload['secure'] = secure; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} ProjectsCreateSmtpTestRequestParams * @property {string} projectId Project unique ID. @@ -1637,6 +1778,74 @@ const projectsCreateSmtpTest = async ({projectId,emails,senderName,senderEmail,h } +/** + * @typedef {Object} ProjectsCreateSMTPTestRequestParams + * @property {string} projectId Project unique ID. + * @property {string[]} emails Array of emails to send test email to. Maximum of 10 emails are allowed. + * @property {string} senderName Name of the email sender + * @property {string} senderEmail Email of the sender + * @property {string} host SMTP server host name + * @property {string} replyTo Reply to email + * @property {number} port SMTP server port + * @property {string} username SMTP server username + * @property {string} password SMTP server password + * @property {SMTPSecure} secure Does SMTP server use secure connection + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {ProjectsCreateSMTPTestRequestParams} params + */ +const projectsCreateSMTPTest = async ({projectId,emails,senderName,senderEmail,host,replyTo,port,username,password,secure,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForConsole() : + sdk; + let apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId); + let payload = {}; + emails = emails === true ? [] : emails; + if (typeof emails !== 'undefined') { + payload['emails'] = emails; + } + if (typeof senderName !== 'undefined') { + payload['senderName'] = senderName; + } + if (typeof senderEmail !== 'undefined') { + payload['senderEmail'] = senderEmail; + } + if (typeof replyTo !== 'undefined') { + payload['replyTo'] = replyTo; + } + if (typeof host !== 'undefined') { + payload['host'] = host; + } + if (typeof port !== 'undefined') { + payload['port'] = port; + } + if (typeof username !== 'undefined') { + payload['username'] = username; + } + if (typeof password !== 'undefined') { + payload['password'] = password; + } + if (typeof secure !== 'undefined') { + payload['secure'] = secure; + } + + let response = undefined; + + response = await client.call('post', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} ProjectsUpdateTeamRequestParams * @property {string} projectId Project unique ID. @@ -1822,6 +2031,38 @@ const projectsGetSmsTemplate = async ({projectId,type,locale,parseOutput = true, } +/** + * @typedef {Object} ProjectsGetSMSTemplateRequestParams + * @property {string} projectId Project unique ID. + * @property {SmsTemplateType} type Template type + * @property {SmsTemplateLocale} locale Template locale + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {ProjectsGetSMSTemplateRequestParams} params + */ +const projectsGetSMSTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForConsole() : + sdk; + let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale); + let payload = {}; + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} ProjectsUpdateSmsTemplateRequestParams * @property {string} projectId Project unique ID. @@ -1859,6 +2100,43 @@ const projectsUpdateSmsTemplate = async ({projectId,type,locale,message,parseOut } +/** + * @typedef {Object} ProjectsUpdateSMSTemplateRequestParams + * @property {string} projectId Project unique ID. + * @property {SmsTemplateType} type Template type + * @property {SmsTemplateLocale} locale Template locale + * @property {string} message Template message + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {ProjectsUpdateSMSTemplateRequestParams} params + */ +const projectsUpdateSMSTemplate = async ({projectId,type,locale,message,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForConsole() : + sdk; + let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale); + let payload = {}; + if (typeof message !== 'undefined') { + payload['message'] = message; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} ProjectsDeleteSmsTemplateRequestParams * @property {string} projectId Project unique ID. @@ -1892,6 +2170,39 @@ const projectsDeleteSmsTemplate = async ({projectId,type,locale,parseOutput = tr } +/** + * @typedef {Object} ProjectsDeleteSMSTemplateRequestParams + * @property {string} projectId Project unique ID. + * @property {SmsTemplateType} type Template type + * @property {SmsTemplateLocale} locale Template locale + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {ProjectsDeleteSMSTemplateRequestParams} params + */ +const projectsDeleteSMSTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForConsole() : + sdk; + let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale); + let payload = {}; + + let response = undefined; + + response = await client.call('delete', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} ProjectsListWebhooksRequestParams * @property {string} projectId Project unique ID. @@ -2203,19 +2514,34 @@ projects projects .command(`update-api-status`) - .description(`Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-api-status' instead] Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--api `, `API name.`) .requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(projectsUpdateApiStatus)) +projects + .command(`update-api-status`) + .description(`Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`) + .requiredOption(`--project-id `, `Project unique ID.`) + .requiredOption(`--api `, `API name.`) + .requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(projectsUpdateAPIStatus)) + projects .command(`update-api-status-all`) - .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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-api-status-all' instead] 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.`) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(projectsUpdateApiStatusAll)) +projects + .command(`update-api-status-all`) + .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.`) + .requiredOption(`--project-id `, `Project unique ID.`) + .requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(projectsUpdateAPIStatusAll)) + projects .command(`update-auth-duration`) .description(`Update how long sessions created within a project should stay active for.`) @@ -2456,7 +2782,7 @@ projects projects .command(`update-smtp`) - .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. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-smtp' instead] 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. `) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--enabled [value]`, `Enable custom SMTP service`, (value) => value === undefined ? true : parseBool(value)) .option(`--sender-name `, `Name of the email sender`) @@ -2469,9 +2795,24 @@ projects .option(`--secure `, `Does SMTP server use secure connection`) .action(actionRunner(projectsUpdateSmtp)) +projects + .command(`update-smtp`) + .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. `) + .requiredOption(`--project-id `, `Project unique ID.`) + .requiredOption(`--enabled [value]`, `Enable custom SMTP service`, (value) => value === undefined ? true : parseBool(value)) + .option(`--sender-name `, `Name of the email sender`) + .option(`--sender-email `, `Email of the sender`) + .option(`--reply-to `, `Reply to email`) + .option(`--host `, `SMTP server host name`) + .option(`--port `, `SMTP server port`, parseInteger) + .option(`--username `, `SMTP server username`) + .option(`--password `, `SMTP server password`) + .option(`--secure `, `Does SMTP server use secure connection`) + .action(actionRunner(projectsUpdateSMTP)) + projects .command(`create-smtp-test`) - .description(`Send a test email to verify SMTP configuration. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-smtp-test' instead] Send a test email to verify SMTP configuration. `) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`) .requiredOption(`--sender-name `, `Name of the email sender`) @@ -2484,6 +2825,21 @@ projects .option(`--secure `, `Does SMTP server use secure connection`) .action(actionRunner(projectsCreateSmtpTest)) +projects + .command(`create-smtp-test`) + .description(`Send a test email to verify SMTP configuration. `) + .requiredOption(`--project-id `, `Project unique ID.`) + .requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`) + .requiredOption(`--sender-name `, `Name of the email sender`) + .requiredOption(`--sender-email `, `Email of the sender`) + .requiredOption(`--host `, `SMTP server host name`) + .option(`--reply-to `, `Reply to email`) + .option(`--port `, `SMTP server port`, parseInteger) + .option(`--username `, `SMTP server username`) + .option(`--password `, `SMTP server password`) + .option(`--secure `, `Does SMTP server use secure connection`) + .action(actionRunner(projectsCreateSMTPTest)) + projects .command(`update-team`) .description(`Update the team ID of a project allowing for it to be transferred to another team.`) @@ -2522,29 +2878,54 @@ projects projects .command(`get-sms-template`) - .description(`Get a custom SMS template for the specified locale and type returning it's contents.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'get-sms-template' instead] Get a custom SMS template for the specified locale and type returning it's contents.`) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--type `, `Template type`) .requiredOption(`--locale `, `Template locale`) .action(actionRunner(projectsGetSmsTemplate)) +projects + .command(`get-sms-template`) + .description(`Get a custom SMS template for the specified locale and type returning it's contents.`) + .requiredOption(`--project-id `, `Project unique ID.`) + .requiredOption(`--type `, `Template type`) + .requiredOption(`--locale `, `Template locale`) + .action(actionRunner(projectsGetSMSTemplate)) + projects .command(`update-sms-template`) - .description(`Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-sms-template' instead] Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--type `, `Template type`) .requiredOption(`--locale `, `Template locale`) .requiredOption(`--message `, `Template message`) .action(actionRunner(projectsUpdateSmsTemplate)) +projects + .command(`update-sms-template`) + .description(`Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `) + .requiredOption(`--project-id `, `Project unique ID.`) + .requiredOption(`--type `, `Template type`) + .requiredOption(`--locale `, `Template locale`) + .requiredOption(`--message `, `Template message`) + .action(actionRunner(projectsUpdateSMSTemplate)) + projects .command(`delete-sms-template`) - .description(`Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'delete-sms-template' instead] Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--type `, `Template type`) .requiredOption(`--locale `, `Template locale`) .action(actionRunner(projectsDeleteSmsTemplate)) +projects + .command(`delete-sms-template`) + .description(`Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `) + .requiredOption(`--project-id `, `Project unique ID.`) + .requiredOption(`--type `, `Template type`) + .requiredOption(`--locale `, `Template locale`) + .action(actionRunner(projectsDeleteSMSTemplate)) + projects .command(`list-webhooks`) .description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results. `) @@ -2609,7 +2990,9 @@ module.exports = { projectsUpdate, projectsDelete, projectsUpdateApiStatus, + projectsUpdateAPIStatus, projectsUpdateApiStatusAll, + projectsUpdateAPIStatusAll, projectsUpdateAuthDuration, projectsUpdateAuthLimit, projectsUpdateAuthSessionsLimit, @@ -2641,14 +3024,19 @@ module.exports = { projectsUpdateServiceStatus, projectsUpdateServiceStatusAll, projectsUpdateSmtp, + projectsUpdateSMTP, projectsCreateSmtpTest, + projectsCreateSMTPTest, projectsUpdateTeam, projectsGetEmailTemplate, projectsUpdateEmailTemplate, projectsDeleteEmailTemplate, projectsGetSmsTemplate, + projectsGetSMSTemplate, projectsUpdateSmsTemplate, + projectsUpdateSMSTemplate, projectsDeleteSmsTemplate, + projectsDeleteSMSTemplate, projectsListWebhooks, projectsCreateWebhook, projectsGetWebhook, diff --git a/lib/commands/tables-db.js b/lib/commands/tables-d-b.js similarity index 92% rename from lib/commands/tables-db.js rename to lib/commands/tables-d-b.js index c8638e6..272d9cc 100644 --- a/lib/commands/tables-db.js +++ b/lib/commands/tables-d-b.js @@ -40,7 +40,7 @@ const tablesdb = new Command("tablesdb").description(commandDescriptions['tables }) /** - * @typedef {Object} TablesDbListRequestParams + * @typedef {Object} TablesDBListRequestParams * @property {string[]} queries 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. * @property {boolean} overrideForCli @@ -49,7 +49,7 @@ const tablesdb = new Command("tablesdb").description(commandDescriptions['tables */ /** - * @param {TablesDbListRequestParams} params + * @param {TablesDBListRequestParams} params */ const tablesdbList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : @@ -70,7 +70,7 @@ const tablesdbList = async ({queries,search,parseOutput = true, overrideForCli = if (parseOutput) { if(console) { - showConsoleLink('tablesDb', 'list'); + showConsoleLink('tablesDB', 'list'); } else { parse(response) } @@ -81,7 +81,7 @@ const tablesdbList = async ({queries,search,parseOutput = true, overrideForCli = } /** - * @typedef {Object} TablesDbCreateRequestParams + * @typedef {Object} TablesDBCreateRequestParams * @property {string} databaseId 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. * @property {string} name Database name. Max length: 128 chars. * @property {boolean} enabled 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. @@ -91,7 +91,7 @@ const tablesdbList = async ({queries,search,parseOutput = true, overrideForCli = */ /** - * @param {TablesDbCreateRequestParams} params + * @param {TablesDBCreateRequestParams} params */ const tablesdbCreate = async ({databaseId,name,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -123,7 +123,7 @@ const tablesdbCreate = async ({databaseId,name,enabled,parseOutput = true, overr } /** - * @typedef {Object} TablesDbListUsageRequestParams + * @typedef {Object} TablesDBListUsageRequestParams * @property {UsageRange} range Date range. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -131,7 +131,7 @@ const tablesdbCreate = async ({databaseId,name,enabled,parseOutput = true, overr */ /** - * @param {TablesDbListUsageRequestParams} params + * @param {TablesDBListUsageRequestParams} params */ const tablesdbListUsage = async ({range,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : @@ -149,7 +149,7 @@ const tablesdbListUsage = async ({range,parseOutput = true, overrideForCli = fal if (parseOutput) { if(console) { - showConsoleLink('tablesDb', 'listUsage'); + showConsoleLink('tablesDB', 'listUsage'); } else { parse(response) } @@ -160,7 +160,7 @@ const tablesdbListUsage = async ({range,parseOutput = true, overrideForCli = fal } /** - * @typedef {Object} TablesDbGetRequestParams + * @typedef {Object} TablesDBGetRequestParams * @property {string} databaseId Database ID. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -168,7 +168,7 @@ const tablesdbListUsage = async ({range,parseOutput = true, overrideForCli = fal */ /** - * @param {TablesDbGetRequestParams} params + * @param {TablesDBGetRequestParams} params */ const tablesdbGet = async ({databaseId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : @@ -183,7 +183,7 @@ const tablesdbGet = async ({databaseId,parseOutput = true, overrideForCli = fals if (parseOutput) { if(console) { - showConsoleLink('tablesDb', 'get', databaseId); + showConsoleLink('tablesDB', 'get', databaseId); } else { parse(response) } @@ -194,7 +194,7 @@ const tablesdbGet = async ({databaseId,parseOutput = true, overrideForCli = fals } /** - * @typedef {Object} TablesDbUpdateRequestParams + * @typedef {Object} TablesDBUpdateRequestParams * @property {string} databaseId Database ID. * @property {string} name Database name. Max length: 128 chars. * @property {boolean} enabled 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. @@ -204,7 +204,7 @@ const tablesdbGet = async ({databaseId,parseOutput = true, overrideForCli = fals */ /** - * @param {TablesDbUpdateRequestParams} params + * @param {TablesDBUpdateRequestParams} params */ const tablesdbUpdate = async ({databaseId,name,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -233,7 +233,7 @@ const tablesdbUpdate = async ({databaseId,name,enabled,parseOutput = true, overr } /** - * @typedef {Object} TablesDbDeleteRequestParams + * @typedef {Object} TablesDBDeleteRequestParams * @property {string} databaseId Database ID. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -241,7 +241,7 @@ const tablesdbUpdate = async ({databaseId,name,enabled,parseOutput = true, overr */ /** - * @param {TablesDbDeleteRequestParams} params + * @param {TablesDBDeleteRequestParams} params */ const tablesdbDelete = async ({databaseId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -264,7 +264,7 @@ const tablesdbDelete = async ({databaseId,parseOutput = true, overrideForCli = f } /** - * @typedef {Object} TablesDbListTablesRequestParams + * @typedef {Object} TablesDBListTablesRequestParams * @property {string} databaseId Database ID. * @property {string[]} queries 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. @@ -274,7 +274,7 @@ const tablesdbDelete = async ({databaseId,parseOutput = true, overrideForCli = f */ /** - * @param {TablesDbListTablesRequestParams} params + * @param {TablesDBListTablesRequestParams} params */ const tablesdbListTables = async ({databaseId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : @@ -295,7 +295,7 @@ const tablesdbListTables = async ({databaseId,queries,search,parseOutput = true, if (parseOutput) { if(console) { - showConsoleLink('tablesDb', 'listTables', databaseId); + showConsoleLink('tablesDB', 'listTables', databaseId); } else { parse(response) } @@ -306,7 +306,7 @@ const tablesdbListTables = async ({databaseId,queries,search,parseOutput = true, } /** - * @typedef {Object} TablesDbCreateTableRequestParams + * @typedef {Object} TablesDBCreateTableRequestParams * @property {string} databaseId Database ID. * @property {string} tableId 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. * @property {string} name Table name. Max length: 128 chars. @@ -319,7 +319,7 @@ const tablesdbListTables = async ({databaseId,queries,search,parseOutput = true, */ /** - * @param {TablesDbCreateTableRequestParams} params + * @param {TablesDBCreateTableRequestParams} params */ const tablesdbCreateTable = async ({databaseId,tableId,name,permissions,rowSecurity,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -358,7 +358,7 @@ const tablesdbCreateTable = async ({databaseId,tableId,name,permissions,rowSecur } /** - * @typedef {Object} TablesDbGetTableRequestParams + * @typedef {Object} TablesDBGetTableRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {boolean} overrideForCli @@ -367,7 +367,7 @@ const tablesdbCreateTable = async ({databaseId,tableId,name,permissions,rowSecur */ /** - * @param {TablesDbGetTableRequestParams} params + * @param {TablesDBGetTableRequestParams} params */ const tablesdbGetTable = async ({databaseId,tableId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : @@ -382,7 +382,7 @@ const tablesdbGetTable = async ({databaseId,tableId,parseOutput = true, override if (parseOutput) { if(console) { - showConsoleLink('tablesDb', 'getTable', databaseId, tableId); + showConsoleLink('tablesDB', 'getTable', databaseId, tableId); } else { parse(response) } @@ -393,7 +393,7 @@ const tablesdbGetTable = async ({databaseId,tableId,parseOutput = true, override } /** - * @typedef {Object} TablesDbUpdateTableRequestParams + * @typedef {Object} TablesDBUpdateTableRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} name Table name. Max length: 128 chars. @@ -406,7 +406,7 @@ const tablesdbGetTable = async ({databaseId,tableId,parseOutput = true, override */ /** - * @param {TablesDbUpdateTableRequestParams} params + * @param {TablesDBUpdateTableRequestParams} params */ const tablesdbUpdateTable = async ({databaseId,tableId,name,permissions,rowSecurity,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -442,7 +442,7 @@ const tablesdbUpdateTable = async ({databaseId,tableId,name,permissions,rowSecur } /** - * @typedef {Object} TablesDbDeleteTableRequestParams + * @typedef {Object} TablesDBDeleteTableRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {boolean} overrideForCli @@ -451,7 +451,7 @@ const tablesdbUpdateTable = async ({databaseId,tableId,name,permissions,rowSecur */ /** - * @param {TablesDbDeleteTableRequestParams} params + * @param {TablesDBDeleteTableRequestParams} params */ const tablesdbDeleteTable = async ({databaseId,tableId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -474,7 +474,7 @@ const tablesdbDeleteTable = async ({databaseId,tableId,parseOutput = true, overr } /** - * @typedef {Object} TablesDbListColumnsRequestParams + * @typedef {Object} TablesDBListColumnsRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string[]} queries 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 @@ -484,7 +484,7 @@ const tablesdbDeleteTable = async ({databaseId,tableId,parseOutput = true, overr */ /** - * @param {TablesDbListColumnsRequestParams} params + * @param {TablesDBListColumnsRequestParams} params */ const tablesdbListColumns = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : @@ -502,7 +502,7 @@ const tablesdbListColumns = async ({databaseId,tableId,queries,parseOutput = tru if (parseOutput) { if(console) { - showConsoleLink('tablesDb', 'listColumns', databaseId, tableId); + showConsoleLink('tablesDB', 'listColumns', databaseId, tableId); } else { parse(response) } @@ -513,9 +513,9 @@ const tablesdbListColumns = async ({databaseId,tableId,queries,parseOutput = tru } /** - * @typedef {Object} TablesDbCreateBooleanColumnRequestParams + * @typedef {Object} TablesDBCreateBooleanColumnRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @property {string} key Column Key. * @property {boolean} required Is column required? * @property {boolean} xdefault Default value for column when not provided. Cannot be set when column is required. @@ -526,7 +526,7 @@ const tablesdbListColumns = async ({databaseId,tableId,queries,parseOutput = tru */ /** - * @param {TablesDbCreateBooleanColumnRequestParams} params + * @param {TablesDBCreateBooleanColumnRequestParams} params */ const tablesdbCreateBooleanColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -561,9 +561,9 @@ const tablesdbCreateBooleanColumn = async ({databaseId,tableId,key,required,xdef } /** - * @typedef {Object} TablesDbUpdateBooleanColumnRequestParams + * @typedef {Object} TablesDBUpdateBooleanColumnRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @property {string} key Column Key. * @property {boolean} required Is column required? * @property {boolean} xdefault Default value for column when not provided. Cannot be set when column is required. @@ -574,7 +574,7 @@ const tablesdbCreateBooleanColumn = async ({databaseId,tableId,key,required,xdef */ /** - * @param {TablesDbUpdateBooleanColumnRequestParams} params + * @param {TablesDBUpdateBooleanColumnRequestParams} params */ const tablesdbUpdateBooleanColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -606,7 +606,7 @@ const tablesdbUpdateBooleanColumn = async ({databaseId,tableId,key,required,xdef } /** - * @typedef {Object} TablesDbCreateDatetimeColumnRequestParams + * @typedef {Object} TablesDBCreateDatetimeColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -619,7 +619,7 @@ const tablesdbUpdateBooleanColumn = async ({databaseId,tableId,key,required,xdef */ /** - * @param {TablesDbCreateDatetimeColumnRequestParams} params + * @param {TablesDBCreateDatetimeColumnRequestParams} params */ const tablesdbCreateDatetimeColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -654,7 +654,7 @@ const tablesdbCreateDatetimeColumn = async ({databaseId,tableId,key,required,xde } /** - * @typedef {Object} TablesDbUpdateDatetimeColumnRequestParams + * @typedef {Object} TablesDBUpdateDatetimeColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -667,7 +667,7 @@ const tablesdbCreateDatetimeColumn = async ({databaseId,tableId,key,required,xde */ /** - * @param {TablesDbUpdateDatetimeColumnRequestParams} params + * @param {TablesDBUpdateDatetimeColumnRequestParams} params */ const tablesdbUpdateDatetimeColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -699,7 +699,7 @@ const tablesdbUpdateDatetimeColumn = async ({databaseId,tableId,key,required,xde } /** - * @typedef {Object} TablesDbCreateEmailColumnRequestParams + * @typedef {Object} TablesDBCreateEmailColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -712,7 +712,7 @@ const tablesdbUpdateDatetimeColumn = async ({databaseId,tableId,key,required,xde */ /** - * @param {TablesDbCreateEmailColumnRequestParams} params + * @param {TablesDBCreateEmailColumnRequestParams} params */ const tablesdbCreateEmailColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -747,7 +747,7 @@ const tablesdbCreateEmailColumn = async ({databaseId,tableId,key,required,xdefau } /** - * @typedef {Object} TablesDbUpdateEmailColumnRequestParams + * @typedef {Object} TablesDBUpdateEmailColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -760,7 +760,7 @@ const tablesdbCreateEmailColumn = async ({databaseId,tableId,key,required,xdefau */ /** - * @param {TablesDbUpdateEmailColumnRequestParams} params + * @param {TablesDBUpdateEmailColumnRequestParams} params */ const tablesdbUpdateEmailColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -792,7 +792,7 @@ const tablesdbUpdateEmailColumn = async ({databaseId,tableId,key,required,xdefau } /** - * @typedef {Object} TablesDbCreateEnumColumnRequestParams + * @typedef {Object} TablesDBCreateEnumColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -806,7 +806,7 @@ const tablesdbUpdateEmailColumn = async ({databaseId,tableId,key,required,xdefau */ /** - * @param {TablesDbCreateEnumColumnRequestParams} params + * @param {TablesDBCreateEnumColumnRequestParams} params */ const tablesdbCreateEnumColumn = async ({databaseId,tableId,key,elements,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -845,7 +845,7 @@ const tablesdbCreateEnumColumn = async ({databaseId,tableId,key,elements,require } /** - * @typedef {Object} TablesDbUpdateEnumColumnRequestParams + * @typedef {Object} TablesDBUpdateEnumColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -859,7 +859,7 @@ const tablesdbCreateEnumColumn = async ({databaseId,tableId,key,elements,require */ /** - * @param {TablesDbUpdateEnumColumnRequestParams} params + * @param {TablesDBUpdateEnumColumnRequestParams} params */ const tablesdbUpdateEnumColumn = async ({databaseId,tableId,key,elements,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -895,7 +895,7 @@ const tablesdbUpdateEnumColumn = async ({databaseId,tableId,key,elements,require } /** - * @typedef {Object} TablesDbCreateFloatColumnRequestParams + * @typedef {Object} TablesDBCreateFloatColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -910,7 +910,7 @@ const tablesdbUpdateEnumColumn = async ({databaseId,tableId,key,elements,require */ /** - * @param {TablesDbCreateFloatColumnRequestParams} params + * @param {TablesDBCreateFloatColumnRequestParams} params */ const tablesdbCreateFloatColumn = async ({databaseId,tableId,key,required,min,max,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -951,7 +951,7 @@ const tablesdbCreateFloatColumn = async ({databaseId,tableId,key,required,min,ma } /** - * @typedef {Object} TablesDbUpdateFloatColumnRequestParams + * @typedef {Object} TablesDBUpdateFloatColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -966,7 +966,7 @@ const tablesdbCreateFloatColumn = async ({databaseId,tableId,key,required,min,ma */ /** - * @param {TablesDbUpdateFloatColumnRequestParams} params + * @param {TablesDBUpdateFloatColumnRequestParams} params */ const tablesdbUpdateFloatColumn = async ({databaseId,tableId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1004,7 +1004,7 @@ const tablesdbUpdateFloatColumn = async ({databaseId,tableId,key,required,xdefau } /** - * @typedef {Object} TablesDbCreateIntegerColumnRequestParams + * @typedef {Object} TablesDBCreateIntegerColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -1019,7 +1019,7 @@ const tablesdbUpdateFloatColumn = async ({databaseId,tableId,key,required,xdefau */ /** - * @param {TablesDbCreateIntegerColumnRequestParams} params + * @param {TablesDBCreateIntegerColumnRequestParams} params */ const tablesdbCreateIntegerColumn = async ({databaseId,tableId,key,required,min,max,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1060,7 +1060,7 @@ const tablesdbCreateIntegerColumn = async ({databaseId,tableId,key,required,min, } /** - * @typedef {Object} TablesDbUpdateIntegerColumnRequestParams + * @typedef {Object} TablesDBUpdateIntegerColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -1075,7 +1075,7 @@ const tablesdbCreateIntegerColumn = async ({databaseId,tableId,key,required,min, */ /** - * @param {TablesDbUpdateIntegerColumnRequestParams} params + * @param {TablesDBUpdateIntegerColumnRequestParams} params */ const tablesdbUpdateIntegerColumn = async ({databaseId,tableId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1113,7 +1113,7 @@ const tablesdbUpdateIntegerColumn = async ({databaseId,tableId,key,required,xdef } /** - * @typedef {Object} TablesDbCreateIpColumnRequestParams + * @typedef {Object} TablesDBCreateIpColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -1126,7 +1126,7 @@ const tablesdbUpdateIntegerColumn = async ({databaseId,tableId,key,required,xdef */ /** - * @param {TablesDbCreateIpColumnRequestParams} params + * @param {TablesDBCreateIpColumnRequestParams} params */ const tablesdbCreateIpColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1161,7 +1161,7 @@ const tablesdbCreateIpColumn = async ({databaseId,tableId,key,required,xdefault, } /** - * @typedef {Object} TablesDbUpdateIpColumnRequestParams + * @typedef {Object} TablesDBUpdateIpColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -1174,7 +1174,7 @@ const tablesdbCreateIpColumn = async ({databaseId,tableId,key,required,xdefault, */ /** - * @param {TablesDbUpdateIpColumnRequestParams} params + * @param {TablesDBUpdateIpColumnRequestParams} params */ const tablesdbUpdateIpColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1206,7 +1206,7 @@ const tablesdbUpdateIpColumn = async ({databaseId,tableId,key,required,xdefault, } /** - * @typedef {Object} TablesDbCreateRelationshipColumnRequestParams + * @typedef {Object} TablesDBCreateRelationshipColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} relatedTableId Related Table ID. @@ -1221,7 +1221,7 @@ const tablesdbUpdateIpColumn = async ({databaseId,tableId,key,required,xdefault, */ /** - * @param {TablesDbCreateRelationshipColumnRequestParams} params + * @param {TablesDBCreateRelationshipColumnRequestParams} params */ const tablesdbCreateRelationshipColumn = async ({databaseId,tableId,relatedTableId,type,twoWay,key,twoWayKey,onDelete,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1262,9 +1262,9 @@ const tablesdbCreateRelationshipColumn = async ({databaseId,tableId,relatedTable } /** - * @typedef {Object} TablesDbCreateStringColumnRequestParams + * @typedef {Object} TablesDBCreateStringColumnRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @property {string} key Column Key. * @property {number} size Attribute size for text attributes, in number of characters. * @property {boolean} required Is column required? @@ -1277,7 +1277,7 @@ const tablesdbCreateRelationshipColumn = async ({databaseId,tableId,relatedTable */ /** - * @param {TablesDbCreateStringColumnRequestParams} params + * @param {TablesDBCreateStringColumnRequestParams} params */ const tablesdbCreateStringColumn = async ({databaseId,tableId,key,size,required,xdefault,array,encrypt,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1318,9 +1318,9 @@ const tablesdbCreateStringColumn = async ({databaseId,tableId,key,size,required, } /** - * @typedef {Object} TablesDbUpdateStringColumnRequestParams + * @typedef {Object} TablesDBUpdateStringColumnRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @property {string} key Column Key. * @property {boolean} required Is column required? * @property {string} xdefault Default value for column when not provided. Cannot be set when column is required. @@ -1332,7 +1332,7 @@ const tablesdbCreateStringColumn = async ({databaseId,tableId,key,size,required, */ /** - * @param {TablesDbUpdateStringColumnRequestParams} params + * @param {TablesDBUpdateStringColumnRequestParams} params */ const tablesdbUpdateStringColumn = async ({databaseId,tableId,key,required,xdefault,size,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1367,7 +1367,7 @@ const tablesdbUpdateStringColumn = async ({databaseId,tableId,key,required,xdefa } /** - * @typedef {Object} TablesDbCreateUrlColumnRequestParams + * @typedef {Object} TablesDBCreateUrlColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -1380,7 +1380,7 @@ const tablesdbUpdateStringColumn = async ({databaseId,tableId,key,required,xdefa */ /** - * @param {TablesDbCreateUrlColumnRequestParams} params + * @param {TablesDBCreateUrlColumnRequestParams} params */ const tablesdbCreateUrlColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1415,7 +1415,7 @@ const tablesdbCreateUrlColumn = async ({databaseId,tableId,key,required,xdefault } /** - * @typedef {Object} TablesDbUpdateUrlColumnRequestParams + * @typedef {Object} TablesDBUpdateUrlColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -1428,7 +1428,7 @@ const tablesdbCreateUrlColumn = async ({databaseId,tableId,key,required,xdefault */ /** - * @param {TablesDbUpdateUrlColumnRequestParams} params + * @param {TablesDBUpdateUrlColumnRequestParams} params */ const tablesdbUpdateUrlColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1460,7 +1460,7 @@ const tablesdbUpdateUrlColumn = async ({databaseId,tableId,key,required,xdefault } /** - * @typedef {Object} TablesDbGetColumnRequestParams + * @typedef {Object} TablesDBGetColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -1470,7 +1470,7 @@ const tablesdbUpdateUrlColumn = async ({databaseId,tableId,key,required,xdefault */ /** - * @param {TablesDbGetColumnRequestParams} params + * @param {TablesDBGetColumnRequestParams} params */ const tablesdbGetColumn = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : @@ -1485,7 +1485,7 @@ const tablesdbGetColumn = async ({databaseId,tableId,key,parseOutput = true, ove if (parseOutput) { if(console) { - showConsoleLink('tablesDb', 'getColumn', databaseId, tableId); + showConsoleLink('tablesDB', 'getColumn', databaseId, tableId); } else { parse(response) } @@ -1496,7 +1496,7 @@ const tablesdbGetColumn = async ({databaseId,tableId,key,parseOutput = true, ove } /** - * @typedef {Object} TablesDbDeleteColumnRequestParams + * @typedef {Object} TablesDBDeleteColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -1506,7 +1506,7 @@ const tablesdbGetColumn = async ({databaseId,tableId,key,parseOutput = true, ove */ /** - * @param {TablesDbDeleteColumnRequestParams} params + * @param {TablesDBDeleteColumnRequestParams} params */ const tablesdbDeleteColumn = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1529,7 +1529,7 @@ const tablesdbDeleteColumn = async ({databaseId,tableId,key,parseOutput = true, } /** - * @typedef {Object} TablesDbUpdateRelationshipColumnRequestParams + * @typedef {Object} TablesDBUpdateRelationshipColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} key Column Key. @@ -1541,7 +1541,7 @@ const tablesdbDeleteColumn = async ({databaseId,tableId,key,parseOutput = true, */ /** - * @param {TablesDbUpdateRelationshipColumnRequestParams} params + * @param {TablesDBUpdateRelationshipColumnRequestParams} params */ const tablesdbUpdateRelationshipColumn = async ({databaseId,tableId,key,onDelete,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1570,9 +1570,9 @@ const tablesdbUpdateRelationshipColumn = async ({databaseId,tableId,key,onDelete } /** - * @typedef {Object} TablesDbListIndexesRequestParams + * @typedef {Object} TablesDBListIndexesRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @property {string[]} queries 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 * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -1580,7 +1580,7 @@ const tablesdbUpdateRelationshipColumn = async ({databaseId,tableId,key,onDelete */ /** - * @param {TablesDbListIndexesRequestParams} params + * @param {TablesDBListIndexesRequestParams} params */ const tablesdbListIndexes = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : @@ -1598,7 +1598,7 @@ const tablesdbListIndexes = async ({databaseId,tableId,queries,parseOutput = tru if (parseOutput) { if(console) { - showConsoleLink('tablesDb', 'listIndexes', databaseId, tableId); + showConsoleLink('tablesDB', 'listIndexes', databaseId, tableId); } else { parse(response) } @@ -1609,9 +1609,9 @@ const tablesdbListIndexes = async ({databaseId,tableId,queries,parseOutput = tru } /** - * @typedef {Object} TablesDbCreateIndexRequestParams + * @typedef {Object} TablesDBCreateIndexRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @property {string} key Index Key. * @property {IndexType} type Index type. * @property {string[]} columns Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long. @@ -1623,7 +1623,7 @@ const tablesdbListIndexes = async ({databaseId,tableId,queries,parseOutput = tru */ /** - * @param {TablesDbCreateIndexRequestParams} params + * @param {TablesDBCreateIndexRequestParams} params */ const tablesdbCreateIndex = async ({databaseId,tableId,key,type,columns,orders,lengths,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1664,9 +1664,9 @@ const tablesdbCreateIndex = async ({databaseId,tableId,key,type,columns,orders,l } /** - * @typedef {Object} TablesDbGetIndexRequestParams + * @typedef {Object} TablesDBGetIndexRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @property {string} key Index Key. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -1674,7 +1674,7 @@ const tablesdbCreateIndex = async ({databaseId,tableId,key,type,columns,orders,l */ /** - * @param {TablesDbGetIndexRequestParams} params + * @param {TablesDBGetIndexRequestParams} params */ const tablesdbGetIndex = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1696,9 +1696,9 @@ const tablesdbGetIndex = async ({databaseId,tableId,key,parseOutput = true, over } /** - * @typedef {Object} TablesDbDeleteIndexRequestParams + * @typedef {Object} TablesDBDeleteIndexRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @property {string} key Index Key. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -1706,7 +1706,7 @@ const tablesdbGetIndex = async ({databaseId,tableId,key,parseOutput = true, over */ /** - * @param {TablesDbDeleteIndexRequestParams} params + * @param {TablesDBDeleteIndexRequestParams} params */ const tablesdbDeleteIndex = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1729,7 +1729,7 @@ const tablesdbDeleteIndex = async ({databaseId,tableId,key,parseOutput = true, o } /** - * @typedef {Object} TablesDbListTableLogsRequestParams + * @typedef {Object} TablesDBListTableLogsRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string[]} queries 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 @@ -1739,7 +1739,7 @@ const tablesdbDeleteIndex = async ({databaseId,tableId,key,parseOutput = true, o */ /** - * @param {TablesDbListTableLogsRequestParams} params + * @param {TablesDBListTableLogsRequestParams} params */ const tablesdbListTableLogs = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : @@ -1757,7 +1757,7 @@ const tablesdbListTableLogs = async ({databaseId,tableId,queries,parseOutput = t if (parseOutput) { if(console) { - showConsoleLink('tablesDb', 'listTableLogs', databaseId, tableId); + showConsoleLink('tablesDB', 'listTableLogs', databaseId, tableId); } else { parse(response) } @@ -1768,9 +1768,9 @@ const tablesdbListTableLogs = async ({databaseId,tableId,queries,parseOutput = t } /** - * @typedef {Object} TablesDbListRowsRequestParams + * @typedef {Object} TablesDBListRowsRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} tableId Table ID. You can create a new table using the TableDB service [server integration](https://appwrite.io/docs/server/tablesdbdb#tablesdbCreate). * @property {string[]} queries 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. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -1778,7 +1778,7 @@ const tablesdbListTableLogs = async ({databaseId,tableId,queries,parseOutput = t */ /** - * @param {TablesDbListRowsRequestParams} params + * @param {TablesDBListRowsRequestParams} params */ const tablesdbListRows = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : @@ -1796,7 +1796,7 @@ const tablesdbListRows = async ({databaseId,tableId,queries,parseOutput = true, if (parseOutput) { if(console) { - showConsoleLink('tablesDb', 'listRows', databaseId, tableId); + showConsoleLink('tablesDB', 'listRows', databaseId, tableId); } else { parse(response) } @@ -1807,9 +1807,9 @@ const tablesdbListRows = async ({databaseId,tableId,queries,parseOutput = true, } /** - * @typedef {Object} TablesDbCreateRowRequestParams + * @typedef {Object} TablesDBCreateRowRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId 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. + * @property {string} tableId 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. * @property {string} rowId 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. * @property {object} data Row data as JSON object. * @property {string[]} permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). @@ -1819,7 +1819,7 @@ const tablesdbListRows = async ({databaseId,tableId,queries,parseOutput = true, */ /** - * @param {TablesDbCreateRowRequestParams} params + * @param {TablesDBCreateRowRequestParams} params */ const tablesdbCreateRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1852,9 +1852,9 @@ const tablesdbCreateRow = async ({databaseId,tableId,rowId,data,permissions,pars } /** - * @typedef {Object} TablesDbCreateRowsRequestParams + * @typedef {Object} TablesDBCreateRowsRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId 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. + * @property {string} tableId 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. * @property {object[]} rows Array of documents data as JSON objects. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -1862,7 +1862,7 @@ const tablesdbCreateRow = async ({databaseId,tableId,rowId,data,permissions,pars */ /** - * @param {TablesDbCreateRowsRequestParams} params + * @param {TablesDBCreateRowsRequestParams} params */ const tablesdbCreateRows = async ({databaseId,tableId,rows,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1889,7 +1889,7 @@ const tablesdbCreateRows = async ({databaseId,tableId,rows,parseOutput = true, o } /** - * @typedef {Object} TablesDbUpsertRowsRequestParams + * @typedef {Object} TablesDBUpsertRowsRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {object[]} rows Array of row data as JSON objects. May contain partial rows. @@ -1899,7 +1899,7 @@ const tablesdbCreateRows = async ({databaseId,tableId,rows,parseOutput = true, o */ /** - * @param {TablesDbUpsertRowsRequestParams} params + * @param {TablesDBUpsertRowsRequestParams} params */ const tablesdbUpsertRows = async ({databaseId,tableId,rows,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1926,7 +1926,7 @@ const tablesdbUpsertRows = async ({databaseId,tableId,rows,parseOutput = true, o } /** - * @typedef {Object} TablesDbUpdateRowsRequestParams + * @typedef {Object} TablesDBUpdateRowsRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {object} data Row data as JSON object. Include only column and value pairs to be updated. @@ -1937,7 +1937,7 @@ const tablesdbUpsertRows = async ({databaseId,tableId,rows,parseOutput = true, o */ /** - * @param {TablesDbUpdateRowsRequestParams} params + * @param {TablesDBUpdateRowsRequestParams} params */ const tablesdbUpdateRows = async ({databaseId,tableId,data,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -1967,9 +1967,9 @@ const tablesdbUpdateRows = async ({databaseId,tableId,data,queries,parseOutput = } /** - * @typedef {Object} TablesDbDeleteRowsRequestParams + * @typedef {Object} TablesDBDeleteRowsRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @property {string[]} queries 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. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -1977,7 +1977,7 @@ const tablesdbUpdateRows = async ({databaseId,tableId,data,queries,parseOutput = */ /** - * @param {TablesDbDeleteRowsRequestParams} params + * @param {TablesDBDeleteRowsRequestParams} params */ const tablesdbDeleteRows = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -2004,9 +2004,9 @@ const tablesdbDeleteRows = async ({databaseId,tableId,queries,parseOutput = true } /** - * @typedef {Object} TablesDbGetRowRequestParams + * @typedef {Object} TablesDBGetRowRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @property {string} rowId Row ID. * @property {string[]} queries 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. * @property {boolean} overrideForCli @@ -2015,7 +2015,7 @@ const tablesdbDeleteRows = async ({databaseId,tableId,queries,parseOutput = true */ /** - * @param {TablesDbGetRowRequestParams} params + * @param {TablesDBGetRowRequestParams} params */ const tablesdbGetRow = async ({databaseId,tableId,rowId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : @@ -2033,7 +2033,7 @@ const tablesdbGetRow = async ({databaseId,tableId,rowId,queries,parseOutput = tr if (parseOutput) { if(console) { - showConsoleLink('tablesDb', 'getRow', databaseId, tableId, rowId); + showConsoleLink('tablesDB', 'getRow', databaseId, tableId, rowId); } else { parse(response) } @@ -2044,7 +2044,7 @@ const tablesdbGetRow = async ({databaseId,tableId,rowId,queries,parseOutput = tr } /** - * @typedef {Object} TablesDbUpsertRowRequestParams + * @typedef {Object} TablesDBUpsertRowRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} rowId Row ID. @@ -2056,7 +2056,7 @@ const tablesdbGetRow = async ({databaseId,tableId,rowId,queries,parseOutput = tr */ /** - * @param {TablesDbUpsertRowRequestParams} params + * @param {TablesDBUpsertRowRequestParams} params */ const tablesdbUpsertRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -2086,7 +2086,7 @@ const tablesdbUpsertRow = async ({databaseId,tableId,rowId,data,permissions,pars } /** - * @typedef {Object} TablesDbUpdateRowRequestParams + * @typedef {Object} TablesDBUpdateRowRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} rowId Row ID. @@ -2098,7 +2098,7 @@ const tablesdbUpsertRow = async ({databaseId,tableId,rowId,data,permissions,pars */ /** - * @param {TablesDbUpdateRowRequestParams} params + * @param {TablesDBUpdateRowRequestParams} params */ const tablesdbUpdateRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -2128,9 +2128,9 @@ const tablesdbUpdateRow = async ({databaseId,tableId,rowId,data,permissions,pars } /** - * @typedef {Object} TablesDbDeleteRowRequestParams + * @typedef {Object} TablesDBDeleteRowRequestParams * @property {string} databaseId Database ID. - * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @property {string} rowId Row ID. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -2138,7 +2138,7 @@ const tablesdbUpdateRow = async ({databaseId,tableId,rowId,data,permissions,pars */ /** - * @param {TablesDbDeleteRowRequestParams} params + * @param {TablesDBDeleteRowRequestParams} params */ const tablesdbDeleteRow = async ({databaseId,tableId,rowId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -2161,7 +2161,7 @@ const tablesdbDeleteRow = async ({databaseId,tableId,rowId,parseOutput = true, o } /** - * @typedef {Object} TablesDbListRowLogsRequestParams + * @typedef {Object} TablesDBListRowLogsRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} rowId Row ID. @@ -2172,7 +2172,7 @@ const tablesdbDeleteRow = async ({databaseId,tableId,rowId,parseOutput = true, o */ /** - * @param {TablesDbListRowLogsRequestParams} params + * @param {TablesDBListRowLogsRequestParams} params */ const tablesdbListRowLogs = async ({databaseId,tableId,rowId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : @@ -2190,7 +2190,7 @@ const tablesdbListRowLogs = async ({databaseId,tableId,rowId,queries,parseOutput if (parseOutput) { if(console) { - showConsoleLink('tablesDb', 'listRowLogs', databaseId, tableId, rowId); + showConsoleLink('tablesDB', 'listRowLogs', databaseId, tableId, rowId); } else { parse(response) } @@ -2201,7 +2201,7 @@ const tablesdbListRowLogs = async ({databaseId,tableId,rowId,queries,parseOutput } /** - * @typedef {Object} TablesDbDecrementRowColumnRequestParams + * @typedef {Object} TablesDBDecrementRowColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} rowId Row ID. @@ -2214,7 +2214,7 @@ const tablesdbListRowLogs = async ({databaseId,tableId,rowId,queries,parseOutput */ /** - * @param {TablesDbDecrementRowColumnRequestParams} params + * @param {TablesDBDecrementRowColumnRequestParams} params */ const tablesdbDecrementRowColumn = async ({databaseId,tableId,rowId,column,value,min,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -2243,7 +2243,7 @@ const tablesdbDecrementRowColumn = async ({databaseId,tableId,rowId,column,value } /** - * @typedef {Object} TablesDbIncrementRowColumnRequestParams + * @typedef {Object} TablesDBIncrementRowColumnRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string} rowId Row ID. @@ -2256,7 +2256,7 @@ const tablesdbDecrementRowColumn = async ({databaseId,tableId,rowId,column,value */ /** - * @param {TablesDbIncrementRowColumnRequestParams} params + * @param {TablesDBIncrementRowColumnRequestParams} params */ const tablesdbIncrementRowColumn = async ({databaseId,tableId,rowId,column,value,max,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -2285,7 +2285,7 @@ const tablesdbIncrementRowColumn = async ({databaseId,tableId,rowId,column,value } /** - * @typedef {Object} TablesDbGetTableUsageRequestParams + * @typedef {Object} TablesDBGetTableUsageRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {UsageRange} range Date range. @@ -2295,7 +2295,7 @@ const tablesdbIncrementRowColumn = async ({databaseId,tableId,rowId,column,value */ /** - * @param {TablesDbGetTableUsageRequestParams} params + * @param {TablesDBGetTableUsageRequestParams} params */ const tablesdbGetTableUsage = async ({databaseId,tableId,range,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : @@ -2313,7 +2313,7 @@ const tablesdbGetTableUsage = async ({databaseId,tableId,range,parseOutput = tru if (parseOutput) { if(console) { - showConsoleLink('tablesDb', 'getTableUsage', databaseId, tableId); + showConsoleLink('tablesDB', 'getTableUsage', databaseId, tableId); } else { parse(response) } @@ -2324,7 +2324,7 @@ const tablesdbGetTableUsage = async ({databaseId,tableId,range,parseOutput = tru } /** - * @typedef {Object} TablesDbGetUsageRequestParams + * @typedef {Object} TablesDBGetUsageRequestParams * @property {string} databaseId Database ID. * @property {UsageRange} range Date range. * @property {boolean} overrideForCli @@ -2333,7 +2333,7 @@ const tablesdbGetTableUsage = async ({databaseId,tableId,range,parseOutput = tru */ /** - * @param {TablesDbGetUsageRequestParams} params + * @param {TablesDBGetUsageRequestParams} params */ const tablesdbGetUsage = async ({databaseId,range,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : @@ -2412,7 +2412,7 @@ tablesdb tablesdb .command(`create-table`) - .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.`) + .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.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `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.`) .requiredOption(`--name `, `Table name. Max length: 128 chars.`) @@ -2460,7 +2460,7 @@ tablesdb .command(`create-boolean-column`) .description(`Create a boolean column. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault [value]`, `Default value for column when not provided. Cannot be set when column is required.`, (value) => value === undefined ? true : parseBool(value)) @@ -2471,7 +2471,7 @@ tablesdb .command(`update-boolean-column`) .description(`Update a boolean column. Changing the 'default' value will not update already existing rows.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault [value]`, `Default value for column when not provided. Cannot be set when column is required.`, (value) => value === undefined ? true : parseBool(value)) @@ -2637,7 +2637,7 @@ tablesdb .command(`create-string-column`) .description(`Create a string column. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--size `, `Attribute size for text attributes, in number of characters.`, parseInteger) .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) @@ -2650,7 +2650,7 @@ tablesdb .command(`update-string-column`) .description(`Update a string column. Changing the 'default' value will not update already existing rows. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) @@ -2711,7 +2711,7 @@ tablesdb .command(`list-indexes`) .description(`List indexes on the table.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .option(`--queries [queries...]`, `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`) .option(`--console`, `Get the resource console url`) .action(actionRunner(tablesdbListIndexes)) @@ -2720,7 +2720,7 @@ tablesdb .command(`create-index`) .description(`Creates an index on the columns listed. Your index should include all the columns you will query in a single request. Type can be 'key', 'fulltext', or 'unique'.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .requiredOption(`--key `, `Index Key.`) .requiredOption(`--type `, `Index type.`) .requiredOption(`--columns [columns...]`, `Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.`) @@ -2732,7 +2732,7 @@ tablesdb .command(`get-index`) .description(`Get index by ID.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .requiredOption(`--key `, `Index Key.`) .action(actionRunner(tablesdbGetIndex)) @@ -2740,7 +2740,7 @@ tablesdb .command(`delete-index`) .description(`Delete an index.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .requiredOption(`--key `, `Index Key.`) .action(actionRunner(tablesdbDeleteIndex)) @@ -2757,16 +2757,16 @@ tablesdb .command(`list-rows`) .description(`Get a list of all the user's rows in a given table. You can use the query params to filter your results.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the TableDB service [server integration](https://appwrite.io/docs/server/tablesdbdb#tablesdbCreate).`) .option(`--queries [queries...]`, `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.`) .option(`--console`, `Get the resource console url`) .action(actionRunner(tablesdbListRows)) tablesdb .command(`create-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.`) + .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.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `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.`) + .requiredOption(`--table-id `, `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.`) .requiredOption(`--row-id `, `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.`) .requiredOption(`--data `, `Row data as JSON object.`) .option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`) @@ -2774,15 +2774,15 @@ tablesdb tablesdb .command(`create-rows`) - .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.`) + .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.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `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.`) + .requiredOption(`--table-id `, `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.`) .requiredOption(`--rows [rows...]`, `Array of documents data as JSON objects.`) .action(actionRunner(tablesdbCreateRows)) tablesdb .command(`upsert-rows`) - .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. `) + .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. `) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .requiredOption(`--rows [rows...]`, `Array of row data as JSON objects. May contain partial rows.`) @@ -2801,7 +2801,7 @@ tablesdb .command(`delete-rows`) .description(`Bulk delete rows using queries, if no queries are passed then all rows are deleted.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .option(`--queries [queries...]`, `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.`) .action(actionRunner(tablesdbDeleteRows)) @@ -2809,7 +2809,7 @@ tablesdb .command(`get-row`) .description(`Get a row by its unique ID. This endpoint response returns a JSON object with the row data.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .requiredOption(`--row-id `, `Row ID.`) .option(`--queries [queries...]`, `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.`) .option(`--console`, `Get the resource console url`) @@ -2817,7 +2817,7 @@ tablesdb tablesdb .command(`upsert-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.`) + .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.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .requiredOption(`--row-id `, `Row ID.`) @@ -2839,7 +2839,7 @@ tablesdb .command(`delete-row`) .description(`Delete a row by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .requiredOption(`--row-id `, `Row ID.`) .action(actionRunner(tablesdbDeleteRow)) diff --git a/lib/commands/users.js b/lib/commands/users.js index 8285cd5..15830d7 100644 --- a/lib/commands/users.js +++ b/lib/commands/users.js @@ -871,6 +871,41 @@ const usersUpdateMfa = async ({userId,mfa,parseOutput = true, overrideForCli = f } +/** + * @typedef {Object} UsersUpdateMFARequestParams + * @property {string} userId User ID. + * @property {boolean} mfa Enable or disable MFA. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {UsersUpdateMFARequestParams} params + */ +const usersUpdateMFA = async ({userId,mfa,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/users/{userId}/mfa'.replace('{userId}', userId); + let payload = {}; + if (typeof mfa !== 'undefined') { + payload['mfa'] = mfa; + } + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} UsersDeleteMfaAuthenticatorRequestParams * @property {string} userId User ID. @@ -903,6 +938,38 @@ const usersDeleteMfaAuthenticator = async ({userId,type,parseOutput = true, over } +/** + * @typedef {Object} UsersDeleteMFAAuthenticatorRequestParams + * @property {string} userId User ID. + * @property {AuthenticatorType} type Type of authenticator. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {UsersDeleteMFAAuthenticatorRequestParams} params + */ +const usersDeleteMFAAuthenticator = async ({userId,type,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/users/{userId}/mfa/authenticators/{type}'.replace('{userId}', userId).replace('{type}', type); + let payload = {}; + + let response = undefined; + + response = await client.call('delete', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} UsersListMfaFactorsRequestParams * @property {string} userId User ID. @@ -933,6 +1000,36 @@ const usersListMfaFactors = async ({userId,parseOutput = true, overrideForCli = } +/** + * @typedef {Object} UsersListMFAFactorsRequestParams + * @property {string} userId User ID. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {UsersListMFAFactorsRequestParams} params + */ +const usersListMFAFactors = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/users/{userId}/mfa/factors'.replace('{userId}', userId); + let payload = {}; + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} UsersGetMfaRecoveryCodesRequestParams * @property {string} userId User ID. @@ -963,6 +1060,36 @@ const usersGetMfaRecoveryCodes = async ({userId,parseOutput = true, overrideForC } +/** + * @typedef {Object} UsersGetMFARecoveryCodesRequestParams + * @property {string} userId User ID. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {UsersGetMFARecoveryCodesRequestParams} params + */ +const usersGetMFARecoveryCodes = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId); + let payload = {}; + + let response = undefined; + + response = await client.call('get', apiPath, { + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} UsersUpdateMfaRecoveryCodesRequestParams * @property {string} userId User ID. @@ -994,6 +1121,37 @@ const usersUpdateMfaRecoveryCodes = async ({userId,parseOutput = true, overrideF } +/** + * @typedef {Object} UsersUpdateMFARecoveryCodesRequestParams + * @property {string} userId User ID. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {UsersUpdateMFARecoveryCodesRequestParams} params + */ +const usersUpdateMFARecoveryCodes = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId); + let payload = {}; + + let response = undefined; + + response = await client.call('put', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} UsersCreateMfaRecoveryCodesRequestParams * @property {string} userId User ID. @@ -1025,6 +1183,37 @@ const usersCreateMfaRecoveryCodes = async ({userId,parseOutput = true, overrideF } +/** + * @typedef {Object} UsersCreateMFARecoveryCodesRequestParams + * @property {string} userId User ID. + * @property {boolean} overrideForCli + * @property {boolean} parseOutput + * @property {libClient | undefined} sdk + */ + +/** + * @param {UsersCreateMFARecoveryCodesRequestParams} params + */ +const usersCreateMFARecoveryCodes = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { + let client = !sdk ? await sdkForProject() : + sdk; + let apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId); + let payload = {}; + + let response = undefined; + + response = await client.call('patch', apiPath, { + 'content-type': 'application/json', + }, payload); + + if (parseOutput) { + parse(response) + } + + return response; + +} + /** * @typedef {Object} UsersUpdateNameRequestParams * @property {string} userId User ID. @@ -1820,42 +2009,80 @@ users users .command(`update-mfa`) - .description(`Enable or disable MFA on a user account.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-mfa' instead] Enable or disable MFA on a user account.`) .requiredOption(`--user-id `, `User ID.`) .requiredOption(`--mfa [value]`, `Enable or disable MFA.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(usersUpdateMfa)) +users + .command(`update-mfa`) + .description(`Enable or disable MFA on a user account.`) + .requiredOption(`--user-id `, `User ID.`) + .requiredOption(`--mfa [value]`, `Enable or disable MFA.`, (value) => value === undefined ? true : parseBool(value)) + .action(actionRunner(usersUpdateMFA)) + users .command(`delete-mfa-authenticator`) - .description(`Delete an authenticator app.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'delete-mfa-authenticator' instead] Delete an authenticator app.`) .requiredOption(`--user-id `, `User ID.`) .requiredOption(`--type `, `Type of authenticator.`) .action(actionRunner(usersDeleteMfaAuthenticator)) +users + .command(`delete-mfa-authenticator`) + .description(`Delete an authenticator app.`) + .requiredOption(`--user-id `, `User ID.`) + .requiredOption(`--type `, `Type of authenticator.`) + .action(actionRunner(usersDeleteMFAAuthenticator)) + users .command(`list-mfa-factors`) - .description(`List the factors available on the account to be used as a MFA challange.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'list-mfa-factors' instead] List the factors available on the account to be used as a MFA challange.`) .requiredOption(`--user-id `, `User ID.`) .action(actionRunner(usersListMfaFactors)) +users + .command(`list-mfa-factors`) + .description(`List the factors available on the account to be used as a MFA challange.`) + .requiredOption(`--user-id `, `User ID.`) + .action(actionRunner(usersListMFAFactors)) + users .command(`get-mfa-recovery-codes`) - .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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'get-mfa-recovery-codes' instead] 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.`) .requiredOption(`--user-id `, `User ID.`) .action(actionRunner(usersGetMfaRecoveryCodes)) +users + .command(`get-mfa-recovery-codes`) + .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.`) + .requiredOption(`--user-id `, `User ID.`) + .action(actionRunner(usersGetMFARecoveryCodes)) + users .command(`update-mfa-recovery-codes`) - .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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-mfa-recovery-codes' instead] 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.`) .requiredOption(`--user-id `, `User ID.`) .action(actionRunner(usersUpdateMfaRecoveryCodes)) +users + .command(`update-mfa-recovery-codes`) + .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.`) + .requiredOption(`--user-id `, `User ID.`) + .action(actionRunner(usersUpdateMFARecoveryCodes)) + users .command(`create-mfa-recovery-codes`) - .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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-mfa-recovery-codes' instead] 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.`) .requiredOption(`--user-id `, `User ID.`) .action(actionRunner(usersCreateMfaRecoveryCodes)) +users + .command(`create-mfa-recovery-codes`) + .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.`) + .requiredOption(`--user-id `, `User ID.`) + .action(actionRunner(usersCreateMFARecoveryCodes)) + users .command(`update-name`) .description(`Update the user name by its unique ID.`) @@ -2009,11 +2236,17 @@ module.exports = { usersListLogs, usersListMemberships, usersUpdateMfa, + usersUpdateMFA, usersDeleteMfaAuthenticator, + usersDeleteMFAAuthenticator, usersListMfaFactors, + usersListMFAFactors, usersGetMfaRecoveryCodes, + usersGetMFARecoveryCodes, usersUpdateMfaRecoveryCodes, + usersUpdateMFARecoveryCodes, usersCreateMfaRecoveryCodes, + usersCreateMFARecoveryCodes, usersUpdateName, usersUpdatePassword, usersUpdatePhone, From 2604c29b27cd5fca3396cf3d4c9fbd63220e5743 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 23 Aug 2025 20:10:00 +1200 Subject: [PATCH 4/6] Add 1.8.x support --- lib/commands/account.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/commands/account.js b/lib/commands/account.js index 4de2f46..b8e39da 100644 --- a/lib/commands/account.js +++ b/lib/commands/account.js @@ -1693,7 +1693,7 @@ const accountDeletePushTarget = async ({targetId,parseOutput = true, overrideFor /** * @typedef {Object} AccountCreateEmailTokenRequestParams - * @property {string} userId 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. + * @property {string} userId 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. * @property {string} email User email. * @property {boolean} phrase 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. * @property {boolean} overrideForCli @@ -1735,7 +1735,7 @@ const accountCreateEmailToken = async ({userId,email,phrase,parseOutput = true, /** * @typedef {Object} AccountCreateMagicURLTokenRequestParams - * @property {string} userId 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. + * @property {string} userId 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. * @property {string} email User email. * @property {string} 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. * @property {boolean} phrase 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. @@ -1823,7 +1823,7 @@ const accountCreateOAuth2Token = async ({provider,success,failure,scopes,parseOu /** * @typedef {Object} AccountCreatePhoneTokenRequestParams - * @property {string} userId 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. + * @property {string} userId 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. * @property {string} phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -2304,8 +2304,8 @@ account account .command(`create-email-token`) - .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. 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).`) - .requiredOption(`--user-id `, `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(`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). `) + .requiredOption(`--user-id `, `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.`) .requiredOption(`--email `, `User email.`) .option(`--phrase [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(accountCreateEmailToken)) @@ -2313,7 +2313,7 @@ account account .command(`create-magic-url-token`) .description(`Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to 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 link sent to the user's email address is valid for 1 hour. 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). `) - .requiredOption(`--user-id `, `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.`) + .requiredOption(`--user-id `, `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.`) .requiredOption(`--email `, `User email.`) .option(`--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.`) .option(`--phrase [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) @@ -2331,7 +2331,7 @@ account account .command(`create-phone-token`) .description(`Sends the user an SMS 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 phone 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).`) - .requiredOption(`--user-id `, `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.`) + .requiredOption(`--user-id `, `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.`) .requiredOption(`--phone `, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`) .action(actionRunner(accountCreatePhoneToken)) From 12786d78ca78d09d5a5c71a71c5f3e6f35c31daf Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 23 Aug 2025 22:15:37 +1200 Subject: [PATCH 5/6] Add 1.8.x support --- lib/commands/account.js | 18 +++++++++--------- lib/commands/messaging.js | 16 ++++++++-------- lib/commands/projects.js | 14 +++++++------- lib/commands/tables-d-b.js | 20 ++++++++++---------- lib/commands/users.js | 12 ++++++------ 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/lib/commands/account.js b/lib/commands/account.js index b8e39da..df5f669 100644 --- a/lib/commands/account.js +++ b/lib/commands/account.js @@ -2057,7 +2057,7 @@ account account .command(`create-mfa-authenticator`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-mfa-authenticator' instead] 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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'account create-mfa-authenticator' instead] 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.`) .requiredOption(`--type `, `Type of authenticator. Must be 'totp'`) .action(actionRunner(accountCreateMfaAuthenticator)) @@ -2069,7 +2069,7 @@ account account .command(`update-mfa-authenticator`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-mfa-authenticator' instead] Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'account update-mfa-authenticator' instead] Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.`) .requiredOption(`--type `, `Type of authenticator.`) .requiredOption(`--otp `, `Valid verification token.`) .action(actionRunner(accountUpdateMfaAuthenticator)) @@ -2083,7 +2083,7 @@ account account .command(`delete-mfa-authenticator`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'delete-mfa-authenticator' instead] Delete an authenticator for a user by ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'account delete-mfa-authenticator' instead] Delete an authenticator for a user by ID.`) .requiredOption(`--type `, `Type of authenticator.`) .action(actionRunner(accountDeleteMfaAuthenticator)) @@ -2095,7 +2095,7 @@ account account .command(`create-mfa-challenge`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-mfa-challenge' instead] Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'account create-mfa-challenge' instead] Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.`) .requiredOption(`--factor `, `Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'.`) .action(actionRunner(accountCreateMfaChallenge)) @@ -2107,7 +2107,7 @@ account account .command(`update-mfa-challenge`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-mfa-challenge' instead] 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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'account update-mfa-challenge' instead] 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.`) .requiredOption(`--challenge-id `, `ID of the challenge.`) .requiredOption(`--otp `, `Valid verification token.`) .action(actionRunner(accountUpdateMfaChallenge)) @@ -2121,7 +2121,7 @@ account account .command(`list-mfa-factors`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'list-mfa-factors' instead] List the factors available on the account to be used as a MFA challange.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'account list-mfa-factors' instead] List the factors available on the account to be used as a MFA challange.`) .action(actionRunner(accountListMfaFactors)) account @@ -2131,7 +2131,7 @@ account account .command(`get-mfa-recovery-codes`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'get-mfa-recovery-codes' instead] 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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'account get-mfa-recovery-codes' instead] 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.`) .action(actionRunner(accountGetMfaRecoveryCodes)) account @@ -2141,7 +2141,7 @@ account account .command(`create-mfa-recovery-codes`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-mfa-recovery-codes' instead] 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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'account create-mfa-recovery-codes' instead] 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.`) .action(actionRunner(accountCreateMfaRecoveryCodes)) account @@ -2151,7 +2151,7 @@ account account .command(`update-mfa-recovery-codes`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-mfa-recovery-codes' instead] 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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'account update-mfa-recovery-codes' instead] 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.`) .action(actionRunner(accountUpdateMfaRecoveryCodes)) account diff --git a/lib/commands/messaging.js b/lib/commands/messaging.js index 2712673..d95dd8a 100644 --- a/lib/commands/messaging.js +++ b/lib/commands/messaging.js @@ -3009,7 +3009,7 @@ messaging messaging .command(`create-sms`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-sms' instead] Create a new SMS message.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging create-sms' instead] Create a new SMS message.`) .requiredOption(`--message-id `, `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.`) .requiredOption(`--content `, `SMS Content.`) .option(`--topics [topics...]`, `List of Topic IDs.`) @@ -3033,7 +3033,7 @@ messaging messaging .command(`update-sms`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-sms' instead] 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. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging update-sms' instead] 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. `) .requiredOption(`--message-id `, `Message ID.`) .option(`--topics [topics...]`, `List of Topic IDs.`) .option(`--users [users...]`, `List of User IDs.`) @@ -3093,7 +3093,7 @@ messaging messaging .command(`create-apns-provider`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-apns-provider' instead] Create a new Apple Push Notification service provider.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging create-apns-provider' instead] Create a new Apple Push Notification service provider.`) .requiredOption(`--provider-id `, `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.`) .requiredOption(`--name `, `Provider name.`) .option(`--auth-key `, `APNS authentication key.`) @@ -3119,7 +3119,7 @@ messaging messaging .command(`update-apns-provider`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-apns-provider' instead] Update a Apple Push Notification service provider by its unique ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging update-apns-provider' instead] Update a Apple Push Notification service provider by its unique ID.`) .requiredOption(`--provider-id `, `Provider ID.`) .option(`--name `, `Provider name.`) .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) @@ -3145,7 +3145,7 @@ messaging messaging .command(`create-fcm-provider`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-fcm-provider' instead] Create a new Firebase Cloud Messaging provider.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging create-fcm-provider' instead] Create a new Firebase Cloud Messaging provider.`) .requiredOption(`--provider-id `, `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.`) .requiredOption(`--name `, `Provider name.`) .option(`--service-account-json `, `FCM service account JSON.`) @@ -3163,7 +3163,7 @@ messaging messaging .command(`update-fcm-provider`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-fcm-provider' instead] Update a Firebase Cloud Messaging provider by its unique ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging update-fcm-provider' instead] Update a Firebase Cloud Messaging provider by its unique ID.`) .requiredOption(`--provider-id `, `Provider ID.`) .option(`--name `, `Provider name.`) .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) @@ -3259,7 +3259,7 @@ messaging messaging .command(`create-smtp-provider`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-smtp-provider' instead] Create a new SMTP provider.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging create-smtp-provider' instead] Create a new SMTP provider.`) .requiredOption(`--provider-id `, `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.`) .requiredOption(`--name `, `Provider name.`) .requiredOption(`--host `, `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.`) @@ -3297,7 +3297,7 @@ messaging messaging .command(`update-smtp-provider`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-smtp-provider' instead] Update a SMTP provider by its unique ID.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging update-smtp-provider' instead] Update a SMTP provider by its unique ID.`) .requiredOption(`--provider-id `, `Provider ID.`) .option(`--name `, `Provider name.`) .option(`--host `, `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.`) diff --git a/lib/commands/projects.js b/lib/commands/projects.js index fdbf6f7..5696591 100644 --- a/lib/commands/projects.js +++ b/lib/commands/projects.js @@ -2514,7 +2514,7 @@ projects projects .command(`update-api-status`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-api-status' instead] Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects update-api-status' instead] Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--api `, `API name.`) .requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : parseBool(value)) @@ -2530,7 +2530,7 @@ projects projects .command(`update-api-status-all`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-api-status-all' instead] 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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects update-api-status-all' instead] 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.`) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(projectsUpdateApiStatusAll)) @@ -2782,7 +2782,7 @@ projects projects .command(`update-smtp`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-smtp' instead] 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. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects update-smtp' instead] 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. `) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--enabled [value]`, `Enable custom SMTP service`, (value) => value === undefined ? true : parseBool(value)) .option(`--sender-name `, `Name of the email sender`) @@ -2812,7 +2812,7 @@ projects projects .command(`create-smtp-test`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-smtp-test' instead] Send a test email to verify SMTP configuration. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects create-smtp-test' instead] Send a test email to verify SMTP configuration. `) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`) .requiredOption(`--sender-name `, `Name of the email sender`) @@ -2878,7 +2878,7 @@ projects projects .command(`get-sms-template`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'get-sms-template' instead] Get a custom SMS template for the specified locale and type returning it's contents.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects get-sms-template' instead] Get a custom SMS template for the specified locale and type returning it's contents.`) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--type `, `Template type`) .requiredOption(`--locale `, `Template locale`) @@ -2894,7 +2894,7 @@ projects projects .command(`update-sms-template`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-sms-template' instead] Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects update-sms-template' instead] Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--type `, `Template type`) .requiredOption(`--locale `, `Template locale`) @@ -2912,7 +2912,7 @@ projects projects .command(`delete-sms-template`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'delete-sms-template' instead] Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects delete-sms-template' instead] Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--type `, `Template type`) .requiredOption(`--locale `, `Template locale`) diff --git a/lib/commands/tables-d-b.js b/lib/commands/tables-d-b.js index 272d9cc..2043c86 100644 --- a/lib/commands/tables-d-b.js +++ b/lib/commands/tables-d-b.js @@ -41,7 +41,7 @@ const tablesdb = new Command("tablesdb").description(commandDescriptions['tables /** * @typedef {Object} TablesDBListRequestParams - * @property {string[]} queries 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 + * @property {string[]} queries 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -266,7 +266,7 @@ const tablesdbDelete = async ({databaseId,parseOutput = true, overrideForCli = f /** * @typedef {Object} TablesDBListTablesRequestParams * @property {string} databaseId Database ID. - * @property {string[]} queries 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 + * @property {string[]} queries 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -477,7 +477,7 @@ const tablesdbDeleteTable = async ({databaseId,tableId,parseOutput = true, overr * @typedef {Object} TablesDBListColumnsRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. - * @property {string[]} queries 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 + * @property {string[]} queries 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 * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1266,7 +1266,7 @@ const tablesdbCreateRelationshipColumn = async ({databaseId,tableId,relatedTable * @property {string} databaseId Database ID. * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @property {string} key Column Key. - * @property {number} size Attribute size for text attributes, in number of characters. + * @property {number} size Column size for text columns, in number of characters. * @property {boolean} required Is column required? * @property {string} xdefault Default value for column when not provided. Cannot be set when column is required. * @property {boolean} array Is column an array? @@ -1573,7 +1573,7 @@ const tablesdbUpdateRelationshipColumn = async ({databaseId,tableId,key,onDelete * @typedef {Object} TablesDBListIndexesRequestParams * @property {string} databaseId Database ID. * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). - * @property {string[]} queries 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 + * @property {string[]} queries 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 * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -2360,7 +2360,7 @@ const tablesdbGetUsage = async ({databaseId,range,parseOutput = true, overrideFo tablesdb .command(`list`) .description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`) - .option(`--queries [queries...]`, `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`) + .option(`--queries [queries...]`, `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`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option(`--console`, `Get the resource console url`) .action(actionRunner(tablesdbList)) @@ -2405,7 +2405,7 @@ tablesdb .command(`list-tables`) .description(`Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.`) .requiredOption(`--database-id `, `Database ID.`) - .option(`--queries [queries...]`, `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`) + .option(`--queries [queries...]`, `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`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option(`--console`, `Get the resource console url`) .action(actionRunner(tablesdbListTables)) @@ -2452,7 +2452,7 @@ tablesdb .description(`List columns in the table.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) - .option(`--queries [queries...]`, `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`) + .option(`--queries [queries...]`, `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`) .option(`--console`, `Get the resource console url`) .action(actionRunner(tablesdbListColumns)) @@ -2639,7 +2639,7 @@ tablesdb .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .requiredOption(`--key `, `Column Key.`) - .requiredOption(`--size `, `Attribute size for text attributes, in number of characters.`, parseInteger) + .requiredOption(`--size `, `Column size for text columns, in number of characters.`, parseInteger) .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) @@ -2712,7 +2712,7 @@ tablesdb .description(`List indexes on the table.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) - .option(`--queries [queries...]`, `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`) + .option(`--queries [queries...]`, `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`) .option(`--console`, `Get the resource console url`) .action(actionRunner(tablesdbListIndexes)) diff --git a/lib/commands/users.js b/lib/commands/users.js index 15830d7..eb61d12 100644 --- a/lib/commands/users.js +++ b/lib/commands/users.js @@ -2009,7 +2009,7 @@ users users .command(`update-mfa`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-mfa' instead] Enable or disable MFA on a user account.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'users update-mfa' instead] Enable or disable MFA on a user account.`) .requiredOption(`--user-id `, `User ID.`) .requiredOption(`--mfa [value]`, `Enable or disable MFA.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(usersUpdateMfa)) @@ -2023,7 +2023,7 @@ users users .command(`delete-mfa-authenticator`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'delete-mfa-authenticator' instead] Delete an authenticator app.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'users delete-mfa-authenticator' instead] Delete an authenticator app.`) .requiredOption(`--user-id `, `User ID.`) .requiredOption(`--type `, `Type of authenticator.`) .action(actionRunner(usersDeleteMfaAuthenticator)) @@ -2037,7 +2037,7 @@ users users .command(`list-mfa-factors`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'list-mfa-factors' instead] List the factors available on the account to be used as a MFA challange.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'users list-mfa-factors' instead] List the factors available on the account to be used as a MFA challange.`) .requiredOption(`--user-id `, `User ID.`) .action(actionRunner(usersListMfaFactors)) @@ -2049,7 +2049,7 @@ users users .command(`get-mfa-recovery-codes`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'get-mfa-recovery-codes' instead] 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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'users get-mfa-recovery-codes' instead] 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.`) .requiredOption(`--user-id `, `User ID.`) .action(actionRunner(usersGetMfaRecoveryCodes)) @@ -2061,7 +2061,7 @@ users users .command(`update-mfa-recovery-codes`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'update-mfa-recovery-codes' instead] 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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'users update-mfa-recovery-codes' instead] 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.`) .requiredOption(`--user-id `, `User ID.`) .action(actionRunner(usersUpdateMfaRecoveryCodes)) @@ -2073,7 +2073,7 @@ users users .command(`create-mfa-recovery-codes`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'create-mfa-recovery-codes' instead] 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.`) + .description(`[**DEPRECATED** - This command is deprecated. Please use 'users create-mfa-recovery-codes' instead] 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.`) .requiredOption(`--user-id `, `User ID.`) .action(actionRunner(usersCreateMfaRecoveryCodes)) From e296f531f4c4c643b7554a1f9bb8414cd318e46c Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 26 Aug 2025 04:23:24 +1200 Subject: [PATCH 6/6] Fix docs --- .../account/create-anonymous-session.md | 2 +- .../account/create-email-password-session.md | 6 +- docs/examples/account/create-email-token.md | 7 +- docs/examples/account/create-j-w-t.md | 1 - docs/examples/account/create-jwt.md | 1 + .../account/create-m-f-a-authenticator.md | 2 - .../account/create-m-f-a-challenge.md | 2 - .../account/create-m-f-a-recovery-codes.md | 1 - .../account/create-magic-u-r-l-token.md | 5 - .../account/create-magic-url-token.md | 3 + .../account/create-mfa-authenticator.md | 4 +- docs/examples/account/create-mfa-challenge.md | 4 +- .../account/create-mfa-recovery-codes.md | 2 +- .../account/create-o-auth-2-session.md | 2 + .../examples/account/create-o-auth-2-token.md | 2 + .../examples/account/create-o-auth2session.md | 5 - docs/examples/account/create-o-auth2token.md | 5 - docs/examples/account/create-phone-token.md | 6 +- .../account/create-phone-verification.md | 2 +- docs/examples/account/create-push-target.md | 7 +- docs/examples/account/create-recovery.md | 6 +- docs/examples/account/create-session.md | 6 +- docs/examples/account/create-verification.md | 4 +- docs/examples/account/create.md | 7 +- docs/examples/account/delete-identity.md | 4 +- .../account/delete-m-f-a-authenticator.md | 2 - .../account/delete-mfa-authenticator.md | 4 +- docs/examples/account/delete-push-target.md | 4 +- docs/examples/account/delete-session.md | 4 +- docs/examples/account/delete-sessions.md | 2 +- .../account/get-m-f-a-recovery-codes.md | 1 - .../account/get-mfa-recovery-codes.md | 2 +- docs/examples/account/get-prefs.md | 2 +- docs/examples/account/get-session.md | 4 +- docs/examples/account/list-identities.md | 3 +- docs/examples/account/list-logs.md | 3 +- docs/examples/account/list-m-f-a-factors.md | 1 - docs/examples/account/list-mfa-factors.md | 2 +- docs/examples/account/list-sessions.md | 2 +- docs/examples/account/update-email.md | 6 +- .../account/update-m-f-a-authenticator.md | 3 - .../account/update-m-f-a-challenge.md | 3 - .../account/update-m-f-a-recovery-codes.md | 1 - docs/examples/account/update-m-f-a.md | 2 - .../account/update-magic-u-r-l-session.md | 3 - .../account/update-magic-url-session.md | 3 + .../account/update-mfa-authenticator.md | 6 +- docs/examples/account/update-mfa-challenge.md | 6 +- .../account/update-mfa-recovery-codes.md | 2 +- docs/examples/account/update-mfa.md | 2 + docs/examples/account/update-name.md | 4 +- docs/examples/account/update-password.md | 5 +- docs/examples/account/update-phone-session.md | 6 +- .../account/update-phone-verification.md | 6 +- docs/examples/account/update-phone.md | 6 +- docs/examples/account/update-prefs.md | 4 +- docs/examples/account/update-push-target.md | 6 +- docs/examples/account/update-recovery.md | 8 +- docs/examples/account/update-session.md | 4 +- docs/examples/account/update-status.md | 2 +- docs/examples/account/update-verification.md | 6 +- docs/examples/avatars/get-browser.md | 7 +- docs/examples/avatars/get-credit-card.md | 7 +- docs/examples/avatars/get-favicon.md | 4 +- docs/examples/avatars/get-flag.md | 7 +- docs/examples/avatars/get-image.md | 6 +- docs/examples/avatars/get-initials.md | 6 +- docs/examples/avatars/get-q-r.md | 5 - docs/examples/avatars/get-qr.md | 2 + docs/examples/console/get-resource.md | 6 +- .../databases/create-boolean-attribute.md | 12 +- docs/examples/databases/create-collection.md | 11 +- .../databases/create-datetime-attribute.md | 12 +- docs/examples/databases/create-document.md | 11 +- docs/examples/databases/create-documents.md | 8 +- .../databases/create-email-attribute.md | 12 +- .../databases/create-enum-attribute.md | 14 +- .../databases/create-float-attribute.md | 14 +- docs/examples/databases/create-index.md | 14 +- .../databases/create-integer-attribute.md | 14 +- .../examples/databases/create-ip-attribute.md | 12 +- .../create-relationship-attribute.md | 14 +- .../databases/create-string-attribute.md | 15 +- .../databases/create-url-attribute.md | 12 +- docs/examples/databases/create.md | 5 +- .../databases/decrement-document-attribute.md | 12 +- docs/examples/databases/delete-attribute.md | 8 +- docs/examples/databases/delete-collection.md | 6 +- docs/examples/databases/delete-document.md | 8 +- docs/examples/databases/delete-documents.md | 7 +- docs/examples/databases/delete-index.md | 8 +- docs/examples/databases/delete.md | 2 +- docs/examples/databases/get-attribute.md | 8 +- .../databases/get-collection-usage.md | 7 +- docs/examples/databases/get-collection.md | 6 +- docs/examples/databases/get-document.md | 9 +- docs/examples/databases/get-index.md | 8 +- docs/examples/databases/get-usage.md | 5 +- docs/examples/databases/get.md | 2 +- .../databases/increment-document-attribute.md | 12 +- docs/examples/databases/list-attributes.md | 7 +- .../databases/list-collection-logs.md | 7 +- docs/examples/databases/list-collections.md | 6 +- docs/examples/databases/list-document-logs.md | 9 +- docs/examples/databases/list-documents.md | 7 +- docs/examples/databases/list-indexes.md | 7 +- docs/examples/databases/list-logs.md | 5 +- docs/examples/databases/list-usage.md | 3 +- docs/examples/databases/list.md | 4 +- .../databases/update-boolean-attribute.md | 13 +- docs/examples/databases/update-collection.md | 11 +- .../databases/update-datetime-attribute.md | 13 +- docs/examples/databases/update-document.md | 10 +- docs/examples/databases/update-documents.md | 8 +- .../databases/update-email-attribute.md | 13 +- .../databases/update-enum-attribute.md | 15 +- .../databases/update-float-attribute.md | 15 +- .../databases/update-integer-attribute.md | 15 +- .../examples/databases/update-ip-attribute.md | 13 +- .../update-relationship-attribute.md | 10 +- .../databases/update-string-attribute.md | 14 +- .../databases/update-url-attribute.md | 13 +- docs/examples/databases/update.md | 5 +- docs/examples/databases/upsert-document.md | 11 +- docs/examples/databases/upsert-documents.md | 8 +- docs/examples/functions/create-deployment.md | 10 +- .../functions/create-duplicate-deployment.md | 7 +- docs/examples/functions/create-execution.md | 10 +- .../functions/create-template-deployment.md | 13 +- docs/examples/functions/create-variable.md | 9 +- .../functions/create-vcs-deployment.md | 9 +- docs/examples/functions/create.md | 21 +- docs/examples/functions/delete-deployment.md | 6 +- docs/examples/functions/delete-execution.md | 6 +- docs/examples/functions/delete-variable.md | 6 +- docs/examples/functions/delete.md | 2 +- .../functions/get-deployment-download.md | 7 +- docs/examples/functions/get-deployment.md | 6 +- docs/examples/functions/get-execution.md | 6 +- docs/examples/functions/get-template.md | 4 +- docs/examples/functions/get-usage.md | 5 +- docs/examples/functions/get-variable.md | 6 +- docs/examples/functions/get.md | 2 +- docs/examples/functions/list-deployments.md | 6 +- docs/examples/functions/list-executions.md | 5 +- docs/examples/functions/list-runtimes.md | 2 +- .../examples/functions/list-specifications.md | 2 +- docs/examples/functions/list-templates.md | 6 +- docs/examples/functions/list-usage.md | 3 +- docs/examples/functions/list-variables.md | 4 +- docs/examples/functions/list.md | 4 +- .../functions/update-deployment-status.md | 6 +- .../functions/update-function-deployment.md | 6 +- docs/examples/functions/update-variable.md | 10 +- docs/examples/functions/update.md | 20 +- docs/examples/graphql/mutation.md | 2 +- docs/examples/graphql/query.md | 2 +- docs/examples/health/get-antivirus.md | 2 +- docs/examples/health/get-cache.md | 2 +- docs/examples/health/get-certificate.md | 3 +- docs/examples/health/get-d-b.md | 1 - docs/examples/health/get-db.md | 1 + docs/examples/health/get-failed-jobs.md | 5 +- docs/examples/health/get-pub-sub.md | 2 +- docs/examples/health/get-queue-builds.md | 3 +- .../examples/health/get-queue-certificates.md | 3 +- docs/examples/health/get-queue-databases.md | 4 +- docs/examples/health/get-queue-deletes.md | 3 +- docs/examples/health/get-queue-functions.md | 3 +- docs/examples/health/get-queue-logs.md | 3 +- docs/examples/health/get-queue-mails.md | 3 +- docs/examples/health/get-queue-messaging.md | 3 +- docs/examples/health/get-queue-migrations.md | 3 +- .../health/get-queue-stats-resources.md | 3 +- docs/examples/health/get-queue-usage.md | 3 +- docs/examples/health/get-queue-webhooks.md | 3 +- docs/examples/health/get-storage-local.md | 2 +- docs/examples/health/get-storage.md | 2 +- docs/examples/health/get-time.md | 2 +- docs/examples/locale/list-codes.md | 2 +- docs/examples/locale/list-continents.md | 2 +- docs/examples/locale/list-countries-e-u.md | 1 - docs/examples/locale/list-countries-eu.md | 1 + docs/examples/locale/list-countries-phones.md | 2 +- docs/examples/locale/list-countries.md | 2 +- docs/examples/locale/list-currencies.md | 2 +- docs/examples/locale/list-languages.md | 2 +- .../messaging/create-a-p-n-s-provider.md | 9 - .../messaging/create-apns-provider.md | 12 +- docs/examples/messaging/create-email.md | 17 +- .../messaging/create-f-c-m-provider.md | 5 - .../examples/messaging/create-fcm-provider.md | 8 +- .../messaging/create-mailgun-provider.md | 14 +- .../messaging/create-msg-91-provider.md | 3 + .../messaging/create-msg91provider.md | 7 - docs/examples/messaging/create-push.md | 22 +- docs/examples/messaging/create-s-m-s.md | 8 - .../messaging/create-s-m-t-p-provider.md | 15 - .../messaging/create-sendgrid-provider.md | 12 +- docs/examples/messaging/create-sms.md | 11 +- .../messaging/create-smtp-provider.md | 19 +- docs/examples/messaging/create-subscriber.md | 8 +- .../messaging/create-telesign-provider.md | 10 +- .../messaging/create-textmagic-provider.md | 10 +- docs/examples/messaging/create-topic.md | 7 +- .../messaging/create-twilio-provider.md | 10 +- .../messaging/create-vonage-provider.md | 10 +- docs/examples/messaging/delete-provider.md | 4 +- docs/examples/messaging/delete-subscriber.md | 6 +- docs/examples/messaging/delete-topic.md | 4 +- docs/examples/messaging/delete.md | 2 +- docs/examples/messaging/get-message.md | 4 +- docs/examples/messaging/get-provider.md | 4 +- docs/examples/messaging/get-subscriber.md | 6 +- docs/examples/messaging/get-topic.md | 4 +- docs/examples/messaging/list-message-logs.md | 5 +- docs/examples/messaging/list-messages.md | 4 +- docs/examples/messaging/list-provider-logs.md | 5 +- docs/examples/messaging/list-providers.md | 4 +- .../messaging/list-subscriber-logs.md | 5 +- docs/examples/messaging/list-subscribers.md | 6 +- docs/examples/messaging/list-targets.md | 5 +- docs/examples/messaging/list-topic-logs.md | 5 +- docs/examples/messaging/list-topics.md | 4 +- .../messaging/update-a-p-n-s-provider.md | 9 - .../messaging/update-apns-provider.md | 11 +- docs/examples/messaging/update-email.md | 15 +- .../messaging/update-f-c-m-provider.md | 5 - .../examples/messaging/update-fcm-provider.md | 7 +- .../messaging/update-mailgun-provider.md | 13 +- .../messaging/update-msg-91-provider.md | 2 + .../messaging/update-msg91provider.md | 7 - docs/examples/messaging/update-push.md | 22 +- docs/examples/messaging/update-s-m-s.md | 8 - .../messaging/update-s-m-t-p-provider.md | 15 - .../messaging/update-sendgrid-provider.md | 11 +- docs/examples/messaging/update-sms.md | 10 +- .../messaging/update-smtp-provider.md | 17 +- .../messaging/update-telesign-provider.md | 9 +- .../messaging/update-textmagic-provider.md | 9 +- docs/examples/messaging/update-topic.md | 6 +- .../messaging/update-twilio-provider.md | 9 +- .../messaging/update-vonage-provider.md | 9 +- .../migrations/create-appwrite-migration.md | 10 +- .../migrations/create-csv-migration.md | 9 +- .../migrations/create-firebase-migration.md | 6 +- .../migrations/create-n-host-migration.md | 17 +- .../migrations/create-supabase-migration.md | 15 +- docs/examples/migrations/delete.md | 2 +- .../migrations/get-appwrite-report.md | 10 +- .../migrations/get-firebase-report.md | 6 +- docs/examples/migrations/get-n-host-report.md | 17 +- .../migrations/get-supabase-report.md | 15 +- docs/examples/migrations/get.md | 2 +- docs/examples/migrations/list.md | 4 +- docs/examples/migrations/retry.md | 2 +- docs/examples/project/create-variable.md | 7 +- docs/examples/project/delete-variable.md | 4 +- docs/examples/project/get-usage.md | 7 +- docs/examples/project/get-variable.md | 4 +- docs/examples/project/list-variables.md | 2 +- docs/examples/project/update-variable.md | 8 +- docs/examples/projects/create-dev-key.md | 8 +- docs/examples/projects/create-j-w-t.md | 4 - docs/examples/projects/create-jwt.md | 3 + docs/examples/projects/create-key.md | 9 +- docs/examples/projects/create-platform.md | 11 +- docs/examples/projects/create-s-m-t-p-test.md | 11 - docs/examples/projects/create-smtp-test.md | 17 +- docs/examples/projects/create-webhook.md | 15 +- docs/examples/projects/create.md | 16 +- docs/examples/projects/delete-dev-key.md | 6 +- .../projects/delete-email-template.md | 8 +- docs/examples/projects/delete-key.md | 6 +- docs/examples/projects/delete-platform.md | 6 +- .../projects/delete-s-m-s-template.md | 4 - docs/examples/projects/delete-sms-template.md | 8 +- docs/examples/projects/delete-webhook.md | 6 +- docs/examples/projects/delete.md | 2 +- docs/examples/projects/get-dev-key.md | 6 +- docs/examples/projects/get-email-template.md | 8 +- docs/examples/projects/get-key.md | 6 +- docs/examples/projects/get-platform.md | 6 +- docs/examples/projects/get-s-m-s-template.md | 4 - docs/examples/projects/get-sms-template.md | 8 +- docs/examples/projects/get-webhook.md | 6 +- docs/examples/projects/get.md | 2 +- docs/examples/projects/list-dev-keys.md | 5 +- docs/examples/projects/list-keys.md | 4 +- docs/examples/projects/list-platforms.md | 4 +- docs/examples/projects/list-webhooks.md | 4 +- docs/examples/projects/list.md | 4 +- .../projects/update-a-p-i-status-all.md | 3 - docs/examples/projects/update-a-p-i-status.md | 4 - .../projects/update-api-status-all.md | 6 +- docs/examples/projects/update-api-status.md | 8 +- .../examples/projects/update-auth-duration.md | 6 +- docs/examples/projects/update-auth-limit.md | 6 +- .../update-auth-password-dictionary.md | 6 +- .../projects/update-auth-password-history.md | 6 +- .../projects/update-auth-sessions-limit.md | 6 +- docs/examples/projects/update-auth-status.md | 8 +- docs/examples/projects/update-dev-key.md | 10 +- .../projects/update-email-template.md | 15 +- docs/examples/projects/update-key.md | 11 +- .../projects/update-memberships-privacy.md | 10 +- docs/examples/projects/update-mock-numbers.md | 6 +- docs/examples/projects/update-o-auth-2.md | 3 + docs/examples/projects/update-o-auth2.md | 6 - .../projects/update-personal-data-check.md | 6 +- docs/examples/projects/update-platform.md | 11 +- .../projects/update-s-m-s-template.md | 5 - docs/examples/projects/update-s-m-t-p.md | 11 - .../projects/update-service-status-all.md | 6 +- .../projects/update-service-status.md | 8 +- .../projects/update-session-alerts.md | 6 +- .../projects/update-session-invalidation.md | 6 +- docs/examples/projects/update-sms-template.md | 10 +- docs/examples/projects/update-smtp.md | 14 +- docs/examples/projects/update-team.md | 6 +- .../projects/update-webhook-signature.md | 6 +- docs/examples/projects/update-webhook.md | 17 +- docs/examples/projects/update.md | 13 +- docs/examples/proxy/create-a-p-i-rule.md | 2 - docs/examples/proxy/create-api-rule.md | 2 + docs/examples/proxy/create-function-rule.md | 7 +- docs/examples/proxy/create-redirect-rule.md | 12 +- docs/examples/proxy/create-site-rule.md | 7 +- docs/examples/proxy/delete-rule.md | 4 +- docs/examples/proxy/get-rule.md | 4 +- docs/examples/proxy/list-rules.md | 4 +- .../proxy/update-rule-verification.md | 4 +- docs/examples/sites/create-deployment.md | 11 +- .../sites/create-duplicate-deployment.md | 6 +- .../sites/create-template-deployment.md | 13 +- docs/examples/sites/create-variable.md | 9 +- docs/examples/sites/create-vcs-deployment.md | 9 +- docs/examples/sites/create.md | 22 +- docs/examples/sites/delete-deployment.md | 6 +- docs/examples/sites/delete-log.md | 6 +- docs/examples/sites/delete-variable.md | 6 +- docs/examples/sites/delete.md | 2 +- .../examples/sites/get-deployment-download.md | 7 +- docs/examples/sites/get-deployment.md | 6 +- docs/examples/sites/get-log.md | 6 +- docs/examples/sites/get-template.md | 4 +- docs/examples/sites/get-usage.md | 5 +- docs/examples/sites/get-variable.md | 6 +- docs/examples/sites/get.md | 2 +- docs/examples/sites/list-deployments.md | 6 +- docs/examples/sites/list-frameworks.md | 2 +- docs/examples/sites/list-logs.md | 5 +- docs/examples/sites/list-specifications.md | 2 +- docs/examples/sites/list-templates.md | 6 +- docs/examples/sites/list-usage.md | 3 +- docs/examples/sites/list-variables.md | 4 +- docs/examples/sites/list.md | 4 +- .../sites/update-deployment-status.md | 6 +- docs/examples/sites/update-site-deployment.md | 6 +- docs/examples/sites/update-variable.md | 10 +- docs/examples/sites/update.md | 21 +- docs/examples/storage/create-bucket.md | 14 +- docs/examples/storage/create-file.md | 9 +- docs/examples/storage/delete-bucket.md | 4 +- docs/examples/storage/delete-file.md | 6 +- docs/examples/storage/get-bucket-usage.md | 5 +- docs/examples/storage/get-bucket.md | 4 +- docs/examples/storage/get-file-download.md | 7 +- docs/examples/storage/get-file-preview.md | 18 +- docs/examples/storage/get-file-view.md | 7 +- docs/examples/storage/get-file.md | 6 +- docs/examples/storage/get-usage.md | 3 +- docs/examples/storage/list-buckets.md | 4 +- docs/examples/storage/list-files.md | 6 +- docs/examples/storage/update-bucket.md | 14 +- docs/examples/storage/update-file.md | 8 +- .../tablesdb/create-boolean-column.md | 12 +- .../tablesdb/create-datetime-column.md | 12 +- docs/examples/tablesdb/create-email-column.md | 12 +- docs/examples/tablesdb/create-enum-column.md | 14 +- docs/examples/tablesdb/create-float-column.md | 14 +- docs/examples/tablesdb/create-index.md | 14 +- .../tablesdb/create-integer-column.md | 14 +- docs/examples/tablesdb/create-ip-column.md | 12 +- .../tablesdb/create-relationship-column.md | 14 +- docs/examples/tablesdb/create-row.md | 11 +- docs/examples/tablesdb/create-rows.md | 8 +- .../examples/tablesdb/create-string-column.md | 15 +- docs/examples/tablesdb/create-table.md | 11 +- docs/examples/tablesdb/create-url-column.md | 12 +- docs/examples/tablesdb/create.md | 7 +- .../examples/tablesdb/decrement-row-column.md | 12 +- docs/examples/tablesdb/delete-column.md | 8 +- docs/examples/tablesdb/delete-index.md | 8 +- docs/examples/tablesdb/delete-row.md | 8 +- docs/examples/tablesdb/delete-rows.md | 7 +- docs/examples/tablesdb/delete-table.md | 6 +- docs/examples/tablesdb/delete.md | 4 +- docs/examples/tablesdb/get-column.md | 8 +- docs/examples/tablesdb/get-index.md | 8 +- docs/examples/tablesdb/get-row.md | 9 +- docs/examples/tablesdb/get-table-usage.md | 7 +- docs/examples/tablesdb/get-table.md | 6 +- docs/examples/tablesdb/get-usage.md | 5 +- docs/examples/tablesdb/get.md | 4 +- .../examples/tablesdb/increment-row-column.md | 12 +- docs/examples/tablesdb/list-columns.md | 7 +- docs/examples/tablesdb/list-indexes.md | 7 +- docs/examples/tablesdb/list-row-logs.md | 9 +- docs/examples/tablesdb/list-rows.md | 7 +- docs/examples/tablesdb/list-table-logs.md | 7 +- docs/examples/tablesdb/list-tables.md | 6 +- docs/examples/tablesdb/list-usage.md | 3 +- docs/examples/tablesdb/list.md | 4 +- .../tablesdb/update-boolean-column.md | 13 +- .../tablesdb/update-datetime-column.md | 13 +- docs/examples/tablesdb/update-email-column.md | 13 +- docs/examples/tablesdb/update-enum-column.md | 15 +- docs/examples/tablesdb/update-float-column.md | 15 +- .../tablesdb/update-integer-column.md | 15 +- docs/examples/tablesdb/update-ip-column.md | 13 +- .../tablesdb/update-relationship-column.md | 10 +- docs/examples/tablesdb/update-row.md | 10 +- docs/examples/tablesdb/update-rows.md | 8 +- .../examples/tablesdb/update-string-column.md | 14 +- docs/examples/tablesdb/update-table.md | 11 +- docs/examples/tablesdb/update-url-column.md | 13 +- docs/examples/tablesdb/update.md | 7 +- docs/examples/tablesdb/upsert-row.md | 10 +- docs/examples/tablesdb/upsert-rows.md | 8 +- docs/examples/teams/create-membership.md | 11 +- docs/examples/teams/create.md | 5 +- docs/examples/teams/delete-membership.md | 6 +- docs/examples/teams/delete.md | 2 +- docs/examples/teams/get-membership.md | 6 +- docs/examples/teams/get-prefs.md | 4 +- docs/examples/teams/get.md | 2 +- docs/examples/teams/list-logs.md | 5 +- docs/examples/teams/list-memberships.md | 6 +- docs/examples/teams/list.md | 4 +- .../teams/update-membership-status.md | 10 +- docs/examples/teams/update-membership.md | 8 +- docs/examples/teams/update-name.md | 6 +- docs/examples/teams/update-prefs.md | 6 +- docs/examples/tokens/create-file-token.md | 7 +- docs/examples/tokens/delete.md | 2 +- docs/examples/tokens/get.md | 2 +- docs/examples/tokens/list.md | 5 +- docs/examples/tokens/update.md | 3 +- docs/examples/users/create-argon-2-user.md | 4 + docs/examples/users/create-argon2user.md | 5 - docs/examples/users/create-bcrypt-user.md | 9 +- docs/examples/users/create-j-w-t.md | 4 - docs/examples/users/create-jwt.md | 2 + docs/examples/users/create-m-d5user.md | 5 - .../users/create-m-f-a-recovery-codes.md | 2 - docs/examples/users/create-md-5-user.md | 4 + .../users/create-mfa-recovery-codes.md | 4 +- docs/examples/users/create-p-h-pass-user.md | 5 - docs/examples/users/create-ph-pass-user.md | 4 + docs/examples/users/create-s-h-a-user.md | 6 - .../users/create-scrypt-modified-user.md | 15 +- docs/examples/users/create-scrypt-user.md | 19 +- docs/examples/users/create-session.md | 4 +- docs/examples/users/create-sha-user.md | 4 + docs/examples/users/create-target.md | 12 +- docs/examples/users/create-token.md | 6 +- docs/examples/users/create.md | 6 +- docs/examples/users/delete-identity.md | 4 +- .../users/delete-m-f-a-authenticator.md | 3 - .../users/delete-mfa-authenticator.md | 6 +- docs/examples/users/delete-session.md | 6 +- docs/examples/users/delete-sessions.md | 4 +- docs/examples/users/delete-target.md | 6 +- docs/examples/users/delete.md | 2 +- .../users/get-m-f-a-recovery-codes.md | 2 - docs/examples/users/get-mfa-recovery-codes.md | 4 +- docs/examples/users/get-prefs.md | 4 +- docs/examples/users/get-target.md | 6 +- docs/examples/users/get-usage.md | 3 +- docs/examples/users/get.md | 2 +- docs/examples/users/list-identities.md | 4 +- docs/examples/users/list-logs.md | 5 +- docs/examples/users/list-m-f-a-factors.md | 2 - docs/examples/users/list-memberships.md | 6 +- docs/examples/users/list-mfa-factors.md | 4 +- docs/examples/users/list-sessions.md | 4 +- docs/examples/users/list-targets.md | 5 +- docs/examples/users/list.md | 4 +- .../users/update-email-verification.md | 6 +- docs/examples/users/update-email.md | 6 +- docs/examples/users/update-labels.md | 6 +- .../users/update-m-f-a-recovery-codes.md | 2 - docs/examples/users/update-m-f-a.md | 3 - .../users/update-mfa-recovery-codes.md | 4 +- docs/examples/users/update-mfa.md | 6 +- docs/examples/users/update-name.md | 6 +- docs/examples/users/update-password.md | 6 +- .../users/update-phone-verification.md | 6 +- docs/examples/users/update-phone.md | 6 +- docs/examples/users/update-prefs.md | 6 +- docs/examples/users/update-status.md | 6 +- docs/examples/users/update-target.md | 9 +- .../vcs/create-repository-detection.md | 9 +- docs/examples/vcs/create-repository.md | 8 +- docs/examples/vcs/delete-installation.md | 4 +- docs/examples/vcs/get-installation.md | 4 +- docs/examples/vcs/get-repository-contents.md | 8 +- docs/examples/vcs/get-repository.md | 6 +- docs/examples/vcs/list-installations.md | 4 +- docs/examples/vcs/list-repositories.md | 7 +- docs/examples/vcs/list-repository-branches.md | 6 +- .../vcs/update-external-deployments.md | 8 +- index.js | 2 +- lib/commands/account.js | 396 --------- lib/commands/avatars.js | 7 - lib/commands/console.js | 2 - lib/commands/databases.js | 55 -- lib/commands/functions.js | 30 - lib/commands/graphql.js | 2 - lib/commands/health.js | 22 - lib/commands/locale.js | 8 - lib/commands/messaging.js | 754 ++---------------- lib/commands/migrations.js | 13 - lib/commands/project.js | 6 - lib/commands/projects.js | 440 ---------- lib/commands/proxy.js | 8 - lib/commands/sites.js | 29 - lib/commands/storage.js | 15 - lib/commands/{tables-d-b.js => tables-db.js} | 490 +++++------- lib/commands/teams.js | 14 - lib/commands/tokens.js | 5 - lib/commands/users.js | 276 ------- lib/commands/vcs.js | 10 - 534 files changed, 1620 insertions(+), 4485 deletions(-) delete mode 100644 docs/examples/account/create-j-w-t.md create mode 100644 docs/examples/account/create-jwt.md delete mode 100644 docs/examples/account/create-m-f-a-authenticator.md delete mode 100644 docs/examples/account/create-m-f-a-challenge.md delete mode 100644 docs/examples/account/create-m-f-a-recovery-codes.md delete mode 100644 docs/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/account/create-magic-url-token.md create mode 100644 docs/examples/account/create-o-auth-2-session.md create mode 100644 docs/examples/account/create-o-auth-2-token.md delete mode 100644 docs/examples/account/create-o-auth2session.md delete mode 100644 docs/examples/account/create-o-auth2token.md delete mode 100644 docs/examples/account/delete-m-f-a-authenticator.md delete mode 100644 docs/examples/account/get-m-f-a-recovery-codes.md delete mode 100644 docs/examples/account/list-m-f-a-factors.md delete mode 100644 docs/examples/account/update-m-f-a-authenticator.md delete mode 100644 docs/examples/account/update-m-f-a-challenge.md delete mode 100644 docs/examples/account/update-m-f-a-recovery-codes.md delete mode 100644 docs/examples/account/update-m-f-a.md delete mode 100644 docs/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/account/update-magic-url-session.md create mode 100644 docs/examples/account/update-mfa.md delete mode 100644 docs/examples/avatars/get-q-r.md create mode 100644 docs/examples/avatars/get-qr.md delete mode 100644 docs/examples/health/get-d-b.md create mode 100644 docs/examples/health/get-db.md delete mode 100644 docs/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/locale/list-countries-eu.md delete mode 100644 docs/examples/messaging/create-a-p-n-s-provider.md delete mode 100644 docs/examples/messaging/create-f-c-m-provider.md create mode 100644 docs/examples/messaging/create-msg-91-provider.md delete mode 100644 docs/examples/messaging/create-msg91provider.md delete mode 100644 docs/examples/messaging/create-s-m-s.md delete mode 100644 docs/examples/messaging/create-s-m-t-p-provider.md delete mode 100644 docs/examples/messaging/update-a-p-n-s-provider.md delete mode 100644 docs/examples/messaging/update-f-c-m-provider.md create mode 100644 docs/examples/messaging/update-msg-91-provider.md delete mode 100644 docs/examples/messaging/update-msg91provider.md delete mode 100644 docs/examples/messaging/update-s-m-s.md delete mode 100644 docs/examples/messaging/update-s-m-t-p-provider.md delete mode 100644 docs/examples/projects/create-j-w-t.md create mode 100644 docs/examples/projects/create-jwt.md delete mode 100644 docs/examples/projects/create-s-m-t-p-test.md delete mode 100644 docs/examples/projects/delete-s-m-s-template.md delete mode 100644 docs/examples/projects/get-s-m-s-template.md delete mode 100644 docs/examples/projects/update-a-p-i-status-all.md delete mode 100644 docs/examples/projects/update-a-p-i-status.md create mode 100644 docs/examples/projects/update-o-auth-2.md delete mode 100644 docs/examples/projects/update-o-auth2.md delete mode 100644 docs/examples/projects/update-s-m-s-template.md delete mode 100644 docs/examples/projects/update-s-m-t-p.md delete mode 100644 docs/examples/proxy/create-a-p-i-rule.md create mode 100644 docs/examples/proxy/create-api-rule.md create mode 100644 docs/examples/users/create-argon-2-user.md delete mode 100644 docs/examples/users/create-argon2user.md delete mode 100644 docs/examples/users/create-j-w-t.md create mode 100644 docs/examples/users/create-jwt.md delete mode 100644 docs/examples/users/create-m-d5user.md delete mode 100644 docs/examples/users/create-m-f-a-recovery-codes.md create mode 100644 docs/examples/users/create-md-5-user.md delete mode 100644 docs/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/users/create-ph-pass-user.md delete mode 100644 docs/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/users/create-sha-user.md delete mode 100644 docs/examples/users/delete-m-f-a-authenticator.md delete mode 100644 docs/examples/users/get-m-f-a-recovery-codes.md delete mode 100644 docs/examples/users/list-m-f-a-factors.md delete mode 100644 docs/examples/users/update-m-f-a-recovery-codes.md delete mode 100644 docs/examples/users/update-m-f-a.md rename lib/commands/{tables-d-b.js => tables-db.js} (93%) diff --git a/docs/examples/account/create-anonymous-session.md b/docs/examples/account/create-anonymous-session.md index a7eb9c5..b6f2432 100644 --- a/docs/examples/account/create-anonymous-session.md +++ b/docs/examples/account/create-anonymous-session.md @@ -1 +1 @@ -appwrite account createAnonymousSession +appwrite account create-anonymous-session diff --git a/docs/examples/account/create-email-password-session.md b/docs/examples/account/create-email-password-session.md index 951293b..b13874c 100644 --- a/docs/examples/account/create-email-password-session.md +++ b/docs/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/account/create-email-token.md b/docs/examples/account/create-email-token.md index 0aaf247..1902e8b 100644 --- a/docs/examples/account/create-email-token.md +++ b/docs/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/account/create-j-w-t.md b/docs/examples/account/create-j-w-t.md deleted file mode 100644 index 7b53379..0000000 --- a/docs/examples/account/create-j-w-t.md +++ /dev/null @@ -1 +0,0 @@ -appwrite account createJWT diff --git a/docs/examples/account/create-jwt.md b/docs/examples/account/create-jwt.md new file mode 100644 index 0000000..f2d6569 --- /dev/null +++ b/docs/examples/account/create-jwt.md @@ -0,0 +1 @@ +appwrite account create-jwt diff --git a/docs/examples/account/create-m-f-a-authenticator.md b/docs/examples/account/create-m-f-a-authenticator.md deleted file mode 100644 index a976bc8..0000000 --- a/docs/examples/account/create-m-f-a-authenticator.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite account createMFAAuthenticator \ - --type totp diff --git a/docs/examples/account/create-m-f-a-challenge.md b/docs/examples/account/create-m-f-a-challenge.md deleted file mode 100644 index 13e38e8..0000000 --- a/docs/examples/account/create-m-f-a-challenge.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite account createMFAChallenge \ - --factor email diff --git a/docs/examples/account/create-m-f-a-recovery-codes.md b/docs/examples/account/create-m-f-a-recovery-codes.md deleted file mode 100644 index 7c80d88..0000000 --- a/docs/examples/account/create-m-f-a-recovery-codes.md +++ /dev/null @@ -1 +0,0 @@ -appwrite account createMFARecoveryCodes diff --git a/docs/examples/account/create-magic-u-r-l-token.md b/docs/examples/account/create-magic-u-r-l-token.md deleted file mode 100644 index 69203b0..0000000 --- a/docs/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/account/create-magic-url-token.md b/docs/examples/account/create-magic-url-token.md new file mode 100644 index 0000000..4f16a8b --- /dev/null +++ b/docs/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/account/create-mfa-authenticator.md b/docs/examples/account/create-mfa-authenticator.md index 7634217..a454276 100644 --- a/docs/examples/account/create-mfa-authenticator.md +++ b/docs/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/account/create-mfa-challenge.md b/docs/examples/account/create-mfa-challenge.md index 8696be7..24bab3d 100644 --- a/docs/examples/account/create-mfa-challenge.md +++ b/docs/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/account/create-mfa-recovery-codes.md b/docs/examples/account/create-mfa-recovery-codes.md index 0ef2544..4f165d9 100644 --- a/docs/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/account/create-mfa-recovery-codes.md @@ -1 +1 @@ -appwrite account createMfaRecoveryCodes +appwrite account create-mfa-recovery-codes diff --git a/docs/examples/account/create-o-auth-2-session.md b/docs/examples/account/create-o-auth-2-session.md new file mode 100644 index 0000000..fda2faa --- /dev/null +++ b/docs/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/account/create-o-auth-2-token.md b/docs/examples/account/create-o-auth-2-token.md new file mode 100644 index 0000000..7fff73f --- /dev/null +++ b/docs/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/account/create-o-auth2session.md b/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index 9159b8f..0000000 --- a/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite account createOAuth2Session \ - --provider amazon \ - - - diff --git a/docs/examples/account/create-o-auth2token.md b/docs/examples/account/create-o-auth2token.md deleted file mode 100644 index b36f350..0000000 --- a/docs/examples/account/create-o-auth2token.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite account createOAuth2Token \ - --provider amazon \ - - - diff --git a/docs/examples/account/create-phone-token.md b/docs/examples/account/create-phone-token.md index 23f7f19..619478c 100644 --- a/docs/examples/account/create-phone-token.md +++ b/docs/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/account/create-phone-verification.md b/docs/examples/account/create-phone-verification.md index 3c4402b..b5a95ed 100644 --- a/docs/examples/account/create-phone-verification.md +++ b/docs/examples/account/create-phone-verification.md @@ -1 +1 @@ -appwrite account createPhoneVerification +appwrite account create-phone-verification diff --git a/docs/examples/account/create-push-target.md b/docs/examples/account/create-push-target.md index 41c380b..1ba6fe3 100644 --- a/docs/examples/account/create-push-target.md +++ b/docs/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/account/create-recovery.md b/docs/examples/account/create-recovery.md index ea8c145..d6977de 100644 --- a/docs/examples/account/create-recovery.md +++ b/docs/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/account/create-session.md b/docs/examples/account/create-session.md index 426713e..eefeb35 100644 --- a/docs/examples/account/create-session.md +++ b/docs/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/account/create-verification.md b/docs/examples/account/create-verification.md index 402038b..6e972f2 100644 --- a/docs/examples/account/create-verification.md +++ b/docs/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/account/create.md b/docs/examples/account/create.md index 09686a2..56eca76 100644 --- a/docs/examples/account/create.md +++ b/docs/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/account/delete-identity.md b/docs/examples/account/delete-identity.md index acd8511..650ab7b 100644 --- a/docs/examples/account/delete-identity.md +++ b/docs/examples/account/delete-identity.md @@ -1,2 +1,2 @@ -appwrite account deleteIdentity \ - --identityId +appwrite account delete-identity \ + --identity-id diff --git a/docs/examples/account/delete-m-f-a-authenticator.md b/docs/examples/account/delete-m-f-a-authenticator.md deleted file mode 100644 index 67f278f..0000000 --- a/docs/examples/account/delete-m-f-a-authenticator.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite account deleteMFAAuthenticator \ - --type totp diff --git a/docs/examples/account/delete-mfa-authenticator.md b/docs/examples/account/delete-mfa-authenticator.md index d466485..e3689b1 100644 --- a/docs/examples/account/delete-mfa-authenticator.md +++ b/docs/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/account/delete-push-target.md b/docs/examples/account/delete-push-target.md index 610ea23..04f94f6 100644 --- a/docs/examples/account/delete-push-target.md +++ b/docs/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/account/delete-session.md b/docs/examples/account/delete-session.md index 9774552..6476fd9 100644 --- a/docs/examples/account/delete-session.md +++ b/docs/examples/account/delete-session.md @@ -1,2 +1,2 @@ -appwrite account deleteSession \ - --sessionId +appwrite account delete-session \ + --session-id diff --git a/docs/examples/account/delete-sessions.md b/docs/examples/account/delete-sessions.md index dd11877..7381069 100644 --- a/docs/examples/account/delete-sessions.md +++ b/docs/examples/account/delete-sessions.md @@ -1 +1 @@ -appwrite account deleteSessions +appwrite account delete-sessions diff --git a/docs/examples/account/get-m-f-a-recovery-codes.md b/docs/examples/account/get-m-f-a-recovery-codes.md deleted file mode 100644 index d4e274c..0000000 --- a/docs/examples/account/get-m-f-a-recovery-codes.md +++ /dev/null @@ -1 +0,0 @@ -appwrite account getMFARecoveryCodes diff --git a/docs/examples/account/get-mfa-recovery-codes.md b/docs/examples/account/get-mfa-recovery-codes.md index 0e61d65..01a2f35 100644 --- a/docs/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/account/get-mfa-recovery-codes.md @@ -1 +1 @@ -appwrite account getMfaRecoveryCodes +appwrite account get-mfa-recovery-codes diff --git a/docs/examples/account/get-prefs.md b/docs/examples/account/get-prefs.md index 6569925..5796c08 100644 --- a/docs/examples/account/get-prefs.md +++ b/docs/examples/account/get-prefs.md @@ -1 +1 @@ -appwrite account getPrefs +appwrite account get-prefs diff --git a/docs/examples/account/get-session.md b/docs/examples/account/get-session.md index 120dc82..9901eb2 100644 --- a/docs/examples/account/get-session.md +++ b/docs/examples/account/get-session.md @@ -1,2 +1,2 @@ -appwrite account getSession \ - --sessionId +appwrite account get-session \ + --session-id diff --git a/docs/examples/account/list-identities.md b/docs/examples/account/list-identities.md index 877b443..095dcc4 100644 --- a/docs/examples/account/list-identities.md +++ b/docs/examples/account/list-identities.md @@ -1,2 +1 @@ -appwrite account listIdentities \ - +appwrite account list-identities diff --git a/docs/examples/account/list-logs.md b/docs/examples/account/list-logs.md index e92f490..73fb9b6 100644 --- a/docs/examples/account/list-logs.md +++ b/docs/examples/account/list-logs.md @@ -1,2 +1 @@ -appwrite account listLogs \ - +appwrite account list-logs diff --git a/docs/examples/account/list-m-f-a-factors.md b/docs/examples/account/list-m-f-a-factors.md deleted file mode 100644 index 3f2b6d7..0000000 --- a/docs/examples/account/list-m-f-a-factors.md +++ /dev/null @@ -1 +0,0 @@ -appwrite account listMFAFactors diff --git a/docs/examples/account/list-mfa-factors.md b/docs/examples/account/list-mfa-factors.md index a29f287..6930f34 100644 --- a/docs/examples/account/list-mfa-factors.md +++ b/docs/examples/account/list-mfa-factors.md @@ -1 +1 @@ -appwrite account listMfaFactors +appwrite account list-mfa-factors diff --git a/docs/examples/account/list-sessions.md b/docs/examples/account/list-sessions.md index 87cbab0..1aca27b 100644 --- a/docs/examples/account/list-sessions.md +++ b/docs/examples/account/list-sessions.md @@ -1 +1 @@ -appwrite account listSessions +appwrite account list-sessions diff --git a/docs/examples/account/update-email.md b/docs/examples/account/update-email.md index 81938ff..9753a06 100644 --- a/docs/examples/account/update-email.md +++ b/docs/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/account/update-m-f-a-authenticator.md b/docs/examples/account/update-m-f-a-authenticator.md deleted file mode 100644 index d38af3d..0000000 --- a/docs/examples/account/update-m-f-a-authenticator.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite account updateMFAAuthenticator \ - --type totp \ - --otp diff --git a/docs/examples/account/update-m-f-a-challenge.md b/docs/examples/account/update-m-f-a-challenge.md deleted file mode 100644 index f6c3dcf..0000000 --- a/docs/examples/account/update-m-f-a-challenge.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite account updateMFAChallenge \ - --challengeId \ - --otp diff --git a/docs/examples/account/update-m-f-a-recovery-codes.md b/docs/examples/account/update-m-f-a-recovery-codes.md deleted file mode 100644 index d3b398b..0000000 --- a/docs/examples/account/update-m-f-a-recovery-codes.md +++ /dev/null @@ -1 +0,0 @@ -appwrite account updateMFARecoveryCodes diff --git a/docs/examples/account/update-m-f-a.md b/docs/examples/account/update-m-f-a.md deleted file mode 100644 index f714d4d..0000000 --- a/docs/examples/account/update-m-f-a.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite account updateMFA \ - --mfa false diff --git a/docs/examples/account/update-magic-u-r-l-session.md b/docs/examples/account/update-magic-u-r-l-session.md deleted file mode 100644 index 919bd70..0000000 --- a/docs/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/account/update-magic-url-session.md b/docs/examples/account/update-magic-url-session.md new file mode 100644 index 0000000..0bf9ed7 --- /dev/null +++ b/docs/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/account/update-mfa-authenticator.md b/docs/examples/account/update-mfa-authenticator.md index b51796a..838297b 100644 --- a/docs/examples/account/update-mfa-authenticator.md +++ b/docs/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/account/update-mfa-challenge.md b/docs/examples/account/update-mfa-challenge.md index 37e09ef..4a5c8fb 100644 --- a/docs/examples/account/update-mfa-challenge.md +++ b/docs/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/account/update-mfa-recovery-codes.md b/docs/examples/account/update-mfa-recovery-codes.md index a129ca6..9e9ab07 100644 --- a/docs/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/account/update-mfa-recovery-codes.md @@ -1 +1 @@ -appwrite account updateMfaRecoveryCodes +appwrite account update-mfa-recovery-codes diff --git a/docs/examples/account/update-mfa.md b/docs/examples/account/update-mfa.md new file mode 100644 index 0000000..fa122d9 --- /dev/null +++ b/docs/examples/account/update-mfa.md @@ -0,0 +1,2 @@ +appwrite account update-mfa \ + --mfa false diff --git a/docs/examples/account/update-name.md b/docs/examples/account/update-name.md index 6f3b597..c858d0e 100644 --- a/docs/examples/account/update-name.md +++ b/docs/examples/account/update-name.md @@ -1,2 +1,2 @@ -appwrite account updateName \ - --name +appwrite account update-name \ + --name diff --git a/docs/examples/account/update-password.md b/docs/examples/account/update-password.md index 340baec..e4bbdfc 100644 --- a/docs/examples/account/update-password.md +++ b/docs/examples/account/update-password.md @@ -1,3 +1,2 @@ -appwrite account updatePassword \ - --password '' \ - +appwrite account update-password \ + --password '' diff --git a/docs/examples/account/update-phone-session.md b/docs/examples/account/update-phone-session.md index d70f33f..599a905 100644 --- a/docs/examples/account/update-phone-session.md +++ b/docs/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/account/update-phone-verification.md b/docs/examples/account/update-phone-verification.md index cef2b5a..59dde67 100644 --- a/docs/examples/account/update-phone-verification.md +++ b/docs/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/account/update-phone.md b/docs/examples/account/update-phone.md index 93a619a..5c257c8 100644 --- a/docs/examples/account/update-phone.md +++ b/docs/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/account/update-prefs.md b/docs/examples/account/update-prefs.md index 568ac66..7b00d7b 100644 --- a/docs/examples/account/update-prefs.md +++ b/docs/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/account/update-push-target.md b/docs/examples/account/update-push-target.md index f3aa1a9..f71232a 100644 --- a/docs/examples/account/update-push-target.md +++ b/docs/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/account/update-recovery.md b/docs/examples/account/update-recovery.md index 903a99c..c2a97bd 100644 --- a/docs/examples/account/update-recovery.md +++ b/docs/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/account/update-session.md b/docs/examples/account/update-session.md index 5fb6a2e..36833c4 100644 --- a/docs/examples/account/update-session.md +++ b/docs/examples/account/update-session.md @@ -1,2 +1,2 @@ -appwrite account updateSession \ - --sessionId +appwrite account update-session \ + --session-id diff --git a/docs/examples/account/update-status.md b/docs/examples/account/update-status.md index 8886dbb..d271749 100644 --- a/docs/examples/account/update-status.md +++ b/docs/examples/account/update-status.md @@ -1 +1 @@ -appwrite account updateStatus +appwrite account update-status diff --git a/docs/examples/account/update-verification.md b/docs/examples/account/update-verification.md index afdfaa8..d7276c6 100644 --- a/docs/examples/account/update-verification.md +++ b/docs/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/avatars/get-browser.md b/docs/examples/avatars/get-browser.md index 6b4f0b8..b9dce0b 100644 --- a/docs/examples/avatars/get-browser.md +++ b/docs/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/avatars/get-credit-card.md b/docs/examples/avatars/get-credit-card.md index 365568b..0a8317a 100644 --- a/docs/examples/avatars/get-credit-card.md +++ b/docs/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/avatars/get-favicon.md b/docs/examples/avatars/get-favicon.md index c658f1a..c2f4c80 100644 --- a/docs/examples/avatars/get-favicon.md +++ b/docs/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/avatars/get-flag.md b/docs/examples/avatars/get-flag.md index 9f11fef..15a3daf 100644 --- a/docs/examples/avatars/get-flag.md +++ b/docs/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/avatars/get-image.md b/docs/examples/avatars/get-image.md index 7df1506..942574a 100644 --- a/docs/examples/avatars/get-image.md +++ b/docs/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/avatars/get-initials.md b/docs/examples/avatars/get-initials.md index b0b3da7..f9d5110 100644 --- a/docs/examples/avatars/get-initials.md +++ b/docs/examples/avatars/get-initials.md @@ -1,5 +1 @@ -appwrite avatars getInitials \ - - - - +appwrite avatars get-initials diff --git a/docs/examples/avatars/get-q-r.md b/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 01e5085..0000000 --- a/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite avatars getQR \ - --text \ - - - diff --git a/docs/examples/avatars/get-qr.md b/docs/examples/avatars/get-qr.md new file mode 100644 index 0000000..75fb094 --- /dev/null +++ b/docs/examples/avatars/get-qr.md @@ -0,0 +1,2 @@ +appwrite avatars get-qr \ + --text diff --git a/docs/examples/console/get-resource.md b/docs/examples/console/get-resource.md index 3e55163..5251dd6 100644 --- a/docs/examples/console/get-resource.md +++ b/docs/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/databases/create-boolean-attribute.md b/docs/examples/databases/create-boolean-attribute.md index 6babbfb..ce4d65f 100644 --- a/docs/examples/databases/create-boolean-attribute.md +++ b/docs/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/databases/create-collection.md b/docs/examples/databases/create-collection.md index d97c424..89a754c 100644 --- a/docs/examples/databases/create-collection.md +++ b/docs/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/databases/create-datetime-attribute.md b/docs/examples/databases/create-datetime-attribute.md index f6aaf54..b445d08 100644 --- a/docs/examples/databases/create-datetime-attribute.md +++ b/docs/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/databases/create-document.md b/docs/examples/databases/create-document.md index 513cfc4..a45335a 100644 --- a/docs/examples/databases/create-document.md +++ b/docs/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/databases/create-documents.md b/docs/examples/databases/create-documents.md index e9e65b5..3512b68 100644 --- a/docs/examples/databases/create-documents.md +++ b/docs/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/databases/create-email-attribute.md b/docs/examples/databases/create-email-attribute.md index 5c23f94..e4e9a0b 100644 --- a/docs/examples/databases/create-email-attribute.md +++ b/docs/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/databases/create-enum-attribute.md b/docs/examples/databases/create-enum-attribute.md index 5d3c614..2d4c72b 100644 --- a/docs/examples/databases/create-enum-attribute.md +++ b/docs/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/databases/create-float-attribute.md b/docs/examples/databases/create-float-attribute.md index 5a6ef4e..0b9988b 100644 --- a/docs/examples/databases/create-float-attribute.md +++ b/docs/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/databases/create-index.md b/docs/examples/databases/create-index.md index 2dc95ea..cd8fc1d 100644 --- a/docs/examples/databases/create-index.md +++ b/docs/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/databases/create-integer-attribute.md b/docs/examples/databases/create-integer-attribute.md index 791f377..4c2207e 100644 --- a/docs/examples/databases/create-integer-attribute.md +++ b/docs/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/databases/create-ip-attribute.md b/docs/examples/databases/create-ip-attribute.md index 4f39d84..a1cd44e 100644 --- a/docs/examples/databases/create-ip-attribute.md +++ b/docs/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/databases/create-relationship-attribute.md b/docs/examples/databases/create-relationship-attribute.md index c7d8ae5..7003162 100644 --- a/docs/examples/databases/create-relationship-attribute.md +++ b/docs/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/databases/create-string-attribute.md b/docs/examples/databases/create-string-attribute.md index 37b1db6..ed464c5 100644 --- a/docs/examples/databases/create-string-attribute.md +++ b/docs/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/databases/create-url-attribute.md b/docs/examples/databases/create-url-attribute.md index 4406ed7..6968e8c 100644 --- a/docs/examples/databases/create-url-attribute.md +++ b/docs/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/databases/create.md b/docs/examples/databases/create.md index 9e75239..47b0438 100644 --- a/docs/examples/databases/create.md +++ b/docs/examples/databases/create.md @@ -1,4 +1,3 @@ appwrite databases create \ - --databaseId \ - --name \ - + --database-id \ + --name diff --git a/docs/examples/databases/decrement-document-attribute.md b/docs/examples/databases/decrement-document-attribute.md index e6607ea..0b9b8a6 100644 --- a/docs/examples/databases/decrement-document-attribute.md +++ b/docs/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/databases/delete-attribute.md b/docs/examples/databases/delete-attribute.md index 88e7df9..0d68358 100644 --- a/docs/examples/databases/delete-attribute.md +++ b/docs/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/databases/delete-collection.md b/docs/examples/databases/delete-collection.md index 0db185a..d120865 100644 --- a/docs/examples/databases/delete-collection.md +++ b/docs/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/databases/delete-document.md b/docs/examples/databases/delete-document.md index 3a96d35..8e90019 100644 --- a/docs/examples/databases/delete-document.md +++ b/docs/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/databases/delete-documents.md b/docs/examples/databases/delete-documents.md index 6f3463c..b334ed7 100644 --- a/docs/examples/databases/delete-documents.md +++ b/docs/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/databases/delete-index.md b/docs/examples/databases/delete-index.md index 56485e7..2de11d3 100644 --- a/docs/examples/databases/delete-index.md +++ b/docs/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/databases/delete.md b/docs/examples/databases/delete.md index a24a3a0..4743777 100644 --- a/docs/examples/databases/delete.md +++ b/docs/examples/databases/delete.md @@ -1,2 +1,2 @@ appwrite databases delete \ - --databaseId + --database-id diff --git a/docs/examples/databases/get-attribute.md b/docs/examples/databases/get-attribute.md index 8216980..70cee2c 100644 --- a/docs/examples/databases/get-attribute.md +++ b/docs/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/databases/get-collection-usage.md b/docs/examples/databases/get-collection-usage.md index b57e6c9..c9881e2 100644 --- a/docs/examples/databases/get-collection-usage.md +++ b/docs/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/databases/get-collection.md b/docs/examples/databases/get-collection.md index e763b5b..17cbdbe 100644 --- a/docs/examples/databases/get-collection.md +++ b/docs/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/databases/get-document.md b/docs/examples/databases/get-document.md index 35d9615..beb44c1 100644 --- a/docs/examples/databases/get-document.md +++ b/docs/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/databases/get-index.md b/docs/examples/databases/get-index.md index 0071834..50b5961 100644 --- a/docs/examples/databases/get-index.md +++ b/docs/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/databases/get-usage.md b/docs/examples/databases/get-usage.md index 9526345..e3c8748 100644 --- a/docs/examples/databases/get-usage.md +++ b/docs/examples/databases/get-usage.md @@ -1,3 +1,2 @@ -appwrite databases getUsage \ - --databaseId \ - +appwrite databases get-usage \ + --database-id diff --git a/docs/examples/databases/get.md b/docs/examples/databases/get.md index 35480b6..83cec7d 100644 --- a/docs/examples/databases/get.md +++ b/docs/examples/databases/get.md @@ -1,2 +1,2 @@ appwrite databases get \ - --databaseId + --database-id diff --git a/docs/examples/databases/increment-document-attribute.md b/docs/examples/databases/increment-document-attribute.md index 8a5150e..d51e44d 100644 --- a/docs/examples/databases/increment-document-attribute.md +++ b/docs/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/databases/list-attributes.md b/docs/examples/databases/list-attributes.md index a2382fe..c531111 100644 --- a/docs/examples/databases/list-attributes.md +++ b/docs/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/databases/list-collection-logs.md b/docs/examples/databases/list-collection-logs.md index eadac47..27f3a9b 100644 --- a/docs/examples/databases/list-collection-logs.md +++ b/docs/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/databases/list-collections.md b/docs/examples/databases/list-collections.md index b05c330..55576eb 100644 --- a/docs/examples/databases/list-collections.md +++ b/docs/examples/databases/list-collections.md @@ -1,4 +1,2 @@ -appwrite databases listCollections \ - --databaseId \ - - +appwrite databases list-collections \ + --database-id diff --git a/docs/examples/databases/list-document-logs.md b/docs/examples/databases/list-document-logs.md index 63b5394..9f8fb22 100644 --- a/docs/examples/databases/list-document-logs.md +++ b/docs/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/databases/list-documents.md b/docs/examples/databases/list-documents.md index 98e3895..69e921c 100644 --- a/docs/examples/databases/list-documents.md +++ b/docs/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/databases/list-indexes.md b/docs/examples/databases/list-indexes.md index 50acb4d..f12c1e9 100644 --- a/docs/examples/databases/list-indexes.md +++ b/docs/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/databases/list-logs.md b/docs/examples/databases/list-logs.md index 38547c7..293df55 100644 --- a/docs/examples/databases/list-logs.md +++ b/docs/examples/databases/list-logs.md @@ -1,3 +1,2 @@ -appwrite databases listLogs \ - --databaseId \ - +appwrite databases list-logs \ + --database-id diff --git a/docs/examples/databases/list-usage.md b/docs/examples/databases/list-usage.md index aad19fd..6bff75f 100644 --- a/docs/examples/databases/list-usage.md +++ b/docs/examples/databases/list-usage.md @@ -1,2 +1 @@ -appwrite databases listUsage \ - +appwrite databases list-usage diff --git a/docs/examples/databases/list.md b/docs/examples/databases/list.md index e723bc3..6681edc 100644 --- a/docs/examples/databases/list.md +++ b/docs/examples/databases/list.md @@ -1,3 +1 @@ -appwrite databases list \ - - +appwrite databases list diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md index f5adb49..578a5dc 100644 --- a/docs/examples/databases/update-boolean-attribute.md +++ b/docs/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/databases/update-collection.md b/docs/examples/databases/update-collection.md index eab3617..0bad485 100644 --- a/docs/examples/databases/update-collection.md +++ b/docs/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/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md index fe4a462..53459e0 100644 --- a/docs/examples/databases/update-datetime-attribute.md +++ b/docs/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/databases/update-document.md b/docs/examples/databases/update-document.md index a4ac55b..29f1461 100644 --- a/docs/examples/databases/update-document.md +++ b/docs/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/databases/update-documents.md b/docs/examples/databases/update-documents.md index 935f664..f4f85eb 100644 --- a/docs/examples/databases/update-documents.md +++ b/docs/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/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md index 58510a6..20ea219 100644 --- a/docs/examples/databases/update-email-attribute.md +++ b/docs/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/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md index 21d56d3..dfae8d2 100644 --- a/docs/examples/databases/update-enum-attribute.md +++ b/docs/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/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index a9bba3e..caeaa96 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/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/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index 660cd4d..2ab6e12 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/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/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md index a400ead..44b4010 100644 --- a/docs/examples/databases/update-ip-attribute.md +++ b/docs/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/databases/update-relationship-attribute.md b/docs/examples/databases/update-relationship-attribute.md index 6e2dbd9..d3f27d7 100644 --- a/docs/examples/databases/update-relationship-attribute.md +++ b/docs/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/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index 526ece0..0e0dd71 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/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/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md index e6f401b..76e6feb 100644 --- a/docs/examples/databases/update-url-attribute.md +++ b/docs/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/databases/update.md b/docs/examples/databases/update.md index a1e0a84..e3e1de7 100644 --- a/docs/examples/databases/update.md +++ b/docs/examples/databases/update.md @@ -1,4 +1,3 @@ appwrite databases update \ - --databaseId \ - --name \ - + --database-id \ + --name diff --git a/docs/examples/databases/upsert-document.md b/docs/examples/databases/upsert-document.md index 4093201..558ffeb 100644 --- a/docs/examples/databases/upsert-document.md +++ b/docs/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/databases/upsert-documents.md b/docs/examples/databases/upsert-documents.md index cb1677b..e58c202 100644 --- a/docs/examples/databases/upsert-documents.md +++ b/docs/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/functions/create-deployment.md b/docs/examples/functions/create-deployment.md index 6ac80bd..465951c 100644 --- a/docs/examples/functions/create-deployment.md +++ b/docs/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/functions/create-duplicate-deployment.md b/docs/examples/functions/create-duplicate-deployment.md index 4839155..7d5c28b 100644 --- a/docs/examples/functions/create-duplicate-deployment.md +++ b/docs/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/functions/create-execution.md b/docs/examples/functions/create-execution.md index febe88c..fd3b3dd 100644 --- a/docs/examples/functions/create-execution.md +++ b/docs/examples/functions/create-execution.md @@ -1,8 +1,2 @@ -appwrite functions createExecution \ - --functionId \ - - - - - - +appwrite functions create-execution \ + --function-id diff --git a/docs/examples/functions/create-template-deployment.md b/docs/examples/functions/create-template-deployment.md index a6164a3..f3c8487 100644 --- a/docs/examples/functions/create-template-deployment.md +++ b/docs/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/functions/create-variable.md b/docs/examples/functions/create-variable.md index f35f228..50edcaa 100644 --- a/docs/examples/functions/create-variable.md +++ b/docs/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/functions/create-vcs-deployment.md b/docs/examples/functions/create-vcs-deployment.md index 89f4cac..8e84622 100644 --- a/docs/examples/functions/create-vcs-deployment.md +++ b/docs/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/functions/create.md b/docs/examples/functions/create.md index ebca574..bdca30d 100644 --- a/docs/examples/functions/create.md +++ b/docs/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/functions/delete-deployment.md b/docs/examples/functions/delete-deployment.md index 2c9a6aa..4f50b92 100644 --- a/docs/examples/functions/delete-deployment.md +++ b/docs/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/functions/delete-execution.md b/docs/examples/functions/delete-execution.md index 2926b5a..a11c4cb 100644 --- a/docs/examples/functions/delete-execution.md +++ b/docs/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/functions/delete-variable.md b/docs/examples/functions/delete-variable.md index 835d125..aebe857 100644 --- a/docs/examples/functions/delete-variable.md +++ b/docs/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/functions/delete.md b/docs/examples/functions/delete.md index 0eea41c..abf2733 100644 --- a/docs/examples/functions/delete.md +++ b/docs/examples/functions/delete.md @@ -1,2 +1,2 @@ appwrite functions delete \ - --functionId + --function-id diff --git a/docs/examples/functions/get-deployment-download.md b/docs/examples/functions/get-deployment-download.md index 485b608..b9bfcab 100644 --- a/docs/examples/functions/get-deployment-download.md +++ b/docs/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/functions/get-deployment.md b/docs/examples/functions/get-deployment.md index 3da1605..4a65807 100644 --- a/docs/examples/functions/get-deployment.md +++ b/docs/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/functions/get-execution.md b/docs/examples/functions/get-execution.md index d593f07..ac2ad14 100644 --- a/docs/examples/functions/get-execution.md +++ b/docs/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/functions/get-template.md b/docs/examples/functions/get-template.md index 15c6068..2ab2afb 100644 --- a/docs/examples/functions/get-template.md +++ b/docs/examples/functions/get-template.md @@ -1,2 +1,2 @@ -appwrite functions getTemplate \ - --templateId +appwrite functions get-template \ + --template-id diff --git a/docs/examples/functions/get-usage.md b/docs/examples/functions/get-usage.md index 469db0f..a3f061d 100644 --- a/docs/examples/functions/get-usage.md +++ b/docs/examples/functions/get-usage.md @@ -1,3 +1,2 @@ -appwrite functions getUsage \ - --functionId \ - +appwrite functions get-usage \ + --function-id diff --git a/docs/examples/functions/get-variable.md b/docs/examples/functions/get-variable.md index 241a91d..06a3a49 100644 --- a/docs/examples/functions/get-variable.md +++ b/docs/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/functions/get.md b/docs/examples/functions/get.md index f678ef7..fafa87e 100644 --- a/docs/examples/functions/get.md +++ b/docs/examples/functions/get.md @@ -1,2 +1,2 @@ appwrite functions get \ - --functionId + --function-id diff --git a/docs/examples/functions/list-deployments.md b/docs/examples/functions/list-deployments.md index 2befb86..5bb2c60 100644 --- a/docs/examples/functions/list-deployments.md +++ b/docs/examples/functions/list-deployments.md @@ -1,4 +1,2 @@ -appwrite functions listDeployments \ - --functionId \ - - +appwrite functions list-deployments \ + --function-id diff --git a/docs/examples/functions/list-executions.md b/docs/examples/functions/list-executions.md index 8d3136e..a008947 100644 --- a/docs/examples/functions/list-executions.md +++ b/docs/examples/functions/list-executions.md @@ -1,3 +1,2 @@ -appwrite functions listExecutions \ - --functionId \ - +appwrite functions list-executions \ + --function-id diff --git a/docs/examples/functions/list-runtimes.md b/docs/examples/functions/list-runtimes.md index 15dc019..a0430d6 100644 --- a/docs/examples/functions/list-runtimes.md +++ b/docs/examples/functions/list-runtimes.md @@ -1 +1 @@ -appwrite functions listRuntimes +appwrite functions list-runtimes diff --git a/docs/examples/functions/list-specifications.md b/docs/examples/functions/list-specifications.md index 1d64bc6..4fac74e 100644 --- a/docs/examples/functions/list-specifications.md +++ b/docs/examples/functions/list-specifications.md @@ -1 +1 @@ -appwrite functions listSpecifications +appwrite functions list-specifications diff --git a/docs/examples/functions/list-templates.md b/docs/examples/functions/list-templates.md index b48bab5..22209fe 100644 --- a/docs/examples/functions/list-templates.md +++ b/docs/examples/functions/list-templates.md @@ -1,5 +1 @@ -appwrite functions listTemplates \ - - - - +appwrite functions list-templates diff --git a/docs/examples/functions/list-usage.md b/docs/examples/functions/list-usage.md index 8ae7855..de28c5c 100644 --- a/docs/examples/functions/list-usage.md +++ b/docs/examples/functions/list-usage.md @@ -1,2 +1 @@ -appwrite functions listUsage \ - +appwrite functions list-usage diff --git a/docs/examples/functions/list-variables.md b/docs/examples/functions/list-variables.md index 21bf2eb..03e1162 100644 --- a/docs/examples/functions/list-variables.md +++ b/docs/examples/functions/list-variables.md @@ -1,2 +1,2 @@ -appwrite functions listVariables \ - --functionId +appwrite functions list-variables \ + --function-id diff --git a/docs/examples/functions/list.md b/docs/examples/functions/list.md index 3b75512..2d9f0ba 100644 --- a/docs/examples/functions/list.md +++ b/docs/examples/functions/list.md @@ -1,3 +1 @@ -appwrite functions list \ - - +appwrite functions list diff --git a/docs/examples/functions/update-deployment-status.md b/docs/examples/functions/update-deployment-status.md index 06d2dcd..6f0bc1e 100644 --- a/docs/examples/functions/update-deployment-status.md +++ b/docs/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/functions/update-function-deployment.md b/docs/examples/functions/update-function-deployment.md index 652bfe8..d3534b4 100644 --- a/docs/examples/functions/update-function-deployment.md +++ b/docs/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/functions/update-variable.md b/docs/examples/functions/update-variable.md index a2b1049..c1d87f2 100644 --- a/docs/examples/functions/update-variable.md +++ b/docs/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/functions/update.md b/docs/examples/functions/update.md index 7ac63e0..c436ef0 100644 --- a/docs/examples/functions/update.md +++ b/docs/examples/functions/update.md @@ -1,19 +1,3 @@ appwrite functions update \ - --functionId \ - --name \ - - - - - - - - - - - - - - - - + --function-id \ + --name diff --git a/docs/examples/graphql/mutation.md b/docs/examples/graphql/mutation.md index f6127a1..678fcc2 100644 --- a/docs/examples/graphql/mutation.md +++ b/docs/examples/graphql/mutation.md @@ -1,2 +1,2 @@ appwrite graphql mutation \ - --query '{ "key": "value" }' + --query '{ "key": "value" }' diff --git a/docs/examples/graphql/query.md b/docs/examples/graphql/query.md index 1d84bca..157115a 100644 --- a/docs/examples/graphql/query.md +++ b/docs/examples/graphql/query.md @@ -1,2 +1,2 @@ appwrite graphql query \ - --query '{ "key": "value" }' + --query '{ "key": "value" }' diff --git a/docs/examples/health/get-antivirus.md b/docs/examples/health/get-antivirus.md index 96dd7e7..2ef8b6f 100644 --- a/docs/examples/health/get-antivirus.md +++ b/docs/examples/health/get-antivirus.md @@ -1 +1 @@ -appwrite health getAntivirus +appwrite health get-antivirus diff --git a/docs/examples/health/get-cache.md b/docs/examples/health/get-cache.md index ad1111c..b1ff131 100644 --- a/docs/examples/health/get-cache.md +++ b/docs/examples/health/get-cache.md @@ -1 +1 @@ -appwrite health getCache +appwrite health get-cache diff --git a/docs/examples/health/get-certificate.md b/docs/examples/health/get-certificate.md index 4659415..1765216 100644 --- a/docs/examples/health/get-certificate.md +++ b/docs/examples/health/get-certificate.md @@ -1,2 +1 @@ -appwrite health getCertificate \ - +appwrite health get-certificate diff --git a/docs/examples/health/get-d-b.md b/docs/examples/health/get-d-b.md deleted file mode 100644 index b0ea2d3..0000000 --- a/docs/examples/health/get-d-b.md +++ /dev/null @@ -1 +0,0 @@ -appwrite health getDB diff --git a/docs/examples/health/get-db.md b/docs/examples/health/get-db.md new file mode 100644 index 0000000..c5e9cb3 --- /dev/null +++ b/docs/examples/health/get-db.md @@ -0,0 +1 @@ +appwrite health get-db diff --git a/docs/examples/health/get-failed-jobs.md b/docs/examples/health/get-failed-jobs.md index 724299e..9704875 100644 --- a/docs/examples/health/get-failed-jobs.md +++ b/docs/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/health/get-pub-sub.md b/docs/examples/health/get-pub-sub.md index aa1773b..29e93a2 100644 --- a/docs/examples/health/get-pub-sub.md +++ b/docs/examples/health/get-pub-sub.md @@ -1 +1 @@ -appwrite health getPubSub +appwrite health get-pub-sub diff --git a/docs/examples/health/get-queue-builds.md b/docs/examples/health/get-queue-builds.md index 7204c2c..657b988 100644 --- a/docs/examples/health/get-queue-builds.md +++ b/docs/examples/health/get-queue-builds.md @@ -1,2 +1 @@ -appwrite health getQueueBuilds \ - +appwrite health get-queue-builds diff --git a/docs/examples/health/get-queue-certificates.md b/docs/examples/health/get-queue-certificates.md index 203e865..a7c1c64 100644 --- a/docs/examples/health/get-queue-certificates.md +++ b/docs/examples/health/get-queue-certificates.md @@ -1,2 +1 @@ -appwrite health getQueueCertificates \ - +appwrite health get-queue-certificates diff --git a/docs/examples/health/get-queue-databases.md b/docs/examples/health/get-queue-databases.md index f30b941..17d15ba 100644 --- a/docs/examples/health/get-queue-databases.md +++ b/docs/examples/health/get-queue-databases.md @@ -1,3 +1 @@ -appwrite health getQueueDatabases \ - - +appwrite health get-queue-databases diff --git a/docs/examples/health/get-queue-deletes.md b/docs/examples/health/get-queue-deletes.md index 1d44146..78ddc32 100644 --- a/docs/examples/health/get-queue-deletes.md +++ b/docs/examples/health/get-queue-deletes.md @@ -1,2 +1 @@ -appwrite health getQueueDeletes \ - +appwrite health get-queue-deletes diff --git a/docs/examples/health/get-queue-functions.md b/docs/examples/health/get-queue-functions.md index 4aca467..8109a8e 100644 --- a/docs/examples/health/get-queue-functions.md +++ b/docs/examples/health/get-queue-functions.md @@ -1,2 +1 @@ -appwrite health getQueueFunctions \ - +appwrite health get-queue-functions diff --git a/docs/examples/health/get-queue-logs.md b/docs/examples/health/get-queue-logs.md index 3f1386b..5ff48cc 100644 --- a/docs/examples/health/get-queue-logs.md +++ b/docs/examples/health/get-queue-logs.md @@ -1,2 +1 @@ -appwrite health getQueueLogs \ - +appwrite health get-queue-logs diff --git a/docs/examples/health/get-queue-mails.md b/docs/examples/health/get-queue-mails.md index a41f4c3..e44b1b6 100644 --- a/docs/examples/health/get-queue-mails.md +++ b/docs/examples/health/get-queue-mails.md @@ -1,2 +1 @@ -appwrite health getQueueMails \ - +appwrite health get-queue-mails diff --git a/docs/examples/health/get-queue-messaging.md b/docs/examples/health/get-queue-messaging.md index 11b7ff8..5249c73 100644 --- a/docs/examples/health/get-queue-messaging.md +++ b/docs/examples/health/get-queue-messaging.md @@ -1,2 +1 @@ -appwrite health getQueueMessaging \ - +appwrite health get-queue-messaging diff --git a/docs/examples/health/get-queue-migrations.md b/docs/examples/health/get-queue-migrations.md index 2f17bb5..11b07a1 100644 --- a/docs/examples/health/get-queue-migrations.md +++ b/docs/examples/health/get-queue-migrations.md @@ -1,2 +1 @@ -appwrite health getQueueMigrations \ - +appwrite health get-queue-migrations diff --git a/docs/examples/health/get-queue-stats-resources.md b/docs/examples/health/get-queue-stats-resources.md index 9cce963..2e51186 100644 --- a/docs/examples/health/get-queue-stats-resources.md +++ b/docs/examples/health/get-queue-stats-resources.md @@ -1,2 +1 @@ -appwrite health getQueueStatsResources \ - +appwrite health get-queue-stats-resources diff --git a/docs/examples/health/get-queue-usage.md b/docs/examples/health/get-queue-usage.md index d021a3f..1790e0f 100644 --- a/docs/examples/health/get-queue-usage.md +++ b/docs/examples/health/get-queue-usage.md @@ -1,2 +1 @@ -appwrite health getQueueUsage \ - +appwrite health get-queue-usage diff --git a/docs/examples/health/get-queue-webhooks.md b/docs/examples/health/get-queue-webhooks.md index 471175b..e175334 100644 --- a/docs/examples/health/get-queue-webhooks.md +++ b/docs/examples/health/get-queue-webhooks.md @@ -1,2 +1 @@ -appwrite health getQueueWebhooks \ - +appwrite health get-queue-webhooks diff --git a/docs/examples/health/get-storage-local.md b/docs/examples/health/get-storage-local.md index b5df39f..512d135 100644 --- a/docs/examples/health/get-storage-local.md +++ b/docs/examples/health/get-storage-local.md @@ -1 +1 @@ -appwrite health getStorageLocal +appwrite health get-storage-local diff --git a/docs/examples/health/get-storage.md b/docs/examples/health/get-storage.md index eccd21a..170bcfc 100644 --- a/docs/examples/health/get-storage.md +++ b/docs/examples/health/get-storage.md @@ -1 +1 @@ -appwrite health getStorage +appwrite health get-storage diff --git a/docs/examples/health/get-time.md b/docs/examples/health/get-time.md index 067e5da..feb3901 100644 --- a/docs/examples/health/get-time.md +++ b/docs/examples/health/get-time.md @@ -1 +1 @@ -appwrite health getTime +appwrite health get-time diff --git a/docs/examples/locale/list-codes.md b/docs/examples/locale/list-codes.md index 5586d15..ac96ac1 100644 --- a/docs/examples/locale/list-codes.md +++ b/docs/examples/locale/list-codes.md @@ -1 +1 @@ -appwrite locale listCodes +appwrite locale list-codes diff --git a/docs/examples/locale/list-continents.md b/docs/examples/locale/list-continents.md index 775af5d..1826787 100644 --- a/docs/examples/locale/list-continents.md +++ b/docs/examples/locale/list-continents.md @@ -1 +1 @@ -appwrite locale listContinents +appwrite locale list-continents diff --git a/docs/examples/locale/list-countries-e-u.md b/docs/examples/locale/list-countries-e-u.md deleted file mode 100644 index 43b7eff..0000000 --- a/docs/examples/locale/list-countries-e-u.md +++ /dev/null @@ -1 +0,0 @@ -appwrite locale listCountriesEU diff --git a/docs/examples/locale/list-countries-eu.md b/docs/examples/locale/list-countries-eu.md new file mode 100644 index 0000000..eba8886 --- /dev/null +++ b/docs/examples/locale/list-countries-eu.md @@ -0,0 +1 @@ +appwrite locale list-countries-eu diff --git a/docs/examples/locale/list-countries-phones.md b/docs/examples/locale/list-countries-phones.md index 072516b..ea27155 100644 --- a/docs/examples/locale/list-countries-phones.md +++ b/docs/examples/locale/list-countries-phones.md @@ -1 +1 @@ -appwrite locale listCountriesPhones +appwrite locale list-countries-phones diff --git a/docs/examples/locale/list-countries.md b/docs/examples/locale/list-countries.md index ee7101d..6524461 100644 --- a/docs/examples/locale/list-countries.md +++ b/docs/examples/locale/list-countries.md @@ -1 +1 @@ -appwrite locale listCountries +appwrite locale list-countries diff --git a/docs/examples/locale/list-currencies.md b/docs/examples/locale/list-currencies.md index 01b1b3c..bbc0f36 100644 --- a/docs/examples/locale/list-currencies.md +++ b/docs/examples/locale/list-currencies.md @@ -1 +1 @@ -appwrite locale listCurrencies +appwrite locale list-currencies diff --git a/docs/examples/locale/list-languages.md b/docs/examples/locale/list-languages.md index d47622c..a0cfe91 100644 --- a/docs/examples/locale/list-languages.md +++ b/docs/examples/locale/list-languages.md @@ -1 +1 @@ -appwrite locale listLanguages +appwrite locale list-languages diff --git a/docs/examples/messaging/create-a-p-n-s-provider.md b/docs/examples/messaging/create-a-p-n-s-provider.md deleted file mode 100644 index e49870d..0000000 --- a/docs/examples/messaging/create-a-p-n-s-provider.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite messaging createAPNSProvider \ - --providerId \ - --name \ - - - - - - diff --git a/docs/examples/messaging/create-apns-provider.md b/docs/examples/messaging/create-apns-provider.md index 8b369f4..fd5aaa9 100644 --- a/docs/examples/messaging/create-apns-provider.md +++ b/docs/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/messaging/create-email.md b/docs/examples/messaging/create-email.md index 2a8e03b..e8ffc11 100644 --- a/docs/examples/messaging/create-email.md +++ b/docs/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/messaging/create-f-c-m-provider.md b/docs/examples/messaging/create-f-c-m-provider.md deleted file mode 100644 index 897d1af..0000000 --- a/docs/examples/messaging/create-f-c-m-provider.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite messaging createFCMProvider \ - --providerId \ - --name \ - - diff --git a/docs/examples/messaging/create-fcm-provider.md b/docs/examples/messaging/create-fcm-provider.md index a19dcbe..487bb03 100644 --- a/docs/examples/messaging/create-fcm-provider.md +++ b/docs/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/messaging/create-mailgun-provider.md b/docs/examples/messaging/create-mailgun-provider.md index 6b07359..2616f00 100644 --- a/docs/examples/messaging/create-mailgun-provider.md +++ b/docs/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/messaging/create-msg-91-provider.md b/docs/examples/messaging/create-msg-91-provider.md new file mode 100644 index 0000000..d4f975d --- /dev/null +++ b/docs/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/messaging/create-msg91provider.md b/docs/examples/messaging/create-msg91provider.md deleted file mode 100644 index f687e36..0000000 --- a/docs/examples/messaging/create-msg91provider.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite messaging createMsg91Provider \ - --providerId \ - --name \ - - - - diff --git a/docs/examples/messaging/create-push.md b/docs/examples/messaging/create-push.md index 18d8ec5..d5740b9 100644 --- a/docs/examples/messaging/create-push.md +++ b/docs/examples/messaging/create-push.md @@ -1,20 +1,2 @@ -appwrite messaging createPush \ - --messageId \ - - - - - - - - - - - - - - - - - - +appwrite messaging create-push \ + --message-id diff --git a/docs/examples/messaging/create-s-m-s.md b/docs/examples/messaging/create-s-m-s.md deleted file mode 100644 index b1345cf..0000000 --- a/docs/examples/messaging/create-s-m-s.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite messaging createSMS \ - --messageId \ - --content \ - - - - - diff --git a/docs/examples/messaging/create-s-m-t-p-provider.md b/docs/examples/messaging/create-s-m-t-p-provider.md deleted file mode 100644 index 3e4e7de..0000000 --- a/docs/examples/messaging/create-s-m-t-p-provider.md +++ /dev/null @@ -1,15 +0,0 @@ -appwrite messaging createSMTPProvider \ - --providerId \ - --name \ - --host \ - - - - - - - - - - - diff --git a/docs/examples/messaging/create-sendgrid-provider.md b/docs/examples/messaging/create-sendgrid-provider.md index de8d059..2a478fd 100644 --- a/docs/examples/messaging/create-sendgrid-provider.md +++ b/docs/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/messaging/create-sms.md b/docs/examples/messaging/create-sms.md index dfc9b27..3633d06 100644 --- a/docs/examples/messaging/create-sms.md +++ b/docs/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/messaging/create-smtp-provider.md b/docs/examples/messaging/create-smtp-provider.md index 13f04fe..9a41783 100644 --- a/docs/examples/messaging/create-smtp-provider.md +++ b/docs/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/messaging/create-subscriber.md b/docs/examples/messaging/create-subscriber.md index 5e65c36..5fe7682 100644 --- a/docs/examples/messaging/create-subscriber.md +++ b/docs/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/messaging/create-telesign-provider.md b/docs/examples/messaging/create-telesign-provider.md index 783f759..052028d 100644 --- a/docs/examples/messaging/create-telesign-provider.md +++ b/docs/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/messaging/create-textmagic-provider.md b/docs/examples/messaging/create-textmagic-provider.md index 77185c7..6ff37b0 100644 --- a/docs/examples/messaging/create-textmagic-provider.md +++ b/docs/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/messaging/create-topic.md b/docs/examples/messaging/create-topic.md index 1d57e1c..3a28bb1 100644 --- a/docs/examples/messaging/create-topic.md +++ b/docs/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/messaging/create-twilio-provider.md b/docs/examples/messaging/create-twilio-provider.md index 91fdaae..2b2f00d 100644 --- a/docs/examples/messaging/create-twilio-provider.md +++ b/docs/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/messaging/create-vonage-provider.md b/docs/examples/messaging/create-vonage-provider.md index 1939d1c..56fb3e6 100644 --- a/docs/examples/messaging/create-vonage-provider.md +++ b/docs/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/messaging/delete-provider.md b/docs/examples/messaging/delete-provider.md index a938855..75671a9 100644 --- a/docs/examples/messaging/delete-provider.md +++ b/docs/examples/messaging/delete-provider.md @@ -1,2 +1,2 @@ -appwrite messaging deleteProvider \ - --providerId +appwrite messaging delete-provider \ + --provider-id diff --git a/docs/examples/messaging/delete-subscriber.md b/docs/examples/messaging/delete-subscriber.md index c535154..d433e3a 100644 --- a/docs/examples/messaging/delete-subscriber.md +++ b/docs/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/messaging/delete-topic.md b/docs/examples/messaging/delete-topic.md index 1fa387c..0c2887c 100644 --- a/docs/examples/messaging/delete-topic.md +++ b/docs/examples/messaging/delete-topic.md @@ -1,2 +1,2 @@ -appwrite messaging deleteTopic \ - --topicId +appwrite messaging delete-topic \ + --topic-id diff --git a/docs/examples/messaging/delete.md b/docs/examples/messaging/delete.md index 82ff141..eb5d2a6 100644 --- a/docs/examples/messaging/delete.md +++ b/docs/examples/messaging/delete.md @@ -1,2 +1,2 @@ appwrite messaging delete \ - --messageId + --message-id diff --git a/docs/examples/messaging/get-message.md b/docs/examples/messaging/get-message.md index 0144f79..2de245e 100644 --- a/docs/examples/messaging/get-message.md +++ b/docs/examples/messaging/get-message.md @@ -1,2 +1,2 @@ -appwrite messaging getMessage \ - --messageId +appwrite messaging get-message \ + --message-id diff --git a/docs/examples/messaging/get-provider.md b/docs/examples/messaging/get-provider.md index 9da9f2d..b115c52 100644 --- a/docs/examples/messaging/get-provider.md +++ b/docs/examples/messaging/get-provider.md @@ -1,2 +1,2 @@ -appwrite messaging getProvider \ - --providerId +appwrite messaging get-provider \ + --provider-id diff --git a/docs/examples/messaging/get-subscriber.md b/docs/examples/messaging/get-subscriber.md index 02f8bc0..88c2ab6 100644 --- a/docs/examples/messaging/get-subscriber.md +++ b/docs/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/messaging/get-topic.md b/docs/examples/messaging/get-topic.md index feb2dc6..7628bed 100644 --- a/docs/examples/messaging/get-topic.md +++ b/docs/examples/messaging/get-topic.md @@ -1,2 +1,2 @@ -appwrite messaging getTopic \ - --topicId +appwrite messaging get-topic \ + --topic-id diff --git a/docs/examples/messaging/list-message-logs.md b/docs/examples/messaging/list-message-logs.md index 91366f3..9cc6dc5 100644 --- a/docs/examples/messaging/list-message-logs.md +++ b/docs/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/messaging/list-messages.md b/docs/examples/messaging/list-messages.md index 6ab04b0..1e8a726 100644 --- a/docs/examples/messaging/list-messages.md +++ b/docs/examples/messaging/list-messages.md @@ -1,3 +1 @@ -appwrite messaging listMessages \ - - +appwrite messaging list-messages diff --git a/docs/examples/messaging/list-provider-logs.md b/docs/examples/messaging/list-provider-logs.md index 0dee2e3..95e514e 100644 --- a/docs/examples/messaging/list-provider-logs.md +++ b/docs/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/messaging/list-providers.md b/docs/examples/messaging/list-providers.md index 0a2ce47..d075be5 100644 --- a/docs/examples/messaging/list-providers.md +++ b/docs/examples/messaging/list-providers.md @@ -1,3 +1 @@ -appwrite messaging listProviders \ - - +appwrite messaging list-providers diff --git a/docs/examples/messaging/list-subscriber-logs.md b/docs/examples/messaging/list-subscriber-logs.md index 4a04ac4..4858c6c 100644 --- a/docs/examples/messaging/list-subscriber-logs.md +++ b/docs/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/messaging/list-subscribers.md b/docs/examples/messaging/list-subscribers.md index 2eed8bd..c122c68 100644 --- a/docs/examples/messaging/list-subscribers.md +++ b/docs/examples/messaging/list-subscribers.md @@ -1,4 +1,2 @@ -appwrite messaging listSubscribers \ - --topicId \ - - +appwrite messaging list-subscribers \ + --topic-id diff --git a/docs/examples/messaging/list-targets.md b/docs/examples/messaging/list-targets.md index 7efa50e..e161e93 100644 --- a/docs/examples/messaging/list-targets.md +++ b/docs/examples/messaging/list-targets.md @@ -1,3 +1,2 @@ -appwrite messaging listTargets \ - --messageId \ - +appwrite messaging list-targets \ + --message-id diff --git a/docs/examples/messaging/list-topic-logs.md b/docs/examples/messaging/list-topic-logs.md index f23c10a..121f279 100644 --- a/docs/examples/messaging/list-topic-logs.md +++ b/docs/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/messaging/list-topics.md b/docs/examples/messaging/list-topics.md index 1810a7b..0337b3d 100644 --- a/docs/examples/messaging/list-topics.md +++ b/docs/examples/messaging/list-topics.md @@ -1,3 +1 @@ -appwrite messaging listTopics \ - - +appwrite messaging list-topics diff --git a/docs/examples/messaging/update-a-p-n-s-provider.md b/docs/examples/messaging/update-a-p-n-s-provider.md deleted file mode 100644 index 1af2622..0000000 --- a/docs/examples/messaging/update-a-p-n-s-provider.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite messaging updateAPNSProvider \ - --providerId \ - - - - - - - diff --git a/docs/examples/messaging/update-apns-provider.md b/docs/examples/messaging/update-apns-provider.md index 9e895a0..7bd5db2 100644 --- a/docs/examples/messaging/update-apns-provider.md +++ b/docs/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/messaging/update-email.md b/docs/examples/messaging/update-email.md index 934fd29..7e318ad 100644 --- a/docs/examples/messaging/update-email.md +++ b/docs/examples/messaging/update-email.md @@ -1,13 +1,2 @@ -appwrite messaging updateEmail \ - --messageId \ - - - - - - - - - - - +appwrite messaging update-email \ + --message-id diff --git a/docs/examples/messaging/update-f-c-m-provider.md b/docs/examples/messaging/update-f-c-m-provider.md deleted file mode 100644 index 529ad4c..0000000 --- a/docs/examples/messaging/update-f-c-m-provider.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite messaging updateFCMProvider \ - --providerId \ - - - diff --git a/docs/examples/messaging/update-fcm-provider.md b/docs/examples/messaging/update-fcm-provider.md index 0000223..4d41680 100644 --- a/docs/examples/messaging/update-fcm-provider.md +++ b/docs/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/messaging/update-mailgun-provider.md b/docs/examples/messaging/update-mailgun-provider.md index f35c5e9..9d07afe 100644 --- a/docs/examples/messaging/update-mailgun-provider.md +++ b/docs/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/messaging/update-msg-91-provider.md b/docs/examples/messaging/update-msg-91-provider.md new file mode 100644 index 0000000..e4bc24b --- /dev/null +++ b/docs/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,2 @@ +appwrite messaging update-msg-91-provider \ + --provider-id diff --git a/docs/examples/messaging/update-msg91provider.md b/docs/examples/messaging/update-msg91provider.md deleted file mode 100644 index 8e2d604..0000000 --- a/docs/examples/messaging/update-msg91provider.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite messaging updateMsg91Provider \ - --providerId \ - - - - - diff --git a/docs/examples/messaging/update-push.md b/docs/examples/messaging/update-push.md index 1f4427c..c11d462 100644 --- a/docs/examples/messaging/update-push.md +++ b/docs/examples/messaging/update-push.md @@ -1,20 +1,2 @@ -appwrite messaging updatePush \ - --messageId \ - - - - - - - - - - - - - - - - - - +appwrite messaging update-push \ + --message-id diff --git a/docs/examples/messaging/update-s-m-s.md b/docs/examples/messaging/update-s-m-s.md deleted file mode 100644 index 1db1aba..0000000 --- a/docs/examples/messaging/update-s-m-s.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite messaging updateSMS \ - --messageId \ - - - - - - diff --git a/docs/examples/messaging/update-s-m-t-p-provider.md b/docs/examples/messaging/update-s-m-t-p-provider.md deleted file mode 100644 index 4cc7990..0000000 --- a/docs/examples/messaging/update-s-m-t-p-provider.md +++ /dev/null @@ -1,15 +0,0 @@ -appwrite messaging updateSMTPProvider \ - --providerId \ - - - - - - - - - - - - - diff --git a/docs/examples/messaging/update-sendgrid-provider.md b/docs/examples/messaging/update-sendgrid-provider.md index 7f2e97d..77e9fcd 100644 --- a/docs/examples/messaging/update-sendgrid-provider.md +++ b/docs/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/messaging/update-sms.md b/docs/examples/messaging/update-sms.md index a30ff43..888df62 100644 --- a/docs/examples/messaging/update-sms.md +++ b/docs/examples/messaging/update-sms.md @@ -1,8 +1,2 @@ -appwrite messaging updateSms \ - --messageId \ - - - - - - +appwrite messaging update-sms \ + --message-id diff --git a/docs/examples/messaging/update-smtp-provider.md b/docs/examples/messaging/update-smtp-provider.md index 4e0f7b6..23bb899 100644 --- a/docs/examples/messaging/update-smtp-provider.md +++ b/docs/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/messaging/update-telesign-provider.md b/docs/examples/messaging/update-telesign-provider.md index 0a92f2c..69eee1f 100644 --- a/docs/examples/messaging/update-telesign-provider.md +++ b/docs/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/messaging/update-textmagic-provider.md b/docs/examples/messaging/update-textmagic-provider.md index 79160b2..ff23b82 100644 --- a/docs/examples/messaging/update-textmagic-provider.md +++ b/docs/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/messaging/update-topic.md b/docs/examples/messaging/update-topic.md index d10b0ed..ea7bc45 100644 --- a/docs/examples/messaging/update-topic.md +++ b/docs/examples/messaging/update-topic.md @@ -1,4 +1,2 @@ -appwrite messaging updateTopic \ - --topicId \ - - +appwrite messaging update-topic \ + --topic-id diff --git a/docs/examples/messaging/update-twilio-provider.md b/docs/examples/messaging/update-twilio-provider.md index c967d72..25f2910 100644 --- a/docs/examples/messaging/update-twilio-provider.md +++ b/docs/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/messaging/update-vonage-provider.md b/docs/examples/messaging/update-vonage-provider.md index 11f7963..7b87a94 100644 --- a/docs/examples/messaging/update-vonage-provider.md +++ b/docs/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/migrations/create-appwrite-migration.md b/docs/examples/migrations/create-appwrite-migration.md index 73e9ee6..34fee2f 100644 --- a/docs/examples/migrations/create-appwrite-migration.md +++ b/docs/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/migrations/create-csv-migration.md b/docs/examples/migrations/create-csv-migration.md index f80c9e9..4b72b6f 100644 --- a/docs/examples/migrations/create-csv-migration.md +++ b/docs/examples/migrations/create-csv-migration.md @@ -1,5 +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/migrations/create-firebase-migration.md b/docs/examples/migrations/create-firebase-migration.md index 3dfb3ae..81337b4 100644 --- a/docs/examples/migrations/create-firebase-migration.md +++ b/docs/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/migrations/create-n-host-migration.md b/docs/examples/migrations/create-n-host-migration.md index d959897..2bcba6a 100644 --- a/docs/examples/migrations/create-n-host-migration.md +++ b/docs/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/migrations/create-supabase-migration.md b/docs/examples/migrations/create-supabase-migration.md index 0620f3b..a186b17 100644 --- a/docs/examples/migrations/create-supabase-migration.md +++ b/docs/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/migrations/delete.md b/docs/examples/migrations/delete.md index 9dac1aa..b7ad0f0 100644 --- a/docs/examples/migrations/delete.md +++ b/docs/examples/migrations/delete.md @@ -1,2 +1,2 @@ appwrite migrations delete \ - --migrationId + --migration-id diff --git a/docs/examples/migrations/get-appwrite-report.md b/docs/examples/migrations/get-appwrite-report.md index 745e9fb..3f54fed 100644 --- a/docs/examples/migrations/get-appwrite-report.md +++ b/docs/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/migrations/get-firebase-report.md b/docs/examples/migrations/get-firebase-report.md index 73c7e1c..33e7e73 100644 --- a/docs/examples/migrations/get-firebase-report.md +++ b/docs/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/migrations/get-n-host-report.md b/docs/examples/migrations/get-n-host-report.md index 6b7e2ea..2d1ed04 100644 --- a/docs/examples/migrations/get-n-host-report.md +++ b/docs/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/migrations/get-supabase-report.md b/docs/examples/migrations/get-supabase-report.md index 9754f38..789c66a 100644 --- a/docs/examples/migrations/get-supabase-report.md +++ b/docs/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/migrations/get.md b/docs/examples/migrations/get.md index 8810646..46959a3 100644 --- a/docs/examples/migrations/get.md +++ b/docs/examples/migrations/get.md @@ -1,2 +1,2 @@ appwrite migrations get \ - --migrationId + --migration-id diff --git a/docs/examples/migrations/list.md b/docs/examples/migrations/list.md index c120a61..659c9fd 100644 --- a/docs/examples/migrations/list.md +++ b/docs/examples/migrations/list.md @@ -1,3 +1 @@ -appwrite migrations list \ - - +appwrite migrations list diff --git a/docs/examples/migrations/retry.md b/docs/examples/migrations/retry.md index 518f86c..d656dd9 100644 --- a/docs/examples/migrations/retry.md +++ b/docs/examples/migrations/retry.md @@ -1,2 +1,2 @@ appwrite migrations retry \ - --migrationId + --migration-id diff --git a/docs/examples/project/create-variable.md b/docs/examples/project/create-variable.md index 253d6dd..113c0ba 100644 --- a/docs/examples/project/create-variable.md +++ b/docs/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/project/delete-variable.md b/docs/examples/project/delete-variable.md index 7fdda87..a4213dc 100644 --- a/docs/examples/project/delete-variable.md +++ b/docs/examples/project/delete-variable.md @@ -1,2 +1,2 @@ -appwrite project deleteVariable \ - --variableId +appwrite project delete-variable \ + --variable-id diff --git a/docs/examples/project/get-usage.md b/docs/examples/project/get-usage.md index 9b4c296..75cc4b9 100644 --- a/docs/examples/project/get-usage.md +++ b/docs/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/project/get-variable.md b/docs/examples/project/get-variable.md index b2d4825..2833758 100644 --- a/docs/examples/project/get-variable.md +++ b/docs/examples/project/get-variable.md @@ -1,2 +1,2 @@ -appwrite project getVariable \ - --variableId +appwrite project get-variable \ + --variable-id diff --git a/docs/examples/project/list-variables.md b/docs/examples/project/list-variables.md index bd26c7d..dc6251c 100644 --- a/docs/examples/project/list-variables.md +++ b/docs/examples/project/list-variables.md @@ -1 +1 @@ -appwrite project listVariables +appwrite project list-variables diff --git a/docs/examples/project/update-variable.md b/docs/examples/project/update-variable.md index 4365b64..5f12a12 100644 --- a/docs/examples/project/update-variable.md +++ b/docs/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/projects/create-dev-key.md b/docs/examples/projects/create-dev-key.md index 8b9ec89..b90e0ca 100644 --- a/docs/examples/projects/create-dev-key.md +++ b/docs/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/projects/create-j-w-t.md b/docs/examples/projects/create-j-w-t.md deleted file mode 100644 index d703d36..0000000 --- a/docs/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/projects/create-jwt.md b/docs/examples/projects/create-jwt.md new file mode 100644 index 0000000..df708a5 --- /dev/null +++ b/docs/examples/projects/create-jwt.md @@ -0,0 +1,3 @@ +appwrite projects create-jwt \ + --project-id \ + --scopes one two three diff --git a/docs/examples/projects/create-key.md b/docs/examples/projects/create-key.md index fb986dc..0650ccd 100644 --- a/docs/examples/projects/create-key.md +++ b/docs/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/projects/create-platform.md b/docs/examples/projects/create-platform.md index 8727d21..94f5234 100644 --- a/docs/examples/projects/create-platform.md +++ b/docs/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/projects/create-s-m-t-p-test.md b/docs/examples/projects/create-s-m-t-p-test.md deleted file mode 100644 index 9a4dd99..0000000 --- a/docs/examples/projects/create-s-m-t-p-test.md +++ /dev/null @@ -1,11 +0,0 @@ -appwrite projects createSMTPTest \ - --projectId \ - --emails one two three \ - --senderName \ - --senderEmail email@example.com \ - --host '' \ - - - - - diff --git a/docs/examples/projects/create-smtp-test.md b/docs/examples/projects/create-smtp-test.md index 66ce588..c83aebf 100644 --- a/docs/examples/projects/create-smtp-test.md +++ b/docs/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/projects/create-webhook.md b/docs/examples/projects/create-webhook.md index 03ecf41..0983d31 100644 --- a/docs/examples/projects/create-webhook.md +++ b/docs/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/projects/create.md b/docs/examples/projects/create.md index 0504785..5bdd1ff 100644 --- a/docs/examples/projects/create.md +++ b/docs/examples/projects/create.md @@ -1,14 +1,4 @@ appwrite projects create \ - --projectId '' \ - --name \ - --teamId \ - - - - - - - - - - + --project-id '' \ + --name \ + --team-id diff --git a/docs/examples/projects/delete-dev-key.md b/docs/examples/projects/delete-dev-key.md index 2859a33..3e911ea 100644 --- a/docs/examples/projects/delete-dev-key.md +++ b/docs/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/projects/delete-email-template.md b/docs/examples/projects/delete-email-template.md index 01ce0fa..81cf403 100644 --- a/docs/examples/projects/delete-email-template.md +++ b/docs/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/projects/delete-key.md b/docs/examples/projects/delete-key.md index 6baf057..eccb09b 100644 --- a/docs/examples/projects/delete-key.md +++ b/docs/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/projects/delete-platform.md b/docs/examples/projects/delete-platform.md index a85bd86..7f68e7d 100644 --- a/docs/examples/projects/delete-platform.md +++ b/docs/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/projects/delete-s-m-s-template.md b/docs/examples/projects/delete-s-m-s-template.md deleted file mode 100644 index 69fa595..0000000 --- a/docs/examples/projects/delete-s-m-s-template.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite projects deleteSMSTemplate \ - --projectId \ - --type verification \ - --locale af diff --git a/docs/examples/projects/delete-sms-template.md b/docs/examples/projects/delete-sms-template.md index 3afcf64..666de54 100644 --- a/docs/examples/projects/delete-sms-template.md +++ b/docs/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/projects/delete-webhook.md b/docs/examples/projects/delete-webhook.md index a67301e..70e6865 100644 --- a/docs/examples/projects/delete-webhook.md +++ b/docs/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/projects/delete.md b/docs/examples/projects/delete.md index a4ffc70..3127385 100644 --- a/docs/examples/projects/delete.md +++ b/docs/examples/projects/delete.md @@ -1,2 +1,2 @@ appwrite projects delete \ - --projectId + --project-id diff --git a/docs/examples/projects/get-dev-key.md b/docs/examples/projects/get-dev-key.md index cfc37ed..57b2c22 100644 --- a/docs/examples/projects/get-dev-key.md +++ b/docs/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/projects/get-email-template.md b/docs/examples/projects/get-email-template.md index 6e4c21e..ea6d542 100644 --- a/docs/examples/projects/get-email-template.md +++ b/docs/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/projects/get-key.md b/docs/examples/projects/get-key.md index f69b51b..cfd5013 100644 --- a/docs/examples/projects/get-key.md +++ b/docs/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/projects/get-platform.md b/docs/examples/projects/get-platform.md index 67648be..6207730 100644 --- a/docs/examples/projects/get-platform.md +++ b/docs/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/projects/get-s-m-s-template.md b/docs/examples/projects/get-s-m-s-template.md deleted file mode 100644 index c61ca69..0000000 --- a/docs/examples/projects/get-s-m-s-template.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite projects getSMSTemplate \ - --projectId \ - --type verification \ - --locale af diff --git a/docs/examples/projects/get-sms-template.md b/docs/examples/projects/get-sms-template.md index c655953..bbb755b 100644 --- a/docs/examples/projects/get-sms-template.md +++ b/docs/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/projects/get-webhook.md b/docs/examples/projects/get-webhook.md index 890bf37..d725bee 100644 --- a/docs/examples/projects/get-webhook.md +++ b/docs/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/projects/get.md b/docs/examples/projects/get.md index 919321b..0665b37 100644 --- a/docs/examples/projects/get.md +++ b/docs/examples/projects/get.md @@ -1,2 +1,2 @@ appwrite projects get \ - --projectId + --project-id diff --git a/docs/examples/projects/list-dev-keys.md b/docs/examples/projects/list-dev-keys.md index d552cb3..f6f9a84 100644 --- a/docs/examples/projects/list-dev-keys.md +++ b/docs/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/projects/list-keys.md b/docs/examples/projects/list-keys.md index cc37680..aa70a5c 100644 --- a/docs/examples/projects/list-keys.md +++ b/docs/examples/projects/list-keys.md @@ -1,2 +1,2 @@ -appwrite projects listKeys \ - --projectId +appwrite projects list-keys \ + --project-id diff --git a/docs/examples/projects/list-platforms.md b/docs/examples/projects/list-platforms.md index 5fc2ea4..e7fbfb2 100644 --- a/docs/examples/projects/list-platforms.md +++ b/docs/examples/projects/list-platforms.md @@ -1,2 +1,2 @@ -appwrite projects listPlatforms \ - --projectId +appwrite projects list-platforms \ + --project-id diff --git a/docs/examples/projects/list-webhooks.md b/docs/examples/projects/list-webhooks.md index dcf9953..ab4012a 100644 --- a/docs/examples/projects/list-webhooks.md +++ b/docs/examples/projects/list-webhooks.md @@ -1,2 +1,2 @@ -appwrite projects listWebhooks \ - --projectId +appwrite projects list-webhooks \ + --project-id diff --git a/docs/examples/projects/list.md b/docs/examples/projects/list.md index 0d3dd7a..f84f712 100644 --- a/docs/examples/projects/list.md +++ b/docs/examples/projects/list.md @@ -1,3 +1 @@ -appwrite projects list \ - - +appwrite projects list diff --git a/docs/examples/projects/update-a-p-i-status-all.md b/docs/examples/projects/update-a-p-i-status-all.md deleted file mode 100644 index 02adf9c..0000000 --- a/docs/examples/projects/update-a-p-i-status-all.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite projects updateAPIStatusAll \ - --projectId \ - --status false diff --git a/docs/examples/projects/update-a-p-i-status.md b/docs/examples/projects/update-a-p-i-status.md deleted file mode 100644 index de4261e..0000000 --- a/docs/examples/projects/update-a-p-i-status.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite projects updateAPIStatus \ - --projectId \ - --api rest \ - --status false diff --git a/docs/examples/projects/update-api-status-all.md b/docs/examples/projects/update-api-status-all.md index e5f63c5..bbbec45 100644 --- a/docs/examples/projects/update-api-status-all.md +++ b/docs/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/projects/update-api-status.md b/docs/examples/projects/update-api-status.md index 0112095..7e269ba 100644 --- a/docs/examples/projects/update-api-status.md +++ b/docs/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/projects/update-auth-duration.md b/docs/examples/projects/update-auth-duration.md index ad6f8ac..07e458e 100644 --- a/docs/examples/projects/update-auth-duration.md +++ b/docs/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/projects/update-auth-limit.md b/docs/examples/projects/update-auth-limit.md index 9d01fa5..5e5d2ad 100644 --- a/docs/examples/projects/update-auth-limit.md +++ b/docs/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/projects/update-auth-password-dictionary.md b/docs/examples/projects/update-auth-password-dictionary.md index f477bba..b4160e3 100644 --- a/docs/examples/projects/update-auth-password-dictionary.md +++ b/docs/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/projects/update-auth-password-history.md b/docs/examples/projects/update-auth-password-history.md index 8b9b90a..cffc917 100644 --- a/docs/examples/projects/update-auth-password-history.md +++ b/docs/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/projects/update-auth-sessions-limit.md b/docs/examples/projects/update-auth-sessions-limit.md index 2a1294d..fc205c0 100644 --- a/docs/examples/projects/update-auth-sessions-limit.md +++ b/docs/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/projects/update-auth-status.md b/docs/examples/projects/update-auth-status.md index 848987b..5f38dc9 100644 --- a/docs/examples/projects/update-auth-status.md +++ b/docs/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/projects/update-dev-key.md b/docs/examples/projects/update-dev-key.md index cc95030..1e54db3 100644 --- a/docs/examples/projects/update-dev-key.md +++ b/docs/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/projects/update-email-template.md b/docs/examples/projects/update-email-template.md index a3acd06..f8e4919 100644 --- a/docs/examples/projects/update-email-template.md +++ b/docs/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/projects/update-key.md b/docs/examples/projects/update-key.md index 6d3dc19..8ac173b 100644 --- a/docs/examples/projects/update-key.md +++ b/docs/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/projects/update-memberships-privacy.md b/docs/examples/projects/update-memberships-privacy.md index 6c811cc..94582f4 100644 --- a/docs/examples/projects/update-memberships-privacy.md +++ b/docs/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/projects/update-mock-numbers.md b/docs/examples/projects/update-mock-numbers.md index 733cc16..774887d 100644 --- a/docs/examples/projects/update-mock-numbers.md +++ b/docs/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/projects/update-o-auth-2.md b/docs/examples/projects/update-o-auth-2.md new file mode 100644 index 0000000..7f8364d --- /dev/null +++ b/docs/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/projects/update-o-auth2.md b/docs/examples/projects/update-o-auth2.md deleted file mode 100644 index 92f6718..0000000 --- a/docs/examples/projects/update-o-auth2.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite projects updateOAuth2 \ - --projectId \ - --provider amazon \ - - - diff --git a/docs/examples/projects/update-personal-data-check.md b/docs/examples/projects/update-personal-data-check.md index 21dca78..7130dec 100644 --- a/docs/examples/projects/update-personal-data-check.md +++ b/docs/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/projects/update-platform.md b/docs/examples/projects/update-platform.md index 05b1602..170e8a6 100644 --- a/docs/examples/projects/update-platform.md +++ b/docs/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/projects/update-s-m-s-template.md b/docs/examples/projects/update-s-m-s-template.md deleted file mode 100644 index c69ac85..0000000 --- a/docs/examples/projects/update-s-m-s-template.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite projects updateSMSTemplate \ - --projectId \ - --type verification \ - --locale af \ - --message diff --git a/docs/examples/projects/update-s-m-t-p.md b/docs/examples/projects/update-s-m-t-p.md deleted file mode 100644 index e39a811..0000000 --- a/docs/examples/projects/update-s-m-t-p.md +++ /dev/null @@ -1,11 +0,0 @@ -appwrite projects updateSMTP \ - --projectId \ - --enabled false \ - - - - - - - - diff --git a/docs/examples/projects/update-service-status-all.md b/docs/examples/projects/update-service-status-all.md index 1ffb77e..1d8fab2 100644 --- a/docs/examples/projects/update-service-status-all.md +++ b/docs/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/projects/update-service-status.md b/docs/examples/projects/update-service-status.md index 03963a1..ce589bc 100644 --- a/docs/examples/projects/update-service-status.md +++ b/docs/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/projects/update-session-alerts.md b/docs/examples/projects/update-session-alerts.md index bd23b74..d25fa96 100644 --- a/docs/examples/projects/update-session-alerts.md +++ b/docs/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/projects/update-session-invalidation.md b/docs/examples/projects/update-session-invalidation.md index 21e8511..17d635e 100644 --- a/docs/examples/projects/update-session-invalidation.md +++ b/docs/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/projects/update-sms-template.md b/docs/examples/projects/update-sms-template.md index fc8310e..5e10477 100644 --- a/docs/examples/projects/update-sms-template.md +++ b/docs/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/projects/update-smtp.md b/docs/examples/projects/update-smtp.md index 0afbe9c..f62059a 100644 --- a/docs/examples/projects/update-smtp.md +++ b/docs/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/projects/update-team.md b/docs/examples/projects/update-team.md index 49214ad..4cb0a98 100644 --- a/docs/examples/projects/update-team.md +++ b/docs/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/projects/update-webhook-signature.md b/docs/examples/projects/update-webhook-signature.md index 6034ef0..708ff65 100644 --- a/docs/examples/projects/update-webhook-signature.md +++ b/docs/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/projects/update-webhook.md b/docs/examples/projects/update-webhook.md index 51c536d..f505e6e 100644 --- a/docs/examples/projects/update-webhook.md +++ b/docs/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/projects/update.md b/docs/examples/projects/update.md index d4df289..e3c7eca 100644 --- a/docs/examples/projects/update.md +++ b/docs/examples/projects/update.md @@ -1,12 +1,3 @@ appwrite projects update \ - --projectId \ - --name \ - - - - - - - - - + --project-id \ + --name diff --git a/docs/examples/proxy/create-a-p-i-rule.md b/docs/examples/proxy/create-a-p-i-rule.md deleted file mode 100644 index 5746b94..0000000 --- a/docs/examples/proxy/create-a-p-i-rule.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite proxy createAPIRule \ - --domain '' diff --git a/docs/examples/proxy/create-api-rule.md b/docs/examples/proxy/create-api-rule.md new file mode 100644 index 0000000..3bd7bb1 --- /dev/null +++ b/docs/examples/proxy/create-api-rule.md @@ -0,0 +1,2 @@ +appwrite proxy create-api-rule \ + --domain '' diff --git a/docs/examples/proxy/create-function-rule.md b/docs/examples/proxy/create-function-rule.md index 380650c..2312f3a 100644 --- a/docs/examples/proxy/create-function-rule.md +++ b/docs/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/proxy/create-redirect-rule.md b/docs/examples/proxy/create-redirect-rule.md index ec9098a..763f9bc 100644 --- a/docs/examples/proxy/create-redirect-rule.md +++ b/docs/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/proxy/create-site-rule.md b/docs/examples/proxy/create-site-rule.md index eb41bd7..fa7859b 100644 --- a/docs/examples/proxy/create-site-rule.md +++ b/docs/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/proxy/delete-rule.md b/docs/examples/proxy/delete-rule.md index b11b6ca..c676893 100644 --- a/docs/examples/proxy/delete-rule.md +++ b/docs/examples/proxy/delete-rule.md @@ -1,2 +1,2 @@ -appwrite proxy deleteRule \ - --ruleId +appwrite proxy delete-rule \ + --rule-id diff --git a/docs/examples/proxy/get-rule.md b/docs/examples/proxy/get-rule.md index 85d11a5..22ac1de 100644 --- a/docs/examples/proxy/get-rule.md +++ b/docs/examples/proxy/get-rule.md @@ -1,2 +1,2 @@ -appwrite proxy getRule \ - --ruleId +appwrite proxy get-rule \ + --rule-id diff --git a/docs/examples/proxy/list-rules.md b/docs/examples/proxy/list-rules.md index bc654ba..ab53084 100644 --- a/docs/examples/proxy/list-rules.md +++ b/docs/examples/proxy/list-rules.md @@ -1,3 +1 @@ -appwrite proxy listRules \ - - +appwrite proxy list-rules diff --git a/docs/examples/proxy/update-rule-verification.md b/docs/examples/proxy/update-rule-verification.md index 8200d15..b381aa3 100644 --- a/docs/examples/proxy/update-rule-verification.md +++ b/docs/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/sites/create-deployment.md b/docs/examples/sites/create-deployment.md index a83d7f3..dda0468 100644 --- a/docs/examples/sites/create-deployment.md +++ b/docs/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/sites/create-duplicate-deployment.md b/docs/examples/sites/create-duplicate-deployment.md index bab63ca..30cf7d5 100644 --- a/docs/examples/sites/create-duplicate-deployment.md +++ b/docs/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/sites/create-template-deployment.md b/docs/examples/sites/create-template-deployment.md index 2aaaf44..2eece41 100644 --- a/docs/examples/sites/create-template-deployment.md +++ b/docs/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/sites/create-variable.md b/docs/examples/sites/create-variable.md index b640321..af1f470 100644 --- a/docs/examples/sites/create-variable.md +++ b/docs/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/sites/create-vcs-deployment.md b/docs/examples/sites/create-vcs-deployment.md index 85c96f9..ab9c444 100644 --- a/docs/examples/sites/create-vcs-deployment.md +++ b/docs/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/sites/create.md b/docs/examples/sites/create.md index bd7e86e..6806a10 100644 --- a/docs/examples/sites/create.md +++ b/docs/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/sites/delete-deployment.md b/docs/examples/sites/delete-deployment.md index c1cbf49..7f7fe2f 100644 --- a/docs/examples/sites/delete-deployment.md +++ b/docs/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/sites/delete-log.md b/docs/examples/sites/delete-log.md index 6769be2..3ea3503 100644 --- a/docs/examples/sites/delete-log.md +++ b/docs/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/sites/delete-variable.md b/docs/examples/sites/delete-variable.md index 60d9ecf..a7a32b9 100644 --- a/docs/examples/sites/delete-variable.md +++ b/docs/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/sites/delete.md b/docs/examples/sites/delete.md index 9071454..e03eca6 100644 --- a/docs/examples/sites/delete.md +++ b/docs/examples/sites/delete.md @@ -1,2 +1,2 @@ appwrite sites delete \ - --siteId + --site-id diff --git a/docs/examples/sites/get-deployment-download.md b/docs/examples/sites/get-deployment-download.md index 1fae298..e7af5c3 100644 --- a/docs/examples/sites/get-deployment-download.md +++ b/docs/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/sites/get-deployment.md b/docs/examples/sites/get-deployment.md index 93680ff..28fee04 100644 --- a/docs/examples/sites/get-deployment.md +++ b/docs/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/sites/get-log.md b/docs/examples/sites/get-log.md index 7867aba..adba026 100644 --- a/docs/examples/sites/get-log.md +++ b/docs/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/sites/get-template.md b/docs/examples/sites/get-template.md index e04dd2e..64bfd67 100644 --- a/docs/examples/sites/get-template.md +++ b/docs/examples/sites/get-template.md @@ -1,2 +1,2 @@ -appwrite sites getTemplate \ - --templateId +appwrite sites get-template \ + --template-id diff --git a/docs/examples/sites/get-usage.md b/docs/examples/sites/get-usage.md index 6de7d6b..e1f8862 100644 --- a/docs/examples/sites/get-usage.md +++ b/docs/examples/sites/get-usage.md @@ -1,3 +1,2 @@ -appwrite sites getUsage \ - --siteId \ - +appwrite sites get-usage \ + --site-id diff --git a/docs/examples/sites/get-variable.md b/docs/examples/sites/get-variable.md index b60b577..2e96d63 100644 --- a/docs/examples/sites/get-variable.md +++ b/docs/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/sites/get.md b/docs/examples/sites/get.md index 7922efa..db34c82 100644 --- a/docs/examples/sites/get.md +++ b/docs/examples/sites/get.md @@ -1,2 +1,2 @@ appwrite sites get \ - --siteId + --site-id diff --git a/docs/examples/sites/list-deployments.md b/docs/examples/sites/list-deployments.md index 5ab2cdc..0c5de05 100644 --- a/docs/examples/sites/list-deployments.md +++ b/docs/examples/sites/list-deployments.md @@ -1,4 +1,2 @@ -appwrite sites listDeployments \ - --siteId \ - - +appwrite sites list-deployments \ + --site-id diff --git a/docs/examples/sites/list-frameworks.md b/docs/examples/sites/list-frameworks.md index 1d9b6b4..7a213b9 100644 --- a/docs/examples/sites/list-frameworks.md +++ b/docs/examples/sites/list-frameworks.md @@ -1 +1 @@ -appwrite sites listFrameworks +appwrite sites list-frameworks diff --git a/docs/examples/sites/list-logs.md b/docs/examples/sites/list-logs.md index f13864f..565bcab 100644 --- a/docs/examples/sites/list-logs.md +++ b/docs/examples/sites/list-logs.md @@ -1,3 +1,2 @@ -appwrite sites listLogs \ - --siteId \ - +appwrite sites list-logs \ + --site-id diff --git a/docs/examples/sites/list-specifications.md b/docs/examples/sites/list-specifications.md index dc1a16c..e8f1a87 100644 --- a/docs/examples/sites/list-specifications.md +++ b/docs/examples/sites/list-specifications.md @@ -1 +1 @@ -appwrite sites listSpecifications +appwrite sites list-specifications diff --git a/docs/examples/sites/list-templates.md b/docs/examples/sites/list-templates.md index 9d93913..bde094f 100644 --- a/docs/examples/sites/list-templates.md +++ b/docs/examples/sites/list-templates.md @@ -1,5 +1 @@ -appwrite sites listTemplates \ - - - - +appwrite sites list-templates diff --git a/docs/examples/sites/list-usage.md b/docs/examples/sites/list-usage.md index a6f43f6..b5b4171 100644 --- a/docs/examples/sites/list-usage.md +++ b/docs/examples/sites/list-usage.md @@ -1,2 +1 @@ -appwrite sites listUsage \ - +appwrite sites list-usage diff --git a/docs/examples/sites/list-variables.md b/docs/examples/sites/list-variables.md index 13a258b..419fe76 100644 --- a/docs/examples/sites/list-variables.md +++ b/docs/examples/sites/list-variables.md @@ -1,2 +1,2 @@ -appwrite sites listVariables \ - --siteId +appwrite sites list-variables \ + --site-id diff --git a/docs/examples/sites/list.md b/docs/examples/sites/list.md index 0cad70e..9d3b883 100644 --- a/docs/examples/sites/list.md +++ b/docs/examples/sites/list.md @@ -1,3 +1 @@ -appwrite sites list \ - - +appwrite sites list diff --git a/docs/examples/sites/update-deployment-status.md b/docs/examples/sites/update-deployment-status.md index 7923b38..9220265 100644 --- a/docs/examples/sites/update-deployment-status.md +++ b/docs/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/sites/update-site-deployment.md b/docs/examples/sites/update-site-deployment.md index de877d8..9db9e11 100644 --- a/docs/examples/sites/update-site-deployment.md +++ b/docs/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/sites/update-variable.md b/docs/examples/sites/update-variable.md index e968771..e7df76a 100644 --- a/docs/examples/sites/update-variable.md +++ b/docs/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/sites/update.md b/docs/examples/sites/update.md index 192ee26..6fab0af 100644 --- a/docs/examples/sites/update.md +++ b/docs/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/storage/create-bucket.md b/docs/examples/storage/create-bucket.md index 878c10d..2e26dc7 100644 --- a/docs/examples/storage/create-bucket.md +++ b/docs/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/storage/create-file.md b/docs/examples/storage/create-file.md index 67bd4da..82b4d0a 100644 --- a/docs/examples/storage/create-file.md +++ b/docs/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/storage/delete-bucket.md b/docs/examples/storage/delete-bucket.md index e51797e..33e520c 100644 --- a/docs/examples/storage/delete-bucket.md +++ b/docs/examples/storage/delete-bucket.md @@ -1,2 +1,2 @@ -appwrite storage deleteBucket \ - --bucketId +appwrite storage delete-bucket \ + --bucket-id diff --git a/docs/examples/storage/delete-file.md b/docs/examples/storage/delete-file.md index 79c03e8..a3006c2 100644 --- a/docs/examples/storage/delete-file.md +++ b/docs/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/storage/get-bucket-usage.md b/docs/examples/storage/get-bucket-usage.md index df3659c..794b0ec 100644 --- a/docs/examples/storage/get-bucket-usage.md +++ b/docs/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/storage/get-bucket.md b/docs/examples/storage/get-bucket.md index cf8725b..6404281 100644 --- a/docs/examples/storage/get-bucket.md +++ b/docs/examples/storage/get-bucket.md @@ -1,2 +1,2 @@ -appwrite storage getBucket \ - --bucketId +appwrite storage get-bucket \ + --bucket-id diff --git a/docs/examples/storage/get-file-download.md b/docs/examples/storage/get-file-download.md index 79f3368..12a74ea 100644 --- a/docs/examples/storage/get-file-download.md +++ b/docs/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/storage/get-file-preview.md b/docs/examples/storage/get-file-preview.md index de437af..82f180e 100644 --- a/docs/examples/storage/get-file-preview.md +++ b/docs/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/storage/get-file-view.md b/docs/examples/storage/get-file-view.md index 689cf12..5ce6526 100644 --- a/docs/examples/storage/get-file-view.md +++ b/docs/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/storage/get-file.md b/docs/examples/storage/get-file.md index 641c20d..8c139e6 100644 --- a/docs/examples/storage/get-file.md +++ b/docs/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/storage/get-usage.md b/docs/examples/storage/get-usage.md index 29466e0..1d69ffd 100644 --- a/docs/examples/storage/get-usage.md +++ b/docs/examples/storage/get-usage.md @@ -1,2 +1 @@ -appwrite storage getUsage \ - +appwrite storage get-usage diff --git a/docs/examples/storage/list-buckets.md b/docs/examples/storage/list-buckets.md index a5cad19..1bffd0e 100644 --- a/docs/examples/storage/list-buckets.md +++ b/docs/examples/storage/list-buckets.md @@ -1,3 +1 @@ -appwrite storage listBuckets \ - - +appwrite storage list-buckets diff --git a/docs/examples/storage/list-files.md b/docs/examples/storage/list-files.md index 0e1c2f0..29dc20d 100644 --- a/docs/examples/storage/list-files.md +++ b/docs/examples/storage/list-files.md @@ -1,4 +1,2 @@ -appwrite storage listFiles \ - --bucketId \ - - +appwrite storage list-files \ + --bucket-id diff --git a/docs/examples/storage/update-bucket.md b/docs/examples/storage/update-bucket.md index b006a7b..12282f3 100644 --- a/docs/examples/storage/update-bucket.md +++ b/docs/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/storage/update-file.md b/docs/examples/storage/update-file.md index 593ea65..86a3f3d 100644 --- a/docs/examples/storage/update-file.md +++ b/docs/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/tablesdb/create-boolean-column.md b/docs/examples/tablesdb/create-boolean-column.md index 2503836..b191215 100644 --- a/docs/examples/tablesdb/create-boolean-column.md +++ b/docs/examples/tablesdb/create-boolean-column.md @@ -1,7 +1,5 @@ -appwrite tablesDB createBooleanColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - - +appwrite tables-db create-boolean-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/tablesdb/create-datetime-column.md b/docs/examples/tablesdb/create-datetime-column.md index a01b64f..7ccaf9e 100644 --- a/docs/examples/tablesdb/create-datetime-column.md +++ b/docs/examples/tablesdb/create-datetime-column.md @@ -1,7 +1,5 @@ -appwrite tablesDB createDatetimeColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - - +appwrite tables-db create-datetime-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/tablesdb/create-email-column.md b/docs/examples/tablesdb/create-email-column.md index 003f437..54f32b9 100644 --- a/docs/examples/tablesdb/create-email-column.md +++ b/docs/examples/tablesdb/create-email-column.md @@ -1,7 +1,5 @@ -appwrite tablesDB createEmailColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - - +appwrite tables-db create-email-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/tablesdb/create-enum-column.md b/docs/examples/tablesdb/create-enum-column.md index 14edc02..4f3e9ce 100644 --- a/docs/examples/tablesdb/create-enum-column.md +++ b/docs/examples/tablesdb/create-enum-column.md @@ -1,8 +1,6 @@ -appwrite tablesDB createEnumColumn \ - --databaseId \ - --tableId \ - --key '' \ - --elements one two three \ - --required false \ - - +appwrite tables-db create-enum-column \ + --database-id \ + --table-id \ + --key '' \ + --elements one two three \ + --required false diff --git a/docs/examples/tablesdb/create-float-column.md b/docs/examples/tablesdb/create-float-column.md index 3e86dc7..a365cef 100644 --- a/docs/examples/tablesdb/create-float-column.md +++ b/docs/examples/tablesdb/create-float-column.md @@ -1,9 +1,5 @@ -appwrite tablesDB createFloatColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - - - - +appwrite tables-db create-float-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/tablesdb/create-index.md b/docs/examples/tablesdb/create-index.md index 816e807..7100907 100644 --- a/docs/examples/tablesdb/create-index.md +++ b/docs/examples/tablesdb/create-index.md @@ -1,8 +1,6 @@ -appwrite tablesDB createIndex \ - --databaseId \ - --tableId \ - --key '' \ - --type key \ - --columns one two three \ - - +appwrite tables-db create-index \ + --database-id \ + --table-id \ + --key '' \ + --type key \ + --columns one two three diff --git a/docs/examples/tablesdb/create-integer-column.md b/docs/examples/tablesdb/create-integer-column.md index fdb7565..2dc799b 100644 --- a/docs/examples/tablesdb/create-integer-column.md +++ b/docs/examples/tablesdb/create-integer-column.md @@ -1,9 +1,5 @@ -appwrite tablesDB createIntegerColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - - - - +appwrite tables-db create-integer-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/tablesdb/create-ip-column.md b/docs/examples/tablesdb/create-ip-column.md index b84f4ba..2b46013 100644 --- a/docs/examples/tablesdb/create-ip-column.md +++ b/docs/examples/tablesdb/create-ip-column.md @@ -1,7 +1,5 @@ -appwrite tablesDB createIpColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - - +appwrite tables-db create-ip-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/tablesdb/create-relationship-column.md b/docs/examples/tablesdb/create-relationship-column.md index deca698..d7d58b6 100644 --- a/docs/examples/tablesdb/create-relationship-column.md +++ b/docs/examples/tablesdb/create-relationship-column.md @@ -1,9 +1,5 @@ -appwrite tablesDB createRelationshipColumn \ - --databaseId \ - --tableId \ - --relatedTableId \ - --type oneToOne \ - - - - +appwrite tables-db create-relationship-column \ + --database-id \ + --table-id \ + --related-table-id \ + --type oneToOne diff --git a/docs/examples/tablesdb/create-row.md b/docs/examples/tablesdb/create-row.md index a991611..d15c5ec 100644 --- a/docs/examples/tablesdb/create-row.md +++ b/docs/examples/tablesdb/create-row.md @@ -1,6 +1,5 @@ -appwrite tablesDB createRow \ - --databaseId \ - --tableId \ - --rowId \ - --data '{ "key": "value" }' \ - +appwrite tables-db create-row \ + --database-id \ + --table-id \ + --row-id \ + --data '{ "key": "value" }' diff --git a/docs/examples/tablesdb/create-rows.md b/docs/examples/tablesdb/create-rows.md index d1c4320..39eb349 100644 --- a/docs/examples/tablesdb/create-rows.md +++ b/docs/examples/tablesdb/create-rows.md @@ -1,4 +1,4 @@ -appwrite tablesDB createRows \ - --databaseId \ - --tableId \ - --rows one two three +appwrite tables-db create-rows \ + --database-id \ + --table-id \ + --rows one two three diff --git a/docs/examples/tablesdb/create-string-column.md b/docs/examples/tablesdb/create-string-column.md index 188aa26..a394ff5 100644 --- a/docs/examples/tablesdb/create-string-column.md +++ b/docs/examples/tablesdb/create-string-column.md @@ -1,9 +1,6 @@ -appwrite tablesDB createStringColumn \ - --databaseId \ - --tableId \ - --key '' \ - --size 1 \ - --required false \ - - - +appwrite tables-db create-string-column \ + --database-id \ + --table-id \ + --key '' \ + --size 1 \ + --required false diff --git a/docs/examples/tablesdb/create-table.md b/docs/examples/tablesdb/create-table.md index ce5b3c2..1c5a22d 100644 --- a/docs/examples/tablesdb/create-table.md +++ b/docs/examples/tablesdb/create-table.md @@ -1,7 +1,4 @@ -appwrite tablesDB createTable \ - --databaseId \ - --tableId \ - --name \ - - - +appwrite tables-db create-table \ + --database-id \ + --table-id \ + --name diff --git a/docs/examples/tablesdb/create-url-column.md b/docs/examples/tablesdb/create-url-column.md index 649e203..d9b9f2b 100644 --- a/docs/examples/tablesdb/create-url-column.md +++ b/docs/examples/tablesdb/create-url-column.md @@ -1,7 +1,5 @@ -appwrite tablesDB createUrlColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - - +appwrite tables-db create-url-column \ + --database-id \ + --table-id \ + --key '' \ + --required false diff --git a/docs/examples/tablesdb/create.md b/docs/examples/tablesdb/create.md index b1b6946..d10c5d6 100644 --- a/docs/examples/tablesdb/create.md +++ b/docs/examples/tablesdb/create.md @@ -1,4 +1,3 @@ -appwrite tablesDB create \ - --databaseId \ - --name \ - +appwrite tables-db create \ + --database-id \ + --name diff --git a/docs/examples/tablesdb/decrement-row-column.md b/docs/examples/tablesdb/decrement-row-column.md index 3d8dc8c..79e0a51 100644 --- a/docs/examples/tablesdb/decrement-row-column.md +++ b/docs/examples/tablesdb/decrement-row-column.md @@ -1,7 +1,5 @@ -appwrite tablesDB decrementRowColumn \ - --databaseId \ - --tableId \ - --rowId \ - --column '' \ - - +appwrite tables-db decrement-row-column \ + --database-id \ + --table-id \ + --row-id \ + --column '' diff --git a/docs/examples/tablesdb/delete-column.md b/docs/examples/tablesdb/delete-column.md index edcff27..4689290 100644 --- a/docs/examples/tablesdb/delete-column.md +++ b/docs/examples/tablesdb/delete-column.md @@ -1,4 +1,4 @@ -appwrite tablesDB deleteColumn \ - --databaseId \ - --tableId \ - --key '' +appwrite tables-db delete-column \ + --database-id \ + --table-id \ + --key '' diff --git a/docs/examples/tablesdb/delete-index.md b/docs/examples/tablesdb/delete-index.md index 70e50aa..0729f87 100644 --- a/docs/examples/tablesdb/delete-index.md +++ b/docs/examples/tablesdb/delete-index.md @@ -1,4 +1,4 @@ -appwrite tablesDB deleteIndex \ - --databaseId \ - --tableId \ - --key '' +appwrite tables-db delete-index \ + --database-id \ + --table-id \ + --key '' diff --git a/docs/examples/tablesdb/delete-row.md b/docs/examples/tablesdb/delete-row.md index e26f8e2..03b3562 100644 --- a/docs/examples/tablesdb/delete-row.md +++ b/docs/examples/tablesdb/delete-row.md @@ -1,4 +1,4 @@ -appwrite tablesDB deleteRow \ - --databaseId \ - --tableId \ - --rowId +appwrite tables-db delete-row \ + --database-id \ + --table-id \ + --row-id diff --git a/docs/examples/tablesdb/delete-rows.md b/docs/examples/tablesdb/delete-rows.md index 456c706..92cd143 100644 --- a/docs/examples/tablesdb/delete-rows.md +++ b/docs/examples/tablesdb/delete-rows.md @@ -1,4 +1,3 @@ -appwrite tablesDB deleteRows \ - --databaseId \ - --tableId \ - +appwrite tables-db delete-rows \ + --database-id \ + --table-id diff --git a/docs/examples/tablesdb/delete-table.md b/docs/examples/tablesdb/delete-table.md index cd21870..6ec9df4 100644 --- a/docs/examples/tablesdb/delete-table.md +++ b/docs/examples/tablesdb/delete-table.md @@ -1,3 +1,3 @@ -appwrite tablesDB deleteTable \ - --databaseId \ - --tableId +appwrite tables-db delete-table \ + --database-id \ + --table-id diff --git a/docs/examples/tablesdb/delete.md b/docs/examples/tablesdb/delete.md index 2ba8a45..52bf4cd 100644 --- a/docs/examples/tablesdb/delete.md +++ b/docs/examples/tablesdb/delete.md @@ -1,2 +1,2 @@ -appwrite tablesDB delete \ - --databaseId +appwrite tables-db delete \ + --database-id diff --git a/docs/examples/tablesdb/get-column.md b/docs/examples/tablesdb/get-column.md index 63d618b..d209c45 100644 --- a/docs/examples/tablesdb/get-column.md +++ b/docs/examples/tablesdb/get-column.md @@ -1,4 +1,4 @@ -appwrite tablesDB getColumn \ - --databaseId \ - --tableId \ - --key '' +appwrite tables-db get-column \ + --database-id \ + --table-id \ + --key '' diff --git a/docs/examples/tablesdb/get-index.md b/docs/examples/tablesdb/get-index.md index 208fccd..2035e78 100644 --- a/docs/examples/tablesdb/get-index.md +++ b/docs/examples/tablesdb/get-index.md @@ -1,4 +1,4 @@ -appwrite tablesDB getIndex \ - --databaseId \ - --tableId \ - --key '' +appwrite tables-db get-index \ + --database-id \ + --table-id \ + --key '' diff --git a/docs/examples/tablesdb/get-row.md b/docs/examples/tablesdb/get-row.md index cb26107..c8d06ea 100644 --- a/docs/examples/tablesdb/get-row.md +++ b/docs/examples/tablesdb/get-row.md @@ -1,5 +1,4 @@ -appwrite tablesDB getRow \ - --databaseId \ - --tableId \ - --rowId \ - +appwrite tables-db get-row \ + --database-id \ + --table-id \ + --row-id diff --git a/docs/examples/tablesdb/get-table-usage.md b/docs/examples/tablesdb/get-table-usage.md index ccaac73..0e7782f 100644 --- a/docs/examples/tablesdb/get-table-usage.md +++ b/docs/examples/tablesdb/get-table-usage.md @@ -1,4 +1,3 @@ -appwrite tablesDB getTableUsage \ - --databaseId \ - --tableId \ - +appwrite tables-db get-table-usage \ + --database-id \ + --table-id diff --git a/docs/examples/tablesdb/get-table.md b/docs/examples/tablesdb/get-table.md index 2aa2de3..9e5e038 100644 --- a/docs/examples/tablesdb/get-table.md +++ b/docs/examples/tablesdb/get-table.md @@ -1,3 +1,3 @@ -appwrite tablesDB getTable \ - --databaseId \ - --tableId +appwrite tables-db get-table \ + --database-id \ + --table-id diff --git a/docs/examples/tablesdb/get-usage.md b/docs/examples/tablesdb/get-usage.md index e98fd43..ff421ce 100644 --- a/docs/examples/tablesdb/get-usage.md +++ b/docs/examples/tablesdb/get-usage.md @@ -1,3 +1,2 @@ -appwrite tablesDB getUsage \ - --databaseId \ - +appwrite tables-db get-usage \ + --database-id diff --git a/docs/examples/tablesdb/get.md b/docs/examples/tablesdb/get.md index 9323fad..1b125ec 100644 --- a/docs/examples/tablesdb/get.md +++ b/docs/examples/tablesdb/get.md @@ -1,2 +1,2 @@ -appwrite tablesDB get \ - --databaseId +appwrite tables-db get \ + --database-id diff --git a/docs/examples/tablesdb/increment-row-column.md b/docs/examples/tablesdb/increment-row-column.md index 9c97422..a15ab69 100644 --- a/docs/examples/tablesdb/increment-row-column.md +++ b/docs/examples/tablesdb/increment-row-column.md @@ -1,7 +1,5 @@ -appwrite tablesDB incrementRowColumn \ - --databaseId \ - --tableId \ - --rowId \ - --column '' \ - - +appwrite tables-db increment-row-column \ + --database-id \ + --table-id \ + --row-id \ + --column '' diff --git a/docs/examples/tablesdb/list-columns.md b/docs/examples/tablesdb/list-columns.md index b6b7ce4..4c233d5 100644 --- a/docs/examples/tablesdb/list-columns.md +++ b/docs/examples/tablesdb/list-columns.md @@ -1,4 +1,3 @@ -appwrite tablesDB listColumns \ - --databaseId \ - --tableId \ - +appwrite tables-db list-columns \ + --database-id \ + --table-id diff --git a/docs/examples/tablesdb/list-indexes.md b/docs/examples/tablesdb/list-indexes.md index 6e506cf..4139175 100644 --- a/docs/examples/tablesdb/list-indexes.md +++ b/docs/examples/tablesdb/list-indexes.md @@ -1,4 +1,3 @@ -appwrite tablesDB listIndexes \ - --databaseId \ - --tableId \ - +appwrite tables-db list-indexes \ + --database-id \ + --table-id diff --git a/docs/examples/tablesdb/list-row-logs.md b/docs/examples/tablesdb/list-row-logs.md index 2dc6fbe..dfa2f98 100644 --- a/docs/examples/tablesdb/list-row-logs.md +++ b/docs/examples/tablesdb/list-row-logs.md @@ -1,5 +1,4 @@ -appwrite tablesDB listRowLogs \ - --databaseId \ - --tableId \ - --rowId \ - +appwrite tables-db list-row-logs \ + --database-id \ + --table-id \ + --row-id diff --git a/docs/examples/tablesdb/list-rows.md b/docs/examples/tablesdb/list-rows.md index 5b06216..904350e 100644 --- a/docs/examples/tablesdb/list-rows.md +++ b/docs/examples/tablesdb/list-rows.md @@ -1,4 +1,3 @@ -appwrite tablesDB listRows \ - --databaseId \ - --tableId \ - +appwrite tables-db list-rows \ + --database-id \ + --table-id diff --git a/docs/examples/tablesdb/list-table-logs.md b/docs/examples/tablesdb/list-table-logs.md index 9135168..a803bf4 100644 --- a/docs/examples/tablesdb/list-table-logs.md +++ b/docs/examples/tablesdb/list-table-logs.md @@ -1,4 +1,3 @@ -appwrite tablesDB listTableLogs \ - --databaseId \ - --tableId \ - +appwrite tables-db list-table-logs \ + --database-id \ + --table-id diff --git a/docs/examples/tablesdb/list-tables.md b/docs/examples/tablesdb/list-tables.md index 5a7b3ba..f7e7930 100644 --- a/docs/examples/tablesdb/list-tables.md +++ b/docs/examples/tablesdb/list-tables.md @@ -1,4 +1,2 @@ -appwrite tablesDB listTables \ - --databaseId \ - - +appwrite tables-db list-tables \ + --database-id diff --git a/docs/examples/tablesdb/list-usage.md b/docs/examples/tablesdb/list-usage.md index 3b5c6fa..9e6b980 100644 --- a/docs/examples/tablesdb/list-usage.md +++ b/docs/examples/tablesdb/list-usage.md @@ -1,2 +1 @@ -appwrite tablesDB listUsage \ - +appwrite tables-db list-usage diff --git a/docs/examples/tablesdb/list.md b/docs/examples/tablesdb/list.md index 591d65d..22d7e01 100644 --- a/docs/examples/tablesdb/list.md +++ b/docs/examples/tablesdb/list.md @@ -1,3 +1 @@ -appwrite tablesDB list \ - - +appwrite tables-db list diff --git a/docs/examples/tablesdb/update-boolean-column.md b/docs/examples/tablesdb/update-boolean-column.md index 911bb9f..318ddac 100644 --- a/docs/examples/tablesdb/update-boolean-column.md +++ b/docs/examples/tablesdb/update-boolean-column.md @@ -1,7 +1,6 @@ -appwrite tablesDB updateBooleanColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - --default false \ - +appwrite tables-db update-boolean-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default false diff --git a/docs/examples/tablesdb/update-datetime-column.md b/docs/examples/tablesdb/update-datetime-column.md index 874c240..b40a825 100644 --- a/docs/examples/tablesdb/update-datetime-column.md +++ b/docs/examples/tablesdb/update-datetime-column.md @@ -1,7 +1,6 @@ -appwrite tablesDB updateDatetimeColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - --default '' \ - +appwrite tables-db update-datetime-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default '' diff --git a/docs/examples/tablesdb/update-email-column.md b/docs/examples/tablesdb/update-email-column.md index 72757f3..cd8104b 100644 --- a/docs/examples/tablesdb/update-email-column.md +++ b/docs/examples/tablesdb/update-email-column.md @@ -1,7 +1,6 @@ -appwrite tablesDB updateEmailColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - --default email@example.com \ - +appwrite tables-db update-email-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default email@example.com diff --git a/docs/examples/tablesdb/update-enum-column.md b/docs/examples/tablesdb/update-enum-column.md index 216610e..66bc3e2 100644 --- a/docs/examples/tablesdb/update-enum-column.md +++ b/docs/examples/tablesdb/update-enum-column.md @@ -1,8 +1,7 @@ -appwrite tablesDB updateEnumColumn \ - --databaseId \ - --tableId \ - --key '' \ - --elements one two three \ - --required false \ - --default \ - +appwrite tables-db update-enum-column \ + --database-id \ + --table-id \ + --key '' \ + --elements one two three \ + --required false \ + --default diff --git a/docs/examples/tablesdb/update-float-column.md b/docs/examples/tablesdb/update-float-column.md index 984903f..a3c6e6b 100644 --- a/docs/examples/tablesdb/update-float-column.md +++ b/docs/examples/tablesdb/update-float-column.md @@ -1,9 +1,6 @@ -appwrite tablesDB updateFloatColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - --default null \ - - - +appwrite tables-db update-float-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default null diff --git a/docs/examples/tablesdb/update-integer-column.md b/docs/examples/tablesdb/update-integer-column.md index a2252ab..f651c5c 100644 --- a/docs/examples/tablesdb/update-integer-column.md +++ b/docs/examples/tablesdb/update-integer-column.md @@ -1,9 +1,6 @@ -appwrite tablesDB updateIntegerColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - --default null \ - - - +appwrite tables-db update-integer-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default null diff --git a/docs/examples/tablesdb/update-ip-column.md b/docs/examples/tablesdb/update-ip-column.md index b96c4cf..9a1425c 100644 --- a/docs/examples/tablesdb/update-ip-column.md +++ b/docs/examples/tablesdb/update-ip-column.md @@ -1,7 +1,6 @@ -appwrite tablesDB updateIpColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - --default '' \ - +appwrite tables-db update-ip-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default '' diff --git a/docs/examples/tablesdb/update-relationship-column.md b/docs/examples/tablesdb/update-relationship-column.md index d5b7197..fb358a3 100644 --- a/docs/examples/tablesdb/update-relationship-column.md +++ b/docs/examples/tablesdb/update-relationship-column.md @@ -1,6 +1,4 @@ -appwrite tablesDB updateRelationshipColumn \ - --databaseId \ - --tableId \ - --key '' \ - - +appwrite tables-db update-relationship-column \ + --database-id \ + --table-id \ + --key '' diff --git a/docs/examples/tablesdb/update-row.md b/docs/examples/tablesdb/update-row.md index c9f1da4..31d8866 100644 --- a/docs/examples/tablesdb/update-row.md +++ b/docs/examples/tablesdb/update-row.md @@ -1,6 +1,4 @@ -appwrite tablesDB updateRow \ - --databaseId \ - --tableId \ - --rowId \ - - +appwrite tables-db update-row \ + --database-id \ + --table-id \ + --row-id diff --git a/docs/examples/tablesdb/update-rows.md b/docs/examples/tablesdb/update-rows.md index da78717..eca741f 100644 --- a/docs/examples/tablesdb/update-rows.md +++ b/docs/examples/tablesdb/update-rows.md @@ -1,5 +1,3 @@ -appwrite tablesDB updateRows \ - --databaseId \ - --tableId \ - - +appwrite tables-db update-rows \ + --database-id \ + --table-id diff --git a/docs/examples/tablesdb/update-string-column.md b/docs/examples/tablesdb/update-string-column.md index 1132961..fadb277 100644 --- a/docs/examples/tablesdb/update-string-column.md +++ b/docs/examples/tablesdb/update-string-column.md @@ -1,8 +1,6 @@ -appwrite tablesDB updateStringColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - --default \ - - +appwrite tables-db update-string-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default diff --git a/docs/examples/tablesdb/update-table.md b/docs/examples/tablesdb/update-table.md index 3c939b0..92884df 100644 --- a/docs/examples/tablesdb/update-table.md +++ b/docs/examples/tablesdb/update-table.md @@ -1,7 +1,4 @@ -appwrite tablesDB updateTable \ - --databaseId \ - --tableId \ - --name \ - - - +appwrite tables-db update-table \ + --database-id \ + --table-id \ + --name diff --git a/docs/examples/tablesdb/update-url-column.md b/docs/examples/tablesdb/update-url-column.md index c49abfe..e1bbdbb 100644 --- a/docs/examples/tablesdb/update-url-column.md +++ b/docs/examples/tablesdb/update-url-column.md @@ -1,7 +1,6 @@ -appwrite tablesDB updateUrlColumn \ - --databaseId \ - --tableId \ - --key '' \ - --required false \ - --default https://example.com \ - +appwrite tables-db update-url-column \ + --database-id \ + --table-id \ + --key '' \ + --required false \ + --default https://example.com diff --git a/docs/examples/tablesdb/update.md b/docs/examples/tablesdb/update.md index 4e651e4..b8dbec1 100644 --- a/docs/examples/tablesdb/update.md +++ b/docs/examples/tablesdb/update.md @@ -1,4 +1,3 @@ -appwrite tablesDB update \ - --databaseId \ - --name \ - +appwrite tables-db update \ + --database-id \ + --name diff --git a/docs/examples/tablesdb/upsert-row.md b/docs/examples/tablesdb/upsert-row.md index 1143f40..32c9fd6 100644 --- a/docs/examples/tablesdb/upsert-row.md +++ b/docs/examples/tablesdb/upsert-row.md @@ -1,6 +1,4 @@ -appwrite tablesDB upsertRow \ - --databaseId \ - --tableId \ - --rowId \ - - +appwrite tables-db upsert-row \ + --database-id \ + --table-id \ + --row-id diff --git a/docs/examples/tablesdb/upsert-rows.md b/docs/examples/tablesdb/upsert-rows.md index 53ec4e4..85e0bc0 100644 --- a/docs/examples/tablesdb/upsert-rows.md +++ b/docs/examples/tablesdb/upsert-rows.md @@ -1,4 +1,4 @@ -appwrite tablesDB upsertRows \ - --databaseId \ - --tableId \ - --rows one two three +appwrite tables-db upsert-rows \ + --database-id \ + --table-id \ + --rows one two three diff --git a/docs/examples/teams/create-membership.md b/docs/examples/teams/create-membership.md index 0d0fc8d..6e9d50a 100644 --- a/docs/examples/teams/create-membership.md +++ b/docs/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/teams/create.md b/docs/examples/teams/create.md index e0f9a12..fb8bc3a 100644 --- a/docs/examples/teams/create.md +++ b/docs/examples/teams/create.md @@ -1,4 +1,3 @@ appwrite teams create \ - --teamId \ - --name \ - + --team-id \ + --name diff --git a/docs/examples/teams/delete-membership.md b/docs/examples/teams/delete-membership.md index 58d0adb..c9f1596 100644 --- a/docs/examples/teams/delete-membership.md +++ b/docs/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/teams/delete.md b/docs/examples/teams/delete.md index 5b01815..04d5e4e 100644 --- a/docs/examples/teams/delete.md +++ b/docs/examples/teams/delete.md @@ -1,2 +1,2 @@ appwrite teams delete \ - --teamId + --team-id diff --git a/docs/examples/teams/get-membership.md b/docs/examples/teams/get-membership.md index 5e6af4c..a832b23 100644 --- a/docs/examples/teams/get-membership.md +++ b/docs/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/teams/get-prefs.md b/docs/examples/teams/get-prefs.md index 2ab1f1d..a2d456a 100644 --- a/docs/examples/teams/get-prefs.md +++ b/docs/examples/teams/get-prefs.md @@ -1,2 +1,2 @@ -appwrite teams getPrefs \ - --teamId +appwrite teams get-prefs \ + --team-id diff --git a/docs/examples/teams/get.md b/docs/examples/teams/get.md index c8e75b7..94f80a9 100644 --- a/docs/examples/teams/get.md +++ b/docs/examples/teams/get.md @@ -1,2 +1,2 @@ appwrite teams get \ - --teamId + --team-id diff --git a/docs/examples/teams/list-logs.md b/docs/examples/teams/list-logs.md index 6614935..cbdf32a 100644 --- a/docs/examples/teams/list-logs.md +++ b/docs/examples/teams/list-logs.md @@ -1,3 +1,2 @@ -appwrite teams listLogs \ - --teamId \ - +appwrite teams list-logs \ + --team-id diff --git a/docs/examples/teams/list-memberships.md b/docs/examples/teams/list-memberships.md index 050ea96..6a1cbca 100644 --- a/docs/examples/teams/list-memberships.md +++ b/docs/examples/teams/list-memberships.md @@ -1,4 +1,2 @@ -appwrite teams listMemberships \ - --teamId \ - - +appwrite teams list-memberships \ + --team-id diff --git a/docs/examples/teams/list.md b/docs/examples/teams/list.md index dfffc4d..90ab82f 100644 --- a/docs/examples/teams/list.md +++ b/docs/examples/teams/list.md @@ -1,3 +1 @@ -appwrite teams list \ - - +appwrite teams list diff --git a/docs/examples/teams/update-membership-status.md b/docs/examples/teams/update-membership-status.md index aa4acf9..9c234f5 100644 --- a/docs/examples/teams/update-membership-status.md +++ b/docs/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/teams/update-membership.md b/docs/examples/teams/update-membership.md index 6cfda92..f16c776 100644 --- a/docs/examples/teams/update-membership.md +++ b/docs/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/teams/update-name.md b/docs/examples/teams/update-name.md index 8c73e00..cc803fb 100644 --- a/docs/examples/teams/update-name.md +++ b/docs/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/teams/update-prefs.md b/docs/examples/teams/update-prefs.md index b6fc5a8..a8ce426 100644 --- a/docs/examples/teams/update-prefs.md +++ b/docs/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/tokens/create-file-token.md b/docs/examples/tokens/create-file-token.md index 8de8d7a..3890041 100644 --- a/docs/examples/tokens/create-file-token.md +++ b/docs/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/tokens/delete.md b/docs/examples/tokens/delete.md index c25ea4a..93c99a9 100644 --- a/docs/examples/tokens/delete.md +++ b/docs/examples/tokens/delete.md @@ -1,2 +1,2 @@ appwrite tokens delete \ - --tokenId + --token-id diff --git a/docs/examples/tokens/get.md b/docs/examples/tokens/get.md index 2c48280..617c112 100644 --- a/docs/examples/tokens/get.md +++ b/docs/examples/tokens/get.md @@ -1,2 +1,2 @@ appwrite tokens get \ - --tokenId + --token-id diff --git a/docs/examples/tokens/list.md b/docs/examples/tokens/list.md index a808e54..95e0df3 100644 --- a/docs/examples/tokens/list.md +++ b/docs/examples/tokens/list.md @@ -1,4 +1,3 @@ appwrite tokens list \ - --bucketId \ - --fileId \ - + --bucket-id \ + --file-id diff --git a/docs/examples/tokens/update.md b/docs/examples/tokens/update.md index 73f2160..ab86424 100644 --- a/docs/examples/tokens/update.md +++ b/docs/examples/tokens/update.md @@ -1,3 +1,2 @@ appwrite tokens update \ - --tokenId \ - + --token-id diff --git a/docs/examples/users/create-argon-2-user.md b/docs/examples/users/create-argon-2-user.md new file mode 100644 index 0000000..fd2a7e4 --- /dev/null +++ b/docs/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/users/create-argon2user.md b/docs/examples/users/create-argon2user.md deleted file mode 100644 index b0c7494..0000000 --- a/docs/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/users/create-bcrypt-user.md b/docs/examples/users/create-bcrypt-user.md index b568672..e05d9e8 100644 --- a/docs/examples/users/create-bcrypt-user.md +++ b/docs/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/users/create-j-w-t.md b/docs/examples/users/create-j-w-t.md deleted file mode 100644 index 220086b..0000000 --- a/docs/examples/users/create-j-w-t.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite users createJWT \ - --userId \ - - diff --git a/docs/examples/users/create-jwt.md b/docs/examples/users/create-jwt.md new file mode 100644 index 0000000..508c0f6 --- /dev/null +++ b/docs/examples/users/create-jwt.md @@ -0,0 +1,2 @@ +appwrite users create-jwt \ + --user-id diff --git a/docs/examples/users/create-m-d5user.md b/docs/examples/users/create-m-d5user.md deleted file mode 100644 index ba37a78..0000000 --- a/docs/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/users/create-m-f-a-recovery-codes.md b/docs/examples/users/create-m-f-a-recovery-codes.md deleted file mode 100644 index b85c627..0000000 --- a/docs/examples/users/create-m-f-a-recovery-codes.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite users createMFARecoveryCodes \ - --userId diff --git a/docs/examples/users/create-md-5-user.md b/docs/examples/users/create-md-5-user.md new file mode 100644 index 0000000..f47b949 --- /dev/null +++ b/docs/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/users/create-mfa-recovery-codes.md b/docs/examples/users/create-mfa-recovery-codes.md index 4dbd98f..c212872 100644 --- a/docs/examples/users/create-mfa-recovery-codes.md +++ b/docs/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/users/create-p-h-pass-user.md b/docs/examples/users/create-p-h-pass-user.md deleted file mode 100644 index 9dc378d..0000000 --- a/docs/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/users/create-ph-pass-user.md b/docs/examples/users/create-ph-pass-user.md new file mode 100644 index 0000000..a404705 --- /dev/null +++ b/docs/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/users/create-s-h-a-user.md b/docs/examples/users/create-s-h-a-user.md deleted file mode 100644 index 5748362..0000000 --- a/docs/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/users/create-scrypt-modified-user.md b/docs/examples/users/create-scrypt-modified-user.md index 25fc60b..df4d651 100644 --- a/docs/examples/users/create-scrypt-modified-user.md +++ b/docs/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/users/create-scrypt-user.md b/docs/examples/users/create-scrypt-user.md index 3fc56b1..2f911b5 100644 --- a/docs/examples/users/create-scrypt-user.md +++ b/docs/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/users/create-session.md b/docs/examples/users/create-session.md index c8938fa..2644dce 100644 --- a/docs/examples/users/create-session.md +++ b/docs/examples/users/create-session.md @@ -1,2 +1,2 @@ -appwrite users createSession \ - --userId +appwrite users create-session \ + --user-id diff --git a/docs/examples/users/create-sha-user.md b/docs/examples/users/create-sha-user.md new file mode 100644 index 0000000..6965698 --- /dev/null +++ b/docs/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/users/create-target.md b/docs/examples/users/create-target.md index 8d9306b..d0775c9 100644 --- a/docs/examples/users/create-target.md +++ b/docs/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/users/create-token.md b/docs/examples/users/create-token.md index 9962e72..30b7812 100644 --- a/docs/examples/users/create-token.md +++ b/docs/examples/users/create-token.md @@ -1,4 +1,2 @@ -appwrite users createToken \ - --userId \ - - +appwrite users create-token \ + --user-id diff --git a/docs/examples/users/create.md b/docs/examples/users/create.md index e828f56..1103eaf 100644 --- a/docs/examples/users/create.md +++ b/docs/examples/users/create.md @@ -1,6 +1,2 @@ appwrite users create \ - --userId \ - - - - + --user-id diff --git a/docs/examples/users/delete-identity.md b/docs/examples/users/delete-identity.md index f3d2d6d..602a7d0 100644 --- a/docs/examples/users/delete-identity.md +++ b/docs/examples/users/delete-identity.md @@ -1,2 +1,2 @@ -appwrite users deleteIdentity \ - --identityId +appwrite users delete-identity \ + --identity-id diff --git a/docs/examples/users/delete-m-f-a-authenticator.md b/docs/examples/users/delete-m-f-a-authenticator.md deleted file mode 100644 index 8ef5597..0000000 --- a/docs/examples/users/delete-m-f-a-authenticator.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite users deleteMFAAuthenticator \ - --userId \ - --type totp diff --git a/docs/examples/users/delete-mfa-authenticator.md b/docs/examples/users/delete-mfa-authenticator.md index edc67d0..a0fcc70 100644 --- a/docs/examples/users/delete-mfa-authenticator.md +++ b/docs/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/users/delete-session.md b/docs/examples/users/delete-session.md index 9f1fbdb..f638b83 100644 --- a/docs/examples/users/delete-session.md +++ b/docs/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/users/delete-sessions.md b/docs/examples/users/delete-sessions.md index 4c683d2..eb038cc 100644 --- a/docs/examples/users/delete-sessions.md +++ b/docs/examples/users/delete-sessions.md @@ -1,2 +1,2 @@ -appwrite users deleteSessions \ - --userId +appwrite users delete-sessions \ + --user-id diff --git a/docs/examples/users/delete-target.md b/docs/examples/users/delete-target.md index e978091..e6410dd 100644 --- a/docs/examples/users/delete-target.md +++ b/docs/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/users/delete.md b/docs/examples/users/delete.md index 293a5b0..00f8f9c 100644 --- a/docs/examples/users/delete.md +++ b/docs/examples/users/delete.md @@ -1,2 +1,2 @@ appwrite users delete \ - --userId + --user-id diff --git a/docs/examples/users/get-m-f-a-recovery-codes.md b/docs/examples/users/get-m-f-a-recovery-codes.md deleted file mode 100644 index 6d5ccf3..0000000 --- a/docs/examples/users/get-m-f-a-recovery-codes.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite users getMFARecoveryCodes \ - --userId diff --git a/docs/examples/users/get-mfa-recovery-codes.md b/docs/examples/users/get-mfa-recovery-codes.md index cefcce6..cbb7582 100644 --- a/docs/examples/users/get-mfa-recovery-codes.md +++ b/docs/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/users/get-prefs.md b/docs/examples/users/get-prefs.md index 324aa4f..45d01a6 100644 --- a/docs/examples/users/get-prefs.md +++ b/docs/examples/users/get-prefs.md @@ -1,2 +1,2 @@ -appwrite users getPrefs \ - --userId +appwrite users get-prefs \ + --user-id diff --git a/docs/examples/users/get-target.md b/docs/examples/users/get-target.md index b80dbd9..1be3c0e 100644 --- a/docs/examples/users/get-target.md +++ b/docs/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/users/get-usage.md b/docs/examples/users/get-usage.md index ad7895d..a4d13e7 100644 --- a/docs/examples/users/get-usage.md +++ b/docs/examples/users/get-usage.md @@ -1,2 +1 @@ -appwrite users getUsage \ - +appwrite users get-usage diff --git a/docs/examples/users/get.md b/docs/examples/users/get.md index 47002c5..341844c 100644 --- a/docs/examples/users/get.md +++ b/docs/examples/users/get.md @@ -1,2 +1,2 @@ appwrite users get \ - --userId + --user-id diff --git a/docs/examples/users/list-identities.md b/docs/examples/users/list-identities.md index c6cd6d5..d4fa82f 100644 --- a/docs/examples/users/list-identities.md +++ b/docs/examples/users/list-identities.md @@ -1,3 +1 @@ -appwrite users listIdentities \ - - +appwrite users list-identities diff --git a/docs/examples/users/list-logs.md b/docs/examples/users/list-logs.md index 0b0bc1f..d2b95be 100644 --- a/docs/examples/users/list-logs.md +++ b/docs/examples/users/list-logs.md @@ -1,3 +1,2 @@ -appwrite users listLogs \ - --userId \ - +appwrite users list-logs \ + --user-id diff --git a/docs/examples/users/list-m-f-a-factors.md b/docs/examples/users/list-m-f-a-factors.md deleted file mode 100644 index 67a9c09..0000000 --- a/docs/examples/users/list-m-f-a-factors.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite users listMFAFactors \ - --userId diff --git a/docs/examples/users/list-memberships.md b/docs/examples/users/list-memberships.md index 119f446..f027e4a 100644 --- a/docs/examples/users/list-memberships.md +++ b/docs/examples/users/list-memberships.md @@ -1,4 +1,2 @@ -appwrite users listMemberships \ - --userId \ - - +appwrite users list-memberships \ + --user-id diff --git a/docs/examples/users/list-mfa-factors.md b/docs/examples/users/list-mfa-factors.md index e5d111b..d2cadf5 100644 --- a/docs/examples/users/list-mfa-factors.md +++ b/docs/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/users/list-sessions.md b/docs/examples/users/list-sessions.md index cb85d15..761447a 100644 --- a/docs/examples/users/list-sessions.md +++ b/docs/examples/users/list-sessions.md @@ -1,2 +1,2 @@ -appwrite users listSessions \ - --userId +appwrite users list-sessions \ + --user-id diff --git a/docs/examples/users/list-targets.md b/docs/examples/users/list-targets.md index 9b5614b..26330e8 100644 --- a/docs/examples/users/list-targets.md +++ b/docs/examples/users/list-targets.md @@ -1,3 +1,2 @@ -appwrite users listTargets \ - --userId \ - +appwrite users list-targets \ + --user-id diff --git a/docs/examples/users/list.md b/docs/examples/users/list.md index e5fdb9e..94057ad 100644 --- a/docs/examples/users/list.md +++ b/docs/examples/users/list.md @@ -1,3 +1 @@ -appwrite users list \ - - +appwrite users list diff --git a/docs/examples/users/update-email-verification.md b/docs/examples/users/update-email-verification.md index 990436f..9f4788a 100644 --- a/docs/examples/users/update-email-verification.md +++ b/docs/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/users/update-email.md b/docs/examples/users/update-email.md index cce20e9..f02b79d 100644 --- a/docs/examples/users/update-email.md +++ b/docs/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/users/update-labels.md b/docs/examples/users/update-labels.md index ca60c59..5963768 100644 --- a/docs/examples/users/update-labels.md +++ b/docs/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/users/update-m-f-a-recovery-codes.md b/docs/examples/users/update-m-f-a-recovery-codes.md deleted file mode 100644 index ac70d85..0000000 --- a/docs/examples/users/update-m-f-a-recovery-codes.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite users updateMFARecoveryCodes \ - --userId diff --git a/docs/examples/users/update-m-f-a.md b/docs/examples/users/update-m-f-a.md deleted file mode 100644 index 2cf7b78..0000000 --- a/docs/examples/users/update-m-f-a.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite users updateMFA \ - --userId \ - --mfa false diff --git a/docs/examples/users/update-mfa-recovery-codes.md b/docs/examples/users/update-mfa-recovery-codes.md index 63fb7f2..4f63119 100644 --- a/docs/examples/users/update-mfa-recovery-codes.md +++ b/docs/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/users/update-mfa.md b/docs/examples/users/update-mfa.md index 3ccdbd8..1d36d9e 100644 --- a/docs/examples/users/update-mfa.md +++ b/docs/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/users/update-name.md b/docs/examples/users/update-name.md index 9bf20eb..2f0d078 100644 --- a/docs/examples/users/update-name.md +++ b/docs/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/users/update-password.md b/docs/examples/users/update-password.md index c05197b..ec320c2 100644 --- a/docs/examples/users/update-password.md +++ b/docs/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/users/update-phone-verification.md b/docs/examples/users/update-phone-verification.md index b88a282..2cf56b2 100644 --- a/docs/examples/users/update-phone-verification.md +++ b/docs/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/users/update-phone.md b/docs/examples/users/update-phone.md index 118c8e3..d1b7db3 100644 --- a/docs/examples/users/update-phone.md +++ b/docs/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/users/update-prefs.md b/docs/examples/users/update-prefs.md index f3fa995..b4e27cd 100644 --- a/docs/examples/users/update-prefs.md +++ b/docs/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/users/update-status.md b/docs/examples/users/update-status.md index b587b70..f7c1bb4 100644 --- a/docs/examples/users/update-status.md +++ b/docs/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/users/update-target.md b/docs/examples/users/update-target.md index d6541a0..1fa4b7a 100644 --- a/docs/examples/users/update-target.md +++ b/docs/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/vcs/create-repository-detection.md b/docs/examples/vcs/create-repository-detection.md index d12a093..d10eac8 100644 --- a/docs/examples/vcs/create-repository-detection.md +++ b/docs/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/vcs/create-repository.md b/docs/examples/vcs/create-repository.md index a4934d5..fa9206c 100644 --- a/docs/examples/vcs/create-repository.md +++ b/docs/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/vcs/delete-installation.md b/docs/examples/vcs/delete-installation.md index f7d3a92..ae9fd33 100644 --- a/docs/examples/vcs/delete-installation.md +++ b/docs/examples/vcs/delete-installation.md @@ -1,2 +1,2 @@ -appwrite vcs deleteInstallation \ - --installationId +appwrite vcs delete-installation \ + --installation-id diff --git a/docs/examples/vcs/get-installation.md b/docs/examples/vcs/get-installation.md index df51853..e589d60 100644 --- a/docs/examples/vcs/get-installation.md +++ b/docs/examples/vcs/get-installation.md @@ -1,2 +1,2 @@ -appwrite vcs getInstallation \ - --installationId +appwrite vcs get-installation \ + --installation-id diff --git a/docs/examples/vcs/get-repository-contents.md b/docs/examples/vcs/get-repository-contents.md index 3ba8d75..786d220 100644 --- a/docs/examples/vcs/get-repository-contents.md +++ b/docs/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/vcs/get-repository.md b/docs/examples/vcs/get-repository.md index 9f88e18..10ab555 100644 --- a/docs/examples/vcs/get-repository.md +++ b/docs/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/vcs/list-installations.md b/docs/examples/vcs/list-installations.md index a0af28d..92e13bf 100644 --- a/docs/examples/vcs/list-installations.md +++ b/docs/examples/vcs/list-installations.md @@ -1,3 +1 @@ -appwrite vcs listInstallations \ - - +appwrite vcs list-installations diff --git a/docs/examples/vcs/list-repositories.md b/docs/examples/vcs/list-repositories.md index 15c3a64..7a32140 100644 --- a/docs/examples/vcs/list-repositories.md +++ b/docs/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/vcs/list-repository-branches.md b/docs/examples/vcs/list-repository-branches.md index ea2fbd2..c603673 100644 --- a/docs/examples/vcs/list-repository-branches.md +++ b/docs/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/vcs/update-external-deployments.md b/docs/examples/vcs/update-external-deployments.md index 417b594..f83891c 100644 --- a/docs/examples/vcs/update-external-deployments.md +++ b/docs/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/index.js b/index.js index 5b79e2e..7c717be 100644 --- a/index.js +++ b/index.js @@ -34,7 +34,7 @@ const { projects } = require("./lib/commands/projects"); const { proxy } = require("./lib/commands/proxy"); const { sites } = require("./lib/commands/sites"); const { storage } = require("./lib/commands/storage"); -const { tablesdb } = require("./lib/commands/tablesdb"); +const { tablesDB } = require("./lib/commands/tables-db"); const { teams } = require("./lib/commands/teams"); const { tokens } = require("./lib/commands/tokens"); const { users } = require("./lib/commands/users"); diff --git a/lib/commands/account.js b/lib/commands/account.js index df5f669..ae15e38 100644 --- a/lib/commands/account.js +++ b/lib/commands/account.js @@ -71,7 +71,6 @@ const accountGet = async ({parseOutput = true, overrideForCli = false, sdk = und return response; } - /** * @typedef {Object} AccountCreateRequestParams * @property {string} userId 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. @@ -117,7 +116,6 @@ const accountCreate = async ({userId,email,password,name,parseOutput = true, ove return response; } - /** * @typedef {Object} AccountDeleteRequestParams * @property {boolean} overrideForCli @@ -147,7 +145,6 @@ const accountDelete = async ({parseOutput = true, overrideForCli = false, sdk = return response; } - /** * @typedef {Object} AccountUpdateEmailRequestParams * @property {string} email User email. @@ -185,7 +182,6 @@ const accountUpdateEmail = async ({email,password,parseOutput = true, overrideFo return response; } - /** * @typedef {Object} AccountListIdentitiesRequestParams * @property {string[]} queries 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: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry @@ -218,7 +214,6 @@ const accountListIdentities = async ({queries,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} AccountDeleteIdentityRequestParams * @property {string} identityId Identity ID. @@ -249,7 +244,6 @@ const accountDeleteIdentity = async ({identityId,parseOutput = true, overrideFor return response; } - /** * @typedef {Object} AccountCreateJWTRequestParams * @property {boolean} overrideForCli @@ -279,7 +273,6 @@ const accountCreateJWT = async ({parseOutput = true, overrideForCli = false, sdk return response; } - /** * @typedef {Object} AccountListLogsRequestParams * @property {string[]} queries 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 @@ -312,7 +305,6 @@ const accountListLogs = async ({queries,parseOutput = true, overrideForCli = fal return response; } - /** * @typedef {Object} AccountUpdateMFARequestParams * @property {boolean} mfa Enable or disable MFA. @@ -346,38 +338,6 @@ const accountUpdateMFA = async ({mfa,parseOutput = true, overrideForCli = false, return response; } - -/** - * @typedef {Object} AccountCreateMfaAuthenticatorRequestParams - * @property {AuthenticatorType} type Type of authenticator. Must be 'totp' - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {AccountCreateMfaAuthenticatorRequestParams} params - */ -const accountCreateMfaAuthenticator = async ({type,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type); - let payload = {}; - - let response = undefined; - - response = await client.call('post', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} AccountCreateMFAAuthenticatorRequestParams * @property {AuthenticatorType} type Type of authenticator. Must be 'totp' @@ -408,42 +368,6 @@ const accountCreateMFAAuthenticator = async ({type,parseOutput = true, overrideF return response; } - -/** - * @typedef {Object} AccountUpdateMfaAuthenticatorRequestParams - * @property {AuthenticatorType} type Type of authenticator. - * @property {string} otp Valid verification token. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {AccountUpdateMfaAuthenticatorRequestParams} params - */ -const accountUpdateMfaAuthenticator = async ({type,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type); - let payload = {}; - if (typeof otp !== 'undefined') { - payload['otp'] = otp; - } - - let response = undefined; - - response = await client.call('put', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} AccountUpdateMFAAuthenticatorRequestParams * @property {AuthenticatorType} type Type of authenticator. @@ -478,38 +402,6 @@ const accountUpdateMFAAuthenticator = async ({type,otp,parseOutput = true, overr return response; } - -/** - * @typedef {Object} AccountDeleteMfaAuthenticatorRequestParams - * @property {AuthenticatorType} type Type of authenticator. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {AccountDeleteMfaAuthenticatorRequestParams} params - */ -const accountDeleteMfaAuthenticator = async ({type,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type); - let payload = {}; - - let response = undefined; - - response = await client.call('delete', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} AccountDeleteMFAAuthenticatorRequestParams * @property {AuthenticatorType} type Type of authenticator. @@ -540,41 +432,6 @@ const accountDeleteMFAAuthenticator = async ({type,parseOutput = true, overrideF return response; } - -/** - * @typedef {Object} AccountCreateMfaChallengeRequestParams - * @property {AuthenticationFactor} factor Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {AccountCreateMfaChallengeRequestParams} params - */ -const accountCreateMfaChallenge = async ({factor,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/account/mfa/challenge'; - let payload = {}; - if (typeof factor !== 'undefined') { - payload['factor'] = factor; - } - - let response = undefined; - - response = await client.call('post', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} AccountCreateMFAChallengeRequestParams * @property {AuthenticationFactor} factor Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'. @@ -608,45 +465,6 @@ const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideFor return response; } - -/** - * @typedef {Object} AccountUpdateMfaChallengeRequestParams - * @property {string} challengeId ID of the challenge. - * @property {string} otp Valid verification token. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {AccountUpdateMfaChallengeRequestParams} params - */ -const accountUpdateMfaChallenge = async ({challengeId,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/account/mfa/challenge'; - let payload = {}; - if (typeof challengeId !== 'undefined') { - payload['challengeId'] = challengeId; - } - if (typeof otp !== 'undefined') { - payload['otp'] = otp; - } - - let response = undefined; - - response = await client.call('put', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} AccountUpdateMFAChallengeRequestParams * @property {string} challengeId ID of the challenge. @@ -684,36 +502,6 @@ const accountUpdateMFAChallenge = async ({challengeId,otp,parseOutput = true, ov return response; } - -/** - * @typedef {Object} AccountListMfaFactorsRequestParams - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {AccountListMfaFactorsRequestParams} params - */ -const accountListMfaFactors = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/account/mfa/factors'; - let payload = {}; - - let response = undefined; - - response = await client.call('get', apiPath, { - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} AccountListMFAFactorsRequestParams * @property {boolean} overrideForCli @@ -742,36 +530,6 @@ const accountListMFAFactors = async ({parseOutput = true, overrideForCli = false return response; } - -/** - * @typedef {Object} AccountGetMfaRecoveryCodesRequestParams - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {AccountGetMfaRecoveryCodesRequestParams} params - */ -const accountGetMfaRecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/account/mfa/recovery-codes'; - let payload = {}; - - let response = undefined; - - response = await client.call('get', apiPath, { - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} AccountGetMFARecoveryCodesRequestParams * @property {boolean} overrideForCli @@ -800,37 +558,6 @@ const accountGetMFARecoveryCodes = async ({parseOutput = true, overrideForCli = return response; } - -/** - * @typedef {Object} AccountCreateMfaRecoveryCodesRequestParams - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {AccountCreateMfaRecoveryCodesRequestParams} params - */ -const accountCreateMfaRecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/account/mfa/recovery-codes'; - let payload = {}; - - let response = undefined; - - response = await client.call('post', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} AccountCreateMFARecoveryCodesRequestParams * @property {boolean} overrideForCli @@ -860,37 +587,6 @@ const accountCreateMFARecoveryCodes = async ({parseOutput = true, overrideForCli return response; } - -/** - * @typedef {Object} AccountUpdateMfaRecoveryCodesRequestParams - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {AccountUpdateMfaRecoveryCodesRequestParams} params - */ -const accountUpdateMfaRecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/account/mfa/recovery-codes'; - let payload = {}; - - let response = undefined; - - response = await client.call('patch', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} AccountUpdateMFARecoveryCodesRequestParams * @property {boolean} overrideForCli @@ -920,7 +616,6 @@ const accountUpdateMFARecoveryCodes = async ({parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} AccountUpdateNameRequestParams * @property {string} name User name. Max length: 128 chars. @@ -954,7 +649,6 @@ const accountUpdateName = async ({name,parseOutput = true, overrideForCli = fals return response; } - /** * @typedef {Object} AccountUpdatePasswordRequestParams * @property {string} password New user password. Must be at least 8 chars. @@ -992,7 +686,6 @@ const accountUpdatePassword = async ({password,oldPassword,parseOutput = true, o return response; } - /** * @typedef {Object} AccountUpdatePhoneRequestParams * @property {string} phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. @@ -1030,7 +723,6 @@ const accountUpdatePhone = async ({phone,password,parseOutput = true, overrideFo return response; } - /** * @typedef {Object} AccountGetPrefsRequestParams * @property {boolean} overrideForCli @@ -1059,7 +751,6 @@ const accountGetPrefs = async ({parseOutput = true, overrideForCli = false, sdk return response; } - /** * @typedef {Object} AccountUpdatePrefsRequestParams * @property {object} prefs Prefs key-value JSON object. @@ -1093,7 +784,6 @@ const accountUpdatePrefs = async ({prefs,parseOutput = true, overrideForCli = fa return response; } - /** * @typedef {Object} AccountCreateRecoveryRequestParams * @property {string} email User email. @@ -1131,7 +821,6 @@ const accountCreateRecovery = async ({email,url,parseOutput = true, overrideForC return response; } - /** * @typedef {Object} AccountUpdateRecoveryRequestParams * @property {string} userId User ID. @@ -1173,7 +862,6 @@ const accountUpdateRecovery = async ({userId,secret,password,parseOutput = true, return response; } - /** * @typedef {Object} AccountListSessionsRequestParams * @property {boolean} overrideForCli @@ -1206,7 +894,6 @@ const accountListSessions = async ({parseOutput = true, overrideForCli = false, return response; } - /** * @typedef {Object} AccountDeleteSessionsRequestParams * @property {boolean} overrideForCli @@ -1236,7 +923,6 @@ const accountDeleteSessions = async ({parseOutput = true, overrideForCli = false return response; } - /** * @typedef {Object} AccountCreateAnonymousSessionRequestParams * @property {boolean} overrideForCli @@ -1266,7 +952,6 @@ const accountCreateAnonymousSession = async ({parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} AccountCreateEmailPasswordSessionRequestParams * @property {string} email User email. @@ -1304,7 +989,6 @@ const accountCreateEmailPasswordSession = async ({email,password,parseOutput = t return response; } - /** * @typedef {Object} AccountUpdateMagicURLSessionRequestParams * @property {string} userId 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. @@ -1342,7 +1026,6 @@ const accountUpdateMagicURLSession = async ({userId,secret,parseOutput = true, o return response; } - /** * @typedef {Object} AccountCreateOAuth2SessionRequestParams * @property {OAuthProvider} provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom. @@ -1384,7 +1067,6 @@ const accountCreateOAuth2Session = async ({provider,success,failure,scopes,parse return response; } - /** * @typedef {Object} AccountUpdatePhoneSessionRequestParams * @property {string} userId 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. @@ -1422,7 +1104,6 @@ const accountUpdatePhoneSession = async ({userId,secret,parseOutput = true, over return response; } - /** * @typedef {Object} AccountCreateSessionRequestParams * @property {string} userId 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. @@ -1460,7 +1141,6 @@ const accountCreateSession = async ({userId,secret,parseOutput = true, overrideF return response; } - /** * @typedef {Object} AccountGetSessionRequestParams * @property {string} sessionId Session ID. Use the string 'current' to get the current device session. @@ -1490,7 +1170,6 @@ const accountGetSession = async ({sessionId,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} AccountUpdateSessionRequestParams * @property {string} sessionId Session ID. Use the string 'current' to update the current device session. @@ -1521,7 +1200,6 @@ const accountUpdateSession = async ({sessionId,parseOutput = true, overrideForCl return response; } - /** * @typedef {Object} AccountDeleteSessionRequestParams * @property {string} sessionId Session ID. Use the string 'current' to delete the current device session. @@ -1552,7 +1230,6 @@ const accountDeleteSession = async ({sessionId,parseOutput = true, overrideForCl return response; } - /** * @typedef {Object} AccountUpdateStatusRequestParams * @property {boolean} overrideForCli @@ -1582,7 +1259,6 @@ const accountUpdateStatus = async ({parseOutput = true, overrideForCli = false, return response; } - /** * @typedef {Object} AccountCreatePushTargetRequestParams * @property {string} targetId Target 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. @@ -1624,7 +1300,6 @@ const accountCreatePushTarget = async ({targetId,identifier,providerId,parseOutp return response; } - /** * @typedef {Object} AccountUpdatePushTargetRequestParams * @property {string} targetId Target ID. @@ -1659,7 +1334,6 @@ const accountUpdatePushTarget = async ({targetId,identifier,parseOutput = true, return response; } - /** * @typedef {Object} AccountDeletePushTargetRequestParams * @property {string} targetId Target ID. @@ -1690,7 +1364,6 @@ const accountDeletePushTarget = async ({targetId,parseOutput = true, overrideFor return response; } - /** * @typedef {Object} AccountCreateEmailTokenRequestParams * @property {string} userId 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. @@ -1732,7 +1405,6 @@ const accountCreateEmailToken = async ({userId,email,phrase,parseOutput = true, return response; } - /** * @typedef {Object} AccountCreateMagicURLTokenRequestParams * @property {string} userId 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. @@ -1778,7 +1450,6 @@ const accountCreateMagicURLToken = async ({userId,email,url,phrase,parseOutput = return response; } - /** * @typedef {Object} AccountCreateOAuth2TokenRequestParams * @property {OAuthProvider} provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom. @@ -1820,7 +1491,6 @@ const accountCreateOAuth2Token = async ({provider,success,failure,scopes,parseOu return response; } - /** * @typedef {Object} AccountCreatePhoneTokenRequestParams * @property {string} userId 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. @@ -1858,7 +1528,6 @@ const accountCreatePhoneToken = async ({userId,phone,parseOutput = true, overrid return response; } - /** * @typedef {Object} AccountCreateVerificationRequestParams * @property {string} url URL to redirect the user back to your app from the verification email. 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. @@ -1892,7 +1561,6 @@ const accountCreateVerification = async ({url,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} AccountUpdateVerificationRequestParams * @property {string} userId User ID. @@ -1930,7 +1598,6 @@ const accountUpdateVerification = async ({userId,secret,parseOutput = true, over return response; } - /** * @typedef {Object} AccountCreatePhoneVerificationRequestParams * @property {boolean} overrideForCli @@ -1960,7 +1627,6 @@ const accountCreatePhoneVerification = async ({parseOutput = true, overrideForCl return response; } - /** * @typedef {Object} AccountUpdatePhoneVerificationRequestParams * @property {string} userId User ID. @@ -1998,7 +1664,6 @@ const accountUpdatePhoneVerification = async ({userId,secret,parseOutput = true, return response; } - account .command(`get`) .description(`Get the currently logged in user.`) @@ -2055,25 +1720,12 @@ account .requiredOption(`--mfa [value]`, `Enable or disable MFA.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(accountUpdateMFA)) -account - .command(`create-mfa-authenticator`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'account create-mfa-authenticator' instead] 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.`) - .requiredOption(`--type `, `Type of authenticator. Must be 'totp'`) - .action(actionRunner(accountCreateMfaAuthenticator)) - account .command(`create-mfa-authenticator`) .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.`) .requiredOption(`--type `, `Type of authenticator. Must be 'totp'`) .action(actionRunner(accountCreateMFAAuthenticator)) -account - .command(`update-mfa-authenticator`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'account update-mfa-authenticator' instead] Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.`) - .requiredOption(`--type `, `Type of authenticator.`) - .requiredOption(`--otp `, `Valid verification token.`) - .action(actionRunner(accountUpdateMfaAuthenticator)) - account .command(`update-mfa-authenticator`) .description(`Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.`) @@ -2081,37 +1733,18 @@ account .requiredOption(`--otp `, `Valid verification token.`) .action(actionRunner(accountUpdateMFAAuthenticator)) -account - .command(`delete-mfa-authenticator`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'account delete-mfa-authenticator' instead] Delete an authenticator for a user by ID.`) - .requiredOption(`--type `, `Type of authenticator.`) - .action(actionRunner(accountDeleteMfaAuthenticator)) - account .command(`delete-mfa-authenticator`) .description(`Delete an authenticator for a user by ID.`) .requiredOption(`--type `, `Type of authenticator.`) .action(actionRunner(accountDeleteMFAAuthenticator)) -account - .command(`create-mfa-challenge`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'account create-mfa-challenge' instead] Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.`) - .requiredOption(`--factor `, `Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'.`) - .action(actionRunner(accountCreateMfaChallenge)) - account .command(`create-mfa-challenge`) .description(`Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.`) .requiredOption(`--factor `, `Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'.`) .action(actionRunner(accountCreateMFAChallenge)) -account - .command(`update-mfa-challenge`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'account update-mfa-challenge' instead] 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.`) - .requiredOption(`--challenge-id `, `ID of the challenge.`) - .requiredOption(`--otp `, `Valid verification token.`) - .action(actionRunner(accountUpdateMfaChallenge)) - account .command(`update-mfa-challenge`) .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.`) @@ -2119,41 +1752,21 @@ account .requiredOption(`--otp `, `Valid verification token.`) .action(actionRunner(accountUpdateMFAChallenge)) -account - .command(`list-mfa-factors`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'account list-mfa-factors' instead] List the factors available on the account to be used as a MFA challange.`) - .action(actionRunner(accountListMfaFactors)) - account .command(`list-mfa-factors`) .description(`List the factors available on the account to be used as a MFA challange.`) .action(actionRunner(accountListMFAFactors)) -account - .command(`get-mfa-recovery-codes`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'account get-mfa-recovery-codes' instead] 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.`) - .action(actionRunner(accountGetMfaRecoveryCodes)) - account .command(`get-mfa-recovery-codes`) .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.`) .action(actionRunner(accountGetMFARecoveryCodes)) -account - .command(`create-mfa-recovery-codes`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'account create-mfa-recovery-codes' instead] 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.`) - .action(actionRunner(accountCreateMfaRecoveryCodes)) - account .command(`create-mfa-recovery-codes`) .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.`) .action(actionRunner(accountCreateMFARecoveryCodes)) -account - .command(`update-mfa-recovery-codes`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'account update-mfa-recovery-codes' instead] 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.`) - .action(actionRunner(accountUpdateMfaRecoveryCodes)) - account .command(`update-mfa-recovery-codes`) .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.`) @@ -2371,23 +1984,14 @@ module.exports = { accountCreateJWT, accountListLogs, accountUpdateMFA, - accountCreateMfaAuthenticator, accountCreateMFAAuthenticator, - accountUpdateMfaAuthenticator, accountUpdateMFAAuthenticator, - accountDeleteMfaAuthenticator, accountDeleteMFAAuthenticator, - accountCreateMfaChallenge, accountCreateMFAChallenge, - accountUpdateMfaChallenge, accountUpdateMFAChallenge, - accountListMfaFactors, accountListMFAFactors, - accountGetMfaRecoveryCodes, accountGetMFARecoveryCodes, - accountCreateMfaRecoveryCodes, accountCreateMFARecoveryCodes, - accountUpdateMfaRecoveryCodes, accountUpdateMFARecoveryCodes, accountUpdateName, accountUpdatePassword, diff --git a/lib/commands/avatars.js b/lib/commands/avatars.js index 5707995..e4818eb 100644 --- a/lib/commands/avatars.js +++ b/lib/commands/avatars.js @@ -92,7 +92,6 @@ const avatarsGetBrowser = async ({code,width,height,quality,parseOutput = true, return response; } - /** * @typedef {Object} AvatarsGetCreditCardRequestParams * @property {CreditCard} code 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. @@ -146,7 +145,6 @@ const avatarsGetCreditCard = async ({code,width,height,quality,parseOutput = tru return response; } - /** * @typedef {Object} AvatarsGetFaviconRequestParams * @property {string} url Website URL which you want to fetch the favicon from. @@ -191,7 +189,6 @@ const avatarsGetFavicon = async ({url,parseOutput = true, overrideForCli = false return response; } - /** * @typedef {Object} AvatarsGetFlagRequestParams * @property {Flag} code Country Code. ISO Alpha-2 country code format. @@ -245,7 +242,6 @@ const avatarsGetFlag = async ({code,width,height,quality,parseOutput = true, ove return response; } - /** * @typedef {Object} AvatarsGetImageRequestParams * @property {string} url Image URL which you want to crop. @@ -298,7 +294,6 @@ const avatarsGetImage = async ({url,width,height,parseOutput = true, overrideFor return response; } - /** * @typedef {Object} AvatarsGetInitialsRequestParams * @property {string} name Full Name. When empty, current user name or email will be used. Max length: 128 chars. @@ -355,7 +350,6 @@ const avatarsGetInitials = async ({name,width,height,background,parseOutput = tr return response; } - /** * @typedef {Object} AvatarsGetQRRequestParams * @property {string} text Plain text to be converted to QR code image. @@ -412,7 +406,6 @@ const avatarsGetQR = async ({text,size,margin,download,parseOutput = true, overr return response; } - avatars .command(`get-browser`) .description(`You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings. When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.`) diff --git a/lib/commands/console.js b/lib/commands/console.js index 8fa5e22..967d2aa 100644 --- a/lib/commands/console.js +++ b/lib/commands/console.js @@ -79,7 +79,6 @@ const consoleGetResource = async ({value,type,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} ConsoleVariablesRequestParams * @property {boolean} overrideForCli @@ -108,7 +107,6 @@ const consoleVariables = async ({parseOutput = true, overrideForCli = false, sdk return response; } - console .command(`get-resource`) .description(`Check if a resource ID is available.`) diff --git a/lib/commands/databases.js b/lib/commands/databases.js index 4aadcb7..7308bc0 100644 --- a/lib/commands/databases.js +++ b/lib/commands/databases.js @@ -79,7 +79,6 @@ const databasesList = async ({queries,search,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} DatabasesCreateRequestParams * @property {string} databaseId 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. @@ -121,7 +120,6 @@ const databasesCreate = async ({databaseId,name,enabled,parseOutput = true, over return response; } - /** * @typedef {Object} DatabasesListUsageRequestParams * @property {UsageRange} range Date range. @@ -158,7 +156,6 @@ const databasesListUsage = async ({range,parseOutput = true, overrideForCli = fa return response; } - /** * @typedef {Object} DatabasesGetRequestParams * @property {string} databaseId Database ID. @@ -192,7 +189,6 @@ const databasesGet = async ({databaseId,parseOutput = true, overrideForCli = fal return response; } - /** * @typedef {Object} DatabasesUpdateRequestParams * @property {string} databaseId Database ID. @@ -231,7 +227,6 @@ const databasesUpdate = async ({databaseId,name,enabled,parseOutput = true, over return response; } - /** * @typedef {Object} DatabasesDeleteRequestParams * @property {string} databaseId Database ID. @@ -262,7 +257,6 @@ const databasesDelete = async ({databaseId,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} DatabasesListCollectionsRequestParams * @property {string} databaseId Database ID. @@ -304,7 +298,6 @@ const databasesListCollections = async ({databaseId,queries,search,parseOutput = return response; } - /** * @typedef {Object} DatabasesCreateCollectionRequestParams * @property {string} databaseId Database ID. @@ -356,7 +349,6 @@ const databasesCreateCollection = async ({databaseId,collectionId,name,permissio return response; } - /** * @typedef {Object} DatabasesGetCollectionRequestParams * @property {string} databaseId Database ID. @@ -391,7 +383,6 @@ const databasesGetCollection = async ({databaseId,collectionId,parseOutput = tru return response; } - /** * @typedef {Object} DatabasesUpdateCollectionRequestParams * @property {string} databaseId Database ID. @@ -440,7 +431,6 @@ const databasesUpdateCollection = async ({databaseId,collectionId,name,permissio return response; } - /** * @typedef {Object} DatabasesDeleteCollectionRequestParams * @property {string} databaseId Database ID. @@ -472,7 +462,6 @@ const databasesDeleteCollection = async ({databaseId,collectionId,parseOutput = return response; } - /** * @typedef {Object} DatabasesListAttributesRequestParams * @property {string} databaseId Database ID. @@ -511,7 +500,6 @@ const databasesListAttributes = async ({databaseId,collectionId,queries,parseOut return response; } - /** * @typedef {Object} DatabasesCreateBooleanAttributeRequestParams * @property {string} databaseId Database ID. @@ -559,7 +547,6 @@ const databasesCreateBooleanAttribute = async ({databaseId,collectionId,key,requ return response; } - /** * @typedef {Object} DatabasesUpdateBooleanAttributeRequestParams * @property {string} databaseId Database ID. @@ -604,7 +591,6 @@ const databasesUpdateBooleanAttribute = async ({databaseId,collectionId,key,requ return response; } - /** * @typedef {Object} DatabasesCreateDatetimeAttributeRequestParams * @property {string} databaseId Database ID. @@ -652,7 +638,6 @@ const databasesCreateDatetimeAttribute = async ({databaseId,collectionId,key,req return response; } - /** * @typedef {Object} DatabasesUpdateDatetimeAttributeRequestParams * @property {string} databaseId Database ID. @@ -697,7 +682,6 @@ const databasesUpdateDatetimeAttribute = async ({databaseId,collectionId,key,req return response; } - /** * @typedef {Object} DatabasesCreateEmailAttributeRequestParams * @property {string} databaseId Database ID. @@ -745,7 +729,6 @@ const databasesCreateEmailAttribute = async ({databaseId,collectionId,key,requir return response; } - /** * @typedef {Object} DatabasesUpdateEmailAttributeRequestParams * @property {string} databaseId Database ID. @@ -790,7 +773,6 @@ const databasesUpdateEmailAttribute = async ({databaseId,collectionId,key,requir return response; } - /** * @typedef {Object} DatabasesCreateEnumAttributeRequestParams * @property {string} databaseId Database ID. @@ -843,7 +825,6 @@ const databasesCreateEnumAttribute = async ({databaseId,collectionId,key,element return response; } - /** * @typedef {Object} DatabasesUpdateEnumAttributeRequestParams * @property {string} databaseId Database ID. @@ -893,7 +874,6 @@ const databasesUpdateEnumAttribute = async ({databaseId,collectionId,key,element return response; } - /** * @typedef {Object} DatabasesCreateFloatAttributeRequestParams * @property {string} databaseId Database ID. @@ -949,7 +929,6 @@ const databasesCreateFloatAttribute = async ({databaseId,collectionId,key,requir return response; } - /** * @typedef {Object} DatabasesUpdateFloatAttributeRequestParams * @property {string} databaseId Database ID. @@ -1002,7 +981,6 @@ const databasesUpdateFloatAttribute = async ({databaseId,collectionId,key,requir return response; } - /** * @typedef {Object} DatabasesCreateIntegerAttributeRequestParams * @property {string} databaseId Database ID. @@ -1058,7 +1036,6 @@ const databasesCreateIntegerAttribute = async ({databaseId,collectionId,key,requ return response; } - /** * @typedef {Object} DatabasesUpdateIntegerAttributeRequestParams * @property {string} databaseId Database ID. @@ -1111,7 +1088,6 @@ const databasesUpdateIntegerAttribute = async ({databaseId,collectionId,key,requ return response; } - /** * @typedef {Object} DatabasesCreateIpAttributeRequestParams * @property {string} databaseId Database ID. @@ -1159,7 +1135,6 @@ const databasesCreateIpAttribute = async ({databaseId,collectionId,key,required, return response; } - /** * @typedef {Object} DatabasesUpdateIpAttributeRequestParams * @property {string} databaseId Database ID. @@ -1204,7 +1179,6 @@ const databasesUpdateIpAttribute = async ({databaseId,collectionId,key,required, return response; } - /** * @typedef {Object} DatabasesCreateRelationshipAttributeRequestParams * @property {string} databaseId Database ID. @@ -1260,7 +1234,6 @@ const databasesCreateRelationshipAttribute = async ({databaseId,collectionId,rel return response; } - /** * @typedef {Object} DatabasesCreateStringAttributeRequestParams * @property {string} databaseId Database ID. @@ -1316,7 +1289,6 @@ const databasesCreateStringAttribute = async ({databaseId,collectionId,key,size, return response; } - /** * @typedef {Object} DatabasesUpdateStringAttributeRequestParams * @property {string} databaseId Database ID. @@ -1365,7 +1337,6 @@ const databasesUpdateStringAttribute = async ({databaseId,collectionId,key,requi return response; } - /** * @typedef {Object} DatabasesCreateUrlAttributeRequestParams * @property {string} databaseId Database ID. @@ -1413,7 +1384,6 @@ const databasesCreateUrlAttribute = async ({databaseId,collectionId,key,required return response; } - /** * @typedef {Object} DatabasesUpdateUrlAttributeRequestParams * @property {string} databaseId Database ID. @@ -1458,7 +1428,6 @@ const databasesUpdateUrlAttribute = async ({databaseId,collectionId,key,required return response; } - /** * @typedef {Object} DatabasesGetAttributeRequestParams * @property {string} databaseId Database ID. @@ -1490,7 +1459,6 @@ const databasesGetAttribute = async ({databaseId,collectionId,key,parseOutput = return response; } - /** * @typedef {Object} DatabasesDeleteAttributeRequestParams * @property {string} databaseId Database ID. @@ -1523,7 +1491,6 @@ const databasesDeleteAttribute = async ({databaseId,collectionId,key,parseOutput return response; } - /** * @typedef {Object} DatabasesUpdateRelationshipAttributeRequestParams * @property {string} databaseId Database ID. @@ -1564,7 +1531,6 @@ const databasesUpdateRelationshipAttribute = async ({databaseId,collectionId,key return response; } - /** * @typedef {Object} DatabasesListDocumentsRequestParams * @property {string} databaseId Database ID. @@ -1603,7 +1569,6 @@ const databasesListDocuments = async ({databaseId,collectionId,queries,parseOutp return response; } - /** * @typedef {Object} DatabasesCreateDocumentRequestParams * @property {string} databaseId Database ID. @@ -1648,7 +1613,6 @@ const databasesCreateDocument = async ({databaseId,collectionId,documentId,data, return response; } - /** * @typedef {Object} DatabasesCreateDocumentsRequestParams * @property {string} databaseId Database ID. @@ -1685,7 +1649,6 @@ const databasesCreateDocuments = async ({databaseId,collectionId,documents,parse return response; } - /** * @typedef {Object} DatabasesUpsertDocumentsRequestParams * @property {string} databaseId Database ID. @@ -1722,7 +1685,6 @@ const databasesUpsertDocuments = async ({databaseId,collectionId,documents,parse return response; } - /** * @typedef {Object} DatabasesUpdateDocumentsRequestParams * @property {string} databaseId Database ID. @@ -1763,7 +1725,6 @@ const databasesUpdateDocuments = async ({databaseId,collectionId,data,queries,pa return response; } - /** * @typedef {Object} DatabasesDeleteDocumentsRequestParams * @property {string} databaseId Database ID. @@ -1800,7 +1761,6 @@ const databasesDeleteDocuments = async ({databaseId,collectionId,queries,parseOu return response; } - /** * @typedef {Object} DatabasesGetDocumentRequestParams * @property {string} databaseId Database ID. @@ -1840,7 +1800,6 @@ const databasesGetDocument = async ({databaseId,collectionId,documentId,queries, return response; } - /** * @typedef {Object} DatabasesUpsertDocumentRequestParams * @property {string} databaseId Database ID. @@ -1882,7 +1841,6 @@ const databasesUpsertDocument = async ({databaseId,collectionId,documentId,data, return response; } - /** * @typedef {Object} DatabasesUpdateDocumentRequestParams * @property {string} databaseId Database ID. @@ -1924,7 +1882,6 @@ const databasesUpdateDocument = async ({databaseId,collectionId,documentId,data, return response; } - /** * @typedef {Object} DatabasesDeleteDocumentRequestParams * @property {string} databaseId Database ID. @@ -1957,7 +1914,6 @@ const databasesDeleteDocument = async ({databaseId,collectionId,documentId,parse return response; } - /** * @typedef {Object} DatabasesListDocumentLogsRequestParams * @property {string} databaseId Database ID. @@ -1993,7 +1949,6 @@ const databasesListDocumentLogs = async ({databaseId,collectionId,documentId,que return response; } - /** * @typedef {Object} DatabasesDecrementDocumentAttributeRequestParams * @property {string} databaseId Database ID. @@ -2035,7 +1990,6 @@ const databasesDecrementDocumentAttribute = async ({databaseId,collectionId,docu return response; } - /** * @typedef {Object} DatabasesIncrementDocumentAttributeRequestParams * @property {string} databaseId Database ID. @@ -2077,7 +2031,6 @@ const databasesIncrementDocumentAttribute = async ({databaseId,collectionId,docu return response; } - /** * @typedef {Object} DatabasesListIndexesRequestParams * @property {string} databaseId Database ID. @@ -2116,7 +2069,6 @@ const databasesListIndexes = async ({databaseId,collectionId,queries,parseOutput return response; } - /** * @typedef {Object} DatabasesCreateIndexRequestParams * @property {string} databaseId Database ID. @@ -2171,7 +2123,6 @@ const databasesCreateIndex = async ({databaseId,collectionId,key,type,attributes return response; } - /** * @typedef {Object} DatabasesGetIndexRequestParams * @property {string} databaseId Database ID. @@ -2203,7 +2154,6 @@ const databasesGetIndex = async ({databaseId,collectionId,key,parseOutput = true return response; } - /** * @typedef {Object} DatabasesDeleteIndexRequestParams * @property {string} databaseId Database ID. @@ -2236,7 +2186,6 @@ const databasesDeleteIndex = async ({databaseId,collectionId,key,parseOutput = t return response; } - /** * @typedef {Object} DatabasesListCollectionLogsRequestParams * @property {string} databaseId Database ID. @@ -2271,7 +2220,6 @@ const databasesListCollectionLogs = async ({databaseId,collectionId,queries,pars return response; } - /** * @typedef {Object} DatabasesGetCollectionUsageRequestParams * @property {string} databaseId Database ID. @@ -2306,7 +2254,6 @@ const databasesGetCollectionUsage = async ({databaseId,collectionId,range,parseO return response; } - /** * @typedef {Object} DatabasesListLogsRequestParams * @property {string} databaseId Database ID. @@ -2340,7 +2287,6 @@ const databasesListLogs = async ({databaseId,queries,parseOutput = true, overrid return response; } - /** * @typedef {Object} DatabasesGetUsageRequestParams * @property {string} databaseId Database ID. @@ -2374,7 +2320,6 @@ const databasesGetUsage = async ({databaseId,range,parseOutput = true, overrideF return response; } - databases .command(`list`) .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list' instead] Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`) diff --git a/lib/commands/functions.js b/lib/commands/functions.js index 8d4e384..cf42c5a 100644 --- a/lib/commands/functions.js +++ b/lib/commands/functions.js @@ -79,7 +79,6 @@ const functionsList = async ({queries,search,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} FunctionsCreateRequestParams * @property {string} functionId Function 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. @@ -184,7 +183,6 @@ const functionsCreate = async ({functionId,name,runtime,execute,events,schedule, return response; } - /** * @typedef {Object} FunctionsListRuntimesRequestParams * @property {boolean} overrideForCli @@ -213,7 +211,6 @@ const functionsListRuntimes = async ({parseOutput = true, overrideForCli = false return response; } - /** * @typedef {Object} FunctionsListSpecificationsRequestParams * @property {boolean} overrideForCli @@ -246,7 +243,6 @@ const functionsListSpecifications = async ({parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} FunctionsListTemplatesRequestParams * @property {string[]} runtimes List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed. @@ -295,7 +291,6 @@ const functionsListTemplates = async ({runtimes,useCases,limit,offset,parseOutpu return response; } - /** * @typedef {Object} FunctionsGetTemplateRequestParams * @property {string} templateId Template ID. @@ -329,7 +324,6 @@ const functionsGetTemplate = async ({templateId,parseOutput = true, overrideForC return response; } - /** * @typedef {Object} FunctionsListUsageRequestParams * @property {UsageRange} range Date range. @@ -366,7 +360,6 @@ const functionsListUsage = async ({range,parseOutput = true, overrideForCli = fa return response; } - /** * @typedef {Object} FunctionsGetRequestParams * @property {string} functionId Function ID. @@ -400,7 +393,6 @@ const functionsGet = async ({functionId,parseOutput = true, overrideForCli = fal return response; } - /** * @typedef {Object} FunctionsUpdateRequestParams * @property {string} functionId Function ID. @@ -502,7 +494,6 @@ const functionsUpdate = async ({functionId,name,runtime,execute,events,schedule, return response; } - /** * @typedef {Object} FunctionsDeleteRequestParams * @property {string} functionId Function ID. @@ -533,7 +524,6 @@ const functionsDelete = async ({functionId,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} FunctionsUpdateFunctionDeploymentRequestParams * @property {string} functionId Function ID. @@ -568,7 +558,6 @@ const functionsUpdateFunctionDeployment = async ({functionId,deploymentId,parseO return response; } - /** * @typedef {Object} FunctionsListDeploymentsRequestParams * @property {string} functionId Function ID. @@ -610,7 +599,6 @@ const functionsListDeployments = async ({functionId,queries,search,parseOutput = return response; } - /** * @typedef {Object} FunctionsCreateDeploymentRequestParams * @property {string} functionId Function ID. @@ -775,7 +763,6 @@ const functionsCreateDeployment = async ({functionId,code,activate,entrypoint,co return response; } - /** * @typedef {Object} FunctionsCreateDuplicateDeploymentRequestParams * @property {string} functionId Function ID. @@ -814,7 +801,6 @@ const functionsCreateDuplicateDeployment = async ({functionId,deploymentId,build return response; } - /** * @typedef {Object} FunctionsCreateTemplateDeploymentRequestParams * @property {string} functionId Function ID. @@ -865,7 +851,6 @@ const functionsCreateTemplateDeployment = async ({functionId,repository,owner,ro return response; } - /** * @typedef {Object} FunctionsCreateVcsDeploymentRequestParams * @property {string} functionId Function ID. @@ -908,7 +893,6 @@ const functionsCreateVcsDeployment = async ({functionId,type,reference,activate, return response; } - /** * @typedef {Object} FunctionsGetDeploymentRequestParams * @property {string} functionId Function ID. @@ -943,7 +927,6 @@ const functionsGetDeployment = async ({functionId,deploymentId,parseOutput = tru return response; } - /** * @typedef {Object} FunctionsDeleteDeploymentRequestParams * @property {string} functionId Function ID. @@ -975,7 +958,6 @@ const functionsDeleteDeployment = async ({functionId,deploymentId,parseOutput = return response; } - /** * @typedef {Object} FunctionsGetDeploymentDownloadRequestParams * @property {string} functionId Function ID. @@ -1026,7 +1008,6 @@ const functionsGetDeploymentDownload = async ({functionId,deploymentId,type,pars return response; } - /** * @typedef {Object} FunctionsUpdateDeploymentStatusRequestParams * @property {string} functionId Function ID. @@ -1058,7 +1039,6 @@ const functionsUpdateDeploymentStatus = async ({functionId,deploymentId,parseOut return response; } - /** * @typedef {Object} FunctionsListExecutionsRequestParams * @property {string} functionId Function ID. @@ -1096,7 +1076,6 @@ const functionsListExecutions = async ({functionId,queries,parseOutput = true, o return response; } - /** * @typedef {Object} FunctionsCreateExecutionRequestParams * @property {string} functionId Function ID. @@ -1151,7 +1130,6 @@ const functionsCreateExecution = async ({functionId,body,async,xpath,method,head return response; } - /** * @typedef {Object} FunctionsGetExecutionRequestParams * @property {string} functionId Function ID. @@ -1186,7 +1164,6 @@ const functionsGetExecution = async ({functionId,executionId,parseOutput = true, return response; } - /** * @typedef {Object} FunctionsDeleteExecutionRequestParams * @property {string} functionId Function ID. @@ -1218,7 +1195,6 @@ const functionsDeleteExecution = async ({functionId,executionId,parseOutput = tr return response; } - /** * @typedef {Object} FunctionsGetUsageRequestParams * @property {string} functionId Function ID. @@ -1252,7 +1228,6 @@ const functionsGetUsage = async ({functionId,range,parseOutput = true, overrideF return response; } - /** * @typedef {Object} FunctionsListVariablesRequestParams * @property {string} functionId Function unique ID. @@ -1282,7 +1257,6 @@ const functionsListVariables = async ({functionId,parseOutput = true, overrideFo return response; } - /** * @typedef {Object} FunctionsCreateVariableRequestParams * @property {string} functionId Function unique ID. @@ -1325,7 +1299,6 @@ const functionsCreateVariable = async ({functionId,key,value,secret,parseOutput return response; } - /** * @typedef {Object} FunctionsGetVariableRequestParams * @property {string} functionId Function unique ID. @@ -1356,7 +1329,6 @@ const functionsGetVariable = async ({functionId,variableId,parseOutput = true, o return response; } - /** * @typedef {Object} FunctionsUpdateVariableRequestParams * @property {string} functionId Function unique ID. @@ -1400,7 +1372,6 @@ const functionsUpdateVariable = async ({functionId,variableId,key,value,secret,p return response; } - /** * @typedef {Object} FunctionsDeleteVariableRequestParams * @property {string} functionId Function unique ID. @@ -1432,7 +1403,6 @@ const functionsDeleteVariable = async ({functionId,variableId,parseOutput = true return response; } - functions .command(`list`) .description(`Get a list of all the project's functions. You can use the query params to filter your results.`) diff --git a/lib/commands/graphql.js b/lib/commands/graphql.js index 6970756..b0cf7e4 100644 --- a/lib/commands/graphql.js +++ b/lib/commands/graphql.js @@ -73,7 +73,6 @@ const graphqlQuery = async ({query,parseOutput = true, overrideForCli = false, s return response; } - /** * @typedef {Object} GraphqlMutationRequestParams * @property {object} query The query or queries to execute. @@ -108,7 +107,6 @@ const graphqlMutation = async ({query,parseOutput = true, overrideForCli = false return response; } - graphql .command(`query`) .description(`Execute a GraphQL mutation.`) diff --git a/lib/commands/health.js b/lib/commands/health.js index 9867c22..6798870 100644 --- a/lib/commands/health.js +++ b/lib/commands/health.js @@ -67,7 +67,6 @@ const healthGet = async ({parseOutput = true, overrideForCli = false, sdk = unde return response; } - /** * @typedef {Object} HealthGetAntivirusRequestParams * @property {boolean} overrideForCli @@ -96,7 +95,6 @@ const healthGetAntivirus = async ({parseOutput = true, overrideForCli = false, s return response; } - /** * @typedef {Object} HealthGetCacheRequestParams * @property {boolean} overrideForCli @@ -125,7 +123,6 @@ const healthGetCache = async ({parseOutput = true, overrideForCli = false, sdk = return response; } - /** * @typedef {Object} HealthGetCertificateRequestParams * @property {string} domain string @@ -158,7 +155,6 @@ const healthGetCertificate = async ({domain,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} HealthGetDBRequestParams * @property {boolean} overrideForCli @@ -187,7 +183,6 @@ const healthGetDB = async ({parseOutput = true, overrideForCli = false, sdk = un return response; } - /** * @typedef {Object} HealthGetPubSubRequestParams * @property {boolean} overrideForCli @@ -216,7 +211,6 @@ const healthGetPubSub = async ({parseOutput = true, overrideForCli = false, sdk return response; } - /** * @typedef {Object} HealthGetQueueBuildsRequestParams * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -249,7 +243,6 @@ const healthGetQueueBuilds = async ({threshold,parseOutput = true, overrideForCl return response; } - /** * @typedef {Object} HealthGetQueueCertificatesRequestParams * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -282,7 +275,6 @@ const healthGetQueueCertificates = async ({threshold,parseOutput = true, overrid return response; } - /** * @typedef {Object} HealthGetQueueDatabasesRequestParams * @property {string} name Queue name for which to check the queue size @@ -319,7 +311,6 @@ const healthGetQueueDatabases = async ({name,threshold,parseOutput = true, overr return response; } - /** * @typedef {Object} HealthGetQueueDeletesRequestParams * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -352,7 +343,6 @@ const healthGetQueueDeletes = async ({threshold,parseOutput = true, overrideForC return response; } - /** * @typedef {Object} HealthGetFailedJobsRequestParams * @property {Name} name The name of the queue @@ -386,7 +376,6 @@ const healthGetFailedJobs = async ({name,threshold,parseOutput = true, overrideF return response; } - /** * @typedef {Object} HealthGetQueueFunctionsRequestParams * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -419,7 +408,6 @@ const healthGetQueueFunctions = async ({threshold,parseOutput = true, overrideFo return response; } - /** * @typedef {Object} HealthGetQueueLogsRequestParams * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -452,7 +440,6 @@ const healthGetQueueLogs = async ({threshold,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} HealthGetQueueMailsRequestParams * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -485,7 +472,6 @@ const healthGetQueueMails = async ({threshold,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} HealthGetQueueMessagingRequestParams * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -518,7 +504,6 @@ const healthGetQueueMessaging = async ({threshold,parseOutput = true, overrideFo return response; } - /** * @typedef {Object} HealthGetQueueMigrationsRequestParams * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -551,7 +536,6 @@ const healthGetQueueMigrations = async ({threshold,parseOutput = true, overrideF return response; } - /** * @typedef {Object} HealthGetQueueStatsResourcesRequestParams * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -584,7 +568,6 @@ const healthGetQueueStatsResources = async ({threshold,parseOutput = true, overr return response; } - /** * @typedef {Object} HealthGetQueueUsageRequestParams * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -617,7 +600,6 @@ const healthGetQueueUsage = async ({threshold,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} HealthGetQueueWebhooksRequestParams * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -650,7 +632,6 @@ const healthGetQueueWebhooks = async ({threshold,parseOutput = true, overrideFor return response; } - /** * @typedef {Object} HealthGetStorageRequestParams * @property {boolean} overrideForCli @@ -679,7 +660,6 @@ const healthGetStorage = async ({parseOutput = true, overrideForCli = false, sdk return response; } - /** * @typedef {Object} HealthGetStorageLocalRequestParams * @property {boolean} overrideForCli @@ -708,7 +688,6 @@ const healthGetStorageLocal = async ({parseOutput = true, overrideForCli = false return response; } - /** * @typedef {Object} HealthGetTimeRequestParams * @property {boolean} overrideForCli @@ -737,7 +716,6 @@ const healthGetTime = async ({parseOutput = true, overrideForCli = false, sdk = return response; } - health .command(`get`) .description(`Check the Appwrite HTTP server is up and responsive.`) diff --git a/lib/commands/locale.js b/lib/commands/locale.js index fcfb022..db1a70d 100644 --- a/lib/commands/locale.js +++ b/lib/commands/locale.js @@ -67,7 +67,6 @@ const localeGet = async ({parseOutput = true, overrideForCli = false, sdk = unde return response; } - /** * @typedef {Object} LocaleListCodesRequestParams * @property {boolean} overrideForCli @@ -96,7 +95,6 @@ const localeListCodes = async ({parseOutput = true, overrideForCli = false, sdk return response; } - /** * @typedef {Object} LocaleListContinentsRequestParams * @property {boolean} overrideForCli @@ -125,7 +123,6 @@ const localeListContinents = async ({parseOutput = true, overrideForCli = false, return response; } - /** * @typedef {Object} LocaleListCountriesRequestParams * @property {boolean} overrideForCli @@ -154,7 +151,6 @@ const localeListCountries = async ({parseOutput = true, overrideForCli = false, return response; } - /** * @typedef {Object} LocaleListCountriesEURequestParams * @property {boolean} overrideForCli @@ -183,7 +179,6 @@ const localeListCountriesEU = async ({parseOutput = true, overrideForCli = false return response; } - /** * @typedef {Object} LocaleListCountriesPhonesRequestParams * @property {boolean} overrideForCli @@ -212,7 +207,6 @@ const localeListCountriesPhones = async ({parseOutput = true, overrideForCli = f return response; } - /** * @typedef {Object} LocaleListCurrenciesRequestParams * @property {boolean} overrideForCli @@ -241,7 +235,6 @@ const localeListCurrencies = async ({parseOutput = true, overrideForCli = false, return response; } - /** * @typedef {Object} LocaleListLanguagesRequestParams * @property {boolean} overrideForCli @@ -270,7 +263,6 @@ const localeListLanguages = async ({parseOutput = true, overrideForCli = false, return response; } - locale .command(`get`) .description(`Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language. ([IP Geolocation by DB-IP](https://db-ip.com))`) diff --git a/lib/commands/messaging.js b/lib/commands/messaging.js index d95dd8a..73d6fdc 100644 --- a/lib/commands/messaging.js +++ b/lib/commands/messaging.js @@ -79,7 +79,6 @@ const messagingListMessages = async ({queries,search,parseOutput = true, overrid return response; } - /** * @typedef {Object} MessagingCreateEmailRequestParams * @property {string} messageId 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. @@ -163,7 +162,6 @@ const messagingCreateEmail = async ({messageId,subject,content,topics,users,targ return response; } - /** * @typedef {Object} MessagingUpdateEmailRequestParams * @property {string} messageId Message ID. @@ -244,7 +242,6 @@ const messagingUpdateEmail = async ({messageId,topics,users,targets,subject,cont return response; } - /** * @typedef {Object} MessagingCreatePushRequestParams * @property {string} messageId 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. @@ -353,7 +350,6 @@ const messagingCreatePush = async ({messageId,title,body,topics,users,targets,da return response; } - /** * @typedef {Object} MessagingUpdatePushRequestParams * @property {string} messageId Message ID. @@ -459,68 +455,6 @@ const messagingUpdatePush = async ({messageId,topics,users,targets,title,body,da return response; } - -/** - * @typedef {Object} MessagingCreateSmsRequestParams - * @property {string} messageId 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. - * @property {string} content SMS Content. - * @property {string[]} topics List of Topic IDs. - * @property {string[]} users List of User IDs. - * @property {string[]} targets List of Targets IDs. - * @property {boolean} draft Is message a draft - * @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {MessagingCreateSmsRequestParams} params - */ -const messagingCreateSms = async ({messageId,content,topics,users,targets,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/messaging/messages/sms'; - let payload = {}; - if (typeof messageId !== 'undefined') { - payload['messageId'] = messageId; - } - if (typeof content !== 'undefined') { - payload['content'] = content; - } - topics = topics === true ? [] : topics; - if (typeof topics !== 'undefined') { - payload['topics'] = topics; - } - users = users === true ? [] : users; - if (typeof users !== 'undefined') { - payload['users'] = users; - } - targets = targets === true ? [] : targets; - if (typeof targets !== 'undefined') { - payload['targets'] = targets; - } - if (typeof draft !== 'undefined') { - payload['draft'] = draft; - } - if (typeof scheduledAt !== 'undefined') { - payload['scheduledAt'] = scheduledAt; - } - - let response = undefined; - - response = await client.call('post', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} MessagingCreateSMSRequestParams * @property {string} messageId 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. @@ -581,65 +515,6 @@ const messagingCreateSMS = async ({messageId,content,topics,users,targets,draft, return response; } - -/** - * @typedef {Object} MessagingUpdateSmsRequestParams - * @property {string} messageId Message ID. - * @property {string[]} topics List of Topic IDs. - * @property {string[]} users List of User IDs. - * @property {string[]} targets List of Targets IDs. - * @property {string} content Email Content. - * @property {boolean} draft Is message a draft - * @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {MessagingUpdateSmsRequestParams} params - */ -const messagingUpdateSms = async ({messageId,topics,users,targets,content,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/messaging/messages/sms/{messageId}'.replace('{messageId}', messageId); - let payload = {}; - topics = topics === true ? [] : topics; - if (typeof topics !== 'undefined') { - payload['topics'] = topics; - } - users = users === true ? [] : users; - if (typeof users !== 'undefined') { - payload['users'] = users; - } - targets = targets === true ? [] : targets; - if (typeof targets !== 'undefined') { - payload['targets'] = targets; - } - if (typeof content !== 'undefined') { - payload['content'] = content; - } - if (typeof draft !== 'undefined') { - payload['draft'] = draft; - } - if (typeof scheduledAt !== 'undefined') { - payload['scheduledAt'] = scheduledAt; - } - - let response = undefined; - - response = await client.call('patch', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} MessagingUpdateSMSRequestParams * @property {string} messageId Message ID. @@ -697,7 +572,6 @@ const messagingUpdateSMS = async ({messageId,topics,users,targets,content,draft, return response; } - /** * @typedef {Object} MessagingGetMessageRequestParams * @property {string} messageId Message ID. @@ -731,7 +605,6 @@ const messagingGetMessage = async ({messageId,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} MessagingDeleteRequestParams * @property {string} messageId Message ID. @@ -762,7 +635,6 @@ const messagingDelete = async ({messageId,parseOutput = true, overrideForCli = f return response; } - /** * @typedef {Object} MessagingListMessageLogsRequestParams * @property {string} messageId Message ID. @@ -800,7 +672,6 @@ const messagingListMessageLogs = async ({messageId,queries,parseOutput = true, o return response; } - /** * @typedef {Object} MessagingListTargetsRequestParams * @property {string} messageId Message ID. @@ -834,7 +705,6 @@ const messagingListTargets = async ({messageId,queries,parseOutput = true, overr return response; } - /** * @typedef {Object} MessagingListProvidersRequestParams * @property {string[]} queries 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, provider, type, enabled @@ -875,69 +745,6 @@ const messagingListProviders = async ({queries,search,parseOutput = true, overri return response; } - -/** - * @typedef {Object} MessagingCreateApnsProviderRequestParams - * @property {string} providerId 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. - * @property {string} name Provider name. - * @property {string} authKey APNS authentication key. - * @property {string} authKeyId APNS authentication key ID. - * @property {string} teamId APNS team ID. - * @property {string} bundleId APNS bundle ID. - * @property {boolean} sandbox Use APNS sandbox environment. - * @property {boolean} enabled Set as enabled. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {MessagingCreateApnsProviderRequestParams} params - */ -const messagingCreateApnsProvider = async ({providerId,name,authKey,authKeyId,teamId,bundleId,sandbox,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/messaging/providers/apns'; - let payload = {}; - if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; - } - if (typeof name !== 'undefined') { - payload['name'] = name; - } - if (typeof authKey !== 'undefined') { - payload['authKey'] = authKey; - } - if (typeof authKeyId !== 'undefined') { - payload['authKeyId'] = authKeyId; - } - if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; - } - if (typeof bundleId !== 'undefined') { - payload['bundleId'] = bundleId; - } - if (typeof sandbox !== 'undefined') { - payload['sandbox'] = sandbox; - } - if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; - } - - let response = undefined; - - response = await client.call('post', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} MessagingCreateAPNSProviderRequestParams * @property {string} providerId 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. @@ -999,66 +806,6 @@ const messagingCreateAPNSProvider = async ({providerId,name,authKey,authKeyId,te return response; } - -/** - * @typedef {Object} MessagingUpdateApnsProviderRequestParams - * @property {string} providerId Provider ID. - * @property {string} name Provider name. - * @property {boolean} enabled Set as enabled. - * @property {string} authKey APNS authentication key. - * @property {string} authKeyId APNS authentication key ID. - * @property {string} teamId APNS team ID. - * @property {string} bundleId APNS bundle ID. - * @property {boolean} sandbox Use APNS sandbox environment. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {MessagingUpdateApnsProviderRequestParams} params - */ -const messagingUpdateApnsProvider = async ({providerId,name,enabled,authKey,authKeyId,teamId,bundleId,sandbox,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/messaging/providers/apns/{providerId}'.replace('{providerId}', providerId); - let payload = {}; - if (typeof name !== 'undefined') { - payload['name'] = name; - } - if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; - } - if (typeof authKey !== 'undefined') { - payload['authKey'] = authKey; - } - if (typeof authKeyId !== 'undefined') { - payload['authKeyId'] = authKeyId; - } - if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; - } - if (typeof bundleId !== 'undefined') { - payload['bundleId'] = bundleId; - } - if (typeof sandbox !== 'undefined') { - payload['sandbox'] = sandbox; - } - - let response = undefined; - - response = await client.call('patch', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} MessagingUpdateAPNSProviderRequestParams * @property {string} providerId Provider ID. @@ -1117,53 +864,6 @@ const messagingUpdateAPNSProvider = async ({providerId,name,enabled,authKey,auth return response; } - -/** - * @typedef {Object} MessagingCreateFcmProviderRequestParams - * @property {string} providerId 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. - * @property {string} name Provider name. - * @property {object} serviceAccountJSON FCM service account JSON. - * @property {boolean} enabled Set as enabled. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {MessagingCreateFcmProviderRequestParams} params - */ -const messagingCreateFcmProvider = async ({providerId,name,serviceAccountJSON,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/messaging/providers/fcm'; - let payload = {}; - if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; - } - if (typeof name !== 'undefined') { - payload['name'] = name; - } - if (typeof serviceAccountJSON !== 'undefined') { - payload['serviceAccountJSON'] = JSON.parse(serviceAccountJSON); - } - if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; - } - - let response = undefined; - - response = await client.call('post', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} MessagingCreateFCMProviderRequestParams * @property {string} providerId 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. @@ -1209,50 +909,6 @@ const messagingCreateFCMProvider = async ({providerId,name,serviceAccountJSON,en return response; } - -/** - * @typedef {Object} MessagingUpdateFcmProviderRequestParams - * @property {string} providerId Provider ID. - * @property {string} name Provider name. - * @property {boolean} enabled Set as enabled. - * @property {object} serviceAccountJSON FCM service account JSON. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {MessagingUpdateFcmProviderRequestParams} params - */ -const messagingUpdateFcmProvider = async ({providerId,name,enabled,serviceAccountJSON,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/messaging/providers/fcm/{providerId}'.replace('{providerId}', providerId); - let payload = {}; - if (typeof name !== 'undefined') { - payload['name'] = name; - } - if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; - } - if (typeof serviceAccountJSON !== 'undefined') { - payload['serviceAccountJSON'] = JSON.parse(serviceAccountJSON); - } - - let response = undefined; - - response = await client.call('patch', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} MessagingUpdateFCMProviderRequestParams * @property {string} providerId Provider ID. @@ -1295,7 +951,6 @@ const messagingUpdateFCMProvider = async ({providerId,name,enabled,serviceAccoun return response; } - /** * @typedef {Object} MessagingCreateMailgunProviderRequestParams * @property {string} providerId 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. @@ -1365,7 +1020,6 @@ const messagingCreateMailgunProvider = async ({providerId,name,apiKey,domain,isE return response; } - /** * @typedef {Object} MessagingUpdateMailgunProviderRequestParams * @property {string} providerId Provider ID. @@ -1432,7 +1086,6 @@ const messagingUpdateMailgunProvider = async ({providerId,name,apiKey,domain,isE return response; } - /** * @typedef {Object} MessagingCreateMsg91ProviderRequestParams * @property {string} providerId 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. @@ -1486,142 +1139,26 @@ const messagingCreateMsg91Provider = async ({providerId,name,templateId,senderId return response; } - /** * @typedef {Object} MessagingUpdateMsg91ProviderRequestParams * @property {string} providerId Provider ID. - * @property {string} name Provider name. - * @property {boolean} enabled Set as enabled. - * @property {string} templateId Msg91 template ID. - * @property {string} senderId Msg91 sender ID. - * @property {string} authKey Msg91 auth key. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {MessagingUpdateMsg91ProviderRequestParams} params - */ -const messagingUpdateMsg91Provider = async ({providerId,name,enabled,templateId,senderId,authKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/messaging/providers/msg91/{providerId}'.replace('{providerId}', providerId); - let payload = {}; - if (typeof name !== 'undefined') { - payload['name'] = name; - } - if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; - } - if (typeof templateId !== 'undefined') { - payload['templateId'] = templateId; - } - if (typeof senderId !== 'undefined') { - payload['senderId'] = senderId; - } - if (typeof authKey !== 'undefined') { - payload['authKey'] = authKey; - } - - let response = undefined; - - response = await client.call('patch', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - -/** - * @typedef {Object} MessagingCreateSendgridProviderRequestParams - * @property {string} providerId 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. - * @property {string} name Provider name. - * @property {string} apiKey Sendgrid API key. - * @property {string} fromName Sender Name. - * @property {string} fromEmail Sender email address. - * @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name. - * @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email. - * @property {boolean} enabled Set as enabled. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {MessagingCreateSendgridProviderRequestParams} params - */ -const messagingCreateSendgridProvider = async ({providerId,name,apiKey,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/messaging/providers/sendgrid'; - let payload = {}; - if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; - } - if (typeof name !== 'undefined') { - payload['name'] = name; - } - if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; - } - if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; - } - if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; - } - if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; - } - if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; - } - if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; - } - - let response = undefined; - - response = await client.call('post', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - -/** - * @typedef {Object} MessagingUpdateSendgridProviderRequestParams - * @property {string} providerId Provider ID. - * @property {string} name Provider name. - * @property {boolean} enabled Set as enabled. - * @property {string} apiKey Sendgrid API key. - * @property {string} fromName Sender Name. - * @property {string} fromEmail Sender email address. - * @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name. - * @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email. + * @property {string} name Provider name. + * @property {boolean} enabled Set as enabled. + * @property {string} templateId Msg91 template ID. + * @property {string} senderId Msg91 sender ID. + * @property {string} authKey Msg91 auth key. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk */ /** - * @param {MessagingUpdateSendgridProviderRequestParams} params + * @param {MessagingUpdateMsg91ProviderRequestParams} params */ -const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,fromName,fromEmail,replyToName,replyToEmail,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const messagingUpdateMsg91Provider = async ({providerId,name,enabled,templateId,senderId,authKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; - let apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId); + let apiPath = '/messaging/providers/msg91/{providerId}'.replace('{providerId}', providerId); let payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -1629,20 +1166,14 @@ const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,f if (typeof enabled !== 'undefined') { payload['enabled'] = enabled; } - if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; - } - if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; - } - if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; + if (typeof templateId !== 'undefined') { + payload['templateId'] = templateId; } - if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + if (typeof senderId !== 'undefined') { + payload['senderId'] = senderId; } - if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + if (typeof authKey !== 'undefined') { + payload['authKey'] = authKey; } let response = undefined; @@ -1658,18 +1189,11 @@ const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,f return response; } - /** - * @typedef {Object} MessagingCreateSmtpProviderRequestParams + * @typedef {Object} MessagingCreateSendgridProviderRequestParams * @property {string} providerId 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. * @property {string} name Provider name. - * @property {string} host 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. - * @property {number} port The default SMTP server port. - * @property {string} username Authentication username. - * @property {string} password Authentication password. - * @property {SmtpEncryption} encryption Encryption type. Can be omitted, 'ssl', or 'tls' - * @property {boolean} autoTLS Enable SMTP AutoTLS feature. - * @property {string} mailer The value to use for the X-Mailer header. + * @property {string} apiKey Sendgrid API key. * @property {string} fromName Sender Name. * @property {string} fromEmail Sender email address. * @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name. @@ -1681,12 +1205,12 @@ const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,f */ /** - * @param {MessagingCreateSmtpProviderRequestParams} params + * @param {MessagingCreateSendgridProviderRequestParams} params */ -const messagingCreateSmtpProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const messagingCreateSendgridProvider = async ({providerId,name,apiKey,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; - let apiPath = '/messaging/providers/smtp'; + let apiPath = '/messaging/providers/sendgrid'; let payload = {}; if (typeof providerId !== 'undefined') { payload['providerId'] = providerId; @@ -1694,26 +1218,8 @@ const messagingCreateSmtpProvider = async ({providerId,name,host,port,username,p if (typeof name !== 'undefined') { payload['name'] = name; } - if (typeof host !== 'undefined') { - payload['host'] = host; - } - if (typeof port !== 'undefined') { - payload['port'] = port; - } - if (typeof username !== 'undefined') { - payload['username'] = username; - } - if (typeof password !== 'undefined') { - payload['password'] = password; - } - if (typeof encryption !== 'undefined') { - payload['encryption'] = encryption; - } - if (typeof autoTLS !== 'undefined') { - payload['autoTLS'] = autoTLS; - } - if (typeof mailer !== 'undefined') { - payload['mailer'] = mailer; + if (typeof apiKey !== 'undefined') { + payload['apiKey'] = apiKey; } if (typeof fromName !== 'undefined') { payload['fromName'] = fromName; @@ -1744,62 +1250,37 @@ const messagingCreateSmtpProvider = async ({providerId,name,host,port,username,p return response; } - /** - * @typedef {Object} MessagingCreateSMTPProviderRequestParams - * @property {string} providerId 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. + * @typedef {Object} MessagingUpdateSendgridProviderRequestParams + * @property {string} providerId Provider ID. * @property {string} name Provider name. - * @property {string} host 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. - * @property {number} port The default SMTP server port. - * @property {string} username Authentication username. - * @property {string} password Authentication password. - * @property {SmtpEncryption} encryption Encryption type. Can be omitted, 'ssl', or 'tls' - * @property {boolean} autoTLS Enable SMTP AutoTLS feature. - * @property {string} mailer The value to use for the X-Mailer header. + * @property {boolean} enabled Set as enabled. + * @property {string} apiKey Sendgrid API key. * @property {string} fromName Sender Name. * @property {string} fromEmail Sender email address. - * @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name. - * @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email. - * @property {boolean} enabled Set as enabled. + * @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name. + * @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk */ /** - * @param {MessagingCreateSMTPProviderRequestParams} params + * @param {MessagingUpdateSendgridProviderRequestParams} params */ -const messagingCreateSMTPProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,fromName,fromEmail,replyToName,replyToEmail,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; - let apiPath = '/messaging/providers/smtp'; + let apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId); let payload = {}; - if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; - } if (typeof name !== 'undefined') { payload['name'] = name; } - if (typeof host !== 'undefined') { - payload['host'] = host; - } - if (typeof port !== 'undefined') { - payload['port'] = port; - } - if (typeof username !== 'undefined') { - payload['username'] = username; - } - if (typeof password !== 'undefined') { - payload['password'] = password; - } - if (typeof encryption !== 'undefined') { - payload['encryption'] = encryption; - } - if (typeof autoTLS !== 'undefined') { - payload['autoTLS'] = autoTLS; + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; } - if (typeof mailer !== 'undefined') { - payload['mailer'] = mailer; + if (typeof apiKey !== 'undefined') { + payload['apiKey'] = apiKey; } if (typeof fromName !== 'undefined') { payload['fromName'] = fromName; @@ -1813,13 +1294,10 @@ const messagingCreateSMTPProvider = async ({providerId,name,host,port,username,p if (typeof replyToEmail !== 'undefined') { payload['replyToEmail'] = replyToEmail; } - if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; - } let response = undefined; - response = await client.call('post', apiPath, { + response = await client.call('patch', apiPath, { 'content-type': 'application/json', }, payload); @@ -1830,22 +1308,21 @@ const messagingCreateSMTPProvider = async ({providerId,name,host,port,username,p return response; } - /** - * @typedef {Object} MessagingUpdateSmtpProviderRequestParams - * @property {string} providerId Provider ID. + * @typedef {Object} MessagingCreateSMTPProviderRequestParams + * @property {string} providerId 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. * @property {string} name Provider name. * @property {string} host 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. - * @property {number} port SMTP port. + * @property {number} port The default SMTP server port. * @property {string} username Authentication username. * @property {string} password Authentication password. - * @property {SmtpEncryption} encryption Encryption type. Can be 'ssl' or 'tls' + * @property {SmtpEncryption} encryption Encryption type. Can be omitted, 'ssl', or 'tls' * @property {boolean} autoTLS Enable SMTP AutoTLS feature. * @property {string} mailer The value to use for the X-Mailer header. * @property {string} fromName Sender Name. * @property {string} fromEmail Sender email address. - * @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name. - * @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email. + * @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name. + * @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email. * @property {boolean} enabled Set as enabled. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -1853,13 +1330,16 @@ const messagingCreateSMTPProvider = async ({providerId,name,host,port,username,p */ /** - * @param {MessagingUpdateSmtpProviderRequestParams} params + * @param {MessagingCreateSMTPProviderRequestParams} params */ -const messagingUpdateSmtpProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const messagingCreateSMTPProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; - let apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId); + let apiPath = '/messaging/providers/smtp'; let payload = {}; + if (typeof providerId !== 'undefined') { + payload['providerId'] = providerId; + } if (typeof name !== 'undefined') { payload['name'] = name; } @@ -1902,7 +1382,7 @@ const messagingUpdateSmtpProvider = async ({providerId,name,host,port,username,p let response = undefined; - response = await client.call('patch', apiPath, { + response = await client.call('post', apiPath, { 'content-type': 'application/json', }, payload); @@ -1913,7 +1393,6 @@ const messagingUpdateSmtpProvider = async ({providerId,name,host,port,username,p return response; } - /** * @typedef {Object} MessagingUpdateSMTPProviderRequestParams * @property {string} providerId Provider ID. @@ -1996,7 +1475,6 @@ const messagingUpdateSMTPProvider = async ({providerId,name,host,port,username,p return response; } - /** * @typedef {Object} MessagingCreateTelesignProviderRequestParams * @property {string} providerId 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. @@ -2050,7 +1528,6 @@ const messagingCreateTelesignProvider = async ({providerId,name,from,customerId, return response; } - /** * @typedef {Object} MessagingUpdateTelesignProviderRequestParams * @property {string} providerId Provider ID. @@ -2101,7 +1578,6 @@ const messagingUpdateTelesignProvider = async ({providerId,name,enabled,customer return response; } - /** * @typedef {Object} MessagingCreateTextmagicProviderRequestParams * @property {string} providerId 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. @@ -2155,7 +1631,6 @@ const messagingCreateTextmagicProvider = async ({providerId,name,from,username,a return response; } - /** * @typedef {Object} MessagingUpdateTextmagicProviderRequestParams * @property {string} providerId Provider ID. @@ -2206,7 +1681,6 @@ const messagingUpdateTextmagicProvider = async ({providerId,name,enabled,usernam return response; } - /** * @typedef {Object} MessagingCreateTwilioProviderRequestParams * @property {string} providerId 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. @@ -2260,7 +1734,6 @@ const messagingCreateTwilioProvider = async ({providerId,name,from,accountSid,au return response; } - /** * @typedef {Object} MessagingUpdateTwilioProviderRequestParams * @property {string} providerId Provider ID. @@ -2311,7 +1784,6 @@ const messagingUpdateTwilioProvider = async ({providerId,name,enabled,accountSid return response; } - /** * @typedef {Object} MessagingCreateVonageProviderRequestParams * @property {string} providerId 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. @@ -2365,7 +1837,6 @@ const messagingCreateVonageProvider = async ({providerId,name,from,apiKey,apiSec return response; } - /** * @typedef {Object} MessagingUpdateVonageProviderRequestParams * @property {string} providerId Provider ID. @@ -2416,7 +1887,6 @@ const messagingUpdateVonageProvider = async ({providerId,name,enabled,apiKey,api return response; } - /** * @typedef {Object} MessagingGetProviderRequestParams * @property {string} providerId Provider ID. @@ -2450,7 +1920,6 @@ const messagingGetProvider = async ({providerId,parseOutput = true, overrideForC return response; } - /** * @typedef {Object} MessagingDeleteProviderRequestParams * @property {string} providerId Provider ID. @@ -2481,7 +1950,6 @@ const messagingDeleteProvider = async ({providerId,parseOutput = true, overrideF return response; } - /** * @typedef {Object} MessagingListProviderLogsRequestParams * @property {string} providerId Provider ID. @@ -2515,7 +1983,6 @@ const messagingListProviderLogs = async ({providerId,queries,parseOutput = true, return response; } - /** * @typedef {Object} MessagingListSubscriberLogsRequestParams * @property {string} subscriberId Subscriber ID. @@ -2549,7 +2016,6 @@ const messagingListSubscriberLogs = async ({subscriberId,queries,parseOutput = t return response; } - /** * @typedef {Object} MessagingListTopicsRequestParams * @property {string[]} queries 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, description, emailTotal, smsTotal, pushTotal @@ -2590,7 +2056,6 @@ const messagingListTopics = async ({queries,search,parseOutput = true, overrideF return response; } - /** * @typedef {Object} MessagingCreateTopicRequestParams * @property {string} topicId Topic ID. Choose a custom Topic ID or a new Topic ID. @@ -2633,7 +2098,6 @@ const messagingCreateTopic = async ({topicId,name,subscribe,parseOutput = true, return response; } - /** * @typedef {Object} MessagingGetTopicRequestParams * @property {string} topicId Topic ID. @@ -2667,7 +2131,6 @@ const messagingGetTopic = async ({topicId,parseOutput = true, overrideForCli = f return response; } - /** * @typedef {Object} MessagingUpdateTopicRequestParams * @property {string} topicId Topic ID. @@ -2707,7 +2170,6 @@ const messagingUpdateTopic = async ({topicId,name,subscribe,parseOutput = true, return response; } - /** * @typedef {Object} MessagingDeleteTopicRequestParams * @property {string} topicId Topic ID. @@ -2738,7 +2200,6 @@ const messagingDeleteTopic = async ({topicId,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} MessagingListTopicLogsRequestParams * @property {string} topicId Topic ID. @@ -2772,7 +2233,6 @@ const messagingListTopicLogs = async ({topicId,queries,parseOutput = true, overr return response; } - /** * @typedef {Object} MessagingListSubscribersRequestParams * @property {string} topicId Topic ID. The topic ID subscribed to. @@ -2814,7 +2274,6 @@ const messagingListSubscribers = async ({topicId,queries,search,parseOutput = tr return response; } - /** * @typedef {Object} MessagingCreateSubscriberRequestParams * @property {string} topicId Topic ID. The topic ID to subscribe to. @@ -2853,7 +2312,6 @@ const messagingCreateSubscriber = async ({topicId,subscriberId,targetId,parseOut return response; } - /** * @typedef {Object} MessagingGetSubscriberRequestParams * @property {string} topicId Topic ID. The topic ID subscribed to. @@ -2884,7 +2342,6 @@ const messagingGetSubscriber = async ({topicId,subscriberId,parseOutput = true, return response; } - /** * @typedef {Object} MessagingDeleteSubscriberRequestParams * @property {string} topicId Topic ID. The topic ID subscribed to. @@ -2916,7 +2373,6 @@ const messagingDeleteSubscriber = async ({topicId,subscriberId,parseOutput = tru return response; } - messaging .command(`list-messages`) .description(`Get a list of all messages from the current Appwrite project.`) @@ -3007,18 +2463,6 @@ messaging .option(`--priority `, `Set the notification priority. "normal" will consider device battery state and may send notifications later. "high" will always attempt to immediately deliver the notification.`) .action(actionRunner(messagingUpdatePush)) -messaging - .command(`create-sms`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging create-sms' instead] Create a new SMS message.`) - .requiredOption(`--message-id `, `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.`) - .requiredOption(`--content `, `SMS Content.`) - .option(`--topics [topics...]`, `List of Topic IDs.`) - .option(`--users [users...]`, `List of User IDs.`) - .option(`--targets [targets...]`, `List of Targets IDs.`) - .option(`--draft [value]`, `Is message a draft`, (value) => value === undefined ? true : parseBool(value)) - .option(`--scheduled-at `, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) - .action(actionRunner(messagingCreateSms)) - messaging .command(`create-sms`) .description(`Create a new SMS message.`) @@ -3031,18 +2475,6 @@ messaging .option(`--scheduled-at `, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) .action(actionRunner(messagingCreateSMS)) -messaging - .command(`update-sms`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging update-sms' instead] 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. `) - .requiredOption(`--message-id `, `Message ID.`) - .option(`--topics [topics...]`, `List of Topic IDs.`) - .option(`--users [users...]`, `List of User IDs.`) - .option(`--targets [targets...]`, `List of Targets IDs.`) - .option(`--content `, `Email Content.`) - .option(`--draft [value]`, `Is message a draft`, (value) => value === undefined ? true : parseBool(value)) - .option(`--scheduled-at `, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) - .action(actionRunner(messagingUpdateSms)) - messaging .command(`update-sms`) .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. `) @@ -3091,19 +2523,6 @@ messaging .option(`--console`, `Get the resource console url`) .action(actionRunner(messagingListProviders)) -messaging - .command(`create-apns-provider`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging create-apns-provider' instead] Create a new Apple Push Notification service provider.`) - .requiredOption(`--provider-id `, `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.`) - .requiredOption(`--name `, `Provider name.`) - .option(`--auth-key `, `APNS authentication key.`) - .option(`--auth-key-id `, `APNS authentication key ID.`) - .option(`--team-id `, `APNS team ID.`) - .option(`--bundle-id `, `APNS bundle ID.`) - .option(`--sandbox [value]`, `Use APNS sandbox environment.`, (value) => value === undefined ? true : parseBool(value)) - .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(messagingCreateApnsProvider)) - messaging .command(`create-apns-provider`) .description(`Create a new Apple Push Notification service provider.`) @@ -3117,19 +2536,6 @@ messaging .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(messagingCreateAPNSProvider)) -messaging - .command(`update-apns-provider`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging update-apns-provider' instead] Update a Apple Push Notification service provider by its unique ID.`) - .requiredOption(`--provider-id `, `Provider ID.`) - .option(`--name `, `Provider name.`) - .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) - .option(`--auth-key `, `APNS authentication key.`) - .option(`--auth-key-id `, `APNS authentication key ID.`) - .option(`--team-id `, `APNS team ID.`) - .option(`--bundle-id `, `APNS bundle ID.`) - .option(`--sandbox [value]`, `Use APNS sandbox environment.`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(messagingUpdateApnsProvider)) - messaging .command(`update-apns-provider`) .description(`Update a Apple Push Notification service provider by its unique ID.`) @@ -3143,15 +2549,6 @@ messaging .option(`--sandbox [value]`, `Use APNS sandbox environment.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(messagingUpdateAPNSProvider)) -messaging - .command(`create-fcm-provider`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging create-fcm-provider' instead] Create a new Firebase Cloud Messaging provider.`) - .requiredOption(`--provider-id `, `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.`) - .requiredOption(`--name `, `Provider name.`) - .option(`--service-account-json `, `FCM service account JSON.`) - .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(messagingCreateFcmProvider)) - messaging .command(`create-fcm-provider`) .description(`Create a new Firebase Cloud Messaging provider.`) @@ -3161,15 +2558,6 @@ messaging .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(messagingCreateFCMProvider)) -messaging - .command(`update-fcm-provider`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging update-fcm-provider' instead] Update a Firebase Cloud Messaging provider by its unique ID.`) - .requiredOption(`--provider-id `, `Provider ID.`) - .option(`--name `, `Provider name.`) - .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) - .option(`--service-account-json `, `FCM service account JSON.`) - .action(actionRunner(messagingUpdateFcmProvider)) - messaging .command(`update-fcm-provider`) .description(`Update a Firebase Cloud Messaging provider by its unique ID.`) @@ -3257,25 +2645,6 @@ messaging .option(`--reply-to-email `, `Email set in the Reply To field for the mail. Default value is Sender Email.`) .action(actionRunner(messagingUpdateSendgridProvider)) -messaging - .command(`create-smtp-provider`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging create-smtp-provider' instead] Create a new SMTP provider.`) - .requiredOption(`--provider-id `, `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.`) - .requiredOption(`--name `, `Provider name.`) - .requiredOption(`--host `, `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.`) - .option(`--port `, `The default SMTP server port.`, parseInteger) - .option(`--username `, `Authentication username.`) - .option(`--password `, `Authentication password.`) - .option(`--encryption `, `Encryption type. Can be omitted, 'ssl', or 'tls'`) - .option(`--auto-tls [value]`, `Enable SMTP AutoTLS feature.`, (value) => value === undefined ? true : parseBool(value)) - .option(`--mailer `, `The value to use for the X-Mailer header.`) - .option(`--from-name `, `Sender Name.`) - .option(`--from-email `, `Sender email address.`) - .option(`--reply-to-name `, `Name set in the reply to field for the mail. Default value is sender name.`) - .option(`--reply-to-email `, `Email set in the reply to field for the mail. Default value is sender email.`) - .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(messagingCreateSmtpProvider)) - messaging .command(`create-smtp-provider`) .description(`Create a new SMTP provider.`) @@ -3295,25 +2664,6 @@ messaging .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(messagingCreateSMTPProvider)) -messaging - .command(`update-smtp-provider`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'messaging update-smtp-provider' instead] Update a SMTP provider by its unique ID.`) - .requiredOption(`--provider-id `, `Provider ID.`) - .option(`--name `, `Provider name.`) - .option(`--host `, `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.`) - .option(`--port `, `SMTP port.`, parseInteger) - .option(`--username `, `Authentication username.`) - .option(`--password `, `Authentication password.`) - .option(`--encryption `, `Encryption type. Can be 'ssl' or 'tls'`) - .option(`--auto-tls [value]`, `Enable SMTP AutoTLS feature.`, (value) => value === undefined ? true : parseBool(value)) - .option(`--mailer `, `The value to use for the X-Mailer header.`) - .option(`--from-name `, `Sender Name.`) - .option(`--from-email `, `Sender email address.`) - .option(`--reply-to-name `, `Name set in the Reply To field for the mail. Default value is Sender Name.`) - .option(`--reply-to-email `, `Email set in the Reply To field for the mail. Default value is Sender Email.`) - .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(messagingUpdateSmtpProvider)) - messaging .command(`update-smtp-provider`) .description(`Update a SMTP provider by its unique ID.`) @@ -3530,22 +2880,16 @@ module.exports = { messagingUpdateEmail, messagingCreatePush, messagingUpdatePush, - messagingCreateSms, messagingCreateSMS, - messagingUpdateSms, messagingUpdateSMS, messagingGetMessage, messagingDelete, messagingListMessageLogs, messagingListTargets, messagingListProviders, - messagingCreateApnsProvider, messagingCreateAPNSProvider, - messagingUpdateApnsProvider, messagingUpdateAPNSProvider, - messagingCreateFcmProvider, messagingCreateFCMProvider, - messagingUpdateFcmProvider, messagingUpdateFCMProvider, messagingCreateMailgunProvider, messagingUpdateMailgunProvider, @@ -3553,9 +2897,7 @@ module.exports = { messagingUpdateMsg91Provider, messagingCreateSendgridProvider, messagingUpdateSendgridProvider, - messagingCreateSmtpProvider, messagingCreateSMTPProvider, - messagingUpdateSmtpProvider, messagingUpdateSMTPProvider, messagingCreateTelesignProvider, messagingUpdateTelesignProvider, diff --git a/lib/commands/migrations.js b/lib/commands/migrations.js index 0e43f5d..792ec7d 100644 --- a/lib/commands/migrations.js +++ b/lib/commands/migrations.js @@ -75,7 +75,6 @@ const migrationsList = async ({queries,search,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} MigrationsCreateAppwriteMigrationRequestParams * @property {string[]} resources List of resources to migrate @@ -122,7 +121,6 @@ const migrationsCreateAppwriteMigration = async ({resources,endpoint,projectId,a return response; } - /** * @typedef {Object} MigrationsGetAppwriteReportRequestParams * @property {string[]} resources List of resources to migrate @@ -167,7 +165,6 @@ const migrationsGetAppwriteReport = async ({resources,endpoint,projectID,key,par return response; } - /** * @typedef {Object} MigrationsCreateCsvMigrationRequestParams * @property {string} bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -213,7 +210,6 @@ const migrationsCreateCsvMigration = async ({bucketId,fileId,resourceId,internal return response; } - /** * @typedef {Object} MigrationsCreateFirebaseMigrationRequestParams * @property {string[]} resources List of resources to migrate @@ -252,7 +248,6 @@ const migrationsCreateFirebaseMigration = async ({resources,serviceAccount,parse return response; } - /** * @typedef {Object} MigrationsGetFirebaseReportRequestParams * @property {string[]} resources List of resources to migrate @@ -289,7 +284,6 @@ const migrationsGetFirebaseReport = async ({resources,serviceAccount,parseOutput return response; } - /** * @typedef {Object} MigrationsCreateNHostMigrationRequestParams * @property {string[]} resources List of resources to migrate @@ -352,7 +346,6 @@ const migrationsCreateNHostMigration = async ({resources,subdomain,region,adminS return response; } - /** * @typedef {Object} MigrationsGetNHostReportRequestParams * @property {string[]} resources List of resources to migrate. @@ -413,7 +406,6 @@ const migrationsGetNHostReport = async ({resources,subdomain,region,adminSecret, return response; } - /** * @typedef {Object} MigrationsCreateSupabaseMigrationRequestParams * @property {string[]} resources List of resources to migrate @@ -472,7 +464,6 @@ const migrationsCreateSupabaseMigration = async ({resources,endpoint,apiKey,data return response; } - /** * @typedef {Object} MigrationsGetSupabaseReportRequestParams * @property {string[]} resources List of resources to migrate @@ -529,7 +520,6 @@ const migrationsGetSupabaseReport = async ({resources,endpoint,apiKey,databaseHo return response; } - /** * @typedef {Object} MigrationsGetRequestParams * @property {string} migrationId Migration unique ID. @@ -559,7 +549,6 @@ const migrationsGet = async ({migrationId,parseOutput = true, overrideForCli = f return response; } - /** * @typedef {Object} MigrationsRetryRequestParams * @property {string} migrationId Migration unique ID. @@ -590,7 +579,6 @@ const migrationsRetry = async ({migrationId,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} MigrationsDeleteRequestParams * @property {string} migrationId Migration ID. @@ -621,7 +609,6 @@ const migrationsDelete = async ({migrationId,parseOutput = true, overrideForCli return response; } - migrations .command(`list`) .description(`List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.`) diff --git a/lib/commands/project.js b/lib/commands/project.js index 950c5cb..cb9ebbc 100644 --- a/lib/commands/project.js +++ b/lib/commands/project.js @@ -79,7 +79,6 @@ const projectGetUsage = async ({startDate,endDate,period,parseOutput = true, ove return response; } - /** * @typedef {Object} ProjectListVariablesRequestParams * @property {boolean} overrideForCli @@ -108,7 +107,6 @@ const projectListVariables = async ({parseOutput = true, overrideForCli = false, return response; } - /** * @typedef {Object} ProjectCreateVariableRequestParams * @property {string} key Variable key. Max length: 255 chars. @@ -150,7 +148,6 @@ const projectCreateVariable = async ({key,value,secret,parseOutput = true, overr return response; } - /** * @typedef {Object} ProjectGetVariableRequestParams * @property {string} variableId Variable unique ID. @@ -180,7 +177,6 @@ const projectGetVariable = async ({variableId,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} ProjectUpdateVariableRequestParams * @property {string} variableId Variable unique ID. @@ -223,7 +219,6 @@ const projectUpdateVariable = async ({variableId,key,value,secret,parseOutput = return response; } - /** * @typedef {Object} ProjectDeleteVariableRequestParams * @property {string} variableId Variable unique ID. @@ -254,7 +249,6 @@ const projectDeleteVariable = async ({variableId,parseOutput = true, overrideFor return response; } - project .command(`get-usage`) .description(`Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.`) diff --git a/lib/commands/projects.js b/lib/commands/projects.js index 5696591..bda0165 100644 --- a/lib/commands/projects.js +++ b/lib/commands/projects.js @@ -79,7 +79,6 @@ const projectsList = async ({queries,search,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} ProjectsCreateRequestParams * @property {string} projectId Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars. @@ -161,7 +160,6 @@ const projectsCreate = async ({projectId,name,teamId,region,description,logo,url return response; } - /** * @typedef {Object} ProjectsGetRequestParams * @property {string} projectId Project unique ID. @@ -195,7 +193,6 @@ const projectsGet = async ({projectId,parseOutput = true, overrideForCli = false return response; } - /** * @typedef {Object} ProjectsUpdateRequestParams * @property {string} projectId Project unique ID. @@ -266,7 +263,6 @@ const projectsUpdate = async ({projectId,name,description,logo,url,legalName,leg return response; } - /** * @typedef {Object} ProjectsDeleteRequestParams * @property {string} projectId Project unique ID. @@ -297,46 +293,6 @@ const projectsDelete = async ({projectId,parseOutput = true, overrideForCli = fa return response; } - -/** - * @typedef {Object} ProjectsUpdateApiStatusRequestParams - * @property {string} projectId Project unique ID. - * @property {Api} api API name. - * @property {boolean} status API status. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {ProjectsUpdateApiStatusRequestParams} params - */ -const projectsUpdateApiStatus = async ({projectId,api,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForConsole() : - sdk; - let apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId); - let payload = {}; - if (typeof api !== 'undefined') { - payload['api'] = api; - } - if (typeof status !== 'undefined') { - payload['status'] = status; - } - - let response = undefined; - - response = await client.call('patch', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} ProjectsUpdateAPIStatusRequestParams * @property {string} projectId Project unique ID. @@ -375,42 +331,6 @@ const projectsUpdateAPIStatus = async ({projectId,api,status,parseOutput = true, return response; } - -/** - * @typedef {Object} ProjectsUpdateApiStatusAllRequestParams - * @property {string} projectId Project unique ID. - * @property {boolean} status API status. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {ProjectsUpdateApiStatusAllRequestParams} params - */ -const projectsUpdateApiStatusAll = async ({projectId,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForConsole() : - sdk; - let apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId); - let payload = {}; - if (typeof status !== 'undefined') { - payload['status'] = status; - } - - let response = undefined; - - response = await client.call('patch', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} ProjectsUpdateAPIStatusAllRequestParams * @property {string} projectId Project unique ID. @@ -445,7 +365,6 @@ const projectsUpdateAPIStatusAll = async ({projectId,status,parseOutput = true, return response; } - /** * @typedef {Object} ProjectsUpdateAuthDurationRequestParams * @property {string} projectId Project unique ID. @@ -480,7 +399,6 @@ const projectsUpdateAuthDuration = async ({projectId,duration,parseOutput = true return response; } - /** * @typedef {Object} ProjectsUpdateAuthLimitRequestParams * @property {string} projectId Project unique ID. @@ -515,7 +433,6 @@ const projectsUpdateAuthLimit = async ({projectId,limit,parseOutput = true, over return response; } - /** * @typedef {Object} ProjectsUpdateAuthSessionsLimitRequestParams * @property {string} projectId Project unique ID. @@ -550,7 +467,6 @@ const projectsUpdateAuthSessionsLimit = async ({projectId,limit,parseOutput = tr return response; } - /** * @typedef {Object} ProjectsUpdateMembershipsPrivacyRequestParams * @property {string} projectId Project unique ID. @@ -593,7 +509,6 @@ const projectsUpdateMembershipsPrivacy = async ({projectId,userName,userEmail,mf return response; } - /** * @typedef {Object} ProjectsUpdateMockNumbersRequestParams * @property {string} projectId Project unique ID. @@ -629,7 +544,6 @@ const projectsUpdateMockNumbers = async ({projectId,numbers,parseOutput = true, return response; } - /** * @typedef {Object} ProjectsUpdateAuthPasswordDictionaryRequestParams * @property {string} projectId Project unique ID. @@ -664,7 +578,6 @@ const projectsUpdateAuthPasswordDictionary = async ({projectId,enabled,parseOutp return response; } - /** * @typedef {Object} ProjectsUpdateAuthPasswordHistoryRequestParams * @property {string} projectId Project unique ID. @@ -699,7 +612,6 @@ const projectsUpdateAuthPasswordHistory = async ({projectId,limit,parseOutput = return response; } - /** * @typedef {Object} ProjectsUpdatePersonalDataCheckRequestParams * @property {string} projectId Project unique ID. @@ -734,7 +646,6 @@ const projectsUpdatePersonalDataCheck = async ({projectId,enabled,parseOutput = return response; } - /** * @typedef {Object} ProjectsUpdateSessionAlertsRequestParams * @property {string} projectId Project unique ID. @@ -769,7 +680,6 @@ const projectsUpdateSessionAlerts = async ({projectId,alerts,parseOutput = true, return response; } - /** * @typedef {Object} ProjectsUpdateSessionInvalidationRequestParams * @property {string} projectId Project unique ID. @@ -804,7 +714,6 @@ const projectsUpdateSessionInvalidation = async ({projectId,enabled,parseOutput return response; } - /** * @typedef {Object} ProjectsUpdateAuthStatusRequestParams * @property {string} projectId Project unique ID. @@ -840,7 +749,6 @@ const projectsUpdateAuthStatus = async ({projectId,method,status,parseOutput = t return response; } - /** * @typedef {Object} ProjectsListDevKeysRequestParams * @property {string} projectId Project unique ID. @@ -878,7 +786,6 @@ const projectsListDevKeys = async ({projectId,queries,parseOutput = true, overri return response; } - /** * @typedef {Object} ProjectsCreateDevKeyRequestParams * @property {string} projectId Project unique ID. @@ -917,7 +824,6 @@ const projectsCreateDevKey = async ({projectId,name,expire,parseOutput = true, o return response; } - /** * @typedef {Object} ProjectsGetDevKeyRequestParams * @property {string} projectId Project unique ID. @@ -952,7 +858,6 @@ const projectsGetDevKey = async ({projectId,keyId,parseOutput = true, overrideFo return response; } - /** * @typedef {Object} ProjectsUpdateDevKeyRequestParams * @property {string} projectId Project unique ID. @@ -992,7 +897,6 @@ const projectsUpdateDevKey = async ({projectId,keyId,name,expire,parseOutput = t return response; } - /** * @typedef {Object} ProjectsDeleteDevKeyRequestParams * @property {string} projectId Project unique ID. @@ -1024,7 +928,6 @@ const projectsDeleteDevKey = async ({projectId,keyId,parseOutput = true, overrid return response; } - /** * @typedef {Object} ProjectsCreateJWTRequestParams * @property {string} projectId Project unique ID. @@ -1064,7 +967,6 @@ const projectsCreateJWT = async ({projectId,scopes,duration,parseOutput = true, return response; } - /** * @typedef {Object} ProjectsListKeysRequestParams * @property {string} projectId Project unique ID. @@ -1098,7 +1000,6 @@ const projectsListKeys = async ({projectId,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} ProjectsCreateKeyRequestParams * @property {string} projectId Project unique ID. @@ -1142,7 +1043,6 @@ const projectsCreateKey = async ({projectId,name,scopes,expire,parseOutput = tru return response; } - /** * @typedef {Object} ProjectsGetKeyRequestParams * @property {string} projectId Project unique ID. @@ -1177,7 +1077,6 @@ const projectsGetKey = async ({projectId,keyId,parseOutput = true, overrideForCl return response; } - /** * @typedef {Object} ProjectsUpdateKeyRequestParams * @property {string} projectId Project unique ID. @@ -1222,7 +1121,6 @@ const projectsUpdateKey = async ({projectId,keyId,name,scopes,expire,parseOutput return response; } - /** * @typedef {Object} ProjectsDeleteKeyRequestParams * @property {string} projectId Project unique ID. @@ -1254,7 +1152,6 @@ const projectsDeleteKey = async ({projectId,keyId,parseOutput = true, overrideFo return response; } - /** * @typedef {Object} ProjectsUpdateOAuth2RequestParams * @property {string} projectId Project unique ID. @@ -1301,7 +1198,6 @@ const projectsUpdateOAuth2 = async ({projectId,provider,appId,secret,enabled,par return response; } - /** * @typedef {Object} ProjectsListPlatformsRequestParams * @property {string} projectId Project unique ID. @@ -1335,7 +1231,6 @@ const projectsListPlatforms = async ({projectId,parseOutput = true, overrideForC return response; } - /** * @typedef {Object} ProjectsCreatePlatformRequestParams * @property {string} projectId Project unique ID. @@ -1386,7 +1281,6 @@ const projectsCreatePlatform = async ({projectId,type,name,key,store,hostname,pa return response; } - /** * @typedef {Object} ProjectsGetPlatformRequestParams * @property {string} projectId Project unique ID. @@ -1421,7 +1315,6 @@ const projectsGetPlatform = async ({projectId,platformId,parseOutput = true, ove return response; } - /** * @typedef {Object} ProjectsUpdatePlatformRequestParams * @property {string} projectId Project unique ID. @@ -1469,7 +1362,6 @@ const projectsUpdatePlatform = async ({projectId,platformId,name,key,store,hostn return response; } - /** * @typedef {Object} ProjectsDeletePlatformRequestParams * @property {string} projectId Project unique ID. @@ -1501,7 +1393,6 @@ const projectsDeletePlatform = async ({projectId,platformId,parseOutput = true, return response; } - /** * @typedef {Object} ProjectsUpdateServiceStatusRequestParams * @property {string} projectId Project unique ID. @@ -1540,7 +1431,6 @@ const projectsUpdateServiceStatus = async ({projectId,service,status,parseOutput return response; } - /** * @typedef {Object} ProjectsUpdateServiceStatusAllRequestParams * @property {string} projectId Project unique ID. @@ -1575,74 +1465,6 @@ const projectsUpdateServiceStatusAll = async ({projectId,status,parseOutput = tr return response; } - -/** - * @typedef {Object} ProjectsUpdateSmtpRequestParams - * @property {string} projectId Project unique ID. - * @property {boolean} enabled Enable custom SMTP service - * @property {string} senderName Name of the email sender - * @property {string} senderEmail Email of the sender - * @property {string} replyTo Reply to email - * @property {string} host SMTP server host name - * @property {number} port SMTP server port - * @property {string} username SMTP server username - * @property {string} password SMTP server password - * @property {SMTPSecure} secure Does SMTP server use secure connection - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {ProjectsUpdateSmtpRequestParams} params - */ -const projectsUpdateSmtp = async ({projectId,enabled,senderName,senderEmail,replyTo,host,port,username,password,secure,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForConsole() : - sdk; - let apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId); - let payload = {}; - if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; - } - if (typeof senderName !== 'undefined') { - payload['senderName'] = senderName; - } - if (typeof senderEmail !== 'undefined') { - payload['senderEmail'] = senderEmail; - } - if (typeof replyTo !== 'undefined') { - payload['replyTo'] = replyTo; - } - if (typeof host !== 'undefined') { - payload['host'] = host; - } - if (typeof port !== 'undefined') { - payload['port'] = port; - } - if (typeof username !== 'undefined') { - payload['username'] = username; - } - if (typeof password !== 'undefined') { - payload['password'] = password; - } - if (typeof secure !== 'undefined') { - payload['secure'] = secure; - } - - let response = undefined; - - response = await client.call('patch', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} ProjectsUpdateSMTPRequestParams * @property {string} projectId Project unique ID. @@ -1709,75 +1531,6 @@ const projectsUpdateSMTP = async ({projectId,enabled,senderName,senderEmail,repl return response; } - -/** - * @typedef {Object} ProjectsCreateSmtpTestRequestParams - * @property {string} projectId Project unique ID. - * @property {string[]} emails Array of emails to send test email to. Maximum of 10 emails are allowed. - * @property {string} senderName Name of the email sender - * @property {string} senderEmail Email of the sender - * @property {string} host SMTP server host name - * @property {string} replyTo Reply to email - * @property {number} port SMTP server port - * @property {string} username SMTP server username - * @property {string} password SMTP server password - * @property {SMTPSecure} secure Does SMTP server use secure connection - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {ProjectsCreateSmtpTestRequestParams} params - */ -const projectsCreateSmtpTest = async ({projectId,emails,senderName,senderEmail,host,replyTo,port,username,password,secure,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForConsole() : - sdk; - let apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId); - let payload = {}; - emails = emails === true ? [] : emails; - if (typeof emails !== 'undefined') { - payload['emails'] = emails; - } - if (typeof senderName !== 'undefined') { - payload['senderName'] = senderName; - } - if (typeof senderEmail !== 'undefined') { - payload['senderEmail'] = senderEmail; - } - if (typeof replyTo !== 'undefined') { - payload['replyTo'] = replyTo; - } - if (typeof host !== 'undefined') { - payload['host'] = host; - } - if (typeof port !== 'undefined') { - payload['port'] = port; - } - if (typeof username !== 'undefined') { - payload['username'] = username; - } - if (typeof password !== 'undefined') { - payload['password'] = password; - } - if (typeof secure !== 'undefined') { - payload['secure'] = secure; - } - - let response = undefined; - - response = await client.call('post', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} ProjectsCreateSMTPTestRequestParams * @property {string} projectId Project unique ID. @@ -1845,7 +1598,6 @@ const projectsCreateSMTPTest = async ({projectId,emails,senderName,senderEmail,h return response; } - /** * @typedef {Object} ProjectsUpdateTeamRequestParams * @property {string} projectId Project unique ID. @@ -1880,7 +1632,6 @@ const projectsUpdateTeam = async ({projectId,teamId,parseOutput = true, override return response; } - /** * @typedef {Object} ProjectsGetEmailTemplateRequestParams * @property {string} projectId Project unique ID. @@ -1912,7 +1663,6 @@ const projectsGetEmailTemplate = async ({projectId,type,locale,parseOutput = tru return response; } - /** * @typedef {Object} ProjectsUpdateEmailTemplateRequestParams * @property {string} projectId Project unique ID. @@ -1965,7 +1715,6 @@ const projectsUpdateEmailTemplate = async ({projectId,type,locale,subject,messag return response; } - /** * @typedef {Object} ProjectsDeleteEmailTemplateRequestParams * @property {string} projectId Project unique ID. @@ -1998,39 +1747,6 @@ const projectsDeleteEmailTemplate = async ({projectId,type,locale,parseOutput = return response; } - -/** - * @typedef {Object} ProjectsGetSmsTemplateRequestParams - * @property {string} projectId Project unique ID. - * @property {SmsTemplateType} type Template type - * @property {SmsTemplateLocale} locale Template locale - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {ProjectsGetSmsTemplateRequestParams} params - */ -const projectsGetSmsTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForConsole() : - sdk; - let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale); - let payload = {}; - - let response = undefined; - - response = await client.call('get', apiPath, { - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} ProjectsGetSMSTemplateRequestParams * @property {string} projectId Project unique ID. @@ -2062,44 +1778,6 @@ const projectsGetSMSTemplate = async ({projectId,type,locale,parseOutput = true, return response; } - -/** - * @typedef {Object} ProjectsUpdateSmsTemplateRequestParams - * @property {string} projectId Project unique ID. - * @property {SmsTemplateType} type Template type - * @property {SmsTemplateLocale} locale Template locale - * @property {string} message Template message - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {ProjectsUpdateSmsTemplateRequestParams} params - */ -const projectsUpdateSmsTemplate = async ({projectId,type,locale,message,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForConsole() : - sdk; - let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale); - let payload = {}; - if (typeof message !== 'undefined') { - payload['message'] = message; - } - - let response = undefined; - - response = await client.call('patch', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} ProjectsUpdateSMSTemplateRequestParams * @property {string} projectId Project unique ID. @@ -2136,40 +1814,6 @@ const projectsUpdateSMSTemplate = async ({projectId,type,locale,message,parseOut return response; } - -/** - * @typedef {Object} ProjectsDeleteSmsTemplateRequestParams - * @property {string} projectId Project unique ID. - * @property {SmsTemplateType} type Template type - * @property {SmsTemplateLocale} locale Template locale - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {ProjectsDeleteSmsTemplateRequestParams} params - */ -const projectsDeleteSmsTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForConsole() : - sdk; - let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale); - let payload = {}; - - let response = undefined; - - response = await client.call('delete', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} ProjectsDeleteSMSTemplateRequestParams * @property {string} projectId Project unique ID. @@ -2202,7 +1846,6 @@ const projectsDeleteSMSTemplate = async ({projectId,type,locale,parseOutput = tr return response; } - /** * @typedef {Object} ProjectsListWebhooksRequestParams * @property {string} projectId Project unique ID. @@ -2236,7 +1879,6 @@ const projectsListWebhooks = async ({projectId,parseOutput = true, overrideForCl return response; } - /** * @typedef {Object} ProjectsCreateWebhookRequestParams * @property {string} projectId Project unique ID. @@ -2296,7 +1938,6 @@ const projectsCreateWebhook = async ({projectId,name,events,url,security,enabled return response; } - /** * @typedef {Object} ProjectsGetWebhookRequestParams * @property {string} projectId Project unique ID. @@ -2331,7 +1972,6 @@ const projectsGetWebhook = async ({projectId,webhookId,parseOutput = true, overr return response; } - /** * @typedef {Object} ProjectsUpdateWebhookRequestParams * @property {string} projectId Project unique ID. @@ -2392,7 +2032,6 @@ const projectsUpdateWebhook = async ({projectId,webhookId,name,events,url,securi return response; } - /** * @typedef {Object} ProjectsDeleteWebhookRequestParams * @property {string} projectId Project unique ID. @@ -2424,7 +2063,6 @@ const projectsDeleteWebhook = async ({projectId,webhookId,parseOutput = true, ov return response; } - /** * @typedef {Object} ProjectsUpdateWebhookSignatureRequestParams * @property {string} projectId Project unique ID. @@ -2456,7 +2094,6 @@ const projectsUpdateWebhookSignature = async ({projectId,webhookId,parseOutput = return response; } - projects .command(`list`) .description(`Get a list of all projects. You can use the query params to filter your results. `) @@ -2512,14 +2149,6 @@ projects .requiredOption(`--project-id `, `Project unique ID.`) .action(actionRunner(projectsDelete)) -projects - .command(`update-api-status`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects update-api-status' instead] Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--api `, `API name.`) - .requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(projectsUpdateApiStatus)) - projects .command(`update-api-status`) .description(`Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`) @@ -2528,13 +2157,6 @@ projects .requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(projectsUpdateAPIStatus)) -projects - .command(`update-api-status-all`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects update-api-status-all' instead] 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.`) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(projectsUpdateApiStatusAll)) - projects .command(`update-api-status-all`) .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.`) @@ -2780,21 +2402,6 @@ projects .requiredOption(`--status [value]`, `Service status.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(projectsUpdateServiceStatusAll)) -projects - .command(`update-smtp`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects update-smtp' instead] 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. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--enabled [value]`, `Enable custom SMTP service`, (value) => value === undefined ? true : parseBool(value)) - .option(`--sender-name `, `Name of the email sender`) - .option(`--sender-email `, `Email of the sender`) - .option(`--reply-to `, `Reply to email`) - .option(`--host `, `SMTP server host name`) - .option(`--port `, `SMTP server port`, parseInteger) - .option(`--username `, `SMTP server username`) - .option(`--password `, `SMTP server password`) - .option(`--secure `, `Does SMTP server use secure connection`) - .action(actionRunner(projectsUpdateSmtp)) - projects .command(`update-smtp`) .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. `) @@ -2810,21 +2417,6 @@ projects .option(`--secure `, `Does SMTP server use secure connection`) .action(actionRunner(projectsUpdateSMTP)) -projects - .command(`create-smtp-test`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects create-smtp-test' instead] Send a test email to verify SMTP configuration. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`) - .requiredOption(`--sender-name `, `Name of the email sender`) - .requiredOption(`--sender-email `, `Email of the sender`) - .requiredOption(`--host `, `SMTP server host name`) - .option(`--reply-to `, `Reply to email`) - .option(`--port `, `SMTP server port`, parseInteger) - .option(`--username `, `SMTP server username`) - .option(`--password `, `SMTP server password`) - .option(`--secure `, `Does SMTP server use secure connection`) - .action(actionRunner(projectsCreateSmtpTest)) - projects .command(`create-smtp-test`) .description(`Send a test email to verify SMTP configuration. `) @@ -2876,14 +2468,6 @@ projects .requiredOption(`--locale `, `Template locale`) .action(actionRunner(projectsDeleteEmailTemplate)) -projects - .command(`get-sms-template`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects get-sms-template' instead] Get a custom SMS template for the specified locale and type returning it's contents.`) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--type `, `Template type`) - .requiredOption(`--locale `, `Template locale`) - .action(actionRunner(projectsGetSmsTemplate)) - projects .command(`get-sms-template`) .description(`Get a custom SMS template for the specified locale and type returning it's contents.`) @@ -2892,15 +2476,6 @@ projects .requiredOption(`--locale `, `Template locale`) .action(actionRunner(projectsGetSMSTemplate)) -projects - .command(`update-sms-template`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects update-sms-template' instead] Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--type `, `Template type`) - .requiredOption(`--locale `, `Template locale`) - .requiredOption(`--message `, `Template message`) - .action(actionRunner(projectsUpdateSmsTemplate)) - projects .command(`update-sms-template`) .description(`Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `) @@ -2910,14 +2485,6 @@ projects .requiredOption(`--message `, `Template message`) .action(actionRunner(projectsUpdateSMSTemplate)) -projects - .command(`delete-sms-template`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'projects delete-sms-template' instead] Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--type `, `Template type`) - .requiredOption(`--locale `, `Template locale`) - .action(actionRunner(projectsDeleteSmsTemplate)) - projects .command(`delete-sms-template`) .description(`Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `) @@ -2989,9 +2556,7 @@ module.exports = { projectsGet, projectsUpdate, projectsDelete, - projectsUpdateApiStatus, projectsUpdateAPIStatus, - projectsUpdateApiStatusAll, projectsUpdateAPIStatusAll, projectsUpdateAuthDuration, projectsUpdateAuthLimit, @@ -3023,19 +2588,14 @@ module.exports = { projectsDeletePlatform, projectsUpdateServiceStatus, projectsUpdateServiceStatusAll, - projectsUpdateSmtp, projectsUpdateSMTP, - projectsCreateSmtpTest, projectsCreateSMTPTest, projectsUpdateTeam, projectsGetEmailTemplate, projectsUpdateEmailTemplate, projectsDeleteEmailTemplate, - projectsGetSmsTemplate, projectsGetSMSTemplate, - projectsUpdateSmsTemplate, projectsUpdateSMSTemplate, - projectsDeleteSmsTemplate, projectsDeleteSMSTemplate, projectsListWebhooks, projectsCreateWebhook, diff --git a/lib/commands/proxy.js b/lib/commands/proxy.js index 008b186..c8339c9 100644 --- a/lib/commands/proxy.js +++ b/lib/commands/proxy.js @@ -75,7 +75,6 @@ const proxyListRules = async ({queries,search,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} ProxyCreateAPIRuleRequestParams * @property {string} domain Domain name. @@ -109,7 +108,6 @@ const proxyCreateAPIRule = async ({domain,parseOutput = true, overrideForCli = f return response; } - /** * @typedef {Object} ProxyCreateFunctionRuleRequestParams * @property {string} domain Domain name. @@ -151,7 +149,6 @@ const proxyCreateFunctionRule = async ({domain,functionId,branch,parseOutput = t return response; } - /** * @typedef {Object} ProxyCreateRedirectRuleRequestParams * @property {string} domain Domain name. @@ -201,7 +198,6 @@ const proxyCreateRedirectRule = async ({domain,url,statusCode,resourceId,resourc return response; } - /** * @typedef {Object} ProxyCreateSiteRuleRequestParams * @property {string} domain Domain name. @@ -243,7 +239,6 @@ const proxyCreateSiteRule = async ({domain,siteId,branch,parseOutput = true, ove return response; } - /** * @typedef {Object} ProxyGetRuleRequestParams * @property {string} ruleId Rule ID. @@ -273,7 +268,6 @@ const proxyGetRule = async ({ruleId,parseOutput = true, overrideForCli = false, return response; } - /** * @typedef {Object} ProxyDeleteRuleRequestParams * @property {string} ruleId Rule ID. @@ -304,7 +298,6 @@ const proxyDeleteRule = async ({ruleId,parseOutput = true, overrideForCli = fals return response; } - /** * @typedef {Object} ProxyUpdateRuleVerificationRequestParams * @property {string} ruleId Rule ID. @@ -335,7 +328,6 @@ const proxyUpdateRuleVerification = async ({ruleId,parseOutput = true, overrideF return response; } - proxy .command(`list-rules`) .description(`Get a list of all the proxy rules. You can use the query params to filter your results.`) diff --git a/lib/commands/sites.js b/lib/commands/sites.js index d41bff4..5c0bf63 100644 --- a/lib/commands/sites.js +++ b/lib/commands/sites.js @@ -79,7 +79,6 @@ const sitesList = async ({queries,search,parseOutput = true, overrideForCli = fa return response; } - /** * @typedef {Object} SitesCreateRequestParams * @property {string} siteId Site 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. @@ -181,7 +180,6 @@ const sitesCreate = async ({siteId,name,framework,buildRuntime,enabled,logging,t return response; } - /** * @typedef {Object} SitesListFrameworksRequestParams * @property {boolean} overrideForCli @@ -214,7 +212,6 @@ const sitesListFrameworks = async ({parseOutput = true, overrideForCli = false, return response; } - /** * @typedef {Object} SitesListSpecificationsRequestParams * @property {boolean} overrideForCli @@ -247,7 +244,6 @@ const sitesListSpecifications = async ({parseOutput = true, overrideForCli = fal return response; } - /** * @typedef {Object} SitesListTemplatesRequestParams * @property {string[]} frameworks List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed. @@ -296,7 +292,6 @@ const sitesListTemplates = async ({frameworks,useCases,limit,offset,parseOutput return response; } - /** * @typedef {Object} SitesGetTemplateRequestParams * @property {string} templateId Template ID. @@ -330,7 +325,6 @@ const sitesGetTemplate = async ({templateId,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} SitesListUsageRequestParams * @property {UsageRange} range Date range. @@ -367,7 +361,6 @@ const sitesListUsage = async ({range,parseOutput = true, overrideForCli = false, return response; } - /** * @typedef {Object} SitesGetRequestParams * @property {string} siteId Site ID. @@ -401,7 +394,6 @@ const sitesGet = async ({siteId,parseOutput = true, overrideForCli = false, sdk return response; } - /** * @typedef {Object} SitesUpdateRequestParams * @property {string} siteId Site ID. @@ -500,7 +492,6 @@ const sitesUpdate = async ({siteId,name,framework,enabled,logging,timeout,instal return response; } - /** * @typedef {Object} SitesDeleteRequestParams * @property {string} siteId Site ID. @@ -531,7 +522,6 @@ const sitesDelete = async ({siteId,parseOutput = true, overrideForCli = false, s return response; } - /** * @typedef {Object} SitesUpdateSiteDeploymentRequestParams * @property {string} siteId Site ID. @@ -566,7 +556,6 @@ const sitesUpdateSiteDeployment = async ({siteId,deploymentId,parseOutput = true return response; } - /** * @typedef {Object} SitesListDeploymentsRequestParams * @property {string} siteId Site ID. @@ -608,7 +597,6 @@ const sitesListDeployments = async ({siteId,queries,search,parseOutput = true, o return response; } - /** * @typedef {Object} SitesCreateDeploymentRequestParams * @property {string} siteId Site ID. @@ -777,7 +765,6 @@ const sitesCreateDeployment = async ({siteId,code,activate,installCommand,buildC return response; } - /** * @typedef {Object} SitesCreateDuplicateDeploymentRequestParams * @property {string} siteId Site ID. @@ -812,7 +799,6 @@ const sitesCreateDuplicateDeployment = async ({siteId,deploymentId,parseOutput = return response; } - /** * @typedef {Object} SitesCreateTemplateDeploymentRequestParams * @property {string} siteId Site ID. @@ -863,7 +849,6 @@ const sitesCreateTemplateDeployment = async ({siteId,repository,owner,rootDirect return response; } - /** * @typedef {Object} SitesCreateVcsDeploymentRequestParams * @property {string} siteId Site ID. @@ -906,7 +891,6 @@ const sitesCreateVcsDeployment = async ({siteId,type,reference,activate,parseOut return response; } - /** * @typedef {Object} SitesGetDeploymentRequestParams * @property {string} siteId Site ID. @@ -941,7 +925,6 @@ const sitesGetDeployment = async ({siteId,deploymentId,parseOutput = true, overr return response; } - /** * @typedef {Object} SitesDeleteDeploymentRequestParams * @property {string} siteId Site ID. @@ -973,7 +956,6 @@ const sitesDeleteDeployment = async ({siteId,deploymentId,parseOutput = true, ov return response; } - /** * @typedef {Object} SitesGetDeploymentDownloadRequestParams * @property {string} siteId Site ID. @@ -1024,7 +1006,6 @@ const sitesGetDeploymentDownload = async ({siteId,deploymentId,type,parseOutput return response; } - /** * @typedef {Object} SitesUpdateDeploymentStatusRequestParams * @property {string} siteId Site ID. @@ -1056,7 +1037,6 @@ const sitesUpdateDeploymentStatus = async ({siteId,deploymentId,parseOutput = tr return response; } - /** * @typedef {Object} SitesListLogsRequestParams * @property {string} siteId Site ID. @@ -1090,7 +1070,6 @@ const sitesListLogs = async ({siteId,queries,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} SitesGetLogRequestParams * @property {string} siteId Site ID. @@ -1125,7 +1104,6 @@ const sitesGetLog = async ({siteId,logId,parseOutput = true, overrideForCli = fa return response; } - /** * @typedef {Object} SitesDeleteLogRequestParams * @property {string} siteId Site ID. @@ -1157,7 +1135,6 @@ const sitesDeleteLog = async ({siteId,logId,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} SitesGetUsageRequestParams * @property {string} siteId Site ID. @@ -1191,7 +1168,6 @@ const sitesGetUsage = async ({siteId,range,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} SitesListVariablesRequestParams * @property {string} siteId Site unique ID. @@ -1221,7 +1197,6 @@ const sitesListVariables = async ({siteId,parseOutput = true, overrideForCli = f return response; } - /** * @typedef {Object} SitesCreateVariableRequestParams * @property {string} siteId Site unique ID. @@ -1264,7 +1239,6 @@ const sitesCreateVariable = async ({siteId,key,value,secret,parseOutput = true, return response; } - /** * @typedef {Object} SitesGetVariableRequestParams * @property {string} siteId Site unique ID. @@ -1295,7 +1269,6 @@ const sitesGetVariable = async ({siteId,variableId,parseOutput = true, overrideF return response; } - /** * @typedef {Object} SitesUpdateVariableRequestParams * @property {string} siteId Site unique ID. @@ -1339,7 +1312,6 @@ const sitesUpdateVariable = async ({siteId,variableId,key,value,secret,parseOutp return response; } - /** * @typedef {Object} SitesDeleteVariableRequestParams * @property {string} siteId Site unique ID. @@ -1371,7 +1343,6 @@ const sitesDeleteVariable = async ({siteId,variableId,parseOutput = true, overri return response; } - sites .command(`list`) .description(`Get a list of all the project's sites. You can use the query params to filter your results.`) diff --git a/lib/commands/storage.js b/lib/commands/storage.js index bcef8ee..46c93aa 100644 --- a/lib/commands/storage.js +++ b/lib/commands/storage.js @@ -79,7 +79,6 @@ const storageListBuckets = async ({queries,search,parseOutput = true, overrideFo return response; } - /** * @typedef {Object} StorageCreateBucketRequestParams * @property {string} bucketId 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. @@ -151,7 +150,6 @@ const storageCreateBucket = async ({bucketId,name,permissions,fileSecurity,enabl return response; } - /** * @typedef {Object} StorageGetBucketRequestParams * @property {string} bucketId Bucket unique ID. @@ -185,7 +183,6 @@ const storageGetBucket = async ({bucketId,parseOutput = true, overrideForCli = f return response; } - /** * @typedef {Object} StorageUpdateBucketRequestParams * @property {string} bucketId Bucket unique ID. @@ -254,7 +251,6 @@ const storageUpdateBucket = async ({bucketId,name,permissions,fileSecurity,enabl return response; } - /** * @typedef {Object} StorageDeleteBucketRequestParams * @property {string} bucketId Bucket unique ID. @@ -285,7 +281,6 @@ const storageDeleteBucket = async ({bucketId,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} StorageListFilesRequestParams * @property {string} bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -327,7 +322,6 @@ const storageListFiles = async ({bucketId,queries,search,parseOutput = true, ove return response; } - /** * @typedef {Object} StorageCreateFileRequestParams * @property {string} bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -460,7 +454,6 @@ const storageCreateFile = async ({bucketId,fileId,file,permissions,parseOutput = return response; } - /** * @typedef {Object} StorageGetFileRequestParams * @property {string} bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -495,7 +488,6 @@ const storageGetFile = async ({bucketId,fileId,parseOutput = true, overrideForCl return response; } - /** * @typedef {Object} StorageUpdateFileRequestParams * @property {string} bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -536,7 +528,6 @@ const storageUpdateFile = async ({bucketId,fileId,name,permissions,parseOutput = return response; } - /** * @typedef {Object} StorageDeleteFileRequestParams * @property {string} bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -568,7 +559,6 @@ const storageDeleteFile = async ({bucketId,fileId,parseOutput = true, overrideFo return response; } - /** * @typedef {Object} StorageGetFileDownloadRequestParams * @property {string} bucketId Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -615,7 +605,6 @@ const storageGetFileDownload = async ({bucketId,fileId,token,parseOutput = true, return response; } - /** * @typedef {Object} StorageGetFilePreviewRequestParams * @property {string} bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -706,7 +695,6 @@ const storageGetFilePreview = async ({bucketId,fileId,width,height,gravity,quali return response; } - /** * @typedef {Object} StorageGetFileViewRequestParams * @property {string} bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -753,7 +741,6 @@ const storageGetFileView = async ({bucketId,fileId,token,parseOutput = true, ove return response; } - /** * @typedef {Object} StorageGetUsageRequestParams * @property {UsageRange} range Date range. @@ -786,7 +773,6 @@ const storageGetUsage = async ({range,parseOutput = true, overrideForCli = false return response; } - /** * @typedef {Object} StorageGetBucketUsageRequestParams * @property {string} bucketId Bucket ID. @@ -824,7 +810,6 @@ const storageGetBucketUsage = async ({bucketId,range,parseOutput = true, overrid return response; } - storage .command(`list-buckets`) .description(`Get a list of all the storage buckets. You can use the query params to filter your results.`) diff --git a/lib/commands/tables-d-b.js b/lib/commands/tables-db.js similarity index 93% rename from lib/commands/tables-d-b.js rename to lib/commands/tables-db.js index 2043c86..46d2280 100644 --- a/lib/commands/tables-d-b.js +++ b/lib/commands/tables-db.js @@ -35,7 +35,7 @@ function convertReadStreamToReadableStream(readStream) { }); } -const tablesdb = new Command("tablesdb").description(commandDescriptions['tablesdb'] ?? '').configureHelp({ +const tablesDB = new Command("tables-db").description(commandDescriptions['tables-db'] ?? '').configureHelp({ helpWidth: process.stdout.columns || 80 }) @@ -51,7 +51,7 @@ const tablesdb = new Command("tablesdb").description(commandDescriptions['tables /** * @param {TablesDBListRequestParams} params */ -const tablesdbList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb'; @@ -79,7 +79,6 @@ const tablesdbList = async ({queries,search,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} TablesDBCreateRequestParams * @property {string} databaseId 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. @@ -93,7 +92,7 @@ const tablesdbList = async ({queries,search,parseOutput = true, overrideForCli = /** * @param {TablesDBCreateRequestParams} params */ -const tablesdbCreate = async ({databaseId,name,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreate = async ({databaseId,name,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb'; @@ -121,7 +120,6 @@ const tablesdbCreate = async ({databaseId,name,enabled,parseOutput = true, overr return response; } - /** * @typedef {Object} TablesDBListUsageRequestParams * @property {UsageRange} range Date range. @@ -133,7 +131,7 @@ const tablesdbCreate = async ({databaseId,name,enabled,parseOutput = true, overr /** * @param {TablesDBListUsageRequestParams} params */ -const tablesdbListUsage = async ({range,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBListUsage = async ({range,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/usage'; @@ -158,7 +156,6 @@ const tablesdbListUsage = async ({range,parseOutput = true, overrideForCli = fal return response; } - /** * @typedef {Object} TablesDBGetRequestParams * @property {string} databaseId Database ID. @@ -170,7 +167,7 @@ const tablesdbListUsage = async ({range,parseOutput = true, overrideForCli = fal /** * @param {TablesDBGetRequestParams} params */ -const tablesdbGet = async ({databaseId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBGet = async ({databaseId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId); @@ -192,7 +189,6 @@ const tablesdbGet = async ({databaseId,parseOutput = true, overrideForCli = fals return response; } - /** * @typedef {Object} TablesDBUpdateRequestParams * @property {string} databaseId Database ID. @@ -206,7 +202,7 @@ const tablesdbGet = async ({databaseId,parseOutput = true, overrideForCli = fals /** * @param {TablesDBUpdateRequestParams} params */ -const tablesdbUpdate = async ({databaseId,name,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdate = async ({databaseId,name,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId); @@ -231,7 +227,6 @@ const tablesdbUpdate = async ({databaseId,name,enabled,parseOutput = true, overr return response; } - /** * @typedef {Object} TablesDBDeleteRequestParams * @property {string} databaseId Database ID. @@ -243,7 +238,7 @@ const tablesdbUpdate = async ({databaseId,name,enabled,parseOutput = true, overr /** * @param {TablesDBDeleteRequestParams} params */ -const tablesdbDelete = async ({databaseId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBDelete = async ({databaseId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId); @@ -262,7 +257,6 @@ const tablesdbDelete = async ({databaseId,parseOutput = true, overrideForCli = f return response; } - /** * @typedef {Object} TablesDBListTablesRequestParams * @property {string} databaseId Database ID. @@ -276,7 +270,7 @@ const tablesdbDelete = async ({databaseId,parseOutput = true, overrideForCli = f /** * @param {TablesDBListTablesRequestParams} params */ -const tablesdbListTables = async ({databaseId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBListTables = async ({databaseId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables'.replace('{databaseId}', databaseId); @@ -304,7 +298,6 @@ const tablesdbListTables = async ({databaseId,queries,search,parseOutput = true, return response; } - /** * @typedef {Object} TablesDBCreateTableRequestParams * @property {string} databaseId Database ID. @@ -321,7 +314,7 @@ const tablesdbListTables = async ({databaseId,queries,search,parseOutput = true, /** * @param {TablesDBCreateTableRequestParams} params */ -const tablesdbCreateTable = async ({databaseId,tableId,name,permissions,rowSecurity,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateTable = async ({databaseId,tableId,name,permissions,rowSecurity,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables'.replace('{databaseId}', databaseId); @@ -356,7 +349,6 @@ const tablesdbCreateTable = async ({databaseId,tableId,name,permissions,rowSecur return response; } - /** * @typedef {Object} TablesDBGetTableRequestParams * @property {string} databaseId Database ID. @@ -369,7 +361,7 @@ const tablesdbCreateTable = async ({databaseId,tableId,name,permissions,rowSecur /** * @param {TablesDBGetTableRequestParams} params */ -const tablesdbGetTable = async ({databaseId,tableId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBGetTable = async ({databaseId,tableId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -391,7 +383,6 @@ const tablesdbGetTable = async ({databaseId,tableId,parseOutput = true, override return response; } - /** * @typedef {Object} TablesDBUpdateTableRequestParams * @property {string} databaseId Database ID. @@ -408,7 +399,7 @@ const tablesdbGetTable = async ({databaseId,tableId,parseOutput = true, override /** * @param {TablesDBUpdateTableRequestParams} params */ -const tablesdbUpdateTable = async ({databaseId,tableId,name,permissions,rowSecurity,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdateTable = async ({databaseId,tableId,name,permissions,rowSecurity,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -440,7 +431,6 @@ const tablesdbUpdateTable = async ({databaseId,tableId,name,permissions,rowSecur return response; } - /** * @typedef {Object} TablesDBDeleteTableRequestParams * @property {string} databaseId Database ID. @@ -453,7 +443,7 @@ const tablesdbUpdateTable = async ({databaseId,tableId,name,permissions,rowSecur /** * @param {TablesDBDeleteTableRequestParams} params */ -const tablesdbDeleteTable = async ({databaseId,tableId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBDeleteTable = async ({databaseId,tableId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -472,7 +462,6 @@ const tablesdbDeleteTable = async ({databaseId,tableId,parseOutput = true, overr return response; } - /** * @typedef {Object} TablesDBListColumnsRequestParams * @property {string} databaseId Database ID. @@ -486,7 +475,7 @@ const tablesdbDeleteTable = async ({databaseId,tableId,parseOutput = true, overr /** * @param {TablesDBListColumnsRequestParams} params */ -const tablesdbListColumns = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBListColumns = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -511,7 +500,6 @@ const tablesdbListColumns = async ({databaseId,tableId,queries,parseOutput = tru return response; } - /** * @typedef {Object} TablesDBCreateBooleanColumnRequestParams * @property {string} databaseId Database ID. @@ -528,7 +516,7 @@ const tablesdbListColumns = async ({databaseId,tableId,queries,parseOutput = tru /** * @param {TablesDBCreateBooleanColumnRequestParams} params */ -const tablesdbCreateBooleanColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateBooleanColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -559,7 +547,6 @@ const tablesdbCreateBooleanColumn = async ({databaseId,tableId,key,required,xdef return response; } - /** * @typedef {Object} TablesDBUpdateBooleanColumnRequestParams * @property {string} databaseId Database ID. @@ -576,7 +563,7 @@ const tablesdbCreateBooleanColumn = async ({databaseId,tableId,key,required,xdef /** * @param {TablesDBUpdateBooleanColumnRequestParams} params */ -const tablesdbUpdateBooleanColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdateBooleanColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -604,7 +591,6 @@ const tablesdbUpdateBooleanColumn = async ({databaseId,tableId,key,required,xdef return response; } - /** * @typedef {Object} TablesDBCreateDatetimeColumnRequestParams * @property {string} databaseId Database ID. @@ -621,7 +607,7 @@ const tablesdbUpdateBooleanColumn = async ({databaseId,tableId,key,required,xdef /** * @param {TablesDBCreateDatetimeColumnRequestParams} params */ -const tablesdbCreateDatetimeColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateDatetimeColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -652,7 +638,6 @@ const tablesdbCreateDatetimeColumn = async ({databaseId,tableId,key,required,xde return response; } - /** * @typedef {Object} TablesDBUpdateDatetimeColumnRequestParams * @property {string} databaseId Database ID. @@ -669,7 +654,7 @@ const tablesdbCreateDatetimeColumn = async ({databaseId,tableId,key,required,xde /** * @param {TablesDBUpdateDatetimeColumnRequestParams} params */ -const tablesdbUpdateDatetimeColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdateDatetimeColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -697,7 +682,6 @@ const tablesdbUpdateDatetimeColumn = async ({databaseId,tableId,key,required,xde return response; } - /** * @typedef {Object} TablesDBCreateEmailColumnRequestParams * @property {string} databaseId Database ID. @@ -714,7 +698,7 @@ const tablesdbUpdateDatetimeColumn = async ({databaseId,tableId,key,required,xde /** * @param {TablesDBCreateEmailColumnRequestParams} params */ -const tablesdbCreateEmailColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateEmailColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -745,7 +729,6 @@ const tablesdbCreateEmailColumn = async ({databaseId,tableId,key,required,xdefau return response; } - /** * @typedef {Object} TablesDBUpdateEmailColumnRequestParams * @property {string} databaseId Database ID. @@ -762,7 +745,7 @@ const tablesdbCreateEmailColumn = async ({databaseId,tableId,key,required,xdefau /** * @param {TablesDBUpdateEmailColumnRequestParams} params */ -const tablesdbUpdateEmailColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdateEmailColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -790,7 +773,6 @@ const tablesdbUpdateEmailColumn = async ({databaseId,tableId,key,required,xdefau return response; } - /** * @typedef {Object} TablesDBCreateEnumColumnRequestParams * @property {string} databaseId Database ID. @@ -808,7 +790,7 @@ const tablesdbUpdateEmailColumn = async ({databaseId,tableId,key,required,xdefau /** * @param {TablesDBCreateEnumColumnRequestParams} params */ -const tablesdbCreateEnumColumn = async ({databaseId,tableId,key,elements,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateEnumColumn = async ({databaseId,tableId,key,elements,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -843,7 +825,6 @@ const tablesdbCreateEnumColumn = async ({databaseId,tableId,key,elements,require return response; } - /** * @typedef {Object} TablesDBUpdateEnumColumnRequestParams * @property {string} databaseId Database ID. @@ -861,7 +842,7 @@ const tablesdbCreateEnumColumn = async ({databaseId,tableId,key,elements,require /** * @param {TablesDBUpdateEnumColumnRequestParams} params */ -const tablesdbUpdateEnumColumn = async ({databaseId,tableId,key,elements,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdateEnumColumn = async ({databaseId,tableId,key,elements,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -893,7 +874,6 @@ const tablesdbUpdateEnumColumn = async ({databaseId,tableId,key,elements,require return response; } - /** * @typedef {Object} TablesDBCreateFloatColumnRequestParams * @property {string} databaseId Database ID. @@ -912,7 +892,7 @@ const tablesdbUpdateEnumColumn = async ({databaseId,tableId,key,elements,require /** * @param {TablesDBCreateFloatColumnRequestParams} params */ -const tablesdbCreateFloatColumn = async ({databaseId,tableId,key,required,min,max,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateFloatColumn = async ({databaseId,tableId,key,required,min,max,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -949,7 +929,6 @@ const tablesdbCreateFloatColumn = async ({databaseId,tableId,key,required,min,ma return response; } - /** * @typedef {Object} TablesDBUpdateFloatColumnRequestParams * @property {string} databaseId Database ID. @@ -968,7 +947,7 @@ const tablesdbCreateFloatColumn = async ({databaseId,tableId,key,required,min,ma /** * @param {TablesDBUpdateFloatColumnRequestParams} params */ -const tablesdbUpdateFloatColumn = async ({databaseId,tableId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdateFloatColumn = async ({databaseId,tableId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -1002,7 +981,6 @@ const tablesdbUpdateFloatColumn = async ({databaseId,tableId,key,required,xdefau return response; } - /** * @typedef {Object} TablesDBCreateIntegerColumnRequestParams * @property {string} databaseId Database ID. @@ -1021,7 +999,7 @@ const tablesdbUpdateFloatColumn = async ({databaseId,tableId,key,required,xdefau /** * @param {TablesDBCreateIntegerColumnRequestParams} params */ -const tablesdbCreateIntegerColumn = async ({databaseId,tableId,key,required,min,max,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateIntegerColumn = async ({databaseId,tableId,key,required,min,max,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -1058,7 +1036,6 @@ const tablesdbCreateIntegerColumn = async ({databaseId,tableId,key,required,min, return response; } - /** * @typedef {Object} TablesDBUpdateIntegerColumnRequestParams * @property {string} databaseId Database ID. @@ -1077,7 +1054,7 @@ const tablesdbCreateIntegerColumn = async ({databaseId,tableId,key,required,min, /** * @param {TablesDBUpdateIntegerColumnRequestParams} params */ -const tablesdbUpdateIntegerColumn = async ({databaseId,tableId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdateIntegerColumn = async ({databaseId,tableId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -1111,7 +1088,6 @@ const tablesdbUpdateIntegerColumn = async ({databaseId,tableId,key,required,xdef return response; } - /** * @typedef {Object} TablesDBCreateIpColumnRequestParams * @property {string} databaseId Database ID. @@ -1128,7 +1104,7 @@ const tablesdbUpdateIntegerColumn = async ({databaseId,tableId,key,required,xdef /** * @param {TablesDBCreateIpColumnRequestParams} params */ -const tablesdbCreateIpColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateIpColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -1159,7 +1135,6 @@ const tablesdbCreateIpColumn = async ({databaseId,tableId,key,required,xdefault, return response; } - /** * @typedef {Object} TablesDBUpdateIpColumnRequestParams * @property {string} databaseId Database ID. @@ -1176,7 +1151,7 @@ const tablesdbCreateIpColumn = async ({databaseId,tableId,key,required,xdefault, /** * @param {TablesDBUpdateIpColumnRequestParams} params */ -const tablesdbUpdateIpColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdateIpColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -1204,7 +1179,6 @@ const tablesdbUpdateIpColumn = async ({databaseId,tableId,key,required,xdefault, return response; } - /** * @typedef {Object} TablesDBCreateRelationshipColumnRequestParams * @property {string} databaseId Database ID. @@ -1223,7 +1197,7 @@ const tablesdbUpdateIpColumn = async ({databaseId,tableId,key,required,xdefault, /** * @param {TablesDBCreateRelationshipColumnRequestParams} params */ -const tablesdbCreateRelationshipColumn = async ({databaseId,tableId,relatedTableId,type,twoWay,key,twoWayKey,onDelete,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateRelationshipColumn = async ({databaseId,tableId,relatedTableId,type,twoWay,key,twoWayKey,onDelete,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -1260,7 +1234,6 @@ const tablesdbCreateRelationshipColumn = async ({databaseId,tableId,relatedTable return response; } - /** * @typedef {Object} TablesDBCreateStringColumnRequestParams * @property {string} databaseId Database ID. @@ -1279,7 +1252,7 @@ const tablesdbCreateRelationshipColumn = async ({databaseId,tableId,relatedTable /** * @param {TablesDBCreateStringColumnRequestParams} params */ -const tablesdbCreateStringColumn = async ({databaseId,tableId,key,size,required,xdefault,array,encrypt,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateStringColumn = async ({databaseId,tableId,key,size,required,xdefault,array,encrypt,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -1316,7 +1289,6 @@ const tablesdbCreateStringColumn = async ({databaseId,tableId,key,size,required, return response; } - /** * @typedef {Object} TablesDBUpdateStringColumnRequestParams * @property {string} databaseId Database ID. @@ -1334,7 +1306,7 @@ const tablesdbCreateStringColumn = async ({databaseId,tableId,key,size,required, /** * @param {TablesDBUpdateStringColumnRequestParams} params */ -const tablesdbUpdateStringColumn = async ({databaseId,tableId,key,required,xdefault,size,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdateStringColumn = async ({databaseId,tableId,key,required,xdefault,size,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -1365,7 +1337,6 @@ const tablesdbUpdateStringColumn = async ({databaseId,tableId,key,required,xdefa return response; } - /** * @typedef {Object} TablesDBCreateUrlColumnRequestParams * @property {string} databaseId Database ID. @@ -1382,7 +1353,7 @@ const tablesdbUpdateStringColumn = async ({databaseId,tableId,key,required,xdefa /** * @param {TablesDBCreateUrlColumnRequestParams} params */ -const tablesdbCreateUrlColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateUrlColumn = async ({databaseId,tableId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -1413,7 +1384,6 @@ const tablesdbCreateUrlColumn = async ({databaseId,tableId,key,required,xdefault return response; } - /** * @typedef {Object} TablesDBUpdateUrlColumnRequestParams * @property {string} databaseId Database ID. @@ -1430,7 +1400,7 @@ const tablesdbCreateUrlColumn = async ({databaseId,tableId,key,required,xdefault /** * @param {TablesDBUpdateUrlColumnRequestParams} params */ -const tablesdbUpdateUrlColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdateUrlColumn = async ({databaseId,tableId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -1458,7 +1428,6 @@ const tablesdbUpdateUrlColumn = async ({databaseId,tableId,key,required,xdefault return response; } - /** * @typedef {Object} TablesDBGetColumnRequestParams * @property {string} databaseId Database ID. @@ -1472,7 +1441,7 @@ const tablesdbUpdateUrlColumn = async ({databaseId,tableId,key,required,xdefault /** * @param {TablesDBGetColumnRequestParams} params */ -const tablesdbGetColumn = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBGetColumn = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -1494,7 +1463,6 @@ const tablesdbGetColumn = async ({databaseId,tableId,key,parseOutput = true, ove return response; } - /** * @typedef {Object} TablesDBDeleteColumnRequestParams * @property {string} databaseId Database ID. @@ -1508,7 +1476,7 @@ const tablesdbGetColumn = async ({databaseId,tableId,key,parseOutput = true, ove /** * @param {TablesDBDeleteColumnRequestParams} params */ -const tablesdbDeleteColumn = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBDeleteColumn = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -1527,7 +1495,6 @@ const tablesdbDeleteColumn = async ({databaseId,tableId,key,parseOutput = true, return response; } - /** * @typedef {Object} TablesDBUpdateRelationshipColumnRequestParams * @property {string} databaseId Database ID. @@ -1543,7 +1510,7 @@ const tablesdbDeleteColumn = async ({databaseId,tableId,key,parseOutput = true, /** * @param {TablesDBUpdateRelationshipColumnRequestParams} params */ -const tablesdbUpdateRelationshipColumn = async ({databaseId,tableId,key,onDelete,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdateRelationshipColumn = async ({databaseId,tableId,key,onDelete,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -1568,7 +1535,6 @@ const tablesdbUpdateRelationshipColumn = async ({databaseId,tableId,key,onDelete return response; } - /** * @typedef {Object} TablesDBListIndexesRequestParams * @property {string} databaseId Database ID. @@ -1582,7 +1548,7 @@ const tablesdbUpdateRelationshipColumn = async ({databaseId,tableId,key,onDelete /** * @param {TablesDBListIndexesRequestParams} params */ -const tablesdbListIndexes = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBListIndexes = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -1607,7 +1573,6 @@ const tablesdbListIndexes = async ({databaseId,tableId,queries,parseOutput = tru return response; } - /** * @typedef {Object} TablesDBCreateIndexRequestParams * @property {string} databaseId Database ID. @@ -1625,7 +1590,7 @@ const tablesdbListIndexes = async ({databaseId,tableId,queries,parseOutput = tru /** * @param {TablesDBCreateIndexRequestParams} params */ -const tablesdbCreateIndex = async ({databaseId,tableId,key,type,columns,orders,lengths,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateIndex = async ({databaseId,tableId,key,type,columns,orders,lengths,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -1662,7 +1627,6 @@ const tablesdbCreateIndex = async ({databaseId,tableId,key,type,columns,orders,l return response; } - /** * @typedef {Object} TablesDBGetIndexRequestParams * @property {string} databaseId Database ID. @@ -1676,7 +1640,7 @@ const tablesdbCreateIndex = async ({databaseId,tableId,key,type,columns,orders,l /** * @param {TablesDBGetIndexRequestParams} params */ -const tablesdbGetIndex = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBGetIndex = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -1694,7 +1658,6 @@ const tablesdbGetIndex = async ({databaseId,tableId,key,parseOutput = true, over return response; } - /** * @typedef {Object} TablesDBDeleteIndexRequestParams * @property {string} databaseId Database ID. @@ -1708,7 +1671,7 @@ const tablesdbGetIndex = async ({databaseId,tableId,key,parseOutput = true, over /** * @param {TablesDBDeleteIndexRequestParams} params */ -const tablesdbDeleteIndex = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBDeleteIndex = async ({databaseId,tableId,key,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); @@ -1727,7 +1690,6 @@ const tablesdbDeleteIndex = async ({databaseId,tableId,key,parseOutput = true, o return response; } - /** * @typedef {Object} TablesDBListTableLogsRequestParams * @property {string} databaseId Database ID. @@ -1741,7 +1703,7 @@ const tablesdbDeleteIndex = async ({databaseId,tableId,key,parseOutput = true, o /** * @param {TablesDBListTableLogsRequestParams} params */ -const tablesdbListTableLogs = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBListTableLogs = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/logs'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -1766,7 +1728,6 @@ const tablesdbListTableLogs = async ({databaseId,tableId,queries,parseOutput = t return response; } - /** * @typedef {Object} TablesDBListRowsRequestParams * @property {string} databaseId Database ID. @@ -1780,7 +1741,7 @@ const tablesdbListTableLogs = async ({databaseId,tableId,queries,parseOutput = t /** * @param {TablesDBListRowsRequestParams} params */ -const tablesdbListRows = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBListRows = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -1805,7 +1766,6 @@ const tablesdbListRows = async ({databaseId,tableId,queries,parseOutput = true, return response; } - /** * @typedef {Object} TablesDBCreateRowRequestParams * @property {string} databaseId Database ID. @@ -1821,7 +1781,7 @@ const tablesdbListRows = async ({databaseId,tableId,queries,parseOutput = true, /** * @param {TablesDBCreateRowRequestParams} params */ -const tablesdbCreateRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -1850,7 +1810,6 @@ const tablesdbCreateRow = async ({databaseId,tableId,rowId,data,permissions,pars return response; } - /** * @typedef {Object} TablesDBCreateRowsRequestParams * @property {string} databaseId Database ID. @@ -1864,7 +1823,7 @@ const tablesdbCreateRow = async ({databaseId,tableId,rowId,data,permissions,pars /** * @param {TablesDBCreateRowsRequestParams} params */ -const tablesdbCreateRows = async ({databaseId,tableId,rows,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBCreateRows = async ({databaseId,tableId,rows,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -1887,7 +1846,6 @@ const tablesdbCreateRows = async ({databaseId,tableId,rows,parseOutput = true, o return response; } - /** * @typedef {Object} TablesDBUpsertRowsRequestParams * @property {string} databaseId Database ID. @@ -1901,7 +1859,7 @@ const tablesdbCreateRows = async ({databaseId,tableId,rows,parseOutput = true, o /** * @param {TablesDBUpsertRowsRequestParams} params */ -const tablesdbUpsertRows = async ({databaseId,tableId,rows,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpsertRows = async ({databaseId,tableId,rows,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -1924,7 +1882,6 @@ const tablesdbUpsertRows = async ({databaseId,tableId,rows,parseOutput = true, o return response; } - /** * @typedef {Object} TablesDBUpdateRowsRequestParams * @property {string} databaseId Database ID. @@ -1939,7 +1896,7 @@ const tablesdbUpsertRows = async ({databaseId,tableId,rows,parseOutput = true, o /** * @param {TablesDBUpdateRowsRequestParams} params */ -const tablesdbUpdateRows = async ({databaseId,tableId,data,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdateRows = async ({databaseId,tableId,data,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -1965,7 +1922,6 @@ const tablesdbUpdateRows = async ({databaseId,tableId,data,queries,parseOutput = return response; } - /** * @typedef {Object} TablesDBDeleteRowsRequestParams * @property {string} databaseId Database ID. @@ -1979,7 +1935,7 @@ const tablesdbUpdateRows = async ({databaseId,tableId,data,queries,parseOutput = /** * @param {TablesDBDeleteRowsRequestParams} params */ -const tablesdbDeleteRows = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBDeleteRows = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -2002,7 +1958,6 @@ const tablesdbDeleteRows = async ({databaseId,tableId,queries,parseOutput = true return response; } - /** * @typedef {Object} TablesDBGetRowRequestParams * @property {string} databaseId Database ID. @@ -2017,7 +1972,7 @@ const tablesdbDeleteRows = async ({databaseId,tableId,queries,parseOutput = true /** * @param {TablesDBGetRowRequestParams} params */ -const tablesdbGetRow = async ({databaseId,tableId,rowId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBGetRow = async ({databaseId,tableId,rowId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId); @@ -2042,7 +1997,6 @@ const tablesdbGetRow = async ({databaseId,tableId,rowId,queries,parseOutput = tr return response; } - /** * @typedef {Object} TablesDBUpsertRowRequestParams * @property {string} databaseId Database ID. @@ -2058,7 +2012,7 @@ const tablesdbGetRow = async ({databaseId,tableId,rowId,queries,parseOutput = tr /** * @param {TablesDBUpsertRowRequestParams} params */ -const tablesdbUpsertRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpsertRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId); @@ -2084,7 +2038,6 @@ const tablesdbUpsertRow = async ({databaseId,tableId,rowId,data,permissions,pars return response; } - /** * @typedef {Object} TablesDBUpdateRowRequestParams * @property {string} databaseId Database ID. @@ -2100,7 +2053,7 @@ const tablesdbUpsertRow = async ({databaseId,tableId,rowId,data,permissions,pars /** * @param {TablesDBUpdateRowRequestParams} params */ -const tablesdbUpdateRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBUpdateRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId); @@ -2126,7 +2079,6 @@ const tablesdbUpdateRow = async ({databaseId,tableId,rowId,data,permissions,pars return response; } - /** * @typedef {Object} TablesDBDeleteRowRequestParams * @property {string} databaseId Database ID. @@ -2140,7 +2092,7 @@ const tablesdbUpdateRow = async ({databaseId,tableId,rowId,data,permissions,pars /** * @param {TablesDBDeleteRowRequestParams} params */ -const tablesdbDeleteRow = async ({databaseId,tableId,rowId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBDeleteRow = async ({databaseId,tableId,rowId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId); @@ -2159,7 +2111,6 @@ const tablesdbDeleteRow = async ({databaseId,tableId,rowId,parseOutput = true, o return response; } - /** * @typedef {Object} TablesDBListRowLogsRequestParams * @property {string} databaseId Database ID. @@ -2174,7 +2125,7 @@ const tablesdbDeleteRow = async ({databaseId,tableId,rowId,parseOutput = true, o /** * @param {TablesDBListRowLogsRequestParams} params */ -const tablesdbListRowLogs = async ({databaseId,tableId,rowId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBListRowLogs = async ({databaseId,tableId,rowId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/logs'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId); @@ -2199,7 +2150,6 @@ const tablesdbListRowLogs = async ({databaseId,tableId,rowId,queries,parseOutput return response; } - /** * @typedef {Object} TablesDBDecrementRowColumnRequestParams * @property {string} databaseId Database ID. @@ -2216,7 +2166,7 @@ const tablesdbListRowLogs = async ({databaseId,tableId,rowId,queries,parseOutput /** * @param {TablesDBDecrementRowColumnRequestParams} params */ -const tablesdbDecrementRowColumn = async ({databaseId,tableId,rowId,column,value,min,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBDecrementRowColumn = async ({databaseId,tableId,rowId,column,value,min,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId).replace('{column}', column); @@ -2241,7 +2191,6 @@ const tablesdbDecrementRowColumn = async ({databaseId,tableId,rowId,column,value return response; } - /** * @typedef {Object} TablesDBIncrementRowColumnRequestParams * @property {string} databaseId Database ID. @@ -2258,7 +2207,7 @@ const tablesdbDecrementRowColumn = async ({databaseId,tableId,rowId,column,value /** * @param {TablesDBIncrementRowColumnRequestParams} params */ -const tablesdbIncrementRowColumn = async ({databaseId,tableId,rowId,column,value,max,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBIncrementRowColumn = async ({databaseId,tableId,rowId,column,value,max,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId).replace('{column}', column); @@ -2283,7 +2232,6 @@ const tablesdbIncrementRowColumn = async ({databaseId,tableId,rowId,column,value return response; } - /** * @typedef {Object} TablesDBGetTableUsageRequestParams * @property {string} databaseId Database ID. @@ -2297,7 +2245,7 @@ const tablesdbIncrementRowColumn = async ({databaseId,tableId,rowId,column,value /** * @param {TablesDBGetTableUsageRequestParams} params */ -const tablesdbGetTableUsage = async ({databaseId,tableId,range,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBGetTableUsage = async ({databaseId,tableId,range,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/usage'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -2322,7 +2270,6 @@ const tablesdbGetTableUsage = async ({databaseId,tableId,range,parseOutput = tru return response; } - /** * @typedef {Object} TablesDBGetUsageRequestParams * @property {string} databaseId Database ID. @@ -2335,7 +2282,7 @@ const tablesdbGetTableUsage = async ({databaseId,tableId,range,parseOutput = tru /** * @param {TablesDBGetUsageRequestParams} params */ -const tablesdbGetUsage = async ({databaseId,range,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const tablesDBGetUsage = async ({databaseId,range,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/usage'.replace('{databaseId}', databaseId); @@ -2356,61 +2303,60 @@ const tablesdbGetUsage = async ({databaseId,range,parseOutput = true, overrideFo return response; } - -tablesdb +tablesDB .command(`list`) .description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`) .option(`--queries [queries...]`, `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`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option(`--console`, `Get the resource console url`) - .action(actionRunner(tablesdbList)) + .action(actionRunner(tablesDBList)) -tablesdb +tablesDB .command(`create`) .description(`Create a new Database. `) .requiredOption(`--database-id `, `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.`) .requiredOption(`--name `, `Database name. Max length: 128 chars.`) .option(`--enabled [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(tablesdbCreate)) + .action(actionRunner(tablesDBCreate)) -tablesdb +tablesDB .command(`list-usage`) .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.`) .option(`--range `, `Date range.`) .option(`--console`, `Get the resource console url`) - .action(actionRunner(tablesdbListUsage)) + .action(actionRunner(tablesDBListUsage)) -tablesdb +tablesDB .command(`get`) .description(`Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.`) .requiredOption(`--database-id `, `Database ID.`) .option(`--console`, `Get the resource console url`) - .action(actionRunner(tablesdbGet)) + .action(actionRunner(tablesDBGet)) -tablesdb +tablesDB .command(`update`) .description(`Update a database by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--name `, `Database name. Max length: 128 chars.`) .option(`--enabled [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(tablesdbUpdate)) + .action(actionRunner(tablesDBUpdate)) -tablesdb +tablesDB .command(`delete`) .description(`Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.`) .requiredOption(`--database-id `, `Database ID.`) - .action(actionRunner(tablesdbDelete)) + .action(actionRunner(tablesDBDelete)) -tablesdb +tablesDB .command(`list-tables`) .description(`Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.`) .requiredOption(`--database-id `, `Database ID.`) .option(`--queries [queries...]`, `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`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option(`--console`, `Get the resource console url`) - .action(actionRunner(tablesdbListTables)) + .action(actionRunner(tablesDBListTables)) -tablesdb +tablesDB .command(`create-table`) .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.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2419,17 +2365,17 @@ tablesdb .option(`--permissions [permissions...]`, `An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`) .option(`--row-security [value]`, `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).`, (value) => value === undefined ? true : parseBool(value)) .option(`--enabled [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(tablesdbCreateTable)) + .action(actionRunner(tablesDBCreateTable)) -tablesdb +tablesDB .command(`get-table`) .description(`Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .option(`--console`, `Get the resource console url`) - .action(actionRunner(tablesdbGetTable)) + .action(actionRunner(tablesDBGetTable)) -tablesdb +tablesDB .command(`update-table`) .description(`Update a table by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2438,25 +2384,25 @@ tablesdb .option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) .option(`--row-security [value]`, `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).`, (value) => value === undefined ? true : parseBool(value)) .option(`--enabled [value]`, `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.`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(tablesdbUpdateTable)) + .action(actionRunner(tablesDBUpdateTable)) -tablesdb +tablesDB .command(`delete-table`) .description(`Delete a table by its unique ID. Only users with write permissions have access to delete this resource.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) - .action(actionRunner(tablesdbDeleteTable)) + .action(actionRunner(tablesDBDeleteTable)) -tablesdb +tablesDB .command(`list-columns`) .description(`List columns in the table.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .option(`--queries [queries...]`, `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`) .option(`--console`, `Get the resource console url`) - .action(actionRunner(tablesdbListColumns)) + .action(actionRunner(tablesDBListColumns)) -tablesdb +tablesDB .command(`create-boolean-column`) .description(`Create a boolean column. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2465,9 +2411,9 @@ tablesdb .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault [value]`, `Default value for column when not provided. Cannot be set when column is required.`, (value) => value === undefined ? true : parseBool(value)) .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(tablesdbCreateBooleanColumn)) + .action(actionRunner(tablesDBCreateBooleanColumn)) -tablesdb +tablesDB .command(`update-boolean-column`) .description(`Update a boolean column. Changing the 'default' value will not update already existing rows.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2476,9 +2422,9 @@ tablesdb .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault [value]`, `Default value for column when not provided. Cannot be set when column is required.`, (value) => value === undefined ? true : parseBool(value)) .option(`--new-key `, `New Column Key.`) - .action(actionRunner(tablesdbUpdateBooleanColumn)) + .action(actionRunner(tablesDBUpdateBooleanColumn)) -tablesdb +tablesDB .command(`create-datetime-column`) .description(`Create a date time column according to the ISO 8601 standard.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2487,9 +2433,9 @@ tablesdb .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `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.`) .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(tablesdbCreateDatetimeColumn)) + .action(actionRunner(tablesDBCreateDatetimeColumn)) -tablesdb +tablesDB .command(`update-datetime-column`) .description(`Update a date time column. Changing the 'default' value will not update already existing rows.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2498,9 +2444,9 @@ tablesdb .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) .option(`--new-key `, `New Column Key.`) - .action(actionRunner(tablesdbUpdateDatetimeColumn)) + .action(actionRunner(tablesDBUpdateDatetimeColumn)) -tablesdb +tablesDB .command(`create-email-column`) .description(`Create an email column. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2509,9 +2455,9 @@ tablesdb .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(tablesdbCreateEmailColumn)) + .action(actionRunner(tablesDBCreateEmailColumn)) -tablesdb +tablesDB .command(`update-email-column`) .description(`Update an email column. Changing the 'default' value will not update already existing rows. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2520,9 +2466,9 @@ tablesdb .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) .option(`--new-key `, `New Column Key.`) - .action(actionRunner(tablesdbUpdateEmailColumn)) + .action(actionRunner(tablesDBUpdateEmailColumn)) -tablesdb +tablesDB .command(`create-enum-column`) .description(`Create an enumeration column. The 'elements' param acts as a white-list of accepted values for this column.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2532,9 +2478,9 @@ tablesdb .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(tablesdbCreateEnumColumn)) + .action(actionRunner(tablesDBCreateEnumColumn)) -tablesdb +tablesDB .command(`update-enum-column`) .description(`Update an enum column. Changing the 'default' value will not update already existing rows. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2544,9 +2490,9 @@ tablesdb .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) .option(`--new-key `, `New Column Key.`) - .action(actionRunner(tablesdbUpdateEnumColumn)) + .action(actionRunner(tablesDBUpdateEnumColumn)) -tablesdb +tablesDB .command(`create-float-column`) .description(`Create a float column. Optionally, minimum and maximum values can be provided. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2557,9 +2503,9 @@ tablesdb .option(`--max `, `Maximum value`, parseInteger) .option(`--xdefault `, `Default value. Cannot be set when required.`, parseInteger) .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(tablesdbCreateFloatColumn)) + .action(actionRunner(tablesDBCreateFloatColumn)) -tablesdb +tablesDB .command(`update-float-column`) .description(`Update a float column. Changing the 'default' value will not update already existing rows. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2570,9 +2516,9 @@ tablesdb .option(`--min `, `Minimum value`, parseInteger) .option(`--max `, `Maximum value`, parseInteger) .option(`--new-key `, `New Column Key.`) - .action(actionRunner(tablesdbUpdateFloatColumn)) + .action(actionRunner(tablesDBUpdateFloatColumn)) -tablesdb +tablesDB .command(`create-integer-column`) .description(`Create an integer column. Optionally, minimum and maximum values can be provided. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2583,9 +2529,9 @@ tablesdb .option(`--max `, `Maximum value`, parseInteger) .option(`--xdefault `, `Default value. Cannot be set when column is required.`, parseInteger) .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(tablesdbCreateIntegerColumn)) + .action(actionRunner(tablesDBCreateIntegerColumn)) -tablesdb +tablesDB .command(`update-integer-column`) .description(`Update an integer column. Changing the 'default' value will not update already existing rows. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2596,9 +2542,9 @@ tablesdb .option(`--min `, `Minimum value`, parseInteger) .option(`--max `, `Maximum value`, parseInteger) .option(`--new-key `, `New Column Key.`) - .action(actionRunner(tablesdbUpdateIntegerColumn)) + .action(actionRunner(tablesDBUpdateIntegerColumn)) -tablesdb +tablesDB .command(`create-ip-column`) .description(`Create IP address column. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2607,9 +2553,9 @@ tablesdb .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value. Cannot be set when column is required.`) .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(tablesdbCreateIpColumn)) + .action(actionRunner(tablesDBCreateIpColumn)) -tablesdb +tablesDB .command(`update-ip-column`) .description(`Update an ip column. Changing the 'default' value will not update already existing rows. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2618,9 +2564,9 @@ tablesdb .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value. Cannot be set when column is required.`) .option(`--new-key `, `New Column Key.`) - .action(actionRunner(tablesdbUpdateIpColumn)) + .action(actionRunner(tablesDBUpdateIpColumn)) -tablesdb +tablesDB .command(`create-relationship-column`) .description(`Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). `) .requiredOption(`--database-id `, `Database ID.`) @@ -2631,9 +2577,9 @@ tablesdb .option(`--key `, `Column Key.`) .option(`--two-way-key `, `Two Way Column Key.`) .option(`--on-delete `, `Constraints option`) - .action(actionRunner(tablesdbCreateRelationshipColumn)) + .action(actionRunner(tablesDBCreateRelationshipColumn)) -tablesdb +tablesDB .command(`create-string-column`) .description(`Create a string column. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2644,9 +2590,9 @@ tablesdb .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) .option(`--encrypt [value]`, `Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(tablesdbCreateStringColumn)) + .action(actionRunner(tablesDBCreateStringColumn)) -tablesdb +tablesDB .command(`update-string-column`) .description(`Update a string column. Changing the 'default' value will not update already existing rows. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2656,9 +2602,9 @@ tablesdb .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) .option(`--size `, `Maximum size of the string column.`, parseInteger) .option(`--new-key `, `New Column Key.`) - .action(actionRunner(tablesdbUpdateStringColumn)) + .action(actionRunner(tablesDBUpdateStringColumn)) -tablesdb +tablesDB .command(`create-url-column`) .description(`Create a URL column. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2667,9 +2613,9 @@ tablesdb .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(tablesdbCreateUrlColumn)) + .action(actionRunner(tablesDBCreateUrlColumn)) -tablesdb +tablesDB .command(`update-url-column`) .description(`Update an url column. Changing the 'default' value will not update already existing rows. `) .requiredOption(`--database-id `, `Database ID.`) @@ -2678,26 +2624,26 @@ tablesdb .requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value)) .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) .option(`--new-key `, `New Column Key.`) - .action(actionRunner(tablesdbUpdateUrlColumn)) + .action(actionRunner(tablesDBUpdateUrlColumn)) -tablesdb +tablesDB .command(`get-column`) .description(`Get column by ID.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .requiredOption(`--key `, `Column Key.`) .option(`--console`, `Get the resource console url`) - .action(actionRunner(tablesdbGetColumn)) + .action(actionRunner(tablesDBGetColumn)) -tablesdb +tablesDB .command(`delete-column`) .description(`Deletes a column.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .requiredOption(`--key `, `Column Key.`) - .action(actionRunner(tablesdbDeleteColumn)) + .action(actionRunner(tablesDBDeleteColumn)) -tablesdb +tablesDB .command(`update-relationship-column`) .description(`Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). `) .requiredOption(`--database-id `, `Database ID.`) @@ -2705,18 +2651,18 @@ tablesdb .requiredOption(`--key `, `Column Key.`) .option(`--on-delete `, `Constraints option`) .option(`--new-key `, `New Column Key.`) - .action(actionRunner(tablesdbUpdateRelationshipColumn)) + .action(actionRunner(tablesDBUpdateRelationshipColumn)) -tablesdb +tablesDB .command(`list-indexes`) .description(`List indexes on the table.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .option(`--queries [queries...]`, `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`) .option(`--console`, `Get the resource console url`) - .action(actionRunner(tablesdbListIndexes)) + .action(actionRunner(tablesDBListIndexes)) -tablesdb +tablesDB .command(`create-index`) .description(`Creates an index on the columns listed. Your index should include all the columns you will query in a single request. Type can be 'key', 'fulltext', or 'unique'.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2726,43 +2672,43 @@ tablesdb .requiredOption(`--columns [columns...]`, `Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.`) .option(`--orders [orders...]`, `Array of index orders. Maximum of 100 orders are allowed.`) .option(`--lengths [lengths...]`, `Length of index. Maximum of 100`) - .action(actionRunner(tablesdbCreateIndex)) + .action(actionRunner(tablesDBCreateIndex)) -tablesdb +tablesDB .command(`get-index`) .description(`Get index by ID.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .requiredOption(`--key `, `Index Key.`) - .action(actionRunner(tablesdbGetIndex)) + .action(actionRunner(tablesDBGetIndex)) -tablesdb +tablesDB .command(`delete-index`) .description(`Delete an index.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .requiredOption(`--key `, `Index Key.`) - .action(actionRunner(tablesdbDeleteIndex)) + .action(actionRunner(tablesDBDeleteIndex)) -tablesdb +tablesDB .command(`list-table-logs`) .description(`Get the table activity logs list by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .option(`--queries [queries...]`, `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`) .option(`--console`, `Get the resource console url`) - .action(actionRunner(tablesdbListTableLogs)) + .action(actionRunner(tablesDBListTableLogs)) -tablesdb +tablesDB .command(`list-rows`) .description(`Get a list of all the user's rows in a given table. You can use the query params to filter your results.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID. You can create a new table using the TableDB service [server integration](https://appwrite.io/docs/server/tablesdbdb#tablesdbCreate).`) .option(`--queries [queries...]`, `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.`) .option(`--console`, `Get the resource console url`) - .action(actionRunner(tablesdbListRows)) + .action(actionRunner(tablesDBListRows)) -tablesdb +tablesDB .command(`create-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.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2770,42 +2716,42 @@ tablesdb .requiredOption(`--row-id `, `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.`) .requiredOption(`--data `, `Row data as JSON object.`) .option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`) - .action(actionRunner(tablesdbCreateRow)) + .action(actionRunner(tablesDBCreateRow)) -tablesdb +tablesDB .command(`create-rows`) .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.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `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.`) .requiredOption(`--rows [rows...]`, `Array of documents data as JSON objects.`) - .action(actionRunner(tablesdbCreateRows)) + .action(actionRunner(tablesDBCreateRows)) -tablesdb +tablesDB .command(`upsert-rows`) .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. `) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .requiredOption(`--rows [rows...]`, `Array of row data as JSON objects. May contain partial rows.`) - .action(actionRunner(tablesdbUpsertRows)) + .action(actionRunner(tablesDBUpsertRows)) -tablesdb +tablesDB .command(`update-rows`) .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.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .option(`--data `, `Row data as JSON object. Include only column and value pairs to be updated.`) .option(`--queries [queries...]`, `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.`) - .action(actionRunner(tablesdbUpdateRows)) + .action(actionRunner(tablesDBUpdateRows)) -tablesdb +tablesDB .command(`delete-rows`) .description(`Bulk delete rows using queries, if no queries are passed then all rows are deleted.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .option(`--queries [queries...]`, `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.`) - .action(actionRunner(tablesdbDeleteRows)) + .action(actionRunner(tablesDBDeleteRows)) -tablesdb +tablesDB .command(`get-row`) .description(`Get a row by its unique ID. This endpoint response returns a JSON object with the row data.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2813,9 +2759,9 @@ tablesdb .requiredOption(`--row-id `, `Row ID.`) .option(`--queries [queries...]`, `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.`) .option(`--console`, `Get the resource console url`) - .action(actionRunner(tablesdbGetRow)) + .action(actionRunner(tablesDBGetRow)) -tablesdb +tablesDB .command(`upsert-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.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2823,9 +2769,9 @@ tablesdb .requiredOption(`--row-id `, `Row ID.`) .option(`--data `, `Row data as JSON object. Include all required columns of the row to be created or updated.`) .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) - .action(actionRunner(tablesdbUpsertRow)) + .action(actionRunner(tablesDBUpsertRow)) -tablesdb +tablesDB .command(`update-row`) .description(`Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2833,17 +2779,17 @@ tablesdb .requiredOption(`--row-id `, `Row ID.`) .option(`--data `, `Row data as JSON object. Include only columns and value pairs to be updated.`) .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) - .action(actionRunner(tablesdbUpdateRow)) + .action(actionRunner(tablesDBUpdateRow)) -tablesdb +tablesDB .command(`delete-row`) .description(`Delete a row by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).`) .requiredOption(`--row-id `, `Row ID.`) - .action(actionRunner(tablesdbDeleteRow)) + .action(actionRunner(tablesDBDeleteRow)) -tablesdb +tablesDB .command(`list-row-logs`) .description(`Get the row activity logs list by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2851,9 +2797,9 @@ tablesdb .requiredOption(`--row-id `, `Row ID.`) .option(`--queries [queries...]`, `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`) .option(`--console`, `Get the resource console url`) - .action(actionRunner(tablesdbListRowLogs)) + .action(actionRunner(tablesDBListRowLogs)) -tablesdb +tablesDB .command(`decrement-row-column`) .description(`Decrement a specific column of a row by a given value.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2862,9 +2808,9 @@ tablesdb .requiredOption(`--column `, `Column key.`) .option(`--value `, `Value to increment the column by. The value must be a number.`, parseInteger) .option(`--min `, `Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.`, parseInteger) - .action(actionRunner(tablesdbDecrementRowColumn)) + .action(actionRunner(tablesDBDecrementRowColumn)) -tablesdb +tablesDB .command(`increment-row-column`) .description(`Increment a specific column of a row by a given value.`) .requiredOption(`--database-id `, `Database ID.`) @@ -2873,78 +2819,78 @@ tablesdb .requiredOption(`--column `, `Column key.`) .option(`--value `, `Value to increment the column by. The value must be a number.`, parseInteger) .option(`--max `, `Maximum value for the column. If the current value is greater than this value, an error will be thrown.`, parseInteger) - .action(actionRunner(tablesdbIncrementRowColumn)) + .action(actionRunner(tablesDBIncrementRowColumn)) -tablesdb +tablesDB .command(`get-table-usage`) .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.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .option(`--range `, `Date range.`) .option(`--console`, `Get the resource console url`) - .action(actionRunner(tablesdbGetTableUsage)) + .action(actionRunner(tablesDBGetTableUsage)) -tablesdb +tablesDB .command(`get-usage`) .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.`) .requiredOption(`--database-id `, `Database ID.`) .option(`--range `, `Date range.`) - .action(actionRunner(tablesdbGetUsage)) + .action(actionRunner(tablesDBGetUsage)) module.exports = { - tablesdb, - tablesdbList, - tablesdbCreate, - tablesdbListUsage, - tablesdbGet, - tablesdbUpdate, - tablesdbDelete, - tablesdbListTables, - tablesdbCreateTable, - tablesdbGetTable, - tablesdbUpdateTable, - tablesdbDeleteTable, - tablesdbListColumns, - tablesdbCreateBooleanColumn, - tablesdbUpdateBooleanColumn, - tablesdbCreateDatetimeColumn, - tablesdbUpdateDatetimeColumn, - tablesdbCreateEmailColumn, - tablesdbUpdateEmailColumn, - tablesdbCreateEnumColumn, - tablesdbUpdateEnumColumn, - tablesdbCreateFloatColumn, - tablesdbUpdateFloatColumn, - tablesdbCreateIntegerColumn, - tablesdbUpdateIntegerColumn, - tablesdbCreateIpColumn, - tablesdbUpdateIpColumn, - tablesdbCreateRelationshipColumn, - tablesdbCreateStringColumn, - tablesdbUpdateStringColumn, - tablesdbCreateUrlColumn, - tablesdbUpdateUrlColumn, - tablesdbGetColumn, - tablesdbDeleteColumn, - tablesdbUpdateRelationshipColumn, - tablesdbListIndexes, - tablesdbCreateIndex, - tablesdbGetIndex, - tablesdbDeleteIndex, - tablesdbListTableLogs, - tablesdbListRows, - tablesdbCreateRow, - tablesdbCreateRows, - tablesdbUpsertRows, - tablesdbUpdateRows, - tablesdbDeleteRows, - tablesdbGetRow, - tablesdbUpsertRow, - tablesdbUpdateRow, - tablesdbDeleteRow, - tablesdbListRowLogs, - tablesdbDecrementRowColumn, - tablesdbIncrementRowColumn, - tablesdbGetTableUsage, - tablesdbGetUsage + tablesDB, + tablesDBList, + tablesDBCreate, + tablesDBListUsage, + tablesDBGet, + tablesDBUpdate, + tablesDBDelete, + tablesDBListTables, + tablesDBCreateTable, + tablesDBGetTable, + tablesDBUpdateTable, + tablesDBDeleteTable, + tablesDBListColumns, + tablesDBCreateBooleanColumn, + tablesDBUpdateBooleanColumn, + tablesDBCreateDatetimeColumn, + tablesDBUpdateDatetimeColumn, + tablesDBCreateEmailColumn, + tablesDBUpdateEmailColumn, + tablesDBCreateEnumColumn, + tablesDBUpdateEnumColumn, + tablesDBCreateFloatColumn, + tablesDBUpdateFloatColumn, + tablesDBCreateIntegerColumn, + tablesDBUpdateIntegerColumn, + tablesDBCreateIpColumn, + tablesDBUpdateIpColumn, + tablesDBCreateRelationshipColumn, + tablesDBCreateStringColumn, + tablesDBUpdateStringColumn, + tablesDBCreateUrlColumn, + tablesDBUpdateUrlColumn, + tablesDBGetColumn, + tablesDBDeleteColumn, + tablesDBUpdateRelationshipColumn, + tablesDBListIndexes, + tablesDBCreateIndex, + tablesDBGetIndex, + tablesDBDeleteIndex, + tablesDBListTableLogs, + tablesDBListRows, + tablesDBCreateRow, + tablesDBCreateRows, + tablesDBUpsertRows, + tablesDBUpdateRows, + tablesDBDeleteRows, + tablesDBGetRow, + tablesDBUpsertRow, + tablesDBUpdateRow, + tablesDBDeleteRow, + tablesDBListRowLogs, + tablesDBDecrementRowColumn, + tablesDBIncrementRowColumn, + tablesDBGetTableUsage, + tablesDBGetUsage }; diff --git a/lib/commands/teams.js b/lib/commands/teams.js index c3e7d87..7d500ab 100644 --- a/lib/commands/teams.js +++ b/lib/commands/teams.js @@ -79,7 +79,6 @@ const teamsList = async ({queries,search,parseOutput = true, overrideForCli = fa return response; } - /** * @typedef {Object} TeamsCreateRequestParams * @property {string} teamId Team 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. @@ -122,7 +121,6 @@ const teamsCreate = async ({teamId,name,roles,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} TeamsGetRequestParams * @property {string} teamId Team ID. @@ -156,7 +154,6 @@ const teamsGet = async ({teamId,parseOutput = true, overrideForCli = false, sdk return response; } - /** * @typedef {Object} TeamsUpdateNameRequestParams * @property {string} teamId Team ID. @@ -191,7 +188,6 @@ const teamsUpdateName = async ({teamId,name,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} TeamsDeleteRequestParams * @property {string} teamId Team ID. @@ -222,7 +218,6 @@ const teamsDelete = async ({teamId,parseOutput = true, overrideForCli = false, s return response; } - /** * @typedef {Object} TeamsListLogsRequestParams * @property {string} teamId Team ID. @@ -256,7 +251,6 @@ const teamsListLogs = async ({teamId,queries,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} TeamsListMembershipsRequestParams * @property {string} teamId Team ID. @@ -294,7 +288,6 @@ const teamsListMemberships = async ({teamId,queries,search,parseOutput = true, o return response; } - /** * @typedef {Object} TeamsCreateMembershipRequestParams * @property {string} teamId Team ID. @@ -350,7 +343,6 @@ const teamsCreateMembership = async ({teamId,roles,email,userId,phone,url,name,p return response; } - /** * @typedef {Object} TeamsGetMembershipRequestParams * @property {string} teamId Team ID. @@ -381,7 +373,6 @@ const teamsGetMembership = async ({teamId,membershipId,parseOutput = true, overr return response; } - /** * @typedef {Object} TeamsUpdateMembershipRequestParams * @property {string} teamId Team ID. @@ -418,7 +409,6 @@ const teamsUpdateMembership = async ({teamId,membershipId,roles,parseOutput = tr return response; } - /** * @typedef {Object} TeamsDeleteMembershipRequestParams * @property {string} teamId Team ID. @@ -450,7 +440,6 @@ const teamsDeleteMembership = async ({teamId,membershipId,parseOutput = true, ov return response; } - /** * @typedef {Object} TeamsUpdateMembershipStatusRequestParams * @property {string} teamId Team ID. @@ -490,7 +479,6 @@ const teamsUpdateMembershipStatus = async ({teamId,membershipId,userId,secret,pa return response; } - /** * @typedef {Object} TeamsGetPrefsRequestParams * @property {string} teamId Team ID. @@ -520,7 +508,6 @@ const teamsGetPrefs = async ({teamId,parseOutput = true, overrideForCli = false, return response; } - /** * @typedef {Object} TeamsUpdatePrefsRequestParams * @property {string} teamId Team ID. @@ -555,7 +542,6 @@ const teamsUpdatePrefs = async ({teamId,prefs,parseOutput = true, overrideForCli return response; } - teams .command(`list`) .description(`Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.`) diff --git a/lib/commands/tokens.js b/lib/commands/tokens.js index 5d3d1b4..5449327 100644 --- a/lib/commands/tokens.js +++ b/lib/commands/tokens.js @@ -77,7 +77,6 @@ const tokensList = async ({bucketId,fileId,queries,parseOutput = true, overrideF return response; } - /** * @typedef {Object} TokensCreateFileTokenRequestParams * @property {string} bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -113,7 +112,6 @@ const tokensCreateFileToken = async ({bucketId,fileId,expire,parseOutput = true, return response; } - /** * @typedef {Object} TokensGetRequestParams * @property {string} tokenId Token ID. @@ -147,7 +145,6 @@ const tokensGet = async ({tokenId,parseOutput = true, overrideForCli = false, sd return response; } - /** * @typedef {Object} TokensUpdateRequestParams * @property {string} tokenId Token unique ID. @@ -182,7 +179,6 @@ const tokensUpdate = async ({tokenId,expire,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} TokensDeleteRequestParams * @property {string} tokenId Token ID. @@ -213,7 +209,6 @@ const tokensDelete = async ({tokenId,parseOutput = true, overrideForCli = false, return response; } - tokens .command(`list`) .description(`List all the tokens created for a specific file or bucket. You can use the query params to filter your results.`) diff --git a/lib/commands/users.js b/lib/commands/users.js index eb61d12..6fddf9f 100644 --- a/lib/commands/users.js +++ b/lib/commands/users.js @@ -79,7 +79,6 @@ const usersList = async ({queries,search,parseOutput = true, overrideForCli = fa return response; } - /** * @typedef {Object} UsersCreateRequestParams * @property {string} userId 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. @@ -129,7 +128,6 @@ const usersCreate = async ({userId,email,phone,password,name,parseOutput = true, return response; } - /** * @typedef {Object} UsersCreateArgon2UserRequestParams * @property {string} userId 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. @@ -175,7 +173,6 @@ const usersCreateArgon2User = async ({userId,email,password,name,parseOutput = t return response; } - /** * @typedef {Object} UsersCreateBcryptUserRequestParams * @property {string} userId 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. @@ -221,7 +218,6 @@ const usersCreateBcryptUser = async ({userId,email,password,name,parseOutput = t return response; } - /** * @typedef {Object} UsersListIdentitiesRequestParams * @property {string[]} queries 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: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry @@ -258,7 +254,6 @@ const usersListIdentities = async ({queries,search,parseOutput = true, overrideF return response; } - /** * @typedef {Object} UsersDeleteIdentityRequestParams * @property {string} identityId Identity ID. @@ -289,7 +284,6 @@ const usersDeleteIdentity = async ({identityId,parseOutput = true, overrideForCl return response; } - /** * @typedef {Object} UsersCreateMD5UserRequestParams * @property {string} userId 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. @@ -335,7 +329,6 @@ const usersCreateMD5User = async ({userId,email,password,name,parseOutput = true return response; } - /** * @typedef {Object} UsersCreatePHPassUserRequestParams * @property {string} userId User ID. Choose a custom ID or pass the string 'ID.unique()'to auto generate it. 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. @@ -381,7 +374,6 @@ const usersCreatePHPassUser = async ({userId,email,password,name,parseOutput = t return response; } - /** * @typedef {Object} UsersCreateScryptUserRequestParams * @property {string} userId 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. @@ -447,7 +439,6 @@ const usersCreateScryptUser = async ({userId,email,password,passwordSalt,passwor return response; } - /** * @typedef {Object} UsersCreateScryptModifiedUserRequestParams * @property {string} userId 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. @@ -505,7 +496,6 @@ const usersCreateScryptModifiedUser = async ({userId,email,password,passwordSalt return response; } - /** * @typedef {Object} UsersCreateSHAUserRequestParams * @property {string} userId 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. @@ -555,7 +545,6 @@ const usersCreateSHAUser = async ({userId,email,password,passwordVersion,name,pa return response; } - /** * @typedef {Object} UsersGetUsageRequestParams * @property {UsageRange} range Date range. @@ -588,7 +577,6 @@ const usersGetUsage = async ({range,parseOutput = true, overrideForCli = false, return response; } - /** * @typedef {Object} UsersGetRequestParams * @property {string} userId User ID. @@ -622,7 +610,6 @@ const usersGet = async ({userId,parseOutput = true, overrideForCli = false, sdk return response; } - /** * @typedef {Object} UsersDeleteRequestParams * @property {string} userId User ID. @@ -653,7 +640,6 @@ const usersDelete = async ({userId,parseOutput = true, overrideForCli = false, s return response; } - /** * @typedef {Object} UsersUpdateEmailRequestParams * @property {string} userId User ID. @@ -688,7 +674,6 @@ const usersUpdateEmail = async ({userId,email,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} UsersCreateJWTRequestParams * @property {string} userId User ID. @@ -727,7 +712,6 @@ const usersCreateJWT = async ({userId,sessionId,duration,parseOutput = true, ove return response; } - /** * @typedef {Object} UsersUpdateLabelsRequestParams * @property {string} userId User ID. @@ -763,7 +747,6 @@ const usersUpdateLabels = async ({userId,labels,parseOutput = true, overrideForC return response; } - /** * @typedef {Object} UsersListLogsRequestParams * @property {string} userId User ID. @@ -797,7 +780,6 @@ const usersListLogs = async ({userId,queries,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} UsersListMembershipsRequestParams * @property {string} userId User ID. @@ -835,42 +817,6 @@ const usersListMemberships = async ({userId,queries,search,parseOutput = true, o return response; } - -/** - * @typedef {Object} UsersUpdateMfaRequestParams - * @property {string} userId User ID. - * @property {boolean} mfa Enable or disable MFA. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {UsersUpdateMfaRequestParams} params - */ -const usersUpdateMfa = async ({userId,mfa,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/users/{userId}/mfa'.replace('{userId}', userId); - let payload = {}; - if (typeof mfa !== 'undefined') { - payload['mfa'] = mfa; - } - - let response = undefined; - - response = await client.call('patch', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} UsersUpdateMFARequestParams * @property {string} userId User ID. @@ -905,39 +851,6 @@ const usersUpdateMFA = async ({userId,mfa,parseOutput = true, overrideForCli = f return response; } - -/** - * @typedef {Object} UsersDeleteMfaAuthenticatorRequestParams - * @property {string} userId User ID. - * @property {AuthenticatorType} type Type of authenticator. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {UsersDeleteMfaAuthenticatorRequestParams} params - */ -const usersDeleteMfaAuthenticator = async ({userId,type,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/users/{userId}/mfa/authenticators/{type}'.replace('{userId}', userId).replace('{type}', type); - let payload = {}; - - let response = undefined; - - response = await client.call('delete', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} UsersDeleteMFAAuthenticatorRequestParams * @property {string} userId User ID. @@ -969,37 +882,6 @@ const usersDeleteMFAAuthenticator = async ({userId,type,parseOutput = true, over return response; } - -/** - * @typedef {Object} UsersListMfaFactorsRequestParams - * @property {string} userId User ID. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {UsersListMfaFactorsRequestParams} params - */ -const usersListMfaFactors = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/users/{userId}/mfa/factors'.replace('{userId}', userId); - let payload = {}; - - let response = undefined; - - response = await client.call('get', apiPath, { - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} UsersListMFAFactorsRequestParams * @property {string} userId User ID. @@ -1029,37 +911,6 @@ const usersListMFAFactors = async ({userId,parseOutput = true, overrideForCli = return response; } - -/** - * @typedef {Object} UsersGetMfaRecoveryCodesRequestParams - * @property {string} userId User ID. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {UsersGetMfaRecoveryCodesRequestParams} params - */ -const usersGetMfaRecoveryCodes = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId); - let payload = {}; - - let response = undefined; - - response = await client.call('get', apiPath, { - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} UsersGetMFARecoveryCodesRequestParams * @property {string} userId User ID. @@ -1089,38 +940,6 @@ const usersGetMFARecoveryCodes = async ({userId,parseOutput = true, overrideForC return response; } - -/** - * @typedef {Object} UsersUpdateMfaRecoveryCodesRequestParams - * @property {string} userId User ID. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {UsersUpdateMfaRecoveryCodesRequestParams} params - */ -const usersUpdateMfaRecoveryCodes = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId); - let payload = {}; - - let response = undefined; - - response = await client.call('put', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} UsersUpdateMFARecoveryCodesRequestParams * @property {string} userId User ID. @@ -1151,38 +970,6 @@ const usersUpdateMFARecoveryCodes = async ({userId,parseOutput = true, overrideF return response; } - -/** - * @typedef {Object} UsersCreateMfaRecoveryCodesRequestParams - * @property {string} userId User ID. - * @property {boolean} overrideForCli - * @property {boolean} parseOutput - * @property {libClient | undefined} sdk - */ - -/** - * @param {UsersCreateMfaRecoveryCodesRequestParams} params - */ -const usersCreateMfaRecoveryCodes = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => { - let client = !sdk ? await sdkForProject() : - sdk; - let apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId); - let payload = {}; - - let response = undefined; - - response = await client.call('patch', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - -} - /** * @typedef {Object} UsersCreateMFARecoveryCodesRequestParams * @property {string} userId User ID. @@ -1213,7 +1000,6 @@ const usersCreateMFARecoveryCodes = async ({userId,parseOutput = true, overrideF return response; } - /** * @typedef {Object} UsersUpdateNameRequestParams * @property {string} userId User ID. @@ -1248,7 +1034,6 @@ const usersUpdateName = async ({userId,name,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} UsersUpdatePasswordRequestParams * @property {string} userId User ID. @@ -1283,7 +1068,6 @@ const usersUpdatePassword = async ({userId,password,parseOutput = true, override return response; } - /** * @typedef {Object} UsersUpdatePhoneRequestParams * @property {string} userId User ID. @@ -1318,7 +1102,6 @@ const usersUpdatePhone = async ({userId,number,parseOutput = true, overrideForCl return response; } - /** * @typedef {Object} UsersGetPrefsRequestParams * @property {string} userId User ID. @@ -1348,7 +1131,6 @@ const usersGetPrefs = async ({userId,parseOutput = true, overrideForCli = false, return response; } - /** * @typedef {Object} UsersUpdatePrefsRequestParams * @property {string} userId User ID. @@ -1383,7 +1165,6 @@ const usersUpdatePrefs = async ({userId,prefs,parseOutput = true, overrideForCli return response; } - /** * @typedef {Object} UsersListSessionsRequestParams * @property {string} userId User ID. @@ -1417,7 +1198,6 @@ const usersListSessions = async ({userId,parseOutput = true, overrideForCli = fa return response; } - /** * @typedef {Object} UsersCreateSessionRequestParams * @property {string} userId 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. @@ -1448,7 +1228,6 @@ const usersCreateSession = async ({userId,parseOutput = true, overrideForCli = f return response; } - /** * @typedef {Object} UsersDeleteSessionsRequestParams * @property {string} userId User ID. @@ -1479,7 +1258,6 @@ const usersDeleteSessions = async ({userId,parseOutput = true, overrideForCli = return response; } - /** * @typedef {Object} UsersDeleteSessionRequestParams * @property {string} userId User ID. @@ -1511,7 +1289,6 @@ const usersDeleteSession = async ({userId,sessionId,parseOutput = true, override return response; } - /** * @typedef {Object} UsersUpdateStatusRequestParams * @property {string} userId User ID. @@ -1546,7 +1323,6 @@ const usersUpdateStatus = async ({userId,status,parseOutput = true, overrideForC return response; } - /** * @typedef {Object} UsersListTargetsRequestParams * @property {string} userId User ID. @@ -1580,7 +1356,6 @@ const usersListTargets = async ({userId,queries,parseOutput = true, overrideForC return response; } - /** * @typedef {Object} UsersCreateTargetRequestParams * @property {string} userId User ID. @@ -1631,7 +1406,6 @@ const usersCreateTarget = async ({userId,targetId,providerType,identifier,provid return response; } - /** * @typedef {Object} UsersGetTargetRequestParams * @property {string} userId User ID. @@ -1662,7 +1436,6 @@ const usersGetTarget = async ({userId,targetId,parseOutput = true, overrideForCl return response; } - /** * @typedef {Object} UsersUpdateTargetRequestParams * @property {string} userId User ID. @@ -1706,7 +1479,6 @@ const usersUpdateTarget = async ({userId,targetId,identifier,providerId,name,par return response; } - /** * @typedef {Object} UsersDeleteTargetRequestParams * @property {string} userId User ID. @@ -1738,7 +1510,6 @@ const usersDeleteTarget = async ({userId,targetId,parseOutput = true, overrideFo return response; } - /** * @typedef {Object} UsersCreateTokenRequestParams * @property {string} userId User ID. @@ -1777,7 +1548,6 @@ const usersCreateToken = async ({userId,length,expire,parseOutput = true, overri return response; } - /** * @typedef {Object} UsersUpdateEmailVerificationRequestParams * @property {string} userId User ID. @@ -1812,7 +1582,6 @@ const usersUpdateEmailVerification = async ({userId,emailVerification,parseOutpu return response; } - /** * @typedef {Object} UsersUpdatePhoneVerificationRequestParams * @property {string} userId User ID. @@ -1847,7 +1616,6 @@ const usersUpdatePhoneVerification = async ({userId,phoneVerification,parseOutpu return response; } - users .command(`list`) .description(`Get a list of all the project's users. You can use the query params to filter your results.`) @@ -2007,13 +1775,6 @@ users .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .action(actionRunner(usersListMemberships)) -users - .command(`update-mfa`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'users update-mfa' instead] Enable or disable MFA on a user account.`) - .requiredOption(`--user-id `, `User ID.`) - .requiredOption(`--mfa [value]`, `Enable or disable MFA.`, (value) => value === undefined ? true : parseBool(value)) - .action(actionRunner(usersUpdateMfa)) - users .command(`update-mfa`) .description(`Enable or disable MFA on a user account.`) @@ -2021,13 +1782,6 @@ users .requiredOption(`--mfa [value]`, `Enable or disable MFA.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(usersUpdateMFA)) -users - .command(`delete-mfa-authenticator`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'users delete-mfa-authenticator' instead] Delete an authenticator app.`) - .requiredOption(`--user-id `, `User ID.`) - .requiredOption(`--type `, `Type of authenticator.`) - .action(actionRunner(usersDeleteMfaAuthenticator)) - users .command(`delete-mfa-authenticator`) .description(`Delete an authenticator app.`) @@ -2035,48 +1789,24 @@ users .requiredOption(`--type `, `Type of authenticator.`) .action(actionRunner(usersDeleteMFAAuthenticator)) -users - .command(`list-mfa-factors`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'users list-mfa-factors' instead] List the factors available on the account to be used as a MFA challange.`) - .requiredOption(`--user-id `, `User ID.`) - .action(actionRunner(usersListMfaFactors)) - users .command(`list-mfa-factors`) .description(`List the factors available on the account to be used as a MFA challange.`) .requiredOption(`--user-id `, `User ID.`) .action(actionRunner(usersListMFAFactors)) -users - .command(`get-mfa-recovery-codes`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'users get-mfa-recovery-codes' instead] 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.`) - .requiredOption(`--user-id `, `User ID.`) - .action(actionRunner(usersGetMfaRecoveryCodes)) - users .command(`get-mfa-recovery-codes`) .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.`) .requiredOption(`--user-id `, `User ID.`) .action(actionRunner(usersGetMFARecoveryCodes)) -users - .command(`update-mfa-recovery-codes`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'users update-mfa-recovery-codes' instead] 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.`) - .requiredOption(`--user-id `, `User ID.`) - .action(actionRunner(usersUpdateMfaRecoveryCodes)) - users .command(`update-mfa-recovery-codes`) .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.`) .requiredOption(`--user-id `, `User ID.`) .action(actionRunner(usersUpdateMFARecoveryCodes)) -users - .command(`create-mfa-recovery-codes`) - .description(`[**DEPRECATED** - This command is deprecated. Please use 'users create-mfa-recovery-codes' instead] 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.`) - .requiredOption(`--user-id `, `User ID.`) - .action(actionRunner(usersCreateMfaRecoveryCodes)) - users .command(`create-mfa-recovery-codes`) .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.`) @@ -2235,17 +1965,11 @@ module.exports = { usersUpdateLabels, usersListLogs, usersListMemberships, - usersUpdateMfa, usersUpdateMFA, - usersDeleteMfaAuthenticator, usersDeleteMFAAuthenticator, - usersListMfaFactors, usersListMFAFactors, - usersGetMfaRecoveryCodes, usersGetMFARecoveryCodes, - usersUpdateMfaRecoveryCodes, usersUpdateMFARecoveryCodes, - usersCreateMfaRecoveryCodes, usersCreateMFARecoveryCodes, usersUpdateName, usersUpdatePassword, diff --git a/lib/commands/vcs.js b/lib/commands/vcs.js index 7beebaf..b3aea2c 100644 --- a/lib/commands/vcs.js +++ b/lib/commands/vcs.js @@ -81,7 +81,6 @@ const vcsCreateRepositoryDetection = async ({installationId,providerRepositoryId return response; } - /** * @typedef {Object} VcsListRepositoriesRequestParams * @property {string} installationId Installation Id @@ -119,7 +118,6 @@ const vcsListRepositories = async ({installationId,type,search,parseOutput = tru return response; } - /** * @typedef {Object} VcsCreateRepositoryRequestParams * @property {string} installationId Installation Id @@ -158,7 +156,6 @@ const vcsCreateRepository = async ({installationId,name,xprivate,parseOutput = t return response; } - /** * @typedef {Object} VcsGetRepositoryRequestParams * @property {string} installationId Installation Id @@ -189,7 +186,6 @@ const vcsGetRepository = async ({installationId,providerRepositoryId,parseOutput return response; } - /** * @typedef {Object} VcsListRepositoryBranchesRequestParams * @property {string} installationId Installation Id @@ -220,7 +216,6 @@ const vcsListRepositoryBranches = async ({installationId,providerRepositoryId,pa return response; } - /** * @typedef {Object} VcsGetRepositoryContentsRequestParams * @property {string} installationId Installation Id @@ -259,7 +254,6 @@ const vcsGetRepositoryContents = async ({installationId,providerRepositoryId,pro return response; } - /** * @typedef {Object} VcsUpdateExternalDeploymentsRequestParams * @property {string} installationId Installation Id @@ -295,7 +289,6 @@ const vcsUpdateExternalDeployments = async ({installationId,repositoryId,provide return response; } - /** * @typedef {Object} VcsListInstallationsRequestParams * @property {string[]} queries 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: provider, organization @@ -332,7 +325,6 @@ const vcsListInstallations = async ({queries,search,parseOutput = true, override return response; } - /** * @typedef {Object} VcsGetInstallationRequestParams * @property {string} installationId Installation Id @@ -362,7 +354,6 @@ const vcsGetInstallation = async ({installationId,parseOutput = true, overrideFo return response; } - /** * @typedef {Object} VcsDeleteInstallationRequestParams * @property {string} installationId Installation Id @@ -393,7 +384,6 @@ const vcsDeleteInstallation = async ({installationId,parseOutput = true, overrid return response; } - vcs .command(`create-repository-detection`) .description(`Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.`)