appwrite-cli 13.0.0-rc.1 → 13.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-verify.yml +71 -0
- package/.github/workflows/npm-publish.yml +41 -22
- package/CHANGELOG.md +106 -102
- package/LICENSE.md +1 -1
- package/README.md +58 -35
- package/bun.lock +625 -0
- package/dist/bundle.cjs +94853 -0
- package/dist/index.js +99 -99
- package/dist/index.js.map +1 -1
- package/dist/lib/client.d.ts +2 -3
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +56 -45
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/commands/generic.d.ts +2 -2
- package/dist/lib/commands/generic.d.ts.map +1 -1
- package/dist/lib/commands/generic.js +170 -157
- package/dist/lib/commands/generic.js.map +1 -1
- package/dist/lib/commands/init.d.ts +1 -1
- package/dist/lib/commands/init.d.ts.map +1 -1
- package/dist/lib/commands/init.js +197 -189
- package/dist/lib/commands/init.js.map +1 -1
- package/dist/lib/commands/pull.d.ts +2 -2
- package/dist/lib/commands/pull.d.ts.map +1 -1
- package/dist/lib/commands/pull.js +215 -244
- package/dist/lib/commands/pull.js.map +1 -1
- package/dist/lib/commands/push.d.ts.map +1 -1
- package/dist/lib/commands/push.js +814 -841
- package/dist/lib/commands/push.js.map +1 -1
- package/dist/lib/commands/run.d.ts +1 -1
- package/dist/lib/commands/run.d.ts.map +1 -1
- package/dist/lib/commands/run.js +129 -127
- package/dist/lib/commands/run.js.map +1 -1
- package/dist/lib/commands/services/account.d.ts +3 -0
- package/dist/lib/commands/services/account.d.ts.map +1 -0
- package/dist/lib/commands/services/account.js +306 -0
- package/dist/lib/commands/services/account.js.map +1 -0
- package/dist/lib/commands/services/avatars.d.ts +3 -0
- package/dist/lib/commands/services/avatars.d.ts.map +1 -0
- package/dist/lib/commands/services/avatars.js +118 -0
- package/dist/lib/commands/services/avatars.js.map +1 -0
- package/dist/lib/commands/services/console.d.ts +3 -0
- package/dist/lib/commands/services/console.d.ts.map +1 -0
- package/dist/lib/commands/services/console.js +41 -0
- package/dist/lib/commands/services/console.js.map +1 -0
- package/dist/lib/commands/services/databases.d.ts +3 -0
- package/dist/lib/commands/services/databases.d.ts.map +1 -0
- package/dist/lib/commands/services/databases.js +612 -0
- package/dist/lib/commands/services/databases.js.map +1 -0
- package/dist/lib/commands/services/functions.d.ts +3 -0
- package/dist/lib/commands/services/functions.d.ts.map +1 -0
- package/dist/lib/commands/services/functions.js +258 -0
- package/dist/lib/commands/services/functions.js.map +1 -0
- package/dist/lib/commands/services/graphql.d.ts +3 -0
- package/dist/lib/commands/services/graphql.d.ts.map +1 -0
- package/dist/lib/commands/services/graphql.js +28 -0
- package/dist/lib/commands/services/graphql.js.map +1 -0
- package/dist/lib/commands/services/health.d.ts +3 -0
- package/dist/lib/commands/services/health.d.ts.map +1 -0
- package/dist/lib/commands/services/health.js +123 -0
- package/dist/lib/commands/services/health.js.map +1 -0
- package/dist/lib/commands/services/locale.d.ts +3 -0
- package/dist/lib/commands/services/locale.d.ts.map +1 -0
- package/dist/lib/commands/services/locale.js +52 -0
- package/dist/lib/commands/services/locale.js.map +1 -0
- package/dist/lib/commands/services/messaging.d.ts +3 -0
- package/dist/lib/commands/services/messaging.d.ts.map +1 -0
- package/dist/lib/commands/services/messaging.js +505 -0
- package/dist/lib/commands/services/messaging.js.map +1 -0
- package/dist/lib/commands/services/migrations.d.ts +3 -0
- package/dist/lib/commands/services/migrations.d.ts.map +1 -0
- package/dist/lib/commands/services/migrations.js +135 -0
- package/dist/lib/commands/services/migrations.js.map +1 -0
- package/dist/lib/commands/services/project.d.ts +3 -0
- package/dist/lib/commands/services/project.d.ts.map +1 -0
- package/dist/lib/commands/services/project.js +54 -0
- package/dist/lib/commands/services/project.js.map +1 -0
- package/dist/lib/commands/services/projects.d.ts +3 -0
- package/dist/lib/commands/services/projects.d.ts.map +1 -0
- package/dist/lib/commands/services/projects.js +415 -0
- package/dist/lib/commands/services/projects.js.map +1 -0
- package/dist/lib/commands/services/proxy.d.ts +3 -0
- package/dist/lib/commands/services/proxy.d.ts.map +1 -0
- package/dist/lib/commands/services/proxy.js +68 -0
- package/dist/lib/commands/services/proxy.js.map +1 -0
- package/dist/lib/commands/services/sites.d.ts +3 -0
- package/dist/lib/commands/services/sites.d.ts.map +1 -0
- package/dist/lib/commands/services/sites.js +242 -0
- package/dist/lib/commands/services/sites.js.map +1 -0
- package/dist/lib/commands/services/storage.d.ts +3 -0
- package/dist/lib/commands/services/storage.d.ts.map +1 -0
- package/dist/lib/commands/services/storage.js +153 -0
- package/dist/lib/commands/services/storage.js.map +1 -0
- package/dist/lib/commands/services/tablesdb.d.ts +3 -0
- package/dist/lib/commands/services/tablesdb.d.ts.map +1 -0
- package/dist/lib/commands/services/tablesdb.js +605 -0
- package/dist/lib/commands/services/tablesdb.js.map +1 -0
- package/dist/lib/commands/services/teams.d.ts +3 -0
- package/dist/lib/commands/services/teams.d.ts.map +1 -0
- package/dist/lib/commands/services/teams.js +123 -0
- package/dist/lib/commands/services/teams.js.map +1 -0
- package/dist/lib/commands/services/tokens.d.ts +3 -0
- package/dist/lib/commands/services/tokens.d.ts.map +1 -0
- package/dist/lib/commands/services/tokens.js +49 -0
- package/dist/lib/commands/services/tokens.js.map +1 -0
- package/dist/lib/commands/services/users.d.ts +3 -0
- package/dist/lib/commands/services/users.d.ts.map +1 -0
- package/dist/lib/commands/services/users.js +312 -0
- package/dist/lib/commands/services/users.js.map +1 -0
- package/dist/lib/commands/services/vcs.d.ts +3 -0
- package/dist/lib/commands/services/vcs.d.ts.map +1 -0
- package/dist/lib/commands/services/vcs.js +87 -0
- package/dist/lib/commands/services/vcs.js.map +1 -0
- package/dist/lib/commands/types.d.ts +1 -1
- package/dist/lib/commands/types.d.ts.map +1 -1
- package/dist/lib/commands/types.js +53 -57
- package/dist/lib/commands/types.js.map +1 -1
- package/dist/lib/commands/update.d.ts +1 -1
- package/dist/lib/commands/update.d.ts.map +1 -1
- package/dist/lib/commands/update.js +65 -66
- package/dist/lib/commands/update.js.map +1 -1
- package/dist/lib/config.d.ts +39 -39
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +264 -202
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/emulation/docker.d.ts +1 -9
- package/dist/lib/emulation/docker.d.ts.map +1 -1
- package/dist/lib/emulation/docker.js +111 -107
- package/dist/lib/emulation/docker.js.map +1 -1
- package/dist/lib/emulation/utils.d.ts +1 -1
- package/dist/lib/emulation/utils.d.ts.map +1 -1
- package/dist/lib/emulation/utils.js +55 -58
- package/dist/lib/emulation/utils.js.map +1 -1
- package/dist/lib/id.d.ts +1 -1
- package/dist/lib/id.d.ts.map +1 -1
- package/dist/lib/id.js +13 -18
- package/dist/lib/id.js.map +1 -1
- package/dist/lib/paginate.d.ts +3 -4
- package/dist/lib/paginate.d.ts.map +1 -1
- package/dist/lib/paginate.js +7 -10
- package/dist/lib/paginate.js.map +1 -1
- package/dist/lib/parser.d.ts +1 -1
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/parser.js +84 -96
- package/dist/lib/parser.js.map +1 -1
- package/dist/lib/questions.d.ts +1 -1
- package/dist/lib/questions.d.ts.map +1 -1
- package/dist/lib/questions.js +364 -368
- package/dist/lib/questions.js.map +1 -1
- package/dist/lib/sdks.d.ts +1 -1
- package/dist/lib/sdks.d.ts.map +1 -1
- package/dist/lib/sdks.js +40 -30
- package/dist/lib/sdks.js.map +1 -1
- package/dist/lib/services.d.ts +13 -0
- package/dist/lib/services.d.ts.map +1 -0
- package/dist/lib/services.js +47 -0
- package/dist/lib/services.js.map +1 -0
- package/dist/lib/spinner.d.ts +1 -1
- package/dist/lib/spinner.d.ts.map +1 -1
- package/dist/lib/spinner.js +25 -27
- package/dist/lib/spinner.js.map +1 -1
- package/dist/lib/type-generation/attribute.d.ts +1 -1
- package/dist/lib/type-generation/attribute.d.ts.map +1 -1
- package/dist/lib/type-generation/attribute.js +14 -17
- package/dist/lib/type-generation/attribute.js.map +1 -1
- package/dist/lib/type-generation/languages/csharp.d.ts +1 -1
- package/dist/lib/type-generation/languages/csharp.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/csharp.js +34 -34
- package/dist/lib/type-generation/languages/csharp.js.map +1 -1
- package/dist/lib/type-generation/languages/dart.d.ts +1 -1
- package/dist/lib/type-generation/languages/dart.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/dart.js +57 -57
- package/dist/lib/type-generation/languages/dart.js.map +1 -1
- package/dist/lib/type-generation/languages/java.d.ts +1 -1
- package/dist/lib/type-generation/languages/java.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/java.js +35 -35
- package/dist/lib/type-generation/languages/java.js.map +1 -1
- package/dist/lib/type-generation/languages/javascript.d.ts +1 -1
- package/dist/lib/type-generation/languages/javascript.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/javascript.js +45 -44
- package/dist/lib/type-generation/languages/javascript.js.map +1 -1
- package/dist/lib/type-generation/languages/kotlin.d.ts +1 -1
- package/dist/lib/type-generation/languages/kotlin.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/kotlin.js +35 -35
- package/dist/lib/type-generation/languages/kotlin.js.map +1 -1
- package/dist/lib/type-generation/languages/language.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/language.js +32 -37
- package/dist/lib/type-generation/languages/language.js.map +1 -1
- package/dist/lib/type-generation/languages/php.d.ts +1 -1
- package/dist/lib/type-generation/languages/php.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/php.js +34 -34
- package/dist/lib/type-generation/languages/php.js.map +1 -1
- package/dist/lib/type-generation/languages/swift.d.ts +1 -1
- package/dist/lib/type-generation/languages/swift.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/swift.js +35 -35
- package/dist/lib/type-generation/languages/swift.js.map +1 -1
- package/dist/lib/type-generation/languages/typescript.d.ts +1 -1
- package/dist/lib/type-generation/languages/typescript.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/typescript.js +49 -46
- package/dist/lib/type-generation/languages/typescript.js.map +1 -1
- package/dist/lib/types.d.ts +189 -45
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/types.js +1 -2
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +102 -98
- package/dist/lib/utils.js.map +1 -1
- package/dist/lib/validations.d.ts.map +1 -1
- package/dist/lib/validations.js +2 -6
- package/dist/lib/validations.js.map +1 -1
- package/dist/package.json +67 -0
- package/dist/scripts/generate-commands.d.ts +2 -0
- package/dist/scripts/generate-commands.d.ts.map +1 -0
- package/dist/scripts/generate-commands.js +398 -0
- package/dist/scripts/generate-commands.js.map +1 -0
- package/index.ts +146 -130
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.ts +253 -220
- package/lib/commands/generic.ts +371 -269
- package/lib/commands/init.ts +620 -519
- package/lib/commands/pull.ts +581 -470
- package/lib/commands/push.ts +2838 -2269
- package/lib/commands/run.ts +382 -302
- package/lib/commands/services/account.ts +832 -0
- package/lib/commands/services/avatars.ts +400 -0
- package/lib/commands/services/console.ts +73 -0
- package/lib/commands/services/databases.ts +2080 -0
- package/lib/commands/services/functions.ts +855 -0
- package/lib/commands/services/graphql.ts +47 -0
- package/lib/commands/services/health.ts +322 -0
- package/lib/commands/services/locale.ts +99 -0
- package/lib/commands/services/messaging.ts +1871 -0
- package/lib/commands/services/migrations.ts +421 -0
- package/lib/commands/services/project.ts +116 -0
- package/lib/commands/services/projects.ts +1317 -0
- package/lib/commands/services/proxy.ts +163 -0
- package/lib/commands/services/sites.ts +777 -0
- package/lib/commands/services/storage.ts +547 -0
- package/lib/commands/services/tablesdb.ts +1928 -0
- package/lib/commands/services/teams.ts +294 -0
- package/lib/commands/services/tokens.ts +106 -0
- package/lib/commands/services/users.ts +886 -0
- package/lib/commands/services/vcs.ts +268 -0
- package/lib/commands/types.ts +144 -117
- package/lib/commands/update.ts +198 -159
- package/lib/config.ts +815 -700
- package/lib/emulation/docker.ts +291 -244
- package/lib/emulation/utils.ts +188 -174
- package/lib/id.ts +23 -23
- package/lib/paginate.ts +69 -55
- package/lib/parser.ts +215 -189
- package/lib/questions.ts +1025 -948
- package/lib/sdks.ts +80 -51
- package/lib/services.ts +72 -0
- package/lib/spinner.ts +112 -99
- package/lib/type-generation/attribute.ts +15 -14
- package/lib/type-generation/languages/csharp.ts +71 -60
- package/lib/type-generation/languages/dart.ts +106 -93
- package/lib/type-generation/languages/java.ts +69 -58
- package/lib/type-generation/languages/javascript.ts +84 -73
- package/lib/type-generation/languages/kotlin.ts +71 -60
- package/lib/type-generation/languages/language.ts +103 -95
- package/lib/type-generation/languages/php.ts +67 -56
- package/lib/type-generation/languages/swift.ts +71 -60
- package/lib/type-generation/languages/typescript.ts +93 -76
- package/lib/types.ts +261 -107
- package/lib/utils.ts +263 -233
- package/lib/validations.ts +17 -14
- package/package.json +27 -19
- package/scoop/appwrite.config.json +19 -29
- package/scripts/generate-commands.ts +539 -0
- package/tsconfig.json +7 -13
- package/.github/workflows/autoclose.yml +0 -11
- package/dist/lib/commands/account.d.ts +0 -379
- package/dist/lib/commands/account.d.ts.map +0 -1
- package/dist/lib/commands/account.js +0 -1228
- package/dist/lib/commands/account.js.map +0 -1
- package/dist/lib/commands/console.d.ts +0 -20
- package/dist/lib/commands/console.d.ts.map +0 -1
- package/dist/lib/commands/console.js +0 -78
- package/dist/lib/commands/console.js.map +0 -1
- package/dist/lib/commands/databases.d.ts +0 -732
- package/dist/lib/commands/databases.d.ts.map +0 -1
- package/dist/lib/commands/databases.js +0 -2196
- package/dist/lib/commands/databases.js.map +0 -1
- package/dist/lib/commands/functions.d.ts +0 -310
- package/dist/lib/commands/functions.d.ts.map +0 -1
- package/dist/lib/commands/functions.js +0 -1100
- package/dist/lib/commands/functions.js.map +0 -1
- package/dist/lib/commands/graphql.d.ts +0 -19
- package/dist/lib/commands/graphql.d.ts.map +0 -1
- package/dist/lib/commands/graphql.js +0 -77
- package/dist/lib/commands/graphql.js.map +0 -1
- package/dist/lib/commands/health.d.ts +0 -153
- package/dist/lib/commands/health.d.ts.map +0 -1
- package/dist/lib/commands/health.js +0 -464
- package/dist/lib/commands/health.js.map +0 -1
- package/dist/lib/commands/locale.d.ts +0 -53
- package/dist/lib/commands/locale.d.ts.map +0 -1
- package/dist/lib/commands/locale.js +0 -165
- package/dist/lib/commands/locale.js.map +0 -1
- package/dist/lib/commands/messaging.d.ts +0 -588
- package/dist/lib/commands/messaging.d.ts.map +0 -1
- package/dist/lib/commands/messaging.js +0 -2042
- package/dist/lib/commands/messaging.js.map +0 -1
- package/dist/lib/commands/migrations.d.ts +0 -150
- package/dist/lib/commands/migrations.d.ts.map +0 -1
- package/dist/lib/commands/migrations.js +0 -524
- package/dist/lib/commands/migrations.js.map +0 -1
- package/dist/lib/commands/organizations.d.ts +0 -11
- package/dist/lib/commands/organizations.d.ts.map +0 -1
- package/dist/lib/commands/organizations.js +0 -31
- package/dist/lib/commands/organizations.js.map +0 -1
- package/dist/lib/commands/project.d.ts +0 -53
- package/dist/lib/commands/project.d.ts.map +0 -1
- package/dist/lib/commands/project.js +0 -176
- package/dist/lib/commands/project.js.map +0 -1
- package/dist/lib/commands/projects.d.ts +0 -516
- package/dist/lib/commands/projects.d.ts.map +0 -1
- package/dist/lib/commands/projects.js +0 -1590
- package/dist/lib/commands/projects.js.map +0 -1
- package/dist/lib/commands/proxy.d.ts +0 -71
- package/dist/lib/commands/proxy.d.ts.map +0 -1
- package/dist/lib/commands/proxy.js +0 -240
- package/dist/lib/commands/proxy.js.map +0 -1
- package/dist/lib/commands/sites.d.ts +0 -296
- package/dist/lib/commands/sites.d.ts.map +0 -1
- package/dist/lib/commands/sites.js +0 -1046
- package/dist/lib/commands/sites.js.map +0 -1
- package/dist/lib/commands/storage.d.ts +0 -170
- package/dist/lib/commands/storage.d.ts.map +0 -1
- package/dist/lib/commands/storage.js +0 -651
- package/dist/lib/commands/storage.js.map +0 -1
- package/dist/lib/commands/tables-db.d.ts +0 -728
- package/dist/lib/commands/tables-db.d.ts.map +0 -1
- package/dist/lib/commands/tables-db.js +0 -2198
- package/dist/lib/commands/tables-db.js.map +0 -1
- package/dist/lib/commands/teams.d.ts +0 -129
- package/dist/lib/commands/teams.d.ts.map +0 -1
- package/dist/lib/commands/teams.js +0 -403
- package/dist/lib/commands/teams.js.map +0 -1
- package/dist/lib/commands/tokens.d.ts +0 -48
- package/dist/lib/commands/tokens.d.ts.map +0 -1
- package/dist/lib/commands/tokens.js +0 -156
- package/dist/lib/commands/tokens.js.map +0 -1
- package/dist/lib/commands/users.d.ts +0 -382
- package/dist/lib/commands/users.d.ts.map +0 -1
- package/dist/lib/commands/users.js +0 -1195
- package/dist/lib/commands/users.js.map +0 -1
- package/dist/lib/commands/vcs.d.ts +0 -92
- package/dist/lib/commands/vcs.d.ts.map +0 -1
- package/dist/lib/commands/vcs.js +0 -276
- package/dist/lib/commands/vcs.js.map +0 -1
- package/dist/lib/exception.d.ts +0 -8
- package/dist/lib/exception.d.ts.map +0 -1
- package/dist/lib/exception.js +0 -16
- package/dist/lib/exception.js.map +0 -1
- package/docs/examples/account/create-anonymous-session.md +0 -1
- package/docs/examples/account/create-email-password-session.md +0 -3
- package/docs/examples/account/create-email-token.md +0 -3
- package/docs/examples/account/create-email-verification.md +0 -2
- package/docs/examples/account/create-jwt.md +0 -1
- package/docs/examples/account/create-magic-url-token.md +0 -3
- package/docs/examples/account/create-mfa-authenticator.md +0 -2
- package/docs/examples/account/create-mfa-challenge.md +0 -2
- package/docs/examples/account/create-mfa-recovery-codes.md +0 -1
- package/docs/examples/account/create-o-auth-2-session.md +0 -2
- package/docs/examples/account/create-o-auth-2-token.md +0 -2
- package/docs/examples/account/create-phone-token.md +0 -3
- package/docs/examples/account/create-phone-verification.md +0 -1
- package/docs/examples/account/create-push-target.md +0 -3
- package/docs/examples/account/create-recovery.md +0 -3
- package/docs/examples/account/create-session.md +0 -3
- package/docs/examples/account/create-verification.md +0 -2
- package/docs/examples/account/create.md +0 -4
- package/docs/examples/account/delete-identity.md +0 -2
- package/docs/examples/account/delete-mfa-authenticator.md +0 -2
- package/docs/examples/account/delete-push-target.md +0 -2
- package/docs/examples/account/delete-session.md +0 -2
- package/docs/examples/account/delete-sessions.md +0 -1
- package/docs/examples/account/delete.md +0 -1
- package/docs/examples/account/get-mfa-recovery-codes.md +0 -1
- package/docs/examples/account/get-prefs.md +0 -1
- package/docs/examples/account/get-session.md +0 -2
- package/docs/examples/account/get.md +0 -1
- package/docs/examples/account/list-identities.md +0 -1
- package/docs/examples/account/list-logs.md +0 -1
- package/docs/examples/account/list-mfa-factors.md +0 -1
- package/docs/examples/account/list-sessions.md +0 -1
- package/docs/examples/account/update-email-verification.md +0 -3
- package/docs/examples/account/update-email.md +0 -3
- package/docs/examples/account/update-magic-url-session.md +0 -3
- package/docs/examples/account/update-mfa-authenticator.md +0 -3
- package/docs/examples/account/update-mfa-challenge.md +0 -3
- package/docs/examples/account/update-mfa-recovery-codes.md +0 -1
- package/docs/examples/account/update-mfa.md +0 -2
- package/docs/examples/account/update-name.md +0 -2
- package/docs/examples/account/update-password.md +0 -2
- package/docs/examples/account/update-phone-session.md +0 -3
- package/docs/examples/account/update-phone-verification.md +0 -3
- package/docs/examples/account/update-phone.md +0 -3
- package/docs/examples/account/update-prefs.md +0 -2
- package/docs/examples/account/update-push-target.md +0 -3
- package/docs/examples/account/update-recovery.md +0 -4
- package/docs/examples/account/update-session.md +0 -2
- package/docs/examples/account/update-status.md +0 -1
- package/docs/examples/account/update-verification.md +0 -3
- package/docs/examples/console/get-resource.md +0 -3
- package/docs/examples/console/variables.md +0 -1
- package/docs/examples/databases/create-boolean-attribute.md +0 -5
- package/docs/examples/databases/create-collection.md +0 -4
- package/docs/examples/databases/create-datetime-attribute.md +0 -5
- package/docs/examples/databases/create-document.md +0 -5
- package/docs/examples/databases/create-documents.md +0 -4
- package/docs/examples/databases/create-email-attribute.md +0 -5
- package/docs/examples/databases/create-enum-attribute.md +0 -6
- package/docs/examples/databases/create-float-attribute.md +0 -5
- package/docs/examples/databases/create-index.md +0 -6
- package/docs/examples/databases/create-integer-attribute.md +0 -5
- package/docs/examples/databases/create-ip-attribute.md +0 -5
- package/docs/examples/databases/create-line-attribute.md +0 -5
- package/docs/examples/databases/create-operations.md +0 -2
- package/docs/examples/databases/create-point-attribute.md +0 -5
- package/docs/examples/databases/create-polygon-attribute.md +0 -5
- package/docs/examples/databases/create-relationship-attribute.md +0 -5
- package/docs/examples/databases/create-string-attribute.md +0 -6
- package/docs/examples/databases/create-transaction.md +0 -1
- package/docs/examples/databases/create-url-attribute.md +0 -5
- package/docs/examples/databases/create.md +0 -3
- package/docs/examples/databases/decrement-document-attribute.md +0 -5
- package/docs/examples/databases/delete-attribute.md +0 -4
- package/docs/examples/databases/delete-collection.md +0 -3
- package/docs/examples/databases/delete-document.md +0 -4
- package/docs/examples/databases/delete-documents.md +0 -3
- package/docs/examples/databases/delete-index.md +0 -4
- package/docs/examples/databases/delete-transaction.md +0 -2
- package/docs/examples/databases/delete.md +0 -2
- package/docs/examples/databases/get-attribute.md +0 -4
- package/docs/examples/databases/get-collection-usage.md +0 -3
- package/docs/examples/databases/get-collection.md +0 -3
- package/docs/examples/databases/get-document.md +0 -4
- package/docs/examples/databases/get-index.md +0 -4
- package/docs/examples/databases/get-transaction.md +0 -2
- package/docs/examples/databases/get-usage.md +0 -2
- package/docs/examples/databases/get.md +0 -2
- package/docs/examples/databases/increment-document-attribute.md +0 -5
- package/docs/examples/databases/list-attributes.md +0 -3
- package/docs/examples/databases/list-collection-logs.md +0 -3
- package/docs/examples/databases/list-collections.md +0 -2
- package/docs/examples/databases/list-document-logs.md +0 -4
- package/docs/examples/databases/list-documents.md +0 -3
- package/docs/examples/databases/list-indexes.md +0 -3
- package/docs/examples/databases/list-logs.md +0 -2
- package/docs/examples/databases/list-transactions.md +0 -1
- package/docs/examples/databases/list-usage.md +0 -1
- package/docs/examples/databases/list.md +0 -1
- package/docs/examples/databases/update-boolean-attribute.md +0 -6
- package/docs/examples/databases/update-collection.md +0 -4
- package/docs/examples/databases/update-datetime-attribute.md +0 -6
- package/docs/examples/databases/update-document.md +0 -4
- package/docs/examples/databases/update-documents.md +0 -3
- package/docs/examples/databases/update-email-attribute.md +0 -6
- package/docs/examples/databases/update-enum-attribute.md +0 -7
- package/docs/examples/databases/update-float-attribute.md +0 -6
- package/docs/examples/databases/update-integer-attribute.md +0 -6
- package/docs/examples/databases/update-ip-attribute.md +0 -6
- package/docs/examples/databases/update-line-attribute.md +0 -5
- package/docs/examples/databases/update-point-attribute.md +0 -5
- package/docs/examples/databases/update-polygon-attribute.md +0 -5
- package/docs/examples/databases/update-relationship-attribute.md +0 -4
- package/docs/examples/databases/update-string-attribute.md +0 -6
- package/docs/examples/databases/update-transaction.md +0 -2
- package/docs/examples/databases/update-url-attribute.md +0 -6
- package/docs/examples/databases/update.md +0 -3
- package/docs/examples/databases/upsert-document.md +0 -4
- package/docs/examples/databases/upsert-documents.md +0 -4
- package/docs/examples/functions/create-deployment.md +0 -4
- package/docs/examples/functions/create-duplicate-deployment.md +0 -3
- package/docs/examples/functions/create-execution.md +0 -2
- package/docs/examples/functions/create-template-deployment.md +0 -7
- package/docs/examples/functions/create-variable.md +0 -4
- package/docs/examples/functions/create-vcs-deployment.md +0 -4
- package/docs/examples/functions/create.md +0 -4
- package/docs/examples/functions/delete-deployment.md +0 -3
- package/docs/examples/functions/delete-execution.md +0 -3
- package/docs/examples/functions/delete-variable.md +0 -3
- package/docs/examples/functions/delete.md +0 -2
- package/docs/examples/functions/get-deployment-download.md +0 -3
- package/docs/examples/functions/get-deployment.md +0 -3
- package/docs/examples/functions/get-execution.md +0 -3
- package/docs/examples/functions/get-template.md +0 -2
- package/docs/examples/functions/get-usage.md +0 -2
- package/docs/examples/functions/get-variable.md +0 -3
- package/docs/examples/functions/get.md +0 -2
- package/docs/examples/functions/list-deployments.md +0 -2
- package/docs/examples/functions/list-executions.md +0 -2
- package/docs/examples/functions/list-runtimes.md +0 -1
- package/docs/examples/functions/list-specifications.md +0 -1
- package/docs/examples/functions/list-templates.md +0 -1
- package/docs/examples/functions/list-usage.md +0 -1
- package/docs/examples/functions/list-variables.md +0 -2
- package/docs/examples/functions/list.md +0 -1
- package/docs/examples/functions/update-deployment-status.md +0 -3
- package/docs/examples/functions/update-function-deployment.md +0 -3
- package/docs/examples/functions/update-variable.md +0 -4
- package/docs/examples/functions/update.md +0 -3
- package/docs/examples/graphql/mutation.md +0 -2
- package/docs/examples/graphql/query.md +0 -2
- package/docs/examples/health/get-antivirus.md +0 -1
- package/docs/examples/health/get-cache.md +0 -1
- package/docs/examples/health/get-certificate.md +0 -1
- package/docs/examples/health/get-db.md +0 -1
- package/docs/examples/health/get-failed-jobs.md +0 -2
- package/docs/examples/health/get-pub-sub.md +0 -1
- package/docs/examples/health/get-queue-builds.md +0 -1
- package/docs/examples/health/get-queue-certificates.md +0 -1
- package/docs/examples/health/get-queue-databases.md +0 -1
- package/docs/examples/health/get-queue-deletes.md +0 -1
- package/docs/examples/health/get-queue-functions.md +0 -1
- package/docs/examples/health/get-queue-logs.md +0 -1
- package/docs/examples/health/get-queue-mails.md +0 -1
- package/docs/examples/health/get-queue-messaging.md +0 -1
- package/docs/examples/health/get-queue-migrations.md +0 -1
- package/docs/examples/health/get-queue-stats-resources.md +0 -1
- package/docs/examples/health/get-queue-usage.md +0 -1
- package/docs/examples/health/get-queue-webhooks.md +0 -1
- package/docs/examples/health/get-storage-local.md +0 -1
- package/docs/examples/health/get-storage.md +0 -1
- package/docs/examples/health/get-time.md +0 -1
- package/docs/examples/health/get.md +0 -1
- package/docs/examples/locale/get.md +0 -1
- package/docs/examples/locale/list-codes.md +0 -1
- package/docs/examples/locale/list-continents.md +0 -1
- package/docs/examples/locale/list-countries-eu.md +0 -1
- package/docs/examples/locale/list-countries-phones.md +0 -1
- package/docs/examples/locale/list-countries.md +0 -1
- package/docs/examples/locale/list-currencies.md +0 -1
- package/docs/examples/locale/list-languages.md +0 -1
- package/docs/examples/messaging/create-apns-provider.md +0 -3
- package/docs/examples/messaging/create-email.md +0 -4
- package/docs/examples/messaging/create-fcm-provider.md +0 -3
- package/docs/examples/messaging/create-mailgun-provider.md +0 -3
- package/docs/examples/messaging/create-msg-91-provider.md +0 -3
- package/docs/examples/messaging/create-push.md +0 -2
- package/docs/examples/messaging/create-resend-provider.md +0 -3
- package/docs/examples/messaging/create-sendgrid-provider.md +0 -3
- package/docs/examples/messaging/create-sms.md +0 -3
- package/docs/examples/messaging/create-smtp-provider.md +0 -4
- package/docs/examples/messaging/create-subscriber.md +0 -4
- package/docs/examples/messaging/create-telesign-provider.md +0 -3
- package/docs/examples/messaging/create-textmagic-provider.md +0 -3
- package/docs/examples/messaging/create-topic.md +0 -3
- package/docs/examples/messaging/create-twilio-provider.md +0 -3
- package/docs/examples/messaging/create-vonage-provider.md +0 -3
- package/docs/examples/messaging/delete-provider.md +0 -2
- package/docs/examples/messaging/delete-subscriber.md +0 -3
- package/docs/examples/messaging/delete-topic.md +0 -2
- package/docs/examples/messaging/delete.md +0 -2
- package/docs/examples/messaging/get-message.md +0 -2
- package/docs/examples/messaging/get-provider.md +0 -2
- package/docs/examples/messaging/get-subscriber.md +0 -3
- package/docs/examples/messaging/get-topic.md +0 -2
- package/docs/examples/messaging/list-message-logs.md +0 -2
- package/docs/examples/messaging/list-messages.md +0 -1
- package/docs/examples/messaging/list-provider-logs.md +0 -2
- package/docs/examples/messaging/list-providers.md +0 -1
- package/docs/examples/messaging/list-subscriber-logs.md +0 -2
- package/docs/examples/messaging/list-subscribers.md +0 -2
- package/docs/examples/messaging/list-targets.md +0 -2
- package/docs/examples/messaging/list-topic-logs.md +0 -2
- package/docs/examples/messaging/list-topics.md +0 -1
- package/docs/examples/messaging/update-apns-provider.md +0 -2
- package/docs/examples/messaging/update-email.md +0 -2
- package/docs/examples/messaging/update-fcm-provider.md +0 -2
- package/docs/examples/messaging/update-mailgun-provider.md +0 -2
- package/docs/examples/messaging/update-msg-91-provider.md +0 -2
- package/docs/examples/messaging/update-push.md +0 -2
- package/docs/examples/messaging/update-resend-provider.md +0 -2
- package/docs/examples/messaging/update-sendgrid-provider.md +0 -2
- package/docs/examples/messaging/update-sms.md +0 -2
- package/docs/examples/messaging/update-smtp-provider.md +0 -2
- package/docs/examples/messaging/update-telesign-provider.md +0 -2
- package/docs/examples/messaging/update-textmagic-provider.md +0 -2
- package/docs/examples/messaging/update-topic.md +0 -2
- package/docs/examples/messaging/update-twilio-provider.md +0 -2
- package/docs/examples/messaging/update-vonage-provider.md +0 -2
- package/docs/examples/migrations/create-appwrite-migration.md +0 -5
- package/docs/examples/migrations/create-csv-export.md +0 -3
- package/docs/examples/migrations/create-csv-import.md +0 -4
- package/docs/examples/migrations/create-firebase-migration.md +0 -3
- package/docs/examples/migrations/create-n-host-migration.md +0 -8
- package/docs/examples/migrations/create-supabase-migration.md +0 -7
- package/docs/examples/migrations/delete.md +0 -2
- package/docs/examples/migrations/get-appwrite-report.md +0 -5
- package/docs/examples/migrations/get-firebase-report.md +0 -3
- package/docs/examples/migrations/get-n-host-report.md +0 -8
- package/docs/examples/migrations/get-supabase-report.md +0 -7
- package/docs/examples/migrations/get.md +0 -2
- package/docs/examples/migrations/list.md +0 -1
- package/docs/examples/migrations/retry.md +0 -2
- package/docs/examples/project/create-variable.md +0 -3
- package/docs/examples/project/delete-variable.md +0 -2
- package/docs/examples/project/get-usage.md +0 -3
- package/docs/examples/project/get-variable.md +0 -2
- package/docs/examples/project/list-variables.md +0 -1
- package/docs/examples/project/update-variable.md +0 -3
- package/docs/examples/projects/create-dev-key.md +0 -4
- package/docs/examples/projects/create-jwt.md +0 -3
- package/docs/examples/projects/create-key.md +0 -4
- package/docs/examples/projects/create-platform.md +0 -4
- package/docs/examples/projects/create-smtp-test.md +0 -6
- package/docs/examples/projects/create-webhook.md +0 -6
- package/docs/examples/projects/create.md +0 -4
- package/docs/examples/projects/delete-dev-key.md +0 -3
- package/docs/examples/projects/delete-email-template.md +0 -4
- package/docs/examples/projects/delete-key.md +0 -3
- package/docs/examples/projects/delete-platform.md +0 -3
- package/docs/examples/projects/delete-sms-template.md +0 -4
- package/docs/examples/projects/delete-webhook.md +0 -3
- package/docs/examples/projects/delete.md +0 -2
- package/docs/examples/projects/get-dev-key.md +0 -3
- package/docs/examples/projects/get-email-template.md +0 -4
- package/docs/examples/projects/get-key.md +0 -3
- package/docs/examples/projects/get-platform.md +0 -3
- package/docs/examples/projects/get-sms-template.md +0 -4
- package/docs/examples/projects/get-webhook.md +0 -3
- package/docs/examples/projects/get.md +0 -2
- package/docs/examples/projects/list-dev-keys.md +0 -2
- package/docs/examples/projects/list-keys.md +0 -2
- package/docs/examples/projects/list-platforms.md +0 -2
- package/docs/examples/projects/list-webhooks.md +0 -2
- package/docs/examples/projects/list.md +0 -1
- package/docs/examples/projects/update-api-status-all.md +0 -3
- package/docs/examples/projects/update-api-status.md +0 -4
- package/docs/examples/projects/update-auth-duration.md +0 -3
- package/docs/examples/projects/update-auth-limit.md +0 -3
- package/docs/examples/projects/update-auth-password-dictionary.md +0 -3
- package/docs/examples/projects/update-auth-password-history.md +0 -3
- package/docs/examples/projects/update-auth-sessions-limit.md +0 -3
- package/docs/examples/projects/update-auth-status.md +0 -4
- package/docs/examples/projects/update-dev-key.md +0 -5
- package/docs/examples/projects/update-email-template.md +0 -6
- package/docs/examples/projects/update-key.md +0 -5
- package/docs/examples/projects/update-memberships-privacy.md +0 -5
- package/docs/examples/projects/update-mock-numbers.md +0 -3
- package/docs/examples/projects/update-o-auth-2.md +0 -3
- package/docs/examples/projects/update-personal-data-check.md +0 -3
- package/docs/examples/projects/update-platform.md +0 -4
- package/docs/examples/projects/update-service-status-all.md +0 -3
- package/docs/examples/projects/update-service-status.md +0 -4
- package/docs/examples/projects/update-session-alerts.md +0 -3
- package/docs/examples/projects/update-session-invalidation.md +0 -3
- package/docs/examples/projects/update-sms-template.md +0 -5
- package/docs/examples/projects/update-smtp.md +0 -3
- package/docs/examples/projects/update-team.md +0 -3
- package/docs/examples/projects/update-webhook-signature.md +0 -3
- package/docs/examples/projects/update-webhook.md +0 -7
- package/docs/examples/projects/update.md +0 -3
- package/docs/examples/proxy/create-api-rule.md +0 -2
- package/docs/examples/proxy/create-function-rule.md +0 -3
- package/docs/examples/proxy/create-redirect-rule.md +0 -6
- package/docs/examples/proxy/create-site-rule.md +0 -3
- package/docs/examples/proxy/delete-rule.md +0 -2
- package/docs/examples/proxy/get-rule.md +0 -2
- package/docs/examples/proxy/list-rules.md +0 -1
- package/docs/examples/proxy/update-rule-verification.md +0 -2
- package/docs/examples/sites/create-deployment.md +0 -4
- package/docs/examples/sites/create-duplicate-deployment.md +0 -3
- package/docs/examples/sites/create-template-deployment.md +0 -7
- package/docs/examples/sites/create-variable.md +0 -4
- package/docs/examples/sites/create-vcs-deployment.md +0 -4
- package/docs/examples/sites/create.md +0 -5
- package/docs/examples/sites/delete-deployment.md +0 -3
- package/docs/examples/sites/delete-log.md +0 -3
- package/docs/examples/sites/delete-variable.md +0 -3
- package/docs/examples/sites/delete.md +0 -2
- package/docs/examples/sites/get-deployment-download.md +0 -3
- package/docs/examples/sites/get-deployment.md +0 -3
- package/docs/examples/sites/get-log.md +0 -3
- package/docs/examples/sites/get-template.md +0 -2
- package/docs/examples/sites/get-usage.md +0 -2
- package/docs/examples/sites/get-variable.md +0 -3
- package/docs/examples/sites/get.md +0 -2
- package/docs/examples/sites/list-deployments.md +0 -2
- package/docs/examples/sites/list-frameworks.md +0 -1
- package/docs/examples/sites/list-logs.md +0 -2
- package/docs/examples/sites/list-specifications.md +0 -1
- package/docs/examples/sites/list-templates.md +0 -1
- package/docs/examples/sites/list-usage.md +0 -1
- package/docs/examples/sites/list-variables.md +0 -2
- package/docs/examples/sites/list.md +0 -1
- package/docs/examples/sites/update-deployment-status.md +0 -3
- package/docs/examples/sites/update-site-deployment.md +0 -3
- package/docs/examples/sites/update-variable.md +0 -4
- package/docs/examples/sites/update.md +0 -4
- package/docs/examples/storage/create-bucket.md +0 -3
- package/docs/examples/storage/create-file.md +0 -4
- package/docs/examples/storage/delete-bucket.md +0 -2
- package/docs/examples/storage/delete-file.md +0 -3
- package/docs/examples/storage/get-bucket-usage.md +0 -2
- package/docs/examples/storage/get-bucket.md +0 -2
- package/docs/examples/storage/get-file-download.md +0 -3
- package/docs/examples/storage/get-file-preview.md +0 -3
- package/docs/examples/storage/get-file-view.md +0 -3
- package/docs/examples/storage/get-file.md +0 -3
- package/docs/examples/storage/get-usage.md +0 -1
- package/docs/examples/storage/list-buckets.md +0 -1
- package/docs/examples/storage/list-files.md +0 -2
- package/docs/examples/storage/update-bucket.md +0 -3
- package/docs/examples/storage/update-file.md +0 -3
- package/docs/examples/tablesdb/create-boolean-column.md +0 -5
- package/docs/examples/tablesdb/create-datetime-column.md +0 -5
- package/docs/examples/tablesdb/create-email-column.md +0 -5
- package/docs/examples/tablesdb/create-enum-column.md +0 -6
- package/docs/examples/tablesdb/create-float-column.md +0 -5
- package/docs/examples/tablesdb/create-index.md +0 -6
- package/docs/examples/tablesdb/create-integer-column.md +0 -5
- package/docs/examples/tablesdb/create-ip-column.md +0 -5
- package/docs/examples/tablesdb/create-line-column.md +0 -5
- package/docs/examples/tablesdb/create-operations.md +0 -2
- package/docs/examples/tablesdb/create-point-column.md +0 -5
- package/docs/examples/tablesdb/create-polygon-column.md +0 -5
- package/docs/examples/tablesdb/create-relationship-column.md +0 -5
- package/docs/examples/tablesdb/create-row.md +0 -5
- package/docs/examples/tablesdb/create-rows.md +0 -4
- package/docs/examples/tablesdb/create-string-column.md +0 -6
- package/docs/examples/tablesdb/create-table.md +0 -4
- package/docs/examples/tablesdb/create-transaction.md +0 -1
- package/docs/examples/tablesdb/create-url-column.md +0 -5
- package/docs/examples/tablesdb/create.md +0 -3
- package/docs/examples/tablesdb/decrement-row-column.md +0 -5
- package/docs/examples/tablesdb/delete-column.md +0 -4
- package/docs/examples/tablesdb/delete-index.md +0 -4
- package/docs/examples/tablesdb/delete-row.md +0 -4
- package/docs/examples/tablesdb/delete-rows.md +0 -3
- package/docs/examples/tablesdb/delete-table.md +0 -3
- package/docs/examples/tablesdb/delete-transaction.md +0 -2
- package/docs/examples/tablesdb/delete.md +0 -2
- package/docs/examples/tablesdb/get-column.md +0 -4
- package/docs/examples/tablesdb/get-index.md +0 -4
- package/docs/examples/tablesdb/get-row.md +0 -4
- package/docs/examples/tablesdb/get-table-usage.md +0 -3
- package/docs/examples/tablesdb/get-table.md +0 -3
- package/docs/examples/tablesdb/get-transaction.md +0 -2
- package/docs/examples/tablesdb/get-usage.md +0 -2
- package/docs/examples/tablesdb/get.md +0 -2
- package/docs/examples/tablesdb/increment-row-column.md +0 -5
- package/docs/examples/tablesdb/list-columns.md +0 -3
- package/docs/examples/tablesdb/list-indexes.md +0 -3
- package/docs/examples/tablesdb/list-row-logs.md +0 -4
- package/docs/examples/tablesdb/list-rows.md +0 -3
- package/docs/examples/tablesdb/list-table-logs.md +0 -3
- package/docs/examples/tablesdb/list-tables.md +0 -2
- package/docs/examples/tablesdb/list-transactions.md +0 -1
- package/docs/examples/tablesdb/list-usage.md +0 -1
- package/docs/examples/tablesdb/list.md +0 -1
- package/docs/examples/tablesdb/update-boolean-column.md +0 -6
- package/docs/examples/tablesdb/update-datetime-column.md +0 -6
- package/docs/examples/tablesdb/update-email-column.md +0 -6
- package/docs/examples/tablesdb/update-enum-column.md +0 -7
- package/docs/examples/tablesdb/update-float-column.md +0 -6
- package/docs/examples/tablesdb/update-integer-column.md +0 -6
- package/docs/examples/tablesdb/update-ip-column.md +0 -6
- package/docs/examples/tablesdb/update-line-column.md +0 -5
- package/docs/examples/tablesdb/update-point-column.md +0 -5
- package/docs/examples/tablesdb/update-polygon-column.md +0 -5
- package/docs/examples/tablesdb/update-relationship-column.md +0 -4
- package/docs/examples/tablesdb/update-row.md +0 -4
- package/docs/examples/tablesdb/update-rows.md +0 -3
- package/docs/examples/tablesdb/update-string-column.md +0 -6
- package/docs/examples/tablesdb/update-table.md +0 -4
- package/docs/examples/tablesdb/update-transaction.md +0 -2
- package/docs/examples/tablesdb/update-url-column.md +0 -6
- package/docs/examples/tablesdb/update.md +0 -3
- package/docs/examples/tablesdb/upsert-row.md +0 -4
- package/docs/examples/tablesdb/upsert-rows.md +0 -4
- package/docs/examples/teams/create-membership.md +0 -3
- package/docs/examples/teams/create.md +0 -3
- package/docs/examples/teams/delete-membership.md +0 -3
- package/docs/examples/teams/delete.md +0 -2
- package/docs/examples/teams/get-membership.md +0 -3
- package/docs/examples/teams/get-prefs.md +0 -2
- package/docs/examples/teams/get.md +0 -2
- package/docs/examples/teams/list-logs.md +0 -2
- package/docs/examples/teams/list-memberships.md +0 -2
- package/docs/examples/teams/list.md +0 -1
- package/docs/examples/teams/update-membership-status.md +0 -5
- package/docs/examples/teams/update-membership.md +0 -4
- package/docs/examples/teams/update-name.md +0 -3
- package/docs/examples/teams/update-prefs.md +0 -3
- package/docs/examples/tokens/create-file-token.md +0 -3
- package/docs/examples/tokens/delete.md +0 -2
- package/docs/examples/tokens/get.md +0 -2
- package/docs/examples/tokens/list.md +0 -3
- package/docs/examples/tokens/update.md +0 -2
- package/docs/examples/users/create-argon-2-user.md +0 -4
- package/docs/examples/users/create-bcrypt-user.md +0 -4
- package/docs/examples/users/create-jwt.md +0 -2
- package/docs/examples/users/create-md-5-user.md +0 -4
- package/docs/examples/users/create-mfa-recovery-codes.md +0 -2
- package/docs/examples/users/create-ph-pass-user.md +0 -4
- package/docs/examples/users/create-scrypt-modified-user.md +0 -7
- package/docs/examples/users/create-scrypt-user.md +0 -9
- package/docs/examples/users/create-session.md +0 -2
- package/docs/examples/users/create-sha-user.md +0 -4
- package/docs/examples/users/create-target.md +0 -5
- package/docs/examples/users/create-token.md +0 -2
- package/docs/examples/users/create.md +0 -2
- package/docs/examples/users/delete-identity.md +0 -2
- package/docs/examples/users/delete-mfa-authenticator.md +0 -3
- package/docs/examples/users/delete-session.md +0 -3
- package/docs/examples/users/delete-sessions.md +0 -2
- package/docs/examples/users/delete-target.md +0 -3
- package/docs/examples/users/delete.md +0 -2
- package/docs/examples/users/get-mfa-recovery-codes.md +0 -2
- package/docs/examples/users/get-prefs.md +0 -2
- package/docs/examples/users/get-target.md +0 -3
- package/docs/examples/users/get-usage.md +0 -1
- package/docs/examples/users/get.md +0 -2
- package/docs/examples/users/list-identities.md +0 -1
- package/docs/examples/users/list-logs.md +0 -2
- package/docs/examples/users/list-memberships.md +0 -2
- package/docs/examples/users/list-mfa-factors.md +0 -2
- package/docs/examples/users/list-sessions.md +0 -2
- package/docs/examples/users/list-targets.md +0 -2
- package/docs/examples/users/list.md +0 -1
- package/docs/examples/users/update-email-verification.md +0 -3
- package/docs/examples/users/update-email.md +0 -3
- package/docs/examples/users/update-labels.md +0 -3
- package/docs/examples/users/update-mfa-recovery-codes.md +0 -2
- package/docs/examples/users/update-mfa.md +0 -3
- package/docs/examples/users/update-name.md +0 -3
- package/docs/examples/users/update-password.md +0 -3
- package/docs/examples/users/update-phone-verification.md +0 -3
- package/docs/examples/users/update-phone.md +0 -3
- package/docs/examples/users/update-prefs.md +0 -3
- package/docs/examples/users/update-status.md +0 -3
- package/docs/examples/users/update-target.md +0 -3
- package/docs/examples/vcs/create-repository-detection.md +0 -4
- package/docs/examples/vcs/create-repository.md +0 -4
- package/docs/examples/vcs/delete-installation.md +0 -2
- package/docs/examples/vcs/get-installation.md +0 -2
- package/docs/examples/vcs/get-repository-contents.md +0 -3
- package/docs/examples/vcs/get-repository.md +0 -3
- package/docs/examples/vcs/list-installations.md +0 -1
- package/docs/examples/vcs/list-repositories.md +0 -3
- package/docs/examples/vcs/list-repository-branches.md +0 -3
- package/docs/examples/vcs/update-external-deployments.md +0 -4
- package/lib/commands/account.ts +0 -1867
- package/lib/commands/console.ts +0 -112
- package/lib/commands/databases.ts +0 -3272
- package/lib/commands/functions.ts +0 -1587
- package/lib/commands/graphql.ts +0 -110
- package/lib/commands/health.ts +0 -753
- package/lib/commands/locale.ts +0 -270
- package/lib/commands/messaging.ts +0 -2878
- package/lib/commands/migrations.ts +0 -754
- package/lib/commands/organizations.ts +0 -46
- package/lib/commands/project.ts +0 -266
- package/lib/commands/projects.ts +0 -2370
- package/lib/commands/proxy.ts +0 -357
- package/lib/commands/sites.ts +0 -1514
- package/lib/commands/storage.ts +0 -919
- package/lib/commands/tables-db.ts +0 -3260
- package/lib/commands/teams.ts +0 -609
- package/lib/commands/tokens.ts +0 -232
- package/lib/commands/users.ts +0 -1804
- package/lib/commands/vcs.ts +0 -428
- package/lib/exception.ts +0 -20
|
@@ -1,3272 +0,0 @@
|
|
|
1
|
-
import fs = require('fs');
|
|
2
|
-
import pathLib = require('path');
|
|
3
|
-
import tar = require('tar');
|
|
4
|
-
import ignore = require('ignore');
|
|
5
|
-
import { promisify } from 'util';
|
|
6
|
-
import Client from '../client';
|
|
7
|
-
import { getAllFiles, showConsoleLink } from '../utils';
|
|
8
|
-
import { Command } from 'commander';
|
|
9
|
-
import { sdkForProject, sdkForConsole } from '../sdks';
|
|
10
|
-
import { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } from '../parser';
|
|
11
|
-
import { localConfig, globalConfig } from '../config';
|
|
12
|
-
import { File } from 'undici';
|
|
13
|
-
import { ReadableStream } from 'stream/web';
|
|
14
|
-
|
|
15
|
-
function convertReadStreamToReadableStream(readStream: fs.ReadStream): ReadableStream {
|
|
16
|
-
return new ReadableStream({
|
|
17
|
-
start(controller) {
|
|
18
|
-
readStream.on("data", (chunk: Buffer) => {
|
|
19
|
-
controller.enqueue(chunk);
|
|
20
|
-
});
|
|
21
|
-
readStream.on("end", () => {
|
|
22
|
-
controller.close();
|
|
23
|
-
});
|
|
24
|
-
readStream.on("error", (err: Error) => {
|
|
25
|
-
controller.error(err);
|
|
26
|
-
});
|
|
27
|
-
},
|
|
28
|
-
cancel() {
|
|
29
|
-
readStream.destroy();
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const databases = new Command("databases").description(commandDescriptions['databases'] ?? '').configureHelp({
|
|
35
|
-
helpWidth: process.stdout.columns || 80
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
interface DatabasesListRequestParams {
|
|
39
|
-
queries?: string[];
|
|
40
|
-
search?: string;
|
|
41
|
-
total?: boolean;
|
|
42
|
-
overrideForCli?: boolean;
|
|
43
|
-
parseOutput?: boolean;
|
|
44
|
-
sdk?: Client;
|
|
45
|
-
console?: boolean;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export const databasesList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: DatabasesListRequestParams): Promise<any> => {
|
|
49
|
-
let client = !sdk ? await sdkForProject() :
|
|
50
|
-
sdk;
|
|
51
|
-
let apiPath = '/databases';
|
|
52
|
-
let payload = {};
|
|
53
|
-
if (typeof queries !== 'undefined') {
|
|
54
|
-
payload['queries'] = queries;
|
|
55
|
-
}
|
|
56
|
-
if (typeof search !== 'undefined') {
|
|
57
|
-
payload['search'] = search;
|
|
58
|
-
}
|
|
59
|
-
if (typeof total !== 'undefined') {
|
|
60
|
-
payload['total'] = total;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
let response = undefined;
|
|
64
|
-
|
|
65
|
-
response = await client.call('get', apiPath, {
|
|
66
|
-
}, payload);
|
|
67
|
-
|
|
68
|
-
if (parseOutput) {
|
|
69
|
-
if(showConsole) {
|
|
70
|
-
showConsoleLink('databases', 'list');
|
|
71
|
-
} else {
|
|
72
|
-
parse(response)
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return response;
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
interface DatabasesCreateRequestParams {
|
|
80
|
-
databaseId: string;
|
|
81
|
-
name: string;
|
|
82
|
-
enabled?: boolean;
|
|
83
|
-
overrideForCli?: boolean;
|
|
84
|
-
parseOutput?: boolean;
|
|
85
|
-
sdk?: Client;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export const databasesCreate = async ({databaseId,name,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateRequestParams): Promise<any> => {
|
|
89
|
-
let client = !sdk ? await sdkForProject() :
|
|
90
|
-
sdk;
|
|
91
|
-
let apiPath = '/databases';
|
|
92
|
-
let payload = {};
|
|
93
|
-
if (typeof databaseId !== 'undefined') {
|
|
94
|
-
payload['databaseId'] = databaseId;
|
|
95
|
-
}
|
|
96
|
-
if (typeof name !== 'undefined') {
|
|
97
|
-
payload['name'] = name;
|
|
98
|
-
}
|
|
99
|
-
if (typeof enabled !== 'undefined') {
|
|
100
|
-
payload['enabled'] = enabled;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
let response = undefined;
|
|
104
|
-
|
|
105
|
-
response = await client.call('post', apiPath, {
|
|
106
|
-
'content-type': 'application/json',
|
|
107
|
-
}, payload);
|
|
108
|
-
|
|
109
|
-
if (parseOutput) {
|
|
110
|
-
parse(response)
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return response;
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
interface DatabasesListTransactionsRequestParams {
|
|
117
|
-
queries?: string[];
|
|
118
|
-
overrideForCli?: boolean;
|
|
119
|
-
parseOutput?: boolean;
|
|
120
|
-
sdk?: Client;
|
|
121
|
-
console?: boolean;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export const databasesListTransactions = async ({queries,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: DatabasesListTransactionsRequestParams): Promise<any> => {
|
|
125
|
-
let client = !sdk ? await sdkForProject() :
|
|
126
|
-
sdk;
|
|
127
|
-
let apiPath = '/databases/transactions';
|
|
128
|
-
let payload = {};
|
|
129
|
-
if (typeof queries !== 'undefined') {
|
|
130
|
-
payload['queries'] = queries;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
let response = undefined;
|
|
134
|
-
|
|
135
|
-
response = await client.call('get', apiPath, {
|
|
136
|
-
}, payload);
|
|
137
|
-
|
|
138
|
-
if (parseOutput) {
|
|
139
|
-
if(showConsole) {
|
|
140
|
-
showConsoleLink('databases', 'listTransactions');
|
|
141
|
-
} else {
|
|
142
|
-
parse(response)
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return response;
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
interface DatabasesCreateTransactionRequestParams {
|
|
150
|
-
ttl?: number;
|
|
151
|
-
overrideForCli?: boolean;
|
|
152
|
-
parseOutput?: boolean;
|
|
153
|
-
sdk?: Client;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export const databasesCreateTransaction = async ({ttl,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateTransactionRequestParams): Promise<any> => {
|
|
157
|
-
let client = !sdk ? await sdkForProject() :
|
|
158
|
-
sdk;
|
|
159
|
-
let apiPath = '/databases/transactions';
|
|
160
|
-
let payload = {};
|
|
161
|
-
if (typeof ttl !== 'undefined') {
|
|
162
|
-
payload['ttl'] = ttl;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
let response = undefined;
|
|
166
|
-
|
|
167
|
-
response = await client.call('post', apiPath, {
|
|
168
|
-
'content-type': 'application/json',
|
|
169
|
-
}, payload);
|
|
170
|
-
|
|
171
|
-
if (parseOutput) {
|
|
172
|
-
parse(response)
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
return response;
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
interface DatabasesGetTransactionRequestParams {
|
|
179
|
-
transactionId: string;
|
|
180
|
-
overrideForCli?: boolean;
|
|
181
|
-
parseOutput?: boolean;
|
|
182
|
-
sdk?: Client;
|
|
183
|
-
console?: boolean;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export const databasesGetTransaction = async ({transactionId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: DatabasesGetTransactionRequestParams): Promise<any> => {
|
|
187
|
-
let client = !sdk ? await sdkForProject() :
|
|
188
|
-
sdk;
|
|
189
|
-
let apiPath = '/databases/transactions/{transactionId}'.replace('{transactionId}', transactionId);
|
|
190
|
-
let payload = {};
|
|
191
|
-
|
|
192
|
-
let response = undefined;
|
|
193
|
-
|
|
194
|
-
response = await client.call('get', apiPath, {
|
|
195
|
-
}, payload);
|
|
196
|
-
|
|
197
|
-
if (parseOutput) {
|
|
198
|
-
if(showConsole) {
|
|
199
|
-
showConsoleLink('databases', 'getTransaction', transactionId);
|
|
200
|
-
} else {
|
|
201
|
-
parse(response)
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
return response;
|
|
206
|
-
|
|
207
|
-
}
|
|
208
|
-
interface DatabasesUpdateTransactionRequestParams {
|
|
209
|
-
transactionId: string;
|
|
210
|
-
commit?: boolean;
|
|
211
|
-
rollback?: boolean;
|
|
212
|
-
overrideForCli?: boolean;
|
|
213
|
-
parseOutput?: boolean;
|
|
214
|
-
sdk?: Client;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export const databasesUpdateTransaction = async ({transactionId,commit,rollback,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateTransactionRequestParams): Promise<any> => {
|
|
218
|
-
let client = !sdk ? await sdkForProject() :
|
|
219
|
-
sdk;
|
|
220
|
-
let apiPath = '/databases/transactions/{transactionId}'.replace('{transactionId}', transactionId);
|
|
221
|
-
let payload = {};
|
|
222
|
-
if (typeof commit !== 'undefined') {
|
|
223
|
-
payload['commit'] = commit;
|
|
224
|
-
}
|
|
225
|
-
if (typeof rollback !== 'undefined') {
|
|
226
|
-
payload['rollback'] = rollback;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
let response = undefined;
|
|
230
|
-
|
|
231
|
-
response = await client.call('patch', apiPath, {
|
|
232
|
-
'content-type': 'application/json',
|
|
233
|
-
}, payload);
|
|
234
|
-
|
|
235
|
-
if (parseOutput) {
|
|
236
|
-
parse(response)
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
return response;
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
interface DatabasesDeleteTransactionRequestParams {
|
|
243
|
-
transactionId: string;
|
|
244
|
-
overrideForCli?: boolean;
|
|
245
|
-
parseOutput?: boolean;
|
|
246
|
-
sdk?: Client;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export const databasesDeleteTransaction = async ({transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesDeleteTransactionRequestParams): Promise<any> => {
|
|
250
|
-
let client = !sdk ? await sdkForProject() :
|
|
251
|
-
sdk;
|
|
252
|
-
let apiPath = '/databases/transactions/{transactionId}'.replace('{transactionId}', transactionId);
|
|
253
|
-
let payload = {};
|
|
254
|
-
|
|
255
|
-
let response = undefined;
|
|
256
|
-
|
|
257
|
-
response = await client.call('delete', apiPath, {
|
|
258
|
-
'content-type': 'application/json',
|
|
259
|
-
}, payload);
|
|
260
|
-
|
|
261
|
-
if (parseOutput) {
|
|
262
|
-
parse(response)
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
return response;
|
|
266
|
-
|
|
267
|
-
}
|
|
268
|
-
interface DatabasesCreateOperationsRequestParams {
|
|
269
|
-
transactionId: string;
|
|
270
|
-
operations?: object[];
|
|
271
|
-
overrideForCli?: boolean;
|
|
272
|
-
parseOutput?: boolean;
|
|
273
|
-
sdk?: Client;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
export const databasesCreateOperations = async ({transactionId,operations,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateOperationsRequestParams): Promise<any> => {
|
|
277
|
-
let client = !sdk ? await sdkForProject() :
|
|
278
|
-
sdk;
|
|
279
|
-
let apiPath = '/databases/transactions/{transactionId}/operations'.replace('{transactionId}', transactionId);
|
|
280
|
-
let payload = {};
|
|
281
|
-
operations = operations === true ? [] : operations;
|
|
282
|
-
if (typeof operations !== 'undefined') {
|
|
283
|
-
payload['operations'] = operations;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
let response = undefined;
|
|
287
|
-
|
|
288
|
-
response = await client.call('post', apiPath, {
|
|
289
|
-
'content-type': 'application/json',
|
|
290
|
-
}, payload);
|
|
291
|
-
|
|
292
|
-
if (parseOutput) {
|
|
293
|
-
parse(response)
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
return response;
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
interface DatabasesListUsageRequestParams {
|
|
300
|
-
range?: UsageRange;
|
|
301
|
-
overrideForCli?: boolean;
|
|
302
|
-
parseOutput?: boolean;
|
|
303
|
-
sdk?: Client;
|
|
304
|
-
console?: boolean;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
export const databasesListUsage = async ({range,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: DatabasesListUsageRequestParams): Promise<any> => {
|
|
308
|
-
let client = !sdk ? await sdkForProject() :
|
|
309
|
-
sdk;
|
|
310
|
-
let apiPath = '/databases/usage';
|
|
311
|
-
let payload = {};
|
|
312
|
-
if (typeof range !== 'undefined') {
|
|
313
|
-
payload['range'] = range;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
let response = undefined;
|
|
317
|
-
|
|
318
|
-
response = await client.call('get', apiPath, {
|
|
319
|
-
}, payload);
|
|
320
|
-
|
|
321
|
-
if (parseOutput) {
|
|
322
|
-
if(showConsole) {
|
|
323
|
-
showConsoleLink('databases', 'listUsage');
|
|
324
|
-
} else {
|
|
325
|
-
parse(response)
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
return response;
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
interface DatabasesGetRequestParams {
|
|
333
|
-
databaseId: string;
|
|
334
|
-
overrideForCli?: boolean;
|
|
335
|
-
parseOutput?: boolean;
|
|
336
|
-
sdk?: Client;
|
|
337
|
-
console?: boolean;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
export const databasesGet = async ({databaseId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: DatabasesGetRequestParams): Promise<any> => {
|
|
341
|
-
let client = !sdk ? await sdkForProject() :
|
|
342
|
-
sdk;
|
|
343
|
-
let apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
|
|
344
|
-
let payload = {};
|
|
345
|
-
|
|
346
|
-
let response = undefined;
|
|
347
|
-
|
|
348
|
-
response = await client.call('get', apiPath, {
|
|
349
|
-
}, payload);
|
|
350
|
-
|
|
351
|
-
if (parseOutput) {
|
|
352
|
-
if(showConsole) {
|
|
353
|
-
showConsoleLink('databases', 'get', databaseId);
|
|
354
|
-
} else {
|
|
355
|
-
parse(response)
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
return response;
|
|
360
|
-
|
|
361
|
-
}
|
|
362
|
-
interface DatabasesUpdateRequestParams {
|
|
363
|
-
databaseId: string;
|
|
364
|
-
name: string;
|
|
365
|
-
enabled?: boolean;
|
|
366
|
-
overrideForCli?: boolean;
|
|
367
|
-
parseOutput?: boolean;
|
|
368
|
-
sdk?: Client;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
export const databasesUpdate = async ({databaseId,name,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateRequestParams): Promise<any> => {
|
|
372
|
-
let client = !sdk ? await sdkForProject() :
|
|
373
|
-
sdk;
|
|
374
|
-
let apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
|
|
375
|
-
let payload = {};
|
|
376
|
-
if (typeof name !== 'undefined') {
|
|
377
|
-
payload['name'] = name;
|
|
378
|
-
}
|
|
379
|
-
if (typeof enabled !== 'undefined') {
|
|
380
|
-
payload['enabled'] = enabled;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
let response = undefined;
|
|
384
|
-
|
|
385
|
-
response = await client.call('put', apiPath, {
|
|
386
|
-
'content-type': 'application/json',
|
|
387
|
-
}, payload);
|
|
388
|
-
|
|
389
|
-
if (parseOutput) {
|
|
390
|
-
parse(response)
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
return response;
|
|
394
|
-
|
|
395
|
-
}
|
|
396
|
-
interface DatabasesDeleteRequestParams {
|
|
397
|
-
databaseId: string;
|
|
398
|
-
overrideForCli?: boolean;
|
|
399
|
-
parseOutput?: boolean;
|
|
400
|
-
sdk?: Client;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
export const databasesDelete = async ({databaseId,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesDeleteRequestParams): Promise<any> => {
|
|
404
|
-
let client = !sdk ? await sdkForProject() :
|
|
405
|
-
sdk;
|
|
406
|
-
let apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
|
|
407
|
-
let payload = {};
|
|
408
|
-
|
|
409
|
-
let response = undefined;
|
|
410
|
-
|
|
411
|
-
response = await client.call('delete', apiPath, {
|
|
412
|
-
'content-type': 'application/json',
|
|
413
|
-
}, payload);
|
|
414
|
-
|
|
415
|
-
if (parseOutput) {
|
|
416
|
-
parse(response)
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
return response;
|
|
420
|
-
|
|
421
|
-
}
|
|
422
|
-
interface DatabasesListCollectionsRequestParams {
|
|
423
|
-
databaseId: string;
|
|
424
|
-
queries?: string[];
|
|
425
|
-
search?: string;
|
|
426
|
-
total?: boolean;
|
|
427
|
-
overrideForCli?: boolean;
|
|
428
|
-
parseOutput?: boolean;
|
|
429
|
-
sdk?: Client;
|
|
430
|
-
console?: boolean;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
export const databasesListCollections = async ({databaseId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: DatabasesListCollectionsRequestParams): Promise<any> => {
|
|
434
|
-
let client = !sdk ? await sdkForProject() :
|
|
435
|
-
sdk;
|
|
436
|
-
let apiPath = '/databases/{databaseId}/collections'.replace('{databaseId}', databaseId);
|
|
437
|
-
let payload = {};
|
|
438
|
-
if (typeof queries !== 'undefined') {
|
|
439
|
-
payload['queries'] = queries;
|
|
440
|
-
}
|
|
441
|
-
if (typeof search !== 'undefined') {
|
|
442
|
-
payload['search'] = search;
|
|
443
|
-
}
|
|
444
|
-
if (typeof total !== 'undefined') {
|
|
445
|
-
payload['total'] = total;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
let response = undefined;
|
|
449
|
-
|
|
450
|
-
response = await client.call('get', apiPath, {
|
|
451
|
-
}, payload);
|
|
452
|
-
|
|
453
|
-
if (parseOutput) {
|
|
454
|
-
if(showConsole) {
|
|
455
|
-
showConsoleLink('databases', 'listCollections', databaseId);
|
|
456
|
-
} else {
|
|
457
|
-
parse(response)
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
return response;
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
interface DatabasesCreateCollectionRequestParams {
|
|
465
|
-
databaseId: string;
|
|
466
|
-
collectionId: string;
|
|
467
|
-
name: string;
|
|
468
|
-
permissions?: string[];
|
|
469
|
-
documentSecurity?: boolean;
|
|
470
|
-
enabled?: boolean;
|
|
471
|
-
attributes?: object[];
|
|
472
|
-
indexes?: object[];
|
|
473
|
-
overrideForCli?: boolean;
|
|
474
|
-
parseOutput?: boolean;
|
|
475
|
-
sdk?: Client;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
export const databasesCreateCollection = async ({databaseId,collectionId,name,permissions,documentSecurity,enabled,attributes,indexes,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateCollectionRequestParams): Promise<any> => {
|
|
479
|
-
let client = !sdk ? await sdkForProject() :
|
|
480
|
-
sdk;
|
|
481
|
-
let apiPath = '/databases/{databaseId}/collections'.replace('{databaseId}', databaseId);
|
|
482
|
-
let payload = {};
|
|
483
|
-
if (typeof collectionId !== 'undefined') {
|
|
484
|
-
payload['collectionId'] = collectionId;
|
|
485
|
-
}
|
|
486
|
-
if (typeof name !== 'undefined') {
|
|
487
|
-
payload['name'] = name;
|
|
488
|
-
}
|
|
489
|
-
permissions = permissions === true ? [] : permissions;
|
|
490
|
-
if (typeof permissions !== 'undefined') {
|
|
491
|
-
payload['permissions'] = permissions;
|
|
492
|
-
}
|
|
493
|
-
if (typeof documentSecurity !== 'undefined') {
|
|
494
|
-
payload['documentSecurity'] = documentSecurity;
|
|
495
|
-
}
|
|
496
|
-
if (typeof enabled !== 'undefined') {
|
|
497
|
-
payload['enabled'] = enabled;
|
|
498
|
-
}
|
|
499
|
-
attributes = attributes === true ? [] : attributes;
|
|
500
|
-
if (typeof attributes !== 'undefined') {
|
|
501
|
-
payload['attributes'] = attributes;
|
|
502
|
-
}
|
|
503
|
-
indexes = indexes === true ? [] : indexes;
|
|
504
|
-
if (typeof indexes !== 'undefined') {
|
|
505
|
-
payload['indexes'] = indexes;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
let response = undefined;
|
|
509
|
-
|
|
510
|
-
response = await client.call('post', apiPath, {
|
|
511
|
-
'content-type': 'application/json',
|
|
512
|
-
}, payload);
|
|
513
|
-
|
|
514
|
-
if (parseOutput) {
|
|
515
|
-
parse(response)
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
return response;
|
|
519
|
-
|
|
520
|
-
}
|
|
521
|
-
interface DatabasesGetCollectionRequestParams {
|
|
522
|
-
databaseId: string;
|
|
523
|
-
collectionId: string;
|
|
524
|
-
overrideForCli?: boolean;
|
|
525
|
-
parseOutput?: boolean;
|
|
526
|
-
sdk?: Client;
|
|
527
|
-
console?: boolean;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
export const databasesGetCollection = async ({databaseId,collectionId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: DatabasesGetCollectionRequestParams): Promise<any> => {
|
|
531
|
-
let client = !sdk ? await sdkForProject() :
|
|
532
|
-
sdk;
|
|
533
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
534
|
-
let payload = {};
|
|
535
|
-
|
|
536
|
-
let response = undefined;
|
|
537
|
-
|
|
538
|
-
response = await client.call('get', apiPath, {
|
|
539
|
-
}, payload);
|
|
540
|
-
|
|
541
|
-
if (parseOutput) {
|
|
542
|
-
if(showConsole) {
|
|
543
|
-
showConsoleLink('databases', 'getCollection', databaseId, collectionId);
|
|
544
|
-
} else {
|
|
545
|
-
parse(response)
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
return response;
|
|
550
|
-
|
|
551
|
-
}
|
|
552
|
-
interface DatabasesUpdateCollectionRequestParams {
|
|
553
|
-
databaseId: string;
|
|
554
|
-
collectionId: string;
|
|
555
|
-
name: string;
|
|
556
|
-
permissions?: string[];
|
|
557
|
-
documentSecurity?: boolean;
|
|
558
|
-
enabled?: boolean;
|
|
559
|
-
overrideForCli?: boolean;
|
|
560
|
-
parseOutput?: boolean;
|
|
561
|
-
sdk?: Client;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
export const databasesUpdateCollection = async ({databaseId,collectionId,name,permissions,documentSecurity,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateCollectionRequestParams): Promise<any> => {
|
|
565
|
-
let client = !sdk ? await sdkForProject() :
|
|
566
|
-
sdk;
|
|
567
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
568
|
-
let payload = {};
|
|
569
|
-
if (typeof name !== 'undefined') {
|
|
570
|
-
payload['name'] = name;
|
|
571
|
-
}
|
|
572
|
-
permissions = permissions === true ? [] : permissions;
|
|
573
|
-
if (typeof permissions !== 'undefined') {
|
|
574
|
-
payload['permissions'] = permissions;
|
|
575
|
-
}
|
|
576
|
-
if (typeof documentSecurity !== 'undefined') {
|
|
577
|
-
payload['documentSecurity'] = documentSecurity;
|
|
578
|
-
}
|
|
579
|
-
if (typeof enabled !== 'undefined') {
|
|
580
|
-
payload['enabled'] = enabled;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
let response = undefined;
|
|
584
|
-
|
|
585
|
-
response = await client.call('put', apiPath, {
|
|
586
|
-
'content-type': 'application/json',
|
|
587
|
-
}, payload);
|
|
588
|
-
|
|
589
|
-
if (parseOutput) {
|
|
590
|
-
parse(response)
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
return response;
|
|
594
|
-
|
|
595
|
-
}
|
|
596
|
-
interface DatabasesDeleteCollectionRequestParams {
|
|
597
|
-
databaseId: string;
|
|
598
|
-
collectionId: string;
|
|
599
|
-
overrideForCli?: boolean;
|
|
600
|
-
parseOutput?: boolean;
|
|
601
|
-
sdk?: Client;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
export const databasesDeleteCollection = async ({databaseId,collectionId,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesDeleteCollectionRequestParams): Promise<any> => {
|
|
605
|
-
let client = !sdk ? await sdkForProject() :
|
|
606
|
-
sdk;
|
|
607
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
608
|
-
let payload = {};
|
|
609
|
-
|
|
610
|
-
let response = undefined;
|
|
611
|
-
|
|
612
|
-
response = await client.call('delete', apiPath, {
|
|
613
|
-
'content-type': 'application/json',
|
|
614
|
-
}, payload);
|
|
615
|
-
|
|
616
|
-
if (parseOutput) {
|
|
617
|
-
parse(response)
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
return response;
|
|
621
|
-
|
|
622
|
-
}
|
|
623
|
-
interface DatabasesListAttributesRequestParams {
|
|
624
|
-
databaseId: string;
|
|
625
|
-
collectionId: string;
|
|
626
|
-
queries?: string[];
|
|
627
|
-
total?: boolean;
|
|
628
|
-
overrideForCli?: boolean;
|
|
629
|
-
parseOutput?: boolean;
|
|
630
|
-
sdk?: Client;
|
|
631
|
-
console?: boolean;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
export const databasesListAttributes = async ({databaseId,collectionId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: DatabasesListAttributesRequestParams): Promise<any> => {
|
|
635
|
-
let client = !sdk ? await sdkForProject() :
|
|
636
|
-
sdk;
|
|
637
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
638
|
-
let payload = {};
|
|
639
|
-
if (typeof queries !== 'undefined') {
|
|
640
|
-
payload['queries'] = queries;
|
|
641
|
-
}
|
|
642
|
-
if (typeof total !== 'undefined') {
|
|
643
|
-
payload['total'] = total;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
let response = undefined;
|
|
647
|
-
|
|
648
|
-
response = await client.call('get', apiPath, {
|
|
649
|
-
}, payload);
|
|
650
|
-
|
|
651
|
-
if (parseOutput) {
|
|
652
|
-
if(showConsole) {
|
|
653
|
-
showConsoleLink('databases', 'listAttributes', databaseId, collectionId);
|
|
654
|
-
} else {
|
|
655
|
-
parse(response)
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
return response;
|
|
660
|
-
|
|
661
|
-
}
|
|
662
|
-
interface DatabasesCreateBooleanAttributeRequestParams {
|
|
663
|
-
databaseId: string;
|
|
664
|
-
collectionId: string;
|
|
665
|
-
key: string;
|
|
666
|
-
required: boolean;
|
|
667
|
-
xdefault?: boolean;
|
|
668
|
-
array?: boolean;
|
|
669
|
-
overrideForCli?: boolean;
|
|
670
|
-
parseOutput?: boolean;
|
|
671
|
-
sdk?: Client;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
export const databasesCreateBooleanAttribute = async ({databaseId,collectionId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateBooleanAttributeRequestParams): Promise<any> => {
|
|
675
|
-
let client = !sdk ? await sdkForProject() :
|
|
676
|
-
sdk;
|
|
677
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
678
|
-
let payload = {};
|
|
679
|
-
if (typeof key !== 'undefined') {
|
|
680
|
-
payload['key'] = key;
|
|
681
|
-
}
|
|
682
|
-
if (typeof required !== 'undefined') {
|
|
683
|
-
payload['required'] = required;
|
|
684
|
-
}
|
|
685
|
-
if (typeof xdefault !== 'undefined') {
|
|
686
|
-
payload['default'] = xdefault;
|
|
687
|
-
}
|
|
688
|
-
if (typeof array !== 'undefined') {
|
|
689
|
-
payload['array'] = array;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
let response = undefined;
|
|
693
|
-
|
|
694
|
-
response = await client.call('post', apiPath, {
|
|
695
|
-
'content-type': 'application/json',
|
|
696
|
-
}, payload);
|
|
697
|
-
|
|
698
|
-
if (parseOutput) {
|
|
699
|
-
parse(response)
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
return response;
|
|
703
|
-
|
|
704
|
-
}
|
|
705
|
-
interface DatabasesUpdateBooleanAttributeRequestParams {
|
|
706
|
-
databaseId: string;
|
|
707
|
-
collectionId: string;
|
|
708
|
-
key: string;
|
|
709
|
-
required: boolean;
|
|
710
|
-
xdefault: boolean;
|
|
711
|
-
newKey?: string;
|
|
712
|
-
overrideForCli?: boolean;
|
|
713
|
-
parseOutput?: boolean;
|
|
714
|
-
sdk?: Client;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
export const databasesUpdateBooleanAttribute = async ({databaseId,collectionId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateBooleanAttributeRequestParams): Promise<any> => {
|
|
718
|
-
let client = !sdk ? await sdkForProject() :
|
|
719
|
-
sdk;
|
|
720
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
721
|
-
let payload = {};
|
|
722
|
-
if (typeof required !== 'undefined') {
|
|
723
|
-
payload['required'] = required;
|
|
724
|
-
}
|
|
725
|
-
if (typeof xdefault !== 'undefined') {
|
|
726
|
-
payload['default'] = xdefault;
|
|
727
|
-
}
|
|
728
|
-
if (typeof newKey !== 'undefined') {
|
|
729
|
-
payload['newKey'] = newKey;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
let response = undefined;
|
|
733
|
-
|
|
734
|
-
response = await client.call('patch', apiPath, {
|
|
735
|
-
'content-type': 'application/json',
|
|
736
|
-
}, payload);
|
|
737
|
-
|
|
738
|
-
if (parseOutput) {
|
|
739
|
-
parse(response)
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
return response;
|
|
743
|
-
|
|
744
|
-
}
|
|
745
|
-
interface DatabasesCreateDatetimeAttributeRequestParams {
|
|
746
|
-
databaseId: string;
|
|
747
|
-
collectionId: string;
|
|
748
|
-
key: string;
|
|
749
|
-
required: boolean;
|
|
750
|
-
xdefault?: string;
|
|
751
|
-
array?: boolean;
|
|
752
|
-
overrideForCli?: boolean;
|
|
753
|
-
parseOutput?: boolean;
|
|
754
|
-
sdk?: Client;
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
export const databasesCreateDatetimeAttribute = async ({databaseId,collectionId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateDatetimeAttributeRequestParams): Promise<any> => {
|
|
758
|
-
let client = !sdk ? await sdkForProject() :
|
|
759
|
-
sdk;
|
|
760
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
761
|
-
let payload = {};
|
|
762
|
-
if (typeof key !== 'undefined') {
|
|
763
|
-
payload['key'] = key;
|
|
764
|
-
}
|
|
765
|
-
if (typeof required !== 'undefined') {
|
|
766
|
-
payload['required'] = required;
|
|
767
|
-
}
|
|
768
|
-
if (typeof xdefault !== 'undefined') {
|
|
769
|
-
payload['default'] = xdefault;
|
|
770
|
-
}
|
|
771
|
-
if (typeof array !== 'undefined') {
|
|
772
|
-
payload['array'] = array;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
let response = undefined;
|
|
776
|
-
|
|
777
|
-
response = await client.call('post', apiPath, {
|
|
778
|
-
'content-type': 'application/json',
|
|
779
|
-
}, payload);
|
|
780
|
-
|
|
781
|
-
if (parseOutput) {
|
|
782
|
-
parse(response)
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
return response;
|
|
786
|
-
|
|
787
|
-
}
|
|
788
|
-
interface DatabasesUpdateDatetimeAttributeRequestParams {
|
|
789
|
-
databaseId: string;
|
|
790
|
-
collectionId: string;
|
|
791
|
-
key: string;
|
|
792
|
-
required: boolean;
|
|
793
|
-
xdefault: string;
|
|
794
|
-
newKey?: string;
|
|
795
|
-
overrideForCli?: boolean;
|
|
796
|
-
parseOutput?: boolean;
|
|
797
|
-
sdk?: Client;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
export const databasesUpdateDatetimeAttribute = async ({databaseId,collectionId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateDatetimeAttributeRequestParams): Promise<any> => {
|
|
801
|
-
let client = !sdk ? await sdkForProject() :
|
|
802
|
-
sdk;
|
|
803
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
804
|
-
let payload = {};
|
|
805
|
-
if (typeof required !== 'undefined') {
|
|
806
|
-
payload['required'] = required;
|
|
807
|
-
}
|
|
808
|
-
if (typeof xdefault !== 'undefined') {
|
|
809
|
-
payload['default'] = xdefault;
|
|
810
|
-
}
|
|
811
|
-
if (typeof newKey !== 'undefined') {
|
|
812
|
-
payload['newKey'] = newKey;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
let response = undefined;
|
|
816
|
-
|
|
817
|
-
response = await client.call('patch', apiPath, {
|
|
818
|
-
'content-type': 'application/json',
|
|
819
|
-
}, payload);
|
|
820
|
-
|
|
821
|
-
if (parseOutput) {
|
|
822
|
-
parse(response)
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
return response;
|
|
826
|
-
|
|
827
|
-
}
|
|
828
|
-
interface DatabasesCreateEmailAttributeRequestParams {
|
|
829
|
-
databaseId: string;
|
|
830
|
-
collectionId: string;
|
|
831
|
-
key: string;
|
|
832
|
-
required: boolean;
|
|
833
|
-
xdefault?: string;
|
|
834
|
-
array?: boolean;
|
|
835
|
-
overrideForCli?: boolean;
|
|
836
|
-
parseOutput?: boolean;
|
|
837
|
-
sdk?: Client;
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
export const databasesCreateEmailAttribute = async ({databaseId,collectionId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateEmailAttributeRequestParams): Promise<any> => {
|
|
841
|
-
let client = !sdk ? await sdkForProject() :
|
|
842
|
-
sdk;
|
|
843
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/email'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
844
|
-
let payload = {};
|
|
845
|
-
if (typeof key !== 'undefined') {
|
|
846
|
-
payload['key'] = key;
|
|
847
|
-
}
|
|
848
|
-
if (typeof required !== 'undefined') {
|
|
849
|
-
payload['required'] = required;
|
|
850
|
-
}
|
|
851
|
-
if (typeof xdefault !== 'undefined') {
|
|
852
|
-
payload['default'] = xdefault;
|
|
853
|
-
}
|
|
854
|
-
if (typeof array !== 'undefined') {
|
|
855
|
-
payload['array'] = array;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
let response = undefined;
|
|
859
|
-
|
|
860
|
-
response = await client.call('post', apiPath, {
|
|
861
|
-
'content-type': 'application/json',
|
|
862
|
-
}, payload);
|
|
863
|
-
|
|
864
|
-
if (parseOutput) {
|
|
865
|
-
parse(response)
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
return response;
|
|
869
|
-
|
|
870
|
-
}
|
|
871
|
-
interface DatabasesUpdateEmailAttributeRequestParams {
|
|
872
|
-
databaseId: string;
|
|
873
|
-
collectionId: string;
|
|
874
|
-
key: string;
|
|
875
|
-
required: boolean;
|
|
876
|
-
xdefault: string;
|
|
877
|
-
newKey?: string;
|
|
878
|
-
overrideForCli?: boolean;
|
|
879
|
-
parseOutput?: boolean;
|
|
880
|
-
sdk?: Client;
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
export const databasesUpdateEmailAttribute = async ({databaseId,collectionId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateEmailAttributeRequestParams): Promise<any> => {
|
|
884
|
-
let client = !sdk ? await sdkForProject() :
|
|
885
|
-
sdk;
|
|
886
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
887
|
-
let payload = {};
|
|
888
|
-
if (typeof required !== 'undefined') {
|
|
889
|
-
payload['required'] = required;
|
|
890
|
-
}
|
|
891
|
-
if (typeof xdefault !== 'undefined') {
|
|
892
|
-
payload['default'] = xdefault;
|
|
893
|
-
}
|
|
894
|
-
if (typeof newKey !== 'undefined') {
|
|
895
|
-
payload['newKey'] = newKey;
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
let response = undefined;
|
|
899
|
-
|
|
900
|
-
response = await client.call('patch', apiPath, {
|
|
901
|
-
'content-type': 'application/json',
|
|
902
|
-
}, payload);
|
|
903
|
-
|
|
904
|
-
if (parseOutput) {
|
|
905
|
-
parse(response)
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
return response;
|
|
909
|
-
|
|
910
|
-
}
|
|
911
|
-
interface DatabasesCreateEnumAttributeRequestParams {
|
|
912
|
-
databaseId: string;
|
|
913
|
-
collectionId: string;
|
|
914
|
-
key: string;
|
|
915
|
-
elements: string[];
|
|
916
|
-
required: boolean;
|
|
917
|
-
xdefault?: string;
|
|
918
|
-
array?: boolean;
|
|
919
|
-
overrideForCli?: boolean;
|
|
920
|
-
parseOutput?: boolean;
|
|
921
|
-
sdk?: Client;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
export const databasesCreateEnumAttribute = async ({databaseId,collectionId,key,elements,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateEnumAttributeRequestParams): Promise<any> => {
|
|
925
|
-
let client = !sdk ? await sdkForProject() :
|
|
926
|
-
sdk;
|
|
927
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/enum'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
928
|
-
let payload = {};
|
|
929
|
-
if (typeof key !== 'undefined') {
|
|
930
|
-
payload['key'] = key;
|
|
931
|
-
}
|
|
932
|
-
elements = elements === true ? [] : elements;
|
|
933
|
-
if (typeof elements !== 'undefined') {
|
|
934
|
-
payload['elements'] = elements;
|
|
935
|
-
}
|
|
936
|
-
if (typeof required !== 'undefined') {
|
|
937
|
-
payload['required'] = required;
|
|
938
|
-
}
|
|
939
|
-
if (typeof xdefault !== 'undefined') {
|
|
940
|
-
payload['default'] = xdefault;
|
|
941
|
-
}
|
|
942
|
-
if (typeof array !== 'undefined') {
|
|
943
|
-
payload['array'] = array;
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
let response = undefined;
|
|
947
|
-
|
|
948
|
-
response = await client.call('post', apiPath, {
|
|
949
|
-
'content-type': 'application/json',
|
|
950
|
-
}, payload);
|
|
951
|
-
|
|
952
|
-
if (parseOutput) {
|
|
953
|
-
parse(response)
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
return response;
|
|
957
|
-
|
|
958
|
-
}
|
|
959
|
-
interface DatabasesUpdateEnumAttributeRequestParams {
|
|
960
|
-
databaseId: string;
|
|
961
|
-
collectionId: string;
|
|
962
|
-
key: string;
|
|
963
|
-
elements: string[];
|
|
964
|
-
required: boolean;
|
|
965
|
-
xdefault: string;
|
|
966
|
-
newKey?: string;
|
|
967
|
-
overrideForCli?: boolean;
|
|
968
|
-
parseOutput?: boolean;
|
|
969
|
-
sdk?: Client;
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
export const databasesUpdateEnumAttribute = async ({databaseId,collectionId,key,elements,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateEnumAttributeRequestParams): Promise<any> => {
|
|
973
|
-
let client = !sdk ? await sdkForProject() :
|
|
974
|
-
sdk;
|
|
975
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
976
|
-
let payload = {};
|
|
977
|
-
elements = elements === true ? [] : elements;
|
|
978
|
-
if (typeof elements !== 'undefined') {
|
|
979
|
-
payload['elements'] = elements;
|
|
980
|
-
}
|
|
981
|
-
if (typeof required !== 'undefined') {
|
|
982
|
-
payload['required'] = required;
|
|
983
|
-
}
|
|
984
|
-
if (typeof xdefault !== 'undefined') {
|
|
985
|
-
payload['default'] = xdefault;
|
|
986
|
-
}
|
|
987
|
-
if (typeof newKey !== 'undefined') {
|
|
988
|
-
payload['newKey'] = newKey;
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
let response = undefined;
|
|
992
|
-
|
|
993
|
-
response = await client.call('patch', apiPath, {
|
|
994
|
-
'content-type': 'application/json',
|
|
995
|
-
}, payload);
|
|
996
|
-
|
|
997
|
-
if (parseOutput) {
|
|
998
|
-
parse(response)
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
return response;
|
|
1002
|
-
|
|
1003
|
-
}
|
|
1004
|
-
interface DatabasesCreateFloatAttributeRequestParams {
|
|
1005
|
-
databaseId: string;
|
|
1006
|
-
collectionId: string;
|
|
1007
|
-
key: string;
|
|
1008
|
-
required: boolean;
|
|
1009
|
-
min?: number;
|
|
1010
|
-
max?: number;
|
|
1011
|
-
xdefault?: number;
|
|
1012
|
-
array?: boolean;
|
|
1013
|
-
overrideForCli?: boolean;
|
|
1014
|
-
parseOutput?: boolean;
|
|
1015
|
-
sdk?: Client;
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
export const databasesCreateFloatAttribute = async ({databaseId,collectionId,key,required,min,max,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateFloatAttributeRequestParams): Promise<any> => {
|
|
1019
|
-
let client = !sdk ? await sdkForProject() :
|
|
1020
|
-
sdk;
|
|
1021
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/float'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
1022
|
-
let payload = {};
|
|
1023
|
-
if (typeof key !== 'undefined') {
|
|
1024
|
-
payload['key'] = key;
|
|
1025
|
-
}
|
|
1026
|
-
if (typeof required !== 'undefined') {
|
|
1027
|
-
payload['required'] = required;
|
|
1028
|
-
}
|
|
1029
|
-
if (typeof min !== 'undefined') {
|
|
1030
|
-
payload['min'] = min;
|
|
1031
|
-
}
|
|
1032
|
-
if (typeof max !== 'undefined') {
|
|
1033
|
-
payload['max'] = max;
|
|
1034
|
-
}
|
|
1035
|
-
if (typeof xdefault !== 'undefined') {
|
|
1036
|
-
payload['default'] = xdefault;
|
|
1037
|
-
}
|
|
1038
|
-
if (typeof array !== 'undefined') {
|
|
1039
|
-
payload['array'] = array;
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
let response = undefined;
|
|
1043
|
-
|
|
1044
|
-
response = await client.call('post', apiPath, {
|
|
1045
|
-
'content-type': 'application/json',
|
|
1046
|
-
}, payload);
|
|
1047
|
-
|
|
1048
|
-
if (parseOutput) {
|
|
1049
|
-
parse(response)
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
return response;
|
|
1053
|
-
|
|
1054
|
-
}
|
|
1055
|
-
interface DatabasesUpdateFloatAttributeRequestParams {
|
|
1056
|
-
databaseId: string;
|
|
1057
|
-
collectionId: string;
|
|
1058
|
-
key: string;
|
|
1059
|
-
required: boolean;
|
|
1060
|
-
xdefault: number;
|
|
1061
|
-
min?: number;
|
|
1062
|
-
max?: number;
|
|
1063
|
-
newKey?: string;
|
|
1064
|
-
overrideForCli?: boolean;
|
|
1065
|
-
parseOutput?: boolean;
|
|
1066
|
-
sdk?: Client;
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
export const databasesUpdateFloatAttribute = async ({databaseId,collectionId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateFloatAttributeRequestParams): Promise<any> => {
|
|
1070
|
-
let client = !sdk ? await sdkForProject() :
|
|
1071
|
-
sdk;
|
|
1072
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
1073
|
-
let payload = {};
|
|
1074
|
-
if (typeof required !== 'undefined') {
|
|
1075
|
-
payload['required'] = required;
|
|
1076
|
-
}
|
|
1077
|
-
if (typeof min !== 'undefined') {
|
|
1078
|
-
payload['min'] = min;
|
|
1079
|
-
}
|
|
1080
|
-
if (typeof max !== 'undefined') {
|
|
1081
|
-
payload['max'] = max;
|
|
1082
|
-
}
|
|
1083
|
-
if (typeof xdefault !== 'undefined') {
|
|
1084
|
-
payload['default'] = xdefault;
|
|
1085
|
-
}
|
|
1086
|
-
if (typeof newKey !== 'undefined') {
|
|
1087
|
-
payload['newKey'] = newKey;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
let response = undefined;
|
|
1091
|
-
|
|
1092
|
-
response = await client.call('patch', apiPath, {
|
|
1093
|
-
'content-type': 'application/json',
|
|
1094
|
-
}, payload);
|
|
1095
|
-
|
|
1096
|
-
if (parseOutput) {
|
|
1097
|
-
parse(response)
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
return response;
|
|
1101
|
-
|
|
1102
|
-
}
|
|
1103
|
-
interface DatabasesCreateIntegerAttributeRequestParams {
|
|
1104
|
-
databaseId: string;
|
|
1105
|
-
collectionId: string;
|
|
1106
|
-
key: string;
|
|
1107
|
-
required: boolean;
|
|
1108
|
-
min?: number;
|
|
1109
|
-
max?: number;
|
|
1110
|
-
xdefault?: number;
|
|
1111
|
-
array?: boolean;
|
|
1112
|
-
overrideForCli?: boolean;
|
|
1113
|
-
parseOutput?: boolean;
|
|
1114
|
-
sdk?: Client;
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
export const databasesCreateIntegerAttribute = async ({databaseId,collectionId,key,required,min,max,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateIntegerAttributeRequestParams): Promise<any> => {
|
|
1118
|
-
let client = !sdk ? await sdkForProject() :
|
|
1119
|
-
sdk;
|
|
1120
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/integer'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
1121
|
-
let payload = {};
|
|
1122
|
-
if (typeof key !== 'undefined') {
|
|
1123
|
-
payload['key'] = key;
|
|
1124
|
-
}
|
|
1125
|
-
if (typeof required !== 'undefined') {
|
|
1126
|
-
payload['required'] = required;
|
|
1127
|
-
}
|
|
1128
|
-
if (typeof min !== 'undefined') {
|
|
1129
|
-
payload['min'] = min;
|
|
1130
|
-
}
|
|
1131
|
-
if (typeof max !== 'undefined') {
|
|
1132
|
-
payload['max'] = max;
|
|
1133
|
-
}
|
|
1134
|
-
if (typeof xdefault !== 'undefined') {
|
|
1135
|
-
payload['default'] = xdefault;
|
|
1136
|
-
}
|
|
1137
|
-
if (typeof array !== 'undefined') {
|
|
1138
|
-
payload['array'] = array;
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
let response = undefined;
|
|
1142
|
-
|
|
1143
|
-
response = await client.call('post', apiPath, {
|
|
1144
|
-
'content-type': 'application/json',
|
|
1145
|
-
}, payload);
|
|
1146
|
-
|
|
1147
|
-
if (parseOutput) {
|
|
1148
|
-
parse(response)
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
return response;
|
|
1152
|
-
|
|
1153
|
-
}
|
|
1154
|
-
interface DatabasesUpdateIntegerAttributeRequestParams {
|
|
1155
|
-
databaseId: string;
|
|
1156
|
-
collectionId: string;
|
|
1157
|
-
key: string;
|
|
1158
|
-
required: boolean;
|
|
1159
|
-
xdefault: number;
|
|
1160
|
-
min?: number;
|
|
1161
|
-
max?: number;
|
|
1162
|
-
newKey?: string;
|
|
1163
|
-
overrideForCli?: boolean;
|
|
1164
|
-
parseOutput?: boolean;
|
|
1165
|
-
sdk?: Client;
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
export const databasesUpdateIntegerAttribute = async ({databaseId,collectionId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateIntegerAttributeRequestParams): Promise<any> => {
|
|
1169
|
-
let client = !sdk ? await sdkForProject() :
|
|
1170
|
-
sdk;
|
|
1171
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
1172
|
-
let payload = {};
|
|
1173
|
-
if (typeof required !== 'undefined') {
|
|
1174
|
-
payload['required'] = required;
|
|
1175
|
-
}
|
|
1176
|
-
if (typeof min !== 'undefined') {
|
|
1177
|
-
payload['min'] = min;
|
|
1178
|
-
}
|
|
1179
|
-
if (typeof max !== 'undefined') {
|
|
1180
|
-
payload['max'] = max;
|
|
1181
|
-
}
|
|
1182
|
-
if (typeof xdefault !== 'undefined') {
|
|
1183
|
-
payload['default'] = xdefault;
|
|
1184
|
-
}
|
|
1185
|
-
if (typeof newKey !== 'undefined') {
|
|
1186
|
-
payload['newKey'] = newKey;
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
let response = undefined;
|
|
1190
|
-
|
|
1191
|
-
response = await client.call('patch', apiPath, {
|
|
1192
|
-
'content-type': 'application/json',
|
|
1193
|
-
}, payload);
|
|
1194
|
-
|
|
1195
|
-
if (parseOutput) {
|
|
1196
|
-
parse(response)
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
return response;
|
|
1200
|
-
|
|
1201
|
-
}
|
|
1202
|
-
interface DatabasesCreateIpAttributeRequestParams {
|
|
1203
|
-
databaseId: string;
|
|
1204
|
-
collectionId: string;
|
|
1205
|
-
key: string;
|
|
1206
|
-
required: boolean;
|
|
1207
|
-
xdefault?: string;
|
|
1208
|
-
array?: boolean;
|
|
1209
|
-
overrideForCli?: boolean;
|
|
1210
|
-
parseOutput?: boolean;
|
|
1211
|
-
sdk?: Client;
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
export const databasesCreateIpAttribute = async ({databaseId,collectionId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateIpAttributeRequestParams): Promise<any> => {
|
|
1215
|
-
let client = !sdk ? await sdkForProject() :
|
|
1216
|
-
sdk;
|
|
1217
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/ip'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
1218
|
-
let payload = {};
|
|
1219
|
-
if (typeof key !== 'undefined') {
|
|
1220
|
-
payload['key'] = key;
|
|
1221
|
-
}
|
|
1222
|
-
if (typeof required !== 'undefined') {
|
|
1223
|
-
payload['required'] = required;
|
|
1224
|
-
}
|
|
1225
|
-
if (typeof xdefault !== 'undefined') {
|
|
1226
|
-
payload['default'] = xdefault;
|
|
1227
|
-
}
|
|
1228
|
-
if (typeof array !== 'undefined') {
|
|
1229
|
-
payload['array'] = array;
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
let response = undefined;
|
|
1233
|
-
|
|
1234
|
-
response = await client.call('post', apiPath, {
|
|
1235
|
-
'content-type': 'application/json',
|
|
1236
|
-
}, payload);
|
|
1237
|
-
|
|
1238
|
-
if (parseOutput) {
|
|
1239
|
-
parse(response)
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
return response;
|
|
1243
|
-
|
|
1244
|
-
}
|
|
1245
|
-
interface DatabasesUpdateIpAttributeRequestParams {
|
|
1246
|
-
databaseId: string;
|
|
1247
|
-
collectionId: string;
|
|
1248
|
-
key: string;
|
|
1249
|
-
required: boolean;
|
|
1250
|
-
xdefault: string;
|
|
1251
|
-
newKey?: string;
|
|
1252
|
-
overrideForCli?: boolean;
|
|
1253
|
-
parseOutput?: boolean;
|
|
1254
|
-
sdk?: Client;
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
export const databasesUpdateIpAttribute = async ({databaseId,collectionId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateIpAttributeRequestParams): Promise<any> => {
|
|
1258
|
-
let client = !sdk ? await sdkForProject() :
|
|
1259
|
-
sdk;
|
|
1260
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
1261
|
-
let payload = {};
|
|
1262
|
-
if (typeof required !== 'undefined') {
|
|
1263
|
-
payload['required'] = required;
|
|
1264
|
-
}
|
|
1265
|
-
if (typeof xdefault !== 'undefined') {
|
|
1266
|
-
payload['default'] = xdefault;
|
|
1267
|
-
}
|
|
1268
|
-
if (typeof newKey !== 'undefined') {
|
|
1269
|
-
payload['newKey'] = newKey;
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
let response = undefined;
|
|
1273
|
-
|
|
1274
|
-
response = await client.call('patch', apiPath, {
|
|
1275
|
-
'content-type': 'application/json',
|
|
1276
|
-
}, payload);
|
|
1277
|
-
|
|
1278
|
-
if (parseOutput) {
|
|
1279
|
-
parse(response)
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
return response;
|
|
1283
|
-
|
|
1284
|
-
}
|
|
1285
|
-
interface DatabasesCreateLineAttributeRequestParams {
|
|
1286
|
-
databaseId: string;
|
|
1287
|
-
collectionId: string;
|
|
1288
|
-
key: string;
|
|
1289
|
-
required: boolean;
|
|
1290
|
-
xdefault?: any[];
|
|
1291
|
-
overrideForCli?: boolean;
|
|
1292
|
-
parseOutput?: boolean;
|
|
1293
|
-
sdk?: Client;
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
export const databasesCreateLineAttribute = async ({databaseId,collectionId,key,required,xdefault,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateLineAttributeRequestParams): Promise<any> => {
|
|
1297
|
-
let client = !sdk ? await sdkForProject() :
|
|
1298
|
-
sdk;
|
|
1299
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/line'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
1300
|
-
let payload = {};
|
|
1301
|
-
if (typeof key !== 'undefined') {
|
|
1302
|
-
payload['key'] = key;
|
|
1303
|
-
}
|
|
1304
|
-
if (typeof required !== 'undefined') {
|
|
1305
|
-
payload['required'] = required;
|
|
1306
|
-
}
|
|
1307
|
-
xdefault = xdefault === true ? [] : xdefault;
|
|
1308
|
-
if (typeof xdefault !== 'undefined') {
|
|
1309
|
-
payload['default'] = xdefault;
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
let response = undefined;
|
|
1313
|
-
|
|
1314
|
-
response = await client.call('post', apiPath, {
|
|
1315
|
-
'content-type': 'application/json',
|
|
1316
|
-
}, payload);
|
|
1317
|
-
|
|
1318
|
-
if (parseOutput) {
|
|
1319
|
-
parse(response)
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
return response;
|
|
1323
|
-
|
|
1324
|
-
}
|
|
1325
|
-
interface DatabasesUpdateLineAttributeRequestParams {
|
|
1326
|
-
databaseId: string;
|
|
1327
|
-
collectionId: string;
|
|
1328
|
-
key: string;
|
|
1329
|
-
required: boolean;
|
|
1330
|
-
xdefault?: any[];
|
|
1331
|
-
newKey?: string;
|
|
1332
|
-
overrideForCli?: boolean;
|
|
1333
|
-
parseOutput?: boolean;
|
|
1334
|
-
sdk?: Client;
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
export const databasesUpdateLineAttribute = async ({databaseId,collectionId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateLineAttributeRequestParams): Promise<any> => {
|
|
1338
|
-
let client = !sdk ? await sdkForProject() :
|
|
1339
|
-
sdk;
|
|
1340
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/line/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
1341
|
-
let payload = {};
|
|
1342
|
-
if (typeof required !== 'undefined') {
|
|
1343
|
-
payload['required'] = required;
|
|
1344
|
-
}
|
|
1345
|
-
xdefault = xdefault === true ? [] : xdefault;
|
|
1346
|
-
if (typeof xdefault !== 'undefined') {
|
|
1347
|
-
payload['default'] = xdefault;
|
|
1348
|
-
}
|
|
1349
|
-
if (typeof newKey !== 'undefined') {
|
|
1350
|
-
payload['newKey'] = newKey;
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
let response = undefined;
|
|
1354
|
-
|
|
1355
|
-
response = await client.call('patch', apiPath, {
|
|
1356
|
-
'content-type': 'application/json',
|
|
1357
|
-
}, payload);
|
|
1358
|
-
|
|
1359
|
-
if (parseOutput) {
|
|
1360
|
-
parse(response)
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
return response;
|
|
1364
|
-
|
|
1365
|
-
}
|
|
1366
|
-
interface DatabasesCreatePointAttributeRequestParams {
|
|
1367
|
-
databaseId: string;
|
|
1368
|
-
collectionId: string;
|
|
1369
|
-
key: string;
|
|
1370
|
-
required: boolean;
|
|
1371
|
-
xdefault?: any[];
|
|
1372
|
-
overrideForCli?: boolean;
|
|
1373
|
-
parseOutput?: boolean;
|
|
1374
|
-
sdk?: Client;
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
export const databasesCreatePointAttribute = async ({databaseId,collectionId,key,required,xdefault,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreatePointAttributeRequestParams): Promise<any> => {
|
|
1378
|
-
let client = !sdk ? await sdkForProject() :
|
|
1379
|
-
sdk;
|
|
1380
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
1381
|
-
let payload = {};
|
|
1382
|
-
if (typeof key !== 'undefined') {
|
|
1383
|
-
payload['key'] = key;
|
|
1384
|
-
}
|
|
1385
|
-
if (typeof required !== 'undefined') {
|
|
1386
|
-
payload['required'] = required;
|
|
1387
|
-
}
|
|
1388
|
-
xdefault = xdefault === true ? [] : xdefault;
|
|
1389
|
-
if (typeof xdefault !== 'undefined') {
|
|
1390
|
-
payload['default'] = xdefault;
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
let response = undefined;
|
|
1394
|
-
|
|
1395
|
-
response = await client.call('post', apiPath, {
|
|
1396
|
-
'content-type': 'application/json',
|
|
1397
|
-
}, payload);
|
|
1398
|
-
|
|
1399
|
-
if (parseOutput) {
|
|
1400
|
-
parse(response)
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
return response;
|
|
1404
|
-
|
|
1405
|
-
}
|
|
1406
|
-
interface DatabasesUpdatePointAttributeRequestParams {
|
|
1407
|
-
databaseId: string;
|
|
1408
|
-
collectionId: string;
|
|
1409
|
-
key: string;
|
|
1410
|
-
required: boolean;
|
|
1411
|
-
xdefault?: any[];
|
|
1412
|
-
newKey?: string;
|
|
1413
|
-
overrideForCli?: boolean;
|
|
1414
|
-
parseOutput?: boolean;
|
|
1415
|
-
sdk?: Client;
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
export const databasesUpdatePointAttribute = async ({databaseId,collectionId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdatePointAttributeRequestParams): Promise<any> => {
|
|
1419
|
-
let client = !sdk ? await sdkForProject() :
|
|
1420
|
-
sdk;
|
|
1421
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
1422
|
-
let payload = {};
|
|
1423
|
-
if (typeof required !== 'undefined') {
|
|
1424
|
-
payload['required'] = required;
|
|
1425
|
-
}
|
|
1426
|
-
xdefault = xdefault === true ? [] : xdefault;
|
|
1427
|
-
if (typeof xdefault !== 'undefined') {
|
|
1428
|
-
payload['default'] = xdefault;
|
|
1429
|
-
}
|
|
1430
|
-
if (typeof newKey !== 'undefined') {
|
|
1431
|
-
payload['newKey'] = newKey;
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
let response = undefined;
|
|
1435
|
-
|
|
1436
|
-
response = await client.call('patch', apiPath, {
|
|
1437
|
-
'content-type': 'application/json',
|
|
1438
|
-
}, payload);
|
|
1439
|
-
|
|
1440
|
-
if (parseOutput) {
|
|
1441
|
-
parse(response)
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
return response;
|
|
1445
|
-
|
|
1446
|
-
}
|
|
1447
|
-
interface DatabasesCreatePolygonAttributeRequestParams {
|
|
1448
|
-
databaseId: string;
|
|
1449
|
-
collectionId: string;
|
|
1450
|
-
key: string;
|
|
1451
|
-
required: boolean;
|
|
1452
|
-
xdefault?: any[];
|
|
1453
|
-
overrideForCli?: boolean;
|
|
1454
|
-
parseOutput?: boolean;
|
|
1455
|
-
sdk?: Client;
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
export const databasesCreatePolygonAttribute = async ({databaseId,collectionId,key,required,xdefault,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreatePolygonAttributeRequestParams): Promise<any> => {
|
|
1459
|
-
let client = !sdk ? await sdkForProject() :
|
|
1460
|
-
sdk;
|
|
1461
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
1462
|
-
let payload = {};
|
|
1463
|
-
if (typeof key !== 'undefined') {
|
|
1464
|
-
payload['key'] = key;
|
|
1465
|
-
}
|
|
1466
|
-
if (typeof required !== 'undefined') {
|
|
1467
|
-
payload['required'] = required;
|
|
1468
|
-
}
|
|
1469
|
-
xdefault = xdefault === true ? [] : xdefault;
|
|
1470
|
-
if (typeof xdefault !== 'undefined') {
|
|
1471
|
-
payload['default'] = xdefault;
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
let response = undefined;
|
|
1475
|
-
|
|
1476
|
-
response = await client.call('post', apiPath, {
|
|
1477
|
-
'content-type': 'application/json',
|
|
1478
|
-
}, payload);
|
|
1479
|
-
|
|
1480
|
-
if (parseOutput) {
|
|
1481
|
-
parse(response)
|
|
1482
|
-
}
|
|
1483
|
-
|
|
1484
|
-
return response;
|
|
1485
|
-
|
|
1486
|
-
}
|
|
1487
|
-
interface DatabasesUpdatePolygonAttributeRequestParams {
|
|
1488
|
-
databaseId: string;
|
|
1489
|
-
collectionId: string;
|
|
1490
|
-
key: string;
|
|
1491
|
-
required: boolean;
|
|
1492
|
-
xdefault?: any[];
|
|
1493
|
-
newKey?: string;
|
|
1494
|
-
overrideForCli?: boolean;
|
|
1495
|
-
parseOutput?: boolean;
|
|
1496
|
-
sdk?: Client;
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
export const databasesUpdatePolygonAttribute = async ({databaseId,collectionId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdatePolygonAttributeRequestParams): Promise<any> => {
|
|
1500
|
-
let client = !sdk ? await sdkForProject() :
|
|
1501
|
-
sdk;
|
|
1502
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
1503
|
-
let payload = {};
|
|
1504
|
-
if (typeof required !== 'undefined') {
|
|
1505
|
-
payload['required'] = required;
|
|
1506
|
-
}
|
|
1507
|
-
xdefault = xdefault === true ? [] : xdefault;
|
|
1508
|
-
if (typeof xdefault !== 'undefined') {
|
|
1509
|
-
payload['default'] = xdefault;
|
|
1510
|
-
}
|
|
1511
|
-
if (typeof newKey !== 'undefined') {
|
|
1512
|
-
payload['newKey'] = newKey;
|
|
1513
|
-
}
|
|
1514
|
-
|
|
1515
|
-
let response = undefined;
|
|
1516
|
-
|
|
1517
|
-
response = await client.call('patch', apiPath, {
|
|
1518
|
-
'content-type': 'application/json',
|
|
1519
|
-
}, payload);
|
|
1520
|
-
|
|
1521
|
-
if (parseOutput) {
|
|
1522
|
-
parse(response)
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
return response;
|
|
1526
|
-
|
|
1527
|
-
}
|
|
1528
|
-
interface DatabasesCreateRelationshipAttributeRequestParams {
|
|
1529
|
-
databaseId: string;
|
|
1530
|
-
collectionId: string;
|
|
1531
|
-
relatedCollectionId: string;
|
|
1532
|
-
type: RelationshipType;
|
|
1533
|
-
twoWay?: boolean;
|
|
1534
|
-
key?: string;
|
|
1535
|
-
twoWayKey?: string;
|
|
1536
|
-
onDelete?: RelationMutate;
|
|
1537
|
-
overrideForCli?: boolean;
|
|
1538
|
-
parseOutput?: boolean;
|
|
1539
|
-
sdk?: Client;
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
export const databasesCreateRelationshipAttribute = async ({databaseId,collectionId,relatedCollectionId,type,twoWay,key,twoWayKey,onDelete,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateRelationshipAttributeRequestParams): Promise<any> => {
|
|
1543
|
-
let client = !sdk ? await sdkForProject() :
|
|
1544
|
-
sdk;
|
|
1545
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
1546
|
-
let payload = {};
|
|
1547
|
-
if (typeof relatedCollectionId !== 'undefined') {
|
|
1548
|
-
payload['relatedCollectionId'] = relatedCollectionId;
|
|
1549
|
-
}
|
|
1550
|
-
if (typeof type !== 'undefined') {
|
|
1551
|
-
payload['type'] = type;
|
|
1552
|
-
}
|
|
1553
|
-
if (typeof twoWay !== 'undefined') {
|
|
1554
|
-
payload['twoWay'] = twoWay;
|
|
1555
|
-
}
|
|
1556
|
-
if (typeof key !== 'undefined') {
|
|
1557
|
-
payload['key'] = key;
|
|
1558
|
-
}
|
|
1559
|
-
if (typeof twoWayKey !== 'undefined') {
|
|
1560
|
-
payload['twoWayKey'] = twoWayKey;
|
|
1561
|
-
}
|
|
1562
|
-
if (typeof onDelete !== 'undefined') {
|
|
1563
|
-
payload['onDelete'] = onDelete;
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
let response = undefined;
|
|
1567
|
-
|
|
1568
|
-
response = await client.call('post', apiPath, {
|
|
1569
|
-
'content-type': 'application/json',
|
|
1570
|
-
}, payload);
|
|
1571
|
-
|
|
1572
|
-
if (parseOutput) {
|
|
1573
|
-
parse(response)
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
return response;
|
|
1577
|
-
|
|
1578
|
-
}
|
|
1579
|
-
interface DatabasesCreateStringAttributeRequestParams {
|
|
1580
|
-
databaseId: string;
|
|
1581
|
-
collectionId: string;
|
|
1582
|
-
key: string;
|
|
1583
|
-
size: number;
|
|
1584
|
-
required: boolean;
|
|
1585
|
-
xdefault?: string;
|
|
1586
|
-
array?: boolean;
|
|
1587
|
-
encrypt?: boolean;
|
|
1588
|
-
overrideForCli?: boolean;
|
|
1589
|
-
parseOutput?: boolean;
|
|
1590
|
-
sdk?: Client;
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
export const databasesCreateStringAttribute = async ({databaseId,collectionId,key,size,required,xdefault,array,encrypt,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateStringAttributeRequestParams): Promise<any> => {
|
|
1594
|
-
let client = !sdk ? await sdkForProject() :
|
|
1595
|
-
sdk;
|
|
1596
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
1597
|
-
let payload = {};
|
|
1598
|
-
if (typeof key !== 'undefined') {
|
|
1599
|
-
payload['key'] = key;
|
|
1600
|
-
}
|
|
1601
|
-
if (typeof size !== 'undefined') {
|
|
1602
|
-
payload['size'] = size;
|
|
1603
|
-
}
|
|
1604
|
-
if (typeof required !== 'undefined') {
|
|
1605
|
-
payload['required'] = required;
|
|
1606
|
-
}
|
|
1607
|
-
if (typeof xdefault !== 'undefined') {
|
|
1608
|
-
payload['default'] = xdefault;
|
|
1609
|
-
}
|
|
1610
|
-
if (typeof array !== 'undefined') {
|
|
1611
|
-
payload['array'] = array;
|
|
1612
|
-
}
|
|
1613
|
-
if (typeof encrypt !== 'undefined') {
|
|
1614
|
-
payload['encrypt'] = encrypt;
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
let response = undefined;
|
|
1618
|
-
|
|
1619
|
-
response = await client.call('post', apiPath, {
|
|
1620
|
-
'content-type': 'application/json',
|
|
1621
|
-
}, payload);
|
|
1622
|
-
|
|
1623
|
-
if (parseOutput) {
|
|
1624
|
-
parse(response)
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
return response;
|
|
1628
|
-
|
|
1629
|
-
}
|
|
1630
|
-
interface DatabasesUpdateStringAttributeRequestParams {
|
|
1631
|
-
databaseId: string;
|
|
1632
|
-
collectionId: string;
|
|
1633
|
-
key: string;
|
|
1634
|
-
required: boolean;
|
|
1635
|
-
xdefault: string;
|
|
1636
|
-
size?: number;
|
|
1637
|
-
newKey?: string;
|
|
1638
|
-
overrideForCli?: boolean;
|
|
1639
|
-
parseOutput?: boolean;
|
|
1640
|
-
sdk?: Client;
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
export const databasesUpdateStringAttribute = async ({databaseId,collectionId,key,required,xdefault,size,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateStringAttributeRequestParams): Promise<any> => {
|
|
1644
|
-
let client = !sdk ? await sdkForProject() :
|
|
1645
|
-
sdk;
|
|
1646
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
1647
|
-
let payload = {};
|
|
1648
|
-
if (typeof required !== 'undefined') {
|
|
1649
|
-
payload['required'] = required;
|
|
1650
|
-
}
|
|
1651
|
-
if (typeof xdefault !== 'undefined') {
|
|
1652
|
-
payload['default'] = xdefault;
|
|
1653
|
-
}
|
|
1654
|
-
if (typeof size !== 'undefined') {
|
|
1655
|
-
payload['size'] = size;
|
|
1656
|
-
}
|
|
1657
|
-
if (typeof newKey !== 'undefined') {
|
|
1658
|
-
payload['newKey'] = newKey;
|
|
1659
|
-
}
|
|
1660
|
-
|
|
1661
|
-
let response = undefined;
|
|
1662
|
-
|
|
1663
|
-
response = await client.call('patch', apiPath, {
|
|
1664
|
-
'content-type': 'application/json',
|
|
1665
|
-
}, payload);
|
|
1666
|
-
|
|
1667
|
-
if (parseOutput) {
|
|
1668
|
-
parse(response)
|
|
1669
|
-
}
|
|
1670
|
-
|
|
1671
|
-
return response;
|
|
1672
|
-
|
|
1673
|
-
}
|
|
1674
|
-
interface DatabasesCreateUrlAttributeRequestParams {
|
|
1675
|
-
databaseId: string;
|
|
1676
|
-
collectionId: string;
|
|
1677
|
-
key: string;
|
|
1678
|
-
required: boolean;
|
|
1679
|
-
xdefault?: string;
|
|
1680
|
-
array?: boolean;
|
|
1681
|
-
overrideForCli?: boolean;
|
|
1682
|
-
parseOutput?: boolean;
|
|
1683
|
-
sdk?: Client;
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
export const databasesCreateUrlAttribute = async ({databaseId,collectionId,key,required,xdefault,array,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateUrlAttributeRequestParams): Promise<any> => {
|
|
1687
|
-
let client = !sdk ? await sdkForProject() :
|
|
1688
|
-
sdk;
|
|
1689
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
1690
|
-
let payload = {};
|
|
1691
|
-
if (typeof key !== 'undefined') {
|
|
1692
|
-
payload['key'] = key;
|
|
1693
|
-
}
|
|
1694
|
-
if (typeof required !== 'undefined') {
|
|
1695
|
-
payload['required'] = required;
|
|
1696
|
-
}
|
|
1697
|
-
if (typeof xdefault !== 'undefined') {
|
|
1698
|
-
payload['default'] = xdefault;
|
|
1699
|
-
}
|
|
1700
|
-
if (typeof array !== 'undefined') {
|
|
1701
|
-
payload['array'] = array;
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
let response = undefined;
|
|
1705
|
-
|
|
1706
|
-
response = await client.call('post', apiPath, {
|
|
1707
|
-
'content-type': 'application/json',
|
|
1708
|
-
}, payload);
|
|
1709
|
-
|
|
1710
|
-
if (parseOutput) {
|
|
1711
|
-
parse(response)
|
|
1712
|
-
}
|
|
1713
|
-
|
|
1714
|
-
return response;
|
|
1715
|
-
|
|
1716
|
-
}
|
|
1717
|
-
interface DatabasesUpdateUrlAttributeRequestParams {
|
|
1718
|
-
databaseId: string;
|
|
1719
|
-
collectionId: string;
|
|
1720
|
-
key: string;
|
|
1721
|
-
required: boolean;
|
|
1722
|
-
xdefault: string;
|
|
1723
|
-
newKey?: string;
|
|
1724
|
-
overrideForCli?: boolean;
|
|
1725
|
-
parseOutput?: boolean;
|
|
1726
|
-
sdk?: Client;
|
|
1727
|
-
}
|
|
1728
|
-
|
|
1729
|
-
export const databasesUpdateUrlAttribute = async ({databaseId,collectionId,key,required,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateUrlAttributeRequestParams): Promise<any> => {
|
|
1730
|
-
let client = !sdk ? await sdkForProject() :
|
|
1731
|
-
sdk;
|
|
1732
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
1733
|
-
let payload = {};
|
|
1734
|
-
if (typeof required !== 'undefined') {
|
|
1735
|
-
payload['required'] = required;
|
|
1736
|
-
}
|
|
1737
|
-
if (typeof xdefault !== 'undefined') {
|
|
1738
|
-
payload['default'] = xdefault;
|
|
1739
|
-
}
|
|
1740
|
-
if (typeof newKey !== 'undefined') {
|
|
1741
|
-
payload['newKey'] = newKey;
|
|
1742
|
-
}
|
|
1743
|
-
|
|
1744
|
-
let response = undefined;
|
|
1745
|
-
|
|
1746
|
-
response = await client.call('patch', apiPath, {
|
|
1747
|
-
'content-type': 'application/json',
|
|
1748
|
-
}, payload);
|
|
1749
|
-
|
|
1750
|
-
if (parseOutput) {
|
|
1751
|
-
parse(response)
|
|
1752
|
-
}
|
|
1753
|
-
|
|
1754
|
-
return response;
|
|
1755
|
-
|
|
1756
|
-
}
|
|
1757
|
-
interface DatabasesGetAttributeRequestParams {
|
|
1758
|
-
databaseId: string;
|
|
1759
|
-
collectionId: string;
|
|
1760
|
-
key: string;
|
|
1761
|
-
overrideForCli?: boolean;
|
|
1762
|
-
parseOutput?: boolean;
|
|
1763
|
-
sdk?: Client;
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
|
-
export const databasesGetAttribute = async ({databaseId,collectionId,key,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesGetAttributeRequestParams): Promise<any> => {
|
|
1767
|
-
let client = !sdk ? await sdkForProject() :
|
|
1768
|
-
sdk;
|
|
1769
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
1770
|
-
let payload = {};
|
|
1771
|
-
|
|
1772
|
-
let response = undefined;
|
|
1773
|
-
|
|
1774
|
-
response = await client.call('get', apiPath, {
|
|
1775
|
-
}, payload);
|
|
1776
|
-
|
|
1777
|
-
if (parseOutput) {
|
|
1778
|
-
parse(response)
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
return response;
|
|
1782
|
-
|
|
1783
|
-
}
|
|
1784
|
-
interface DatabasesDeleteAttributeRequestParams {
|
|
1785
|
-
databaseId: string;
|
|
1786
|
-
collectionId: string;
|
|
1787
|
-
key: string;
|
|
1788
|
-
overrideForCli?: boolean;
|
|
1789
|
-
parseOutput?: boolean;
|
|
1790
|
-
sdk?: Client;
|
|
1791
|
-
}
|
|
1792
|
-
|
|
1793
|
-
export const databasesDeleteAttribute = async ({databaseId,collectionId,key,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesDeleteAttributeRequestParams): Promise<any> => {
|
|
1794
|
-
let client = !sdk ? await sdkForProject() :
|
|
1795
|
-
sdk;
|
|
1796
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
1797
|
-
let payload = {};
|
|
1798
|
-
|
|
1799
|
-
let response = undefined;
|
|
1800
|
-
|
|
1801
|
-
response = await client.call('delete', apiPath, {
|
|
1802
|
-
'content-type': 'application/json',
|
|
1803
|
-
}, payload);
|
|
1804
|
-
|
|
1805
|
-
if (parseOutput) {
|
|
1806
|
-
parse(response)
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
return response;
|
|
1810
|
-
|
|
1811
|
-
}
|
|
1812
|
-
interface DatabasesUpdateRelationshipAttributeRequestParams {
|
|
1813
|
-
databaseId: string;
|
|
1814
|
-
collectionId: string;
|
|
1815
|
-
key: string;
|
|
1816
|
-
onDelete?: RelationMutate;
|
|
1817
|
-
newKey?: string;
|
|
1818
|
-
overrideForCli?: boolean;
|
|
1819
|
-
parseOutput?: boolean;
|
|
1820
|
-
sdk?: Client;
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
export const databasesUpdateRelationshipAttribute = async ({databaseId,collectionId,key,onDelete,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateRelationshipAttributeRequestParams): Promise<any> => {
|
|
1824
|
-
let client = !sdk ? await sdkForProject() :
|
|
1825
|
-
sdk;
|
|
1826
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
1827
|
-
let payload = {};
|
|
1828
|
-
if (typeof onDelete !== 'undefined') {
|
|
1829
|
-
payload['onDelete'] = onDelete;
|
|
1830
|
-
}
|
|
1831
|
-
if (typeof newKey !== 'undefined') {
|
|
1832
|
-
payload['newKey'] = newKey;
|
|
1833
|
-
}
|
|
1834
|
-
|
|
1835
|
-
let response = undefined;
|
|
1836
|
-
|
|
1837
|
-
response = await client.call('patch', apiPath, {
|
|
1838
|
-
'content-type': 'application/json',
|
|
1839
|
-
}, payload);
|
|
1840
|
-
|
|
1841
|
-
if (parseOutput) {
|
|
1842
|
-
parse(response)
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
return response;
|
|
1846
|
-
|
|
1847
|
-
}
|
|
1848
|
-
interface DatabasesListDocumentsRequestParams {
|
|
1849
|
-
databaseId: string;
|
|
1850
|
-
collectionId: string;
|
|
1851
|
-
queries?: string[];
|
|
1852
|
-
transactionId?: string;
|
|
1853
|
-
total?: boolean;
|
|
1854
|
-
overrideForCli?: boolean;
|
|
1855
|
-
parseOutput?: boolean;
|
|
1856
|
-
sdk?: Client;
|
|
1857
|
-
console?: boolean;
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
export const databasesListDocuments = async ({databaseId,collectionId,queries,transactionId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: DatabasesListDocumentsRequestParams): Promise<any> => {
|
|
1861
|
-
let client = !sdk ? await sdkForProject() :
|
|
1862
|
-
sdk;
|
|
1863
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
1864
|
-
let payload = {};
|
|
1865
|
-
if (typeof queries !== 'undefined') {
|
|
1866
|
-
payload['queries'] = queries;
|
|
1867
|
-
}
|
|
1868
|
-
if (typeof transactionId !== 'undefined') {
|
|
1869
|
-
payload['transactionId'] = transactionId;
|
|
1870
|
-
}
|
|
1871
|
-
if (typeof total !== 'undefined') {
|
|
1872
|
-
payload['total'] = total;
|
|
1873
|
-
}
|
|
1874
|
-
|
|
1875
|
-
let response = undefined;
|
|
1876
|
-
|
|
1877
|
-
response = await client.call('get', apiPath, {
|
|
1878
|
-
}, payload);
|
|
1879
|
-
|
|
1880
|
-
if (parseOutput) {
|
|
1881
|
-
if(showConsole) {
|
|
1882
|
-
showConsoleLink('databases', 'listDocuments', databaseId, collectionId);
|
|
1883
|
-
} else {
|
|
1884
|
-
parse(response)
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
return response;
|
|
1889
|
-
|
|
1890
|
-
}
|
|
1891
|
-
interface DatabasesCreateDocumentRequestParams {
|
|
1892
|
-
databaseId: string;
|
|
1893
|
-
collectionId: string;
|
|
1894
|
-
documentId: string;
|
|
1895
|
-
data: object;
|
|
1896
|
-
permissions?: string[];
|
|
1897
|
-
transactionId?: string;
|
|
1898
|
-
overrideForCli?: boolean;
|
|
1899
|
-
parseOutput?: boolean;
|
|
1900
|
-
sdk?: Client;
|
|
1901
|
-
}
|
|
1902
|
-
|
|
1903
|
-
export const databasesCreateDocument = async ({databaseId,collectionId,documentId,data,permissions,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateDocumentRequestParams): Promise<any> => {
|
|
1904
|
-
let client = !sdk ? await sdkForProject() :
|
|
1905
|
-
sdk;
|
|
1906
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
1907
|
-
let payload = {};
|
|
1908
|
-
if (typeof documentId !== 'undefined') {
|
|
1909
|
-
payload['documentId'] = documentId;
|
|
1910
|
-
}
|
|
1911
|
-
if (typeof data !== 'undefined') {
|
|
1912
|
-
payload['data'] = JSON.parse(data);
|
|
1913
|
-
}
|
|
1914
|
-
permissions = permissions === true ? [] : permissions;
|
|
1915
|
-
if (typeof permissions !== 'undefined') {
|
|
1916
|
-
payload['permissions'] = permissions;
|
|
1917
|
-
}
|
|
1918
|
-
if (typeof transactionId !== 'undefined') {
|
|
1919
|
-
payload['transactionId'] = transactionId;
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
let response = undefined;
|
|
1923
|
-
|
|
1924
|
-
response = await client.call('post', apiPath, {
|
|
1925
|
-
'content-type': 'application/json',
|
|
1926
|
-
}, payload);
|
|
1927
|
-
|
|
1928
|
-
if (parseOutput) {
|
|
1929
|
-
parse(response)
|
|
1930
|
-
}
|
|
1931
|
-
|
|
1932
|
-
return response;
|
|
1933
|
-
|
|
1934
|
-
}
|
|
1935
|
-
interface DatabasesCreateDocumentsRequestParams {
|
|
1936
|
-
databaseId: string;
|
|
1937
|
-
collectionId: string;
|
|
1938
|
-
documents: object[];
|
|
1939
|
-
transactionId?: string;
|
|
1940
|
-
overrideForCli?: boolean;
|
|
1941
|
-
parseOutput?: boolean;
|
|
1942
|
-
sdk?: Client;
|
|
1943
|
-
}
|
|
1944
|
-
|
|
1945
|
-
export const databasesCreateDocuments = async ({databaseId,collectionId,documents,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateDocumentsRequestParams): Promise<any> => {
|
|
1946
|
-
let client = !sdk ? await sdkForProject() :
|
|
1947
|
-
sdk;
|
|
1948
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
1949
|
-
let payload = {};
|
|
1950
|
-
documents = documents === true ? [] : documents;
|
|
1951
|
-
if (typeof documents !== 'undefined') {
|
|
1952
|
-
payload['documents'] = documents;
|
|
1953
|
-
}
|
|
1954
|
-
if (typeof transactionId !== 'undefined') {
|
|
1955
|
-
payload['transactionId'] = transactionId;
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
let response = undefined;
|
|
1959
|
-
|
|
1960
|
-
response = await client.call('post', apiPath, {
|
|
1961
|
-
'content-type': 'application/json',
|
|
1962
|
-
}, payload);
|
|
1963
|
-
|
|
1964
|
-
if (parseOutput) {
|
|
1965
|
-
parse(response)
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
return response;
|
|
1969
|
-
|
|
1970
|
-
}
|
|
1971
|
-
interface DatabasesUpsertDocumentsRequestParams {
|
|
1972
|
-
databaseId: string;
|
|
1973
|
-
collectionId: string;
|
|
1974
|
-
documents: object[];
|
|
1975
|
-
transactionId?: string;
|
|
1976
|
-
overrideForCli?: boolean;
|
|
1977
|
-
parseOutput?: boolean;
|
|
1978
|
-
sdk?: Client;
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
export const databasesUpsertDocuments = async ({databaseId,collectionId,documents,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpsertDocumentsRequestParams): Promise<any> => {
|
|
1982
|
-
let client = !sdk ? await sdkForProject() :
|
|
1983
|
-
sdk;
|
|
1984
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
1985
|
-
let payload = {};
|
|
1986
|
-
documents = documents === true ? [] : documents;
|
|
1987
|
-
if (typeof documents !== 'undefined') {
|
|
1988
|
-
payload['documents'] = documents;
|
|
1989
|
-
}
|
|
1990
|
-
if (typeof transactionId !== 'undefined') {
|
|
1991
|
-
payload['transactionId'] = transactionId;
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
let response = undefined;
|
|
1995
|
-
|
|
1996
|
-
response = await client.call('put', apiPath, {
|
|
1997
|
-
'content-type': 'application/json',
|
|
1998
|
-
}, payload);
|
|
1999
|
-
|
|
2000
|
-
if (parseOutput) {
|
|
2001
|
-
parse(response)
|
|
2002
|
-
}
|
|
2003
|
-
|
|
2004
|
-
return response;
|
|
2005
|
-
|
|
2006
|
-
}
|
|
2007
|
-
interface DatabasesUpdateDocumentsRequestParams {
|
|
2008
|
-
databaseId: string;
|
|
2009
|
-
collectionId: string;
|
|
2010
|
-
data?: object;
|
|
2011
|
-
queries?: string[];
|
|
2012
|
-
transactionId?: string;
|
|
2013
|
-
overrideForCli?: boolean;
|
|
2014
|
-
parseOutput?: boolean;
|
|
2015
|
-
sdk?: Client;
|
|
2016
|
-
}
|
|
2017
|
-
|
|
2018
|
-
export const databasesUpdateDocuments = async ({databaseId,collectionId,data,queries,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateDocumentsRequestParams): Promise<any> => {
|
|
2019
|
-
let client = !sdk ? await sdkForProject() :
|
|
2020
|
-
sdk;
|
|
2021
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
2022
|
-
let payload = {};
|
|
2023
|
-
if (typeof data !== 'undefined') {
|
|
2024
|
-
payload['data'] = JSON.parse(data);
|
|
2025
|
-
}
|
|
2026
|
-
queries = queries === true ? [] : queries;
|
|
2027
|
-
if (typeof queries !== 'undefined') {
|
|
2028
|
-
payload['queries'] = queries;
|
|
2029
|
-
}
|
|
2030
|
-
if (typeof transactionId !== 'undefined') {
|
|
2031
|
-
payload['transactionId'] = transactionId;
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
let response = undefined;
|
|
2035
|
-
|
|
2036
|
-
response = await client.call('patch', apiPath, {
|
|
2037
|
-
'content-type': 'application/json',
|
|
2038
|
-
}, payload);
|
|
2039
|
-
|
|
2040
|
-
if (parseOutput) {
|
|
2041
|
-
parse(response)
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
|
-
return response;
|
|
2045
|
-
|
|
2046
|
-
}
|
|
2047
|
-
interface DatabasesDeleteDocumentsRequestParams {
|
|
2048
|
-
databaseId: string;
|
|
2049
|
-
collectionId: string;
|
|
2050
|
-
queries?: string[];
|
|
2051
|
-
transactionId?: string;
|
|
2052
|
-
overrideForCli?: boolean;
|
|
2053
|
-
parseOutput?: boolean;
|
|
2054
|
-
sdk?: Client;
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
|
-
export const databasesDeleteDocuments = async ({databaseId,collectionId,queries,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesDeleteDocumentsRequestParams): Promise<any> => {
|
|
2058
|
-
let client = !sdk ? await sdkForProject() :
|
|
2059
|
-
sdk;
|
|
2060
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
2061
|
-
let payload = {};
|
|
2062
|
-
queries = queries === true ? [] : queries;
|
|
2063
|
-
if (typeof queries !== 'undefined') {
|
|
2064
|
-
payload['queries'] = queries;
|
|
2065
|
-
}
|
|
2066
|
-
if (typeof transactionId !== 'undefined') {
|
|
2067
|
-
payload['transactionId'] = transactionId;
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
|
-
let response = undefined;
|
|
2071
|
-
|
|
2072
|
-
response = await client.call('delete', apiPath, {
|
|
2073
|
-
'content-type': 'application/json',
|
|
2074
|
-
}, payload);
|
|
2075
|
-
|
|
2076
|
-
if (parseOutput) {
|
|
2077
|
-
parse(response)
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2080
|
-
return response;
|
|
2081
|
-
|
|
2082
|
-
}
|
|
2083
|
-
interface DatabasesGetDocumentRequestParams {
|
|
2084
|
-
databaseId: string;
|
|
2085
|
-
collectionId: string;
|
|
2086
|
-
documentId: string;
|
|
2087
|
-
queries?: string[];
|
|
2088
|
-
transactionId?: string;
|
|
2089
|
-
overrideForCli?: boolean;
|
|
2090
|
-
parseOutput?: boolean;
|
|
2091
|
-
sdk?: Client;
|
|
2092
|
-
console?: boolean;
|
|
2093
|
-
}
|
|
2094
|
-
|
|
2095
|
-
export const databasesGetDocument = async ({databaseId,collectionId,documentId,queries,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: DatabasesGetDocumentRequestParams): Promise<any> => {
|
|
2096
|
-
let client = !sdk ? await sdkForProject() :
|
|
2097
|
-
sdk;
|
|
2098
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
2099
|
-
let payload = {};
|
|
2100
|
-
if (typeof queries !== 'undefined') {
|
|
2101
|
-
payload['queries'] = queries;
|
|
2102
|
-
}
|
|
2103
|
-
if (typeof transactionId !== 'undefined') {
|
|
2104
|
-
payload['transactionId'] = transactionId;
|
|
2105
|
-
}
|
|
2106
|
-
|
|
2107
|
-
let response = undefined;
|
|
2108
|
-
|
|
2109
|
-
response = await client.call('get', apiPath, {
|
|
2110
|
-
}, payload);
|
|
2111
|
-
|
|
2112
|
-
if (parseOutput) {
|
|
2113
|
-
if(showConsole) {
|
|
2114
|
-
showConsoleLink('databases', 'getDocument', databaseId, collectionId, documentId);
|
|
2115
|
-
} else {
|
|
2116
|
-
parse(response)
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
|
|
2120
|
-
return response;
|
|
2121
|
-
|
|
2122
|
-
}
|
|
2123
|
-
interface DatabasesUpsertDocumentRequestParams {
|
|
2124
|
-
databaseId: string;
|
|
2125
|
-
collectionId: string;
|
|
2126
|
-
documentId: string;
|
|
2127
|
-
data?: object;
|
|
2128
|
-
permissions?: string[];
|
|
2129
|
-
transactionId?: string;
|
|
2130
|
-
overrideForCli?: boolean;
|
|
2131
|
-
parseOutput?: boolean;
|
|
2132
|
-
sdk?: Client;
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
export const databasesUpsertDocument = async ({databaseId,collectionId,documentId,data,permissions,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpsertDocumentRequestParams): Promise<any> => {
|
|
2136
|
-
let client = !sdk ? await sdkForProject() :
|
|
2137
|
-
sdk;
|
|
2138
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
2139
|
-
let payload = {};
|
|
2140
|
-
if (typeof data !== 'undefined') {
|
|
2141
|
-
payload['data'] = JSON.parse(data);
|
|
2142
|
-
}
|
|
2143
|
-
permissions = permissions === true ? [] : permissions;
|
|
2144
|
-
if (typeof permissions !== 'undefined') {
|
|
2145
|
-
payload['permissions'] = permissions;
|
|
2146
|
-
}
|
|
2147
|
-
if (typeof transactionId !== 'undefined') {
|
|
2148
|
-
payload['transactionId'] = transactionId;
|
|
2149
|
-
}
|
|
2150
|
-
|
|
2151
|
-
let response = undefined;
|
|
2152
|
-
|
|
2153
|
-
response = await client.call('put', apiPath, {
|
|
2154
|
-
'content-type': 'application/json',
|
|
2155
|
-
}, payload);
|
|
2156
|
-
|
|
2157
|
-
if (parseOutput) {
|
|
2158
|
-
parse(response)
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
return response;
|
|
2162
|
-
|
|
2163
|
-
}
|
|
2164
|
-
interface DatabasesUpdateDocumentRequestParams {
|
|
2165
|
-
databaseId: string;
|
|
2166
|
-
collectionId: string;
|
|
2167
|
-
documentId: string;
|
|
2168
|
-
data?: object;
|
|
2169
|
-
permissions?: string[];
|
|
2170
|
-
transactionId?: string;
|
|
2171
|
-
overrideForCli?: boolean;
|
|
2172
|
-
parseOutput?: boolean;
|
|
2173
|
-
sdk?: Client;
|
|
2174
|
-
}
|
|
2175
|
-
|
|
2176
|
-
export const databasesUpdateDocument = async ({databaseId,collectionId,documentId,data,permissions,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesUpdateDocumentRequestParams): Promise<any> => {
|
|
2177
|
-
let client = !sdk ? await sdkForProject() :
|
|
2178
|
-
sdk;
|
|
2179
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
2180
|
-
let payload = {};
|
|
2181
|
-
if (typeof data !== 'undefined') {
|
|
2182
|
-
payload['data'] = JSON.parse(data);
|
|
2183
|
-
}
|
|
2184
|
-
permissions = permissions === true ? [] : permissions;
|
|
2185
|
-
if (typeof permissions !== 'undefined') {
|
|
2186
|
-
payload['permissions'] = permissions;
|
|
2187
|
-
}
|
|
2188
|
-
if (typeof transactionId !== 'undefined') {
|
|
2189
|
-
payload['transactionId'] = transactionId;
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2192
|
-
let response = undefined;
|
|
2193
|
-
|
|
2194
|
-
response = await client.call('patch', apiPath, {
|
|
2195
|
-
'content-type': 'application/json',
|
|
2196
|
-
}, payload);
|
|
2197
|
-
|
|
2198
|
-
if (parseOutput) {
|
|
2199
|
-
parse(response)
|
|
2200
|
-
}
|
|
2201
|
-
|
|
2202
|
-
return response;
|
|
2203
|
-
|
|
2204
|
-
}
|
|
2205
|
-
interface DatabasesDeleteDocumentRequestParams {
|
|
2206
|
-
databaseId: string;
|
|
2207
|
-
collectionId: string;
|
|
2208
|
-
documentId: string;
|
|
2209
|
-
transactionId?: string;
|
|
2210
|
-
overrideForCli?: boolean;
|
|
2211
|
-
parseOutput?: boolean;
|
|
2212
|
-
sdk?: Client;
|
|
2213
|
-
}
|
|
2214
|
-
|
|
2215
|
-
export const databasesDeleteDocument = async ({databaseId,collectionId,documentId,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesDeleteDocumentRequestParams): Promise<any> => {
|
|
2216
|
-
let client = !sdk ? await sdkForProject() :
|
|
2217
|
-
sdk;
|
|
2218
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
2219
|
-
let payload = {};
|
|
2220
|
-
if (typeof transactionId !== 'undefined') {
|
|
2221
|
-
payload['transactionId'] = transactionId;
|
|
2222
|
-
}
|
|
2223
|
-
|
|
2224
|
-
let response = undefined;
|
|
2225
|
-
|
|
2226
|
-
response = await client.call('delete', apiPath, {
|
|
2227
|
-
'content-type': 'application/json',
|
|
2228
|
-
}, payload);
|
|
2229
|
-
|
|
2230
|
-
if (parseOutput) {
|
|
2231
|
-
parse(response)
|
|
2232
|
-
}
|
|
2233
|
-
|
|
2234
|
-
return response;
|
|
2235
|
-
|
|
2236
|
-
}
|
|
2237
|
-
interface DatabasesListDocumentLogsRequestParams {
|
|
2238
|
-
databaseId: string;
|
|
2239
|
-
collectionId: string;
|
|
2240
|
-
documentId: string;
|
|
2241
|
-
queries?: string[];
|
|
2242
|
-
overrideForCli?: boolean;
|
|
2243
|
-
parseOutput?: boolean;
|
|
2244
|
-
sdk?: Client;
|
|
2245
|
-
}
|
|
2246
|
-
|
|
2247
|
-
export const databasesListDocumentLogs = async ({databaseId,collectionId,documentId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesListDocumentLogsRequestParams): Promise<any> => {
|
|
2248
|
-
let client = !sdk ? await sdkForProject() :
|
|
2249
|
-
sdk;
|
|
2250
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/logs'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
2251
|
-
let payload = {};
|
|
2252
|
-
if (typeof queries !== 'undefined') {
|
|
2253
|
-
payload['queries'] = queries;
|
|
2254
|
-
}
|
|
2255
|
-
|
|
2256
|
-
let response = undefined;
|
|
2257
|
-
|
|
2258
|
-
response = await client.call('get', apiPath, {
|
|
2259
|
-
}, payload);
|
|
2260
|
-
|
|
2261
|
-
if (parseOutput) {
|
|
2262
|
-
parse(response)
|
|
2263
|
-
}
|
|
2264
|
-
|
|
2265
|
-
return response;
|
|
2266
|
-
|
|
2267
|
-
}
|
|
2268
|
-
interface DatabasesDecrementDocumentAttributeRequestParams {
|
|
2269
|
-
databaseId: string;
|
|
2270
|
-
collectionId: string;
|
|
2271
|
-
documentId: string;
|
|
2272
|
-
attribute: string;
|
|
2273
|
-
value?: number;
|
|
2274
|
-
min?: number;
|
|
2275
|
-
transactionId?: string;
|
|
2276
|
-
overrideForCli?: boolean;
|
|
2277
|
-
parseOutput?: boolean;
|
|
2278
|
-
sdk?: Client;
|
|
2279
|
-
}
|
|
2280
|
-
|
|
2281
|
-
export const databasesDecrementDocumentAttribute = async ({databaseId,collectionId,documentId,attribute,value,min,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesDecrementDocumentAttributeRequestParams): Promise<any> => {
|
|
2282
|
-
let client = !sdk ? await sdkForProject() :
|
|
2283
|
-
sdk;
|
|
2284
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', attribute);
|
|
2285
|
-
let payload = {};
|
|
2286
|
-
if (typeof value !== 'undefined') {
|
|
2287
|
-
payload['value'] = value;
|
|
2288
|
-
}
|
|
2289
|
-
if (typeof min !== 'undefined') {
|
|
2290
|
-
payload['min'] = min;
|
|
2291
|
-
}
|
|
2292
|
-
if (typeof transactionId !== 'undefined') {
|
|
2293
|
-
payload['transactionId'] = transactionId;
|
|
2294
|
-
}
|
|
2295
|
-
|
|
2296
|
-
let response = undefined;
|
|
2297
|
-
|
|
2298
|
-
response = await client.call('patch', apiPath, {
|
|
2299
|
-
'content-type': 'application/json',
|
|
2300
|
-
}, payload);
|
|
2301
|
-
|
|
2302
|
-
if (parseOutput) {
|
|
2303
|
-
parse(response)
|
|
2304
|
-
}
|
|
2305
|
-
|
|
2306
|
-
return response;
|
|
2307
|
-
|
|
2308
|
-
}
|
|
2309
|
-
interface DatabasesIncrementDocumentAttributeRequestParams {
|
|
2310
|
-
databaseId: string;
|
|
2311
|
-
collectionId: string;
|
|
2312
|
-
documentId: string;
|
|
2313
|
-
attribute: string;
|
|
2314
|
-
value?: number;
|
|
2315
|
-
max?: number;
|
|
2316
|
-
transactionId?: string;
|
|
2317
|
-
overrideForCli?: boolean;
|
|
2318
|
-
parseOutput?: boolean;
|
|
2319
|
-
sdk?: Client;
|
|
2320
|
-
}
|
|
2321
|
-
|
|
2322
|
-
export const databasesIncrementDocumentAttribute = async ({databaseId,collectionId,documentId,attribute,value,max,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesIncrementDocumentAttributeRequestParams): Promise<any> => {
|
|
2323
|
-
let client = !sdk ? await sdkForProject() :
|
|
2324
|
-
sdk;
|
|
2325
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', attribute);
|
|
2326
|
-
let payload = {};
|
|
2327
|
-
if (typeof value !== 'undefined') {
|
|
2328
|
-
payload['value'] = value;
|
|
2329
|
-
}
|
|
2330
|
-
if (typeof max !== 'undefined') {
|
|
2331
|
-
payload['max'] = max;
|
|
2332
|
-
}
|
|
2333
|
-
if (typeof transactionId !== 'undefined') {
|
|
2334
|
-
payload['transactionId'] = transactionId;
|
|
2335
|
-
}
|
|
2336
|
-
|
|
2337
|
-
let response = undefined;
|
|
2338
|
-
|
|
2339
|
-
response = await client.call('patch', apiPath, {
|
|
2340
|
-
'content-type': 'application/json',
|
|
2341
|
-
}, payload);
|
|
2342
|
-
|
|
2343
|
-
if (parseOutput) {
|
|
2344
|
-
parse(response)
|
|
2345
|
-
}
|
|
2346
|
-
|
|
2347
|
-
return response;
|
|
2348
|
-
|
|
2349
|
-
}
|
|
2350
|
-
interface DatabasesListIndexesRequestParams {
|
|
2351
|
-
databaseId: string;
|
|
2352
|
-
collectionId: string;
|
|
2353
|
-
queries?: string[];
|
|
2354
|
-
total?: boolean;
|
|
2355
|
-
overrideForCli?: boolean;
|
|
2356
|
-
parseOutput?: boolean;
|
|
2357
|
-
sdk?: Client;
|
|
2358
|
-
console?: boolean;
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2361
|
-
export const databasesListIndexes = async ({databaseId,collectionId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: DatabasesListIndexesRequestParams): Promise<any> => {
|
|
2362
|
-
let client = !sdk ? await sdkForProject() :
|
|
2363
|
-
sdk;
|
|
2364
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
2365
|
-
let payload = {};
|
|
2366
|
-
if (typeof queries !== 'undefined') {
|
|
2367
|
-
payload['queries'] = queries;
|
|
2368
|
-
}
|
|
2369
|
-
if (typeof total !== 'undefined') {
|
|
2370
|
-
payload['total'] = total;
|
|
2371
|
-
}
|
|
2372
|
-
|
|
2373
|
-
let response = undefined;
|
|
2374
|
-
|
|
2375
|
-
response = await client.call('get', apiPath, {
|
|
2376
|
-
}, payload);
|
|
2377
|
-
|
|
2378
|
-
if (parseOutput) {
|
|
2379
|
-
if(showConsole) {
|
|
2380
|
-
showConsoleLink('databases', 'listIndexes', databaseId, collectionId);
|
|
2381
|
-
} else {
|
|
2382
|
-
parse(response)
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
|
|
2386
|
-
return response;
|
|
2387
|
-
|
|
2388
|
-
}
|
|
2389
|
-
interface DatabasesCreateIndexRequestParams {
|
|
2390
|
-
databaseId: string;
|
|
2391
|
-
collectionId: string;
|
|
2392
|
-
key: string;
|
|
2393
|
-
type: IndexType;
|
|
2394
|
-
attributes: string[];
|
|
2395
|
-
orders?: string[];
|
|
2396
|
-
lengths?: number[];
|
|
2397
|
-
overrideForCli?: boolean;
|
|
2398
|
-
parseOutput?: boolean;
|
|
2399
|
-
sdk?: Client;
|
|
2400
|
-
}
|
|
2401
|
-
|
|
2402
|
-
export const databasesCreateIndex = async ({databaseId,collectionId,key,type,attributes,orders,lengths,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesCreateIndexRequestParams): Promise<any> => {
|
|
2403
|
-
let client = !sdk ? await sdkForProject() :
|
|
2404
|
-
sdk;
|
|
2405
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
2406
|
-
let payload = {};
|
|
2407
|
-
if (typeof key !== 'undefined') {
|
|
2408
|
-
payload['key'] = key;
|
|
2409
|
-
}
|
|
2410
|
-
if (typeof type !== 'undefined') {
|
|
2411
|
-
payload['type'] = type;
|
|
2412
|
-
}
|
|
2413
|
-
attributes = attributes === true ? [] : attributes;
|
|
2414
|
-
if (typeof attributes !== 'undefined') {
|
|
2415
|
-
payload['attributes'] = attributes;
|
|
2416
|
-
}
|
|
2417
|
-
orders = orders === true ? [] : orders;
|
|
2418
|
-
if (typeof orders !== 'undefined') {
|
|
2419
|
-
payload['orders'] = orders;
|
|
2420
|
-
}
|
|
2421
|
-
lengths = lengths === true ? [] : lengths;
|
|
2422
|
-
if (typeof lengths !== 'undefined') {
|
|
2423
|
-
payload['lengths'] = lengths;
|
|
2424
|
-
}
|
|
2425
|
-
|
|
2426
|
-
let response = undefined;
|
|
2427
|
-
|
|
2428
|
-
response = await client.call('post', apiPath, {
|
|
2429
|
-
'content-type': 'application/json',
|
|
2430
|
-
}, payload);
|
|
2431
|
-
|
|
2432
|
-
if (parseOutput) {
|
|
2433
|
-
parse(response)
|
|
2434
|
-
}
|
|
2435
|
-
|
|
2436
|
-
return response;
|
|
2437
|
-
|
|
2438
|
-
}
|
|
2439
|
-
interface DatabasesGetIndexRequestParams {
|
|
2440
|
-
databaseId: string;
|
|
2441
|
-
collectionId: string;
|
|
2442
|
-
key: string;
|
|
2443
|
-
overrideForCli?: boolean;
|
|
2444
|
-
parseOutput?: boolean;
|
|
2445
|
-
sdk?: Client;
|
|
2446
|
-
}
|
|
2447
|
-
|
|
2448
|
-
export const databasesGetIndex = async ({databaseId,collectionId,key,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesGetIndexRequestParams): Promise<any> => {
|
|
2449
|
-
let client = !sdk ? await sdkForProject() :
|
|
2450
|
-
sdk;
|
|
2451
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
2452
|
-
let payload = {};
|
|
2453
|
-
|
|
2454
|
-
let response = undefined;
|
|
2455
|
-
|
|
2456
|
-
response = await client.call('get', apiPath, {
|
|
2457
|
-
}, payload);
|
|
2458
|
-
|
|
2459
|
-
if (parseOutput) {
|
|
2460
|
-
parse(response)
|
|
2461
|
-
}
|
|
2462
|
-
|
|
2463
|
-
return response;
|
|
2464
|
-
|
|
2465
|
-
}
|
|
2466
|
-
interface DatabasesDeleteIndexRequestParams {
|
|
2467
|
-
databaseId: string;
|
|
2468
|
-
collectionId: string;
|
|
2469
|
-
key: string;
|
|
2470
|
-
overrideForCli?: boolean;
|
|
2471
|
-
parseOutput?: boolean;
|
|
2472
|
-
sdk?: Client;
|
|
2473
|
-
}
|
|
2474
|
-
|
|
2475
|
-
export const databasesDeleteIndex = async ({databaseId,collectionId,key,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesDeleteIndexRequestParams): Promise<any> => {
|
|
2476
|
-
let client = !sdk ? await sdkForProject() :
|
|
2477
|
-
sdk;
|
|
2478
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
2479
|
-
let payload = {};
|
|
2480
|
-
|
|
2481
|
-
let response = undefined;
|
|
2482
|
-
|
|
2483
|
-
response = await client.call('delete', apiPath, {
|
|
2484
|
-
'content-type': 'application/json',
|
|
2485
|
-
}, payload);
|
|
2486
|
-
|
|
2487
|
-
if (parseOutput) {
|
|
2488
|
-
parse(response)
|
|
2489
|
-
}
|
|
2490
|
-
|
|
2491
|
-
return response;
|
|
2492
|
-
|
|
2493
|
-
}
|
|
2494
|
-
interface DatabasesListCollectionLogsRequestParams {
|
|
2495
|
-
databaseId: string;
|
|
2496
|
-
collectionId: string;
|
|
2497
|
-
queries?: string[];
|
|
2498
|
-
overrideForCli?: boolean;
|
|
2499
|
-
parseOutput?: boolean;
|
|
2500
|
-
sdk?: Client;
|
|
2501
|
-
}
|
|
2502
|
-
|
|
2503
|
-
export const databasesListCollectionLogs = async ({databaseId,collectionId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesListCollectionLogsRequestParams): Promise<any> => {
|
|
2504
|
-
let client = !sdk ? await sdkForProject() :
|
|
2505
|
-
sdk;
|
|
2506
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/logs'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
2507
|
-
let payload = {};
|
|
2508
|
-
if (typeof queries !== 'undefined') {
|
|
2509
|
-
payload['queries'] = queries;
|
|
2510
|
-
}
|
|
2511
|
-
|
|
2512
|
-
let response = undefined;
|
|
2513
|
-
|
|
2514
|
-
response = await client.call('get', apiPath, {
|
|
2515
|
-
}, payload);
|
|
2516
|
-
|
|
2517
|
-
if (parseOutput) {
|
|
2518
|
-
parse(response)
|
|
2519
|
-
}
|
|
2520
|
-
|
|
2521
|
-
return response;
|
|
2522
|
-
|
|
2523
|
-
}
|
|
2524
|
-
interface DatabasesGetCollectionUsageRequestParams {
|
|
2525
|
-
databaseId: string;
|
|
2526
|
-
collectionId: string;
|
|
2527
|
-
range?: UsageRange;
|
|
2528
|
-
overrideForCli?: boolean;
|
|
2529
|
-
parseOutput?: boolean;
|
|
2530
|
-
sdk?: Client;
|
|
2531
|
-
}
|
|
2532
|
-
|
|
2533
|
-
export const databasesGetCollectionUsage = async ({databaseId,collectionId,range,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesGetCollectionUsageRequestParams): Promise<any> => {
|
|
2534
|
-
let client = !sdk ? await sdkForProject() :
|
|
2535
|
-
sdk;
|
|
2536
|
-
let apiPath = '/databases/{databaseId}/collections/{collectionId}/usage'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
2537
|
-
let payload = {};
|
|
2538
|
-
if (typeof range !== 'undefined') {
|
|
2539
|
-
payload['range'] = range;
|
|
2540
|
-
}
|
|
2541
|
-
|
|
2542
|
-
let response = undefined;
|
|
2543
|
-
|
|
2544
|
-
response = await client.call('get', apiPath, {
|
|
2545
|
-
}, payload);
|
|
2546
|
-
|
|
2547
|
-
if (parseOutput) {
|
|
2548
|
-
parse(response)
|
|
2549
|
-
}
|
|
2550
|
-
|
|
2551
|
-
return response;
|
|
2552
|
-
|
|
2553
|
-
}
|
|
2554
|
-
interface DatabasesListLogsRequestParams {
|
|
2555
|
-
databaseId: string;
|
|
2556
|
-
queries?: string[];
|
|
2557
|
-
overrideForCli?: boolean;
|
|
2558
|
-
parseOutput?: boolean;
|
|
2559
|
-
sdk?: Client;
|
|
2560
|
-
}
|
|
2561
|
-
|
|
2562
|
-
export const databasesListLogs = async ({databaseId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesListLogsRequestParams): Promise<any> => {
|
|
2563
|
-
let client = !sdk ? await sdkForProject() :
|
|
2564
|
-
sdk;
|
|
2565
|
-
let apiPath = '/databases/{databaseId}/logs'.replace('{databaseId}', databaseId);
|
|
2566
|
-
let payload = {};
|
|
2567
|
-
if (typeof queries !== 'undefined') {
|
|
2568
|
-
payload['queries'] = queries;
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
|
-
let response = undefined;
|
|
2572
|
-
|
|
2573
|
-
response = await client.call('get', apiPath, {
|
|
2574
|
-
}, payload);
|
|
2575
|
-
|
|
2576
|
-
if (parseOutput) {
|
|
2577
|
-
parse(response)
|
|
2578
|
-
}
|
|
2579
|
-
|
|
2580
|
-
return response;
|
|
2581
|
-
|
|
2582
|
-
}
|
|
2583
|
-
interface DatabasesGetUsageRequestParams {
|
|
2584
|
-
databaseId: string;
|
|
2585
|
-
range?: UsageRange;
|
|
2586
|
-
overrideForCli?: boolean;
|
|
2587
|
-
parseOutput?: boolean;
|
|
2588
|
-
sdk?: Client;
|
|
2589
|
-
}
|
|
2590
|
-
|
|
2591
|
-
export const databasesGetUsage = async ({databaseId,range,parseOutput = true, overrideForCli = false, sdk = undefined}: DatabasesGetUsageRequestParams): Promise<any> => {
|
|
2592
|
-
let client = !sdk ? await sdkForProject() :
|
|
2593
|
-
sdk;
|
|
2594
|
-
let apiPath = '/databases/{databaseId}/usage'.replace('{databaseId}', databaseId);
|
|
2595
|
-
let payload = {};
|
|
2596
|
-
if (typeof range !== 'undefined') {
|
|
2597
|
-
payload['range'] = range;
|
|
2598
|
-
}
|
|
2599
|
-
|
|
2600
|
-
let response = undefined;
|
|
2601
|
-
|
|
2602
|
-
response = await client.call('get', apiPath, {
|
|
2603
|
-
}, payload);
|
|
2604
|
-
|
|
2605
|
-
if (parseOutput) {
|
|
2606
|
-
parse(response)
|
|
2607
|
-
}
|
|
2608
|
-
|
|
2609
|
-
return response;
|
|
2610
|
-
|
|
2611
|
-
}
|
|
2612
|
-
databases
|
|
2613
|
-
.command(`list`)
|
|
2614
|
-
.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.`)
|
|
2615
|
-
.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`)
|
|
2616
|
-
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2617
|
-
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2618
|
-
.option(`--console`, `Get the resource console url`)
|
|
2619
|
-
.action(actionRunner(databasesList))
|
|
2620
|
-
|
|
2621
|
-
databases
|
|
2622
|
-
.command(`create`)
|
|
2623
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create' instead] Create a new Database. `)
|
|
2624
|
-
.requiredOption(`--database-id <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.`)
|
|
2625
|
-
.requiredOption(`--name <name>`, `Database name. Max length: 128 chars.`)
|
|
2626
|
-
.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: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2627
|
-
.action(actionRunner(databasesCreate))
|
|
2628
|
-
|
|
2629
|
-
databases
|
|
2630
|
-
.command(`list-transactions`)
|
|
2631
|
-
.description(`List transactions across all databases.`)
|
|
2632
|
-
.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).`)
|
|
2633
|
-
.option(`--console`, `Get the resource console url`)
|
|
2634
|
-
.action(actionRunner(databasesListTransactions))
|
|
2635
|
-
|
|
2636
|
-
databases
|
|
2637
|
-
.command(`create-transaction`)
|
|
2638
|
-
.description(`Create a new transaction.`)
|
|
2639
|
-
.option(`--ttl <ttl>`, `Seconds before the transaction expires.`, parseInteger)
|
|
2640
|
-
.action(actionRunner(databasesCreateTransaction))
|
|
2641
|
-
|
|
2642
|
-
databases
|
|
2643
|
-
.command(`get-transaction`)
|
|
2644
|
-
.description(`Get a transaction by its unique ID.`)
|
|
2645
|
-
.requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
|
|
2646
|
-
.option(`--console`, `Get the resource console url`)
|
|
2647
|
-
.action(actionRunner(databasesGetTransaction))
|
|
2648
|
-
|
|
2649
|
-
databases
|
|
2650
|
-
.command(`update-transaction`)
|
|
2651
|
-
.description(`Update a transaction, to either commit or roll back its operations.`)
|
|
2652
|
-
.requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
|
|
2653
|
-
.option(`--commit [value]`, `Commit transaction?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2654
|
-
.option(`--rollback [value]`, `Rollback transaction?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2655
|
-
.action(actionRunner(databasesUpdateTransaction))
|
|
2656
|
-
|
|
2657
|
-
databases
|
|
2658
|
-
.command(`delete-transaction`)
|
|
2659
|
-
.description(`Delete a transaction by its unique ID.`)
|
|
2660
|
-
.requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
|
|
2661
|
-
.action(actionRunner(databasesDeleteTransaction))
|
|
2662
|
-
|
|
2663
|
-
databases
|
|
2664
|
-
.command(`create-operations`)
|
|
2665
|
-
.description(`Create multiple operations in a single transaction.`)
|
|
2666
|
-
.requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
|
|
2667
|
-
.option(`--operations [operations...]`, `Array of staged operations.`)
|
|
2668
|
-
.action(actionRunner(databasesCreateOperations))
|
|
2669
|
-
|
|
2670
|
-
databases
|
|
2671
|
-
.command(`list-usage`)
|
|
2672
|
-
.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.`)
|
|
2673
|
-
.option(`--range <range>`, `Date range.`)
|
|
2674
|
-
.option(`--console`, `Get the resource console url`)
|
|
2675
|
-
.action(actionRunner(databasesListUsage))
|
|
2676
|
-
|
|
2677
|
-
databases
|
|
2678
|
-
.command(`get`)
|
|
2679
|
-
.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.`)
|
|
2680
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2681
|
-
.option(`--console`, `Get the resource console url`)
|
|
2682
|
-
.action(actionRunner(databasesGet))
|
|
2683
|
-
|
|
2684
|
-
databases
|
|
2685
|
-
.command(`update`)
|
|
2686
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update' instead] Update a database by its unique ID.`)
|
|
2687
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2688
|
-
.requiredOption(`--name <name>`, `Database name. Max length: 128 chars.`)
|
|
2689
|
-
.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: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2690
|
-
.action(actionRunner(databasesUpdate))
|
|
2691
|
-
|
|
2692
|
-
databases
|
|
2693
|
-
.command(`delete`)
|
|
2694
|
-
.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.`)
|
|
2695
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2696
|
-
.action(actionRunner(databasesDelete))
|
|
2697
|
-
|
|
2698
|
-
databases
|
|
2699
|
-
.command(`list-collections`)
|
|
2700
|
-
.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.`)
|
|
2701
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2702
|
-
.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`)
|
|
2703
|
-
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2704
|
-
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2705
|
-
.option(`--console`, `Get the resource console url`)
|
|
2706
|
-
.action(actionRunner(databasesListCollections))
|
|
2707
|
-
|
|
2708
|
-
databases
|
|
2709
|
-
.command(`create-collection`)
|
|
2710
|
-
.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.`)
|
|
2711
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2712
|
-
.requiredOption(`--collection-id <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.`)
|
|
2713
|
-
.requiredOption(`--name <name>`, `Collection name. Max length: 128 chars.`)
|
|
2714
|
-
.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).`)
|
|
2715
|
-
.option(`--document-security [value]`, `Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2716
|
-
.option(`--enabled [value]`, `Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2717
|
-
.option(`--attributes [attributes...]`, `Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.`)
|
|
2718
|
-
.option(`--indexes [indexes...]`, `Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).`)
|
|
2719
|
-
.action(actionRunner(databasesCreateCollection))
|
|
2720
|
-
|
|
2721
|
-
databases
|
|
2722
|
-
.command(`get-collection`)
|
|
2723
|
-
.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.`)
|
|
2724
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2725
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2726
|
-
.option(`--console`, `Get the resource console url`)
|
|
2727
|
-
.action(actionRunner(databasesGetCollection))
|
|
2728
|
-
|
|
2729
|
-
databases
|
|
2730
|
-
.command(`update-collection`)
|
|
2731
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-table' instead] Update a collection by its unique ID.`)
|
|
2732
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2733
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2734
|
-
.requiredOption(`--name <name>`, `Collection name. Max length: 128 chars.`)
|
|
2735
|
-
.option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
2736
|
-
.option(`--document-security [value]`, `Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2737
|
-
.option(`--enabled [value]`, `Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2738
|
-
.action(actionRunner(databasesUpdateCollection))
|
|
2739
|
-
|
|
2740
|
-
databases
|
|
2741
|
-
.command(`delete-collection`)
|
|
2742
|
-
.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.`)
|
|
2743
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2744
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2745
|
-
.action(actionRunner(databasesDeleteCollection))
|
|
2746
|
-
|
|
2747
|
-
databases
|
|
2748
|
-
.command(`list-attributes`)
|
|
2749
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-columns' instead] List attributes in the collection.`)
|
|
2750
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2751
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2752
|
-
.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`)
|
|
2753
|
-
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2754
|
-
.option(`--console`, `Get the resource console url`)
|
|
2755
|
-
.action(actionRunner(databasesListAttributes))
|
|
2756
|
-
|
|
2757
|
-
databases
|
|
2758
|
-
.command(`create-boolean-attribute`)
|
|
2759
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-boolean-column' instead] Create a boolean attribute. `)
|
|
2760
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2761
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
2762
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2763
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2764
|
-
.option(`--xdefault [value]`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2765
|
-
.option(`--array [value]`, `Is attribute an array?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2766
|
-
.action(actionRunner(databasesCreateBooleanAttribute))
|
|
2767
|
-
|
|
2768
|
-
databases
|
|
2769
|
-
.command(`update-boolean-attribute`)
|
|
2770
|
-
.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.`)
|
|
2771
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2772
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`)
|
|
2773
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2774
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2775
|
-
.option(`--xdefault [value]`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2776
|
-
.option(`--new-key <new-key>`, `New attribute key.`)
|
|
2777
|
-
.action(actionRunner(databasesUpdateBooleanAttribute))
|
|
2778
|
-
|
|
2779
|
-
databases
|
|
2780
|
-
.command(`create-datetime-attribute`)
|
|
2781
|
-
.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.`)
|
|
2782
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2783
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`)
|
|
2784
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2785
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2786
|
-
.option(`--xdefault <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.`)
|
|
2787
|
-
.option(`--array [value]`, `Is attribute an array?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2788
|
-
.action(actionRunner(databasesCreateDatetimeAttribute))
|
|
2789
|
-
|
|
2790
|
-
databases
|
|
2791
|
-
.command(`update-datetime-attribute`)
|
|
2792
|
-
.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.`)
|
|
2793
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2794
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2795
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2796
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2797
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
2798
|
-
.option(`--new-key <new-key>`, `New attribute key.`)
|
|
2799
|
-
.action(actionRunner(databasesUpdateDatetimeAttribute))
|
|
2800
|
-
|
|
2801
|
-
databases
|
|
2802
|
-
.command(`create-email-attribute`)
|
|
2803
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-email-column' instead] Create an email attribute. `)
|
|
2804
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2805
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2806
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2807
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2808
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
2809
|
-
.option(`--array [value]`, `Is attribute an array?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2810
|
-
.action(actionRunner(databasesCreateEmailAttribute))
|
|
2811
|
-
|
|
2812
|
-
databases
|
|
2813
|
-
.command(`update-email-attribute`)
|
|
2814
|
-
.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. `)
|
|
2815
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2816
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2817
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2818
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2819
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
2820
|
-
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
2821
|
-
.action(actionRunner(databasesUpdateEmailAttribute))
|
|
2822
|
-
|
|
2823
|
-
databases
|
|
2824
|
-
.command(`create-enum-attribute`)
|
|
2825
|
-
.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. `)
|
|
2826
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2827
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2828
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2829
|
-
.requiredOption(`--elements [elements...]`, `Array of enum values.`)
|
|
2830
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2831
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
2832
|
-
.option(`--array [value]`, `Is attribute an array?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2833
|
-
.action(actionRunner(databasesCreateEnumAttribute))
|
|
2834
|
-
|
|
2835
|
-
databases
|
|
2836
|
-
.command(`update-enum-attribute`)
|
|
2837
|
-
.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. `)
|
|
2838
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2839
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2840
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2841
|
-
.requiredOption(`--elements [elements...]`, `Updated list of enum values.`)
|
|
2842
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2843
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
2844
|
-
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
2845
|
-
.action(actionRunner(databasesUpdateEnumAttribute))
|
|
2846
|
-
|
|
2847
|
-
databases
|
|
2848
|
-
.command(`create-float-attribute`)
|
|
2849
|
-
.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. `)
|
|
2850
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2851
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2852
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2853
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2854
|
-
.option(`--min <min>`, `Minimum value.`, parseInteger)
|
|
2855
|
-
.option(`--max <max>`, `Maximum value.`, parseInteger)
|
|
2856
|
-
.option(`--xdefault <xdefault>`, `Default value. Cannot be set when required.`, parseInteger)
|
|
2857
|
-
.option(`--array [value]`, `Is attribute an array?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2858
|
-
.action(actionRunner(databasesCreateFloatAttribute))
|
|
2859
|
-
|
|
2860
|
-
databases
|
|
2861
|
-
.command(`update-float-attribute`)
|
|
2862
|
-
.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. `)
|
|
2863
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2864
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2865
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2866
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2867
|
-
.option(`--xdefault <xdefault>`, `Default value. Cannot be set when required.`, parseInteger)
|
|
2868
|
-
.option(`--min <min>`, `Minimum value.`, parseInteger)
|
|
2869
|
-
.option(`--max <max>`, `Maximum value.`, parseInteger)
|
|
2870
|
-
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
2871
|
-
.action(actionRunner(databasesUpdateFloatAttribute))
|
|
2872
|
-
|
|
2873
|
-
databases
|
|
2874
|
-
.command(`create-integer-attribute`)
|
|
2875
|
-
.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. `)
|
|
2876
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2877
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2878
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2879
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2880
|
-
.option(`--min <min>`, `Minimum value`, parseInteger)
|
|
2881
|
-
.option(`--max <max>`, `Maximum value`, parseInteger)
|
|
2882
|
-
.option(`--xdefault <xdefault>`, `Default value. Cannot be set when attribute is required.`, parseInteger)
|
|
2883
|
-
.option(`--array [value]`, `Is attribute an array?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2884
|
-
.action(actionRunner(databasesCreateIntegerAttribute))
|
|
2885
|
-
|
|
2886
|
-
databases
|
|
2887
|
-
.command(`update-integer-attribute`)
|
|
2888
|
-
.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. `)
|
|
2889
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2890
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2891
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2892
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2893
|
-
.option(`--xdefault <xdefault>`, `Default value. Cannot be set when attribute is required.`, parseInteger)
|
|
2894
|
-
.option(`--min <min>`, `Minimum value`, parseInteger)
|
|
2895
|
-
.option(`--max <max>`, `Maximum value`, parseInteger)
|
|
2896
|
-
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
2897
|
-
.action(actionRunner(databasesUpdateIntegerAttribute))
|
|
2898
|
-
|
|
2899
|
-
databases
|
|
2900
|
-
.command(`create-ip-attribute`)
|
|
2901
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-ip-column' instead] Create IP address attribute. `)
|
|
2902
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2903
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2904
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2905
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2906
|
-
.option(`--xdefault <xdefault>`, `Default value. Cannot be set when attribute is required.`)
|
|
2907
|
-
.option(`--array [value]`, `Is attribute an array?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2908
|
-
.action(actionRunner(databasesCreateIpAttribute))
|
|
2909
|
-
|
|
2910
|
-
databases
|
|
2911
|
-
.command(`update-ip-attribute`)
|
|
2912
|
-
.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. `)
|
|
2913
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2914
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2915
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2916
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2917
|
-
.option(`--xdefault <xdefault>`, `Default value. Cannot be set when attribute is required.`)
|
|
2918
|
-
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
2919
|
-
.action(actionRunner(databasesUpdateIpAttribute))
|
|
2920
|
-
|
|
2921
|
-
databases
|
|
2922
|
-
.command(`create-line-attribute`)
|
|
2923
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-line-column' instead] Create a geometric line attribute.`)
|
|
2924
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2925
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
2926
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2927
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2928
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.`)
|
|
2929
|
-
.action(actionRunner(databasesCreateLineAttribute))
|
|
2930
|
-
|
|
2931
|
-
databases
|
|
2932
|
-
.command(`update-line-attribute`)
|
|
2933
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-line-column' instead] Update a line attribute. Changing the 'default' value will not update already existing documents.`)
|
|
2934
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2935
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`)
|
|
2936
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2937
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2938
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.`)
|
|
2939
|
-
.option(`--new-key <new-key>`, `New attribute key.`)
|
|
2940
|
-
.action(actionRunner(databasesUpdateLineAttribute))
|
|
2941
|
-
|
|
2942
|
-
databases
|
|
2943
|
-
.command(`create-point-attribute`)
|
|
2944
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-point-column' instead] Create a geometric point attribute.`)
|
|
2945
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2946
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
2947
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2948
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2949
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.`)
|
|
2950
|
-
.action(actionRunner(databasesCreatePointAttribute))
|
|
2951
|
-
|
|
2952
|
-
databases
|
|
2953
|
-
.command(`update-point-attribute`)
|
|
2954
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-point-column' instead] Update a point attribute. Changing the 'default' value will not update already existing documents.`)
|
|
2955
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2956
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`)
|
|
2957
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2958
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2959
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.`)
|
|
2960
|
-
.option(`--new-key <new-key>`, `New attribute key.`)
|
|
2961
|
-
.action(actionRunner(databasesUpdatePointAttribute))
|
|
2962
|
-
|
|
2963
|
-
databases
|
|
2964
|
-
.command(`create-polygon-attribute`)
|
|
2965
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-polygon-column' instead] Create a geometric polygon attribute.`)
|
|
2966
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2967
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
2968
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2969
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2970
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.`)
|
|
2971
|
-
.action(actionRunner(databasesCreatePolygonAttribute))
|
|
2972
|
-
|
|
2973
|
-
databases
|
|
2974
|
-
.command(`update-polygon-attribute`)
|
|
2975
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-polygon-column' instead] Update a polygon attribute. Changing the 'default' value will not update already existing documents.`)
|
|
2976
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2977
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`)
|
|
2978
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2979
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2980
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.`)
|
|
2981
|
-
.option(`--new-key <new-key>`, `New attribute key.`)
|
|
2982
|
-
.action(actionRunner(databasesUpdatePolygonAttribute))
|
|
2983
|
-
|
|
2984
|
-
databases
|
|
2985
|
-
.command(`create-relationship-attribute`)
|
|
2986
|
-
.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). `)
|
|
2987
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2988
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2989
|
-
.requiredOption(`--related-collection-id <related-collection-id>`, `Related Collection ID.`)
|
|
2990
|
-
.requiredOption(`--type <type>`, `Relation type`)
|
|
2991
|
-
.option(`--two-way [value]`, `Is Two Way?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
2992
|
-
.option(`--key <key>`, `Attribute Key.`)
|
|
2993
|
-
.option(`--two-way-key <two-way-key>`, `Two Way Attribute Key.`)
|
|
2994
|
-
.option(`--on-delete <on-delete>`, `Constraints option`)
|
|
2995
|
-
.action(actionRunner(databasesCreateRelationshipAttribute))
|
|
2996
|
-
|
|
2997
|
-
databases
|
|
2998
|
-
.command(`create-string-attribute`)
|
|
2999
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-string-column' instead] Create a string attribute. `)
|
|
3000
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3001
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
3002
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
3003
|
-
.requiredOption(`--size <size>`, `Attribute size for text attributes, in number of characters.`, parseInteger)
|
|
3004
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
3005
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
3006
|
-
.option(`--array [value]`, `Is attribute an array?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
3007
|
-
.option(`--encrypt [value]`, `Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
3008
|
-
.action(actionRunner(databasesCreateStringAttribute))
|
|
3009
|
-
|
|
3010
|
-
databases
|
|
3011
|
-
.command(`update-string-attribute`)
|
|
3012
|
-
.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. `)
|
|
3013
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3014
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
3015
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
3016
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
3017
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
3018
|
-
.option(`--size <size>`, `Maximum size of the string attribute.`, parseInteger)
|
|
3019
|
-
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
3020
|
-
.action(actionRunner(databasesUpdateStringAttribute))
|
|
3021
|
-
|
|
3022
|
-
databases
|
|
3023
|
-
.command(`create-url-attribute`)
|
|
3024
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-url-column' instead] Create a URL attribute. `)
|
|
3025
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3026
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3027
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
3028
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
3029
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
3030
|
-
.option(`--array [value]`, `Is attribute an array?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
3031
|
-
.action(actionRunner(databasesCreateUrlAttribute))
|
|
3032
|
-
|
|
3033
|
-
databases
|
|
3034
|
-
.command(`update-url-attribute`)
|
|
3035
|
-
.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. `)
|
|
3036
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3037
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3038
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
3039
|
-
.requiredOption(`--required [value]`, `Is attribute required?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
3040
|
-
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
3041
|
-
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
3042
|
-
.action(actionRunner(databasesUpdateUrlAttribute))
|
|
3043
|
-
|
|
3044
|
-
databases
|
|
3045
|
-
.command(`get-attribute`)
|
|
3046
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-column' instead] Get attribute by ID.`)
|
|
3047
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3048
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3049
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
3050
|
-
.action(actionRunner(databasesGetAttribute))
|
|
3051
|
-
|
|
3052
|
-
databases
|
|
3053
|
-
.command(`delete-attribute`)
|
|
3054
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete-column' instead] Deletes an attribute.`)
|
|
3055
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3056
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3057
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
3058
|
-
.action(actionRunner(databasesDeleteAttribute))
|
|
3059
|
-
|
|
3060
|
-
databases
|
|
3061
|
-
.command(`update-relationship-attribute`)
|
|
3062
|
-
.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). `)
|
|
3063
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3064
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3065
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
3066
|
-
.option(`--on-delete <on-delete>`, `Constraints option`)
|
|
3067
|
-
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
3068
|
-
.action(actionRunner(databasesUpdateRelationshipAttribute))
|
|
3069
|
-
|
|
3070
|
-
databases
|
|
3071
|
-
.command(`list-documents`)
|
|
3072
|
-
.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.`)
|
|
3073
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3074
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
3075
|
-
.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.`)
|
|
3076
|
-
.option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`)
|
|
3077
|
-
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
3078
|
-
.option(`--console`, `Get the resource console url`)
|
|
3079
|
-
.action(actionRunner(databasesListDocuments))
|
|
3080
|
-
|
|
3081
|
-
databases
|
|
3082
|
-
.command(`create-document`)
|
|
3083
|
-
.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.`)
|
|
3084
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3085
|
-
.requiredOption(`--collection-id <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.`)
|
|
3086
|
-
.requiredOption(`--document-id <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.`)
|
|
3087
|
-
.requiredOption(`--data <data>`, `Document data as JSON object.`)
|
|
3088
|
-
.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).`)
|
|
3089
|
-
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3090
|
-
.action(actionRunner(databasesCreateDocument))
|
|
3091
|
-
|
|
3092
|
-
databases
|
|
3093
|
-
.command(`create-documents`)
|
|
3094
|
-
.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.`)
|
|
3095
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3096
|
-
.requiredOption(`--collection-id <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.`)
|
|
3097
|
-
.requiredOption(`--documents [documents...]`, `Array of documents data as JSON objects.`)
|
|
3098
|
-
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3099
|
-
.action(actionRunner(databasesCreateDocuments))
|
|
3100
|
-
|
|
3101
|
-
databases
|
|
3102
|
-
.command(`upsert-documents`)
|
|
3103
|
-
.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. `)
|
|
3104
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3105
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3106
|
-
.requiredOption(`--documents [documents...]`, `Array of document data as JSON objects. May contain partial documents.`)
|
|
3107
|
-
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3108
|
-
.action(actionRunner(databasesUpsertDocuments))
|
|
3109
|
-
|
|
3110
|
-
databases
|
|
3111
|
-
.command(`update-documents`)
|
|
3112
|
-
.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.`)
|
|
3113
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3114
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3115
|
-
.option(`--data <data>`, `Document data as JSON object. Include only attribute and value pairs to be updated.`)
|
|
3116
|
-
.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.`)
|
|
3117
|
-
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3118
|
-
.action(actionRunner(databasesUpdateDocuments))
|
|
3119
|
-
|
|
3120
|
-
databases
|
|
3121
|
-
.command(`delete-documents`)
|
|
3122
|
-
.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.`)
|
|
3123
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3124
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
3125
|
-
.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.`)
|
|
3126
|
-
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3127
|
-
.action(actionRunner(databasesDeleteDocuments))
|
|
3128
|
-
|
|
3129
|
-
databases
|
|
3130
|
-
.command(`get-document`)
|
|
3131
|
-
.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.`)
|
|
3132
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3133
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
3134
|
-
.requiredOption(`--document-id <document-id>`, `Document ID.`)
|
|
3135
|
-
.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.`)
|
|
3136
|
-
.option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`)
|
|
3137
|
-
.option(`--console`, `Get the resource console url`)
|
|
3138
|
-
.action(actionRunner(databasesGetDocument))
|
|
3139
|
-
|
|
3140
|
-
databases
|
|
3141
|
-
.command(`upsert-document`)
|
|
3142
|
-
.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.`)
|
|
3143
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3144
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3145
|
-
.requiredOption(`--document-id <document-id>`, `Document ID.`)
|
|
3146
|
-
.option(`--data <data>`, `Document data as JSON object. Include all required attributes of the document to be created or updated.`)
|
|
3147
|
-
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
3148
|
-
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3149
|
-
.action(actionRunner(databasesUpsertDocument))
|
|
3150
|
-
|
|
3151
|
-
databases
|
|
3152
|
-
.command(`update-document`)
|
|
3153
|
-
.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.`)
|
|
3154
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3155
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3156
|
-
.requiredOption(`--document-id <document-id>`, `Document ID.`)
|
|
3157
|
-
.option(`--data <data>`, `Document data as JSON object. Include only attribute and value pairs to be updated.`)
|
|
3158
|
-
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
3159
|
-
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3160
|
-
.action(actionRunner(databasesUpdateDocument))
|
|
3161
|
-
|
|
3162
|
-
databases
|
|
3163
|
-
.command(`delete-document`)
|
|
3164
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete-row' instead] Delete a document by its unique ID.`)
|
|
3165
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3166
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
3167
|
-
.requiredOption(`--document-id <document-id>`, `Document ID.`)
|
|
3168
|
-
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3169
|
-
.action(actionRunner(databasesDeleteDocument))
|
|
3170
|
-
|
|
3171
|
-
databases
|
|
3172
|
-
.command(`list-document-logs`)
|
|
3173
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-row-logs' instead] Get the document activity logs list by its unique ID.`)
|
|
3174
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3175
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3176
|
-
.requiredOption(`--document-id <document-id>`, `Document ID.`)
|
|
3177
|
-
.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`)
|
|
3178
|
-
.action(actionRunner(databasesListDocumentLogs))
|
|
3179
|
-
|
|
3180
|
-
databases
|
|
3181
|
-
.command(`decrement-document-attribute`)
|
|
3182
|
-
.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.`)
|
|
3183
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3184
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3185
|
-
.requiredOption(`--document-id <document-id>`, `Document ID.`)
|
|
3186
|
-
.requiredOption(`--attribute <attribute>`, `Attribute key.`)
|
|
3187
|
-
.option(`--value <value>`, `Value to increment the attribute by. The value must be a number.`, parseInteger)
|
|
3188
|
-
.option(`--min <min>`, `Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.`, parseInteger)
|
|
3189
|
-
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3190
|
-
.action(actionRunner(databasesDecrementDocumentAttribute))
|
|
3191
|
-
|
|
3192
|
-
databases
|
|
3193
|
-
.command(`increment-document-attribute`)
|
|
3194
|
-
.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.`)
|
|
3195
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3196
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3197
|
-
.requiredOption(`--document-id <document-id>`, `Document ID.`)
|
|
3198
|
-
.requiredOption(`--attribute <attribute>`, `Attribute key.`)
|
|
3199
|
-
.option(`--value <value>`, `Value to increment the attribute by. The value must be a number.`, parseInteger)
|
|
3200
|
-
.option(`--max <max>`, `Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.`, parseInteger)
|
|
3201
|
-
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3202
|
-
.action(actionRunner(databasesIncrementDocumentAttribute))
|
|
3203
|
-
|
|
3204
|
-
databases
|
|
3205
|
-
.command(`list-indexes`)
|
|
3206
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-indexes' instead] List indexes in the collection.`)
|
|
3207
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3208
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
3209
|
-
.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`)
|
|
3210
|
-
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
3211
|
-
.option(`--console`, `Get the resource console url`)
|
|
3212
|
-
.action(actionRunner(databasesListIndexes))
|
|
3213
|
-
|
|
3214
|
-
databases
|
|
3215
|
-
.command(`create-index`)
|
|
3216
|
-
.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'.`)
|
|
3217
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3218
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
3219
|
-
.requiredOption(`--key <key>`, `Index Key.`)
|
|
3220
|
-
.requiredOption(`--type <type>`, `Index type.`)
|
|
3221
|
-
.requiredOption(`--attributes [attributes...]`, `Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.`)
|
|
3222
|
-
.option(`--orders [orders...]`, `Array of index orders. Maximum of 100 orders are allowed.`)
|
|
3223
|
-
.option(`--lengths [lengths...]`, `Length of index. Maximum of 100`)
|
|
3224
|
-
.action(actionRunner(databasesCreateIndex))
|
|
3225
|
-
|
|
3226
|
-
databases
|
|
3227
|
-
.command(`get-index`)
|
|
3228
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-index' instead] Get an index by its unique ID.`)
|
|
3229
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3230
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
3231
|
-
.requiredOption(`--key <key>`, `Index Key.`)
|
|
3232
|
-
.action(actionRunner(databasesGetIndex))
|
|
3233
|
-
|
|
3234
|
-
databases
|
|
3235
|
-
.command(`delete-index`)
|
|
3236
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete-index' instead] Delete an index.`)
|
|
3237
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3238
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
3239
|
-
.requiredOption(`--key <key>`, `Index Key.`)
|
|
3240
|
-
.action(actionRunner(databasesDeleteIndex))
|
|
3241
|
-
|
|
3242
|
-
databases
|
|
3243
|
-
.command(`list-collection-logs`)
|
|
3244
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-table-logs' instead] Get the collection activity logs list by its unique ID.`)
|
|
3245
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3246
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3247
|
-
.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`)
|
|
3248
|
-
.action(actionRunner(databasesListCollectionLogs))
|
|
3249
|
-
|
|
3250
|
-
databases
|
|
3251
|
-
.command(`get-collection-usage`)
|
|
3252
|
-
.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.`)
|
|
3253
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3254
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
3255
|
-
.option(`--range <range>`, `Date range.`)
|
|
3256
|
-
.action(actionRunner(databasesGetCollectionUsage))
|
|
3257
|
-
|
|
3258
|
-
databases
|
|
3259
|
-
.command(`list-logs`)
|
|
3260
|
-
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-database-logs' instead] Get the database activity logs list by its unique ID.`)
|
|
3261
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3262
|
-
.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`)
|
|
3263
|
-
.action(actionRunner(databasesListLogs))
|
|
3264
|
-
|
|
3265
|
-
databases
|
|
3266
|
-
.command(`get-usage`)
|
|
3267
|
-
.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.`)
|
|
3268
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3269
|
-
.option(`--range <range>`, `Date range.`)
|
|
3270
|
-
.action(actionRunner(databasesGetUsage))
|
|
3271
|
-
|
|
3272
|
-
|