chirag-appwrite-cli 0.1.1 → 0.2.0
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 +190 -1
- package/LICENSE.md +12 -1
- package/README.md +182 -15
- package/bun.lock +627 -0
- package/dist/bundle.cjs +108228 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +149 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/client.d.ts +88 -0
- package/dist/lib/client.d.ts.map +1 -0
- package/dist/lib/client.js +238 -0
- package/dist/lib/client.js.map +1 -0
- package/dist/lib/commands/config.d.ts +557 -0
- package/dist/lib/commands/config.d.ts.map +1 -0
- package/dist/lib/commands/config.js +415 -0
- package/dist/lib/commands/config.js.map +1 -0
- package/dist/lib/commands/db.d.ts +34 -0
- package/dist/lib/commands/db.d.ts.map +1 -0
- package/dist/lib/commands/db.js +247 -0
- package/dist/lib/commands/db.js.map +1 -0
- package/dist/lib/commands/errors.d.ts +68 -0
- package/dist/lib/commands/errors.d.ts.map +1 -0
- package/dist/lib/commands/errors.js +72 -0
- package/dist/lib/commands/errors.js.map +1 -0
- package/dist/lib/commands/generic.d.ts +17 -0
- package/dist/lib/commands/generic.d.ts.map +1 -0
- package/dist/lib/commands/generic.js +292 -0
- package/dist/lib/commands/generic.js.map +1 -0
- package/dist/lib/commands/init.d.ts +3 -0
- package/dist/lib/commands/init.d.ts.map +1 -0
- package/dist/lib/commands/init.js +526 -0
- package/dist/lib/commands/init.js.map +1 -0
- package/dist/lib/commands/pull.d.ts +110 -0
- package/dist/lib/commands/pull.d.ts.map +1 -0
- package/dist/lib/commands/pull.js +626 -0
- package/dist/lib/commands/pull.js.map +1 -0
- package/dist/lib/commands/push.d.ts +82 -0
- package/dist/lib/commands/push.d.ts.map +1 -0
- package/dist/lib/commands/push.js +1666 -0
- package/dist/lib/commands/push.js.map +1 -0
- package/dist/lib/commands/run.d.ts +3 -0
- package/dist/lib/commands/run.d.ts.map +1 -0
- package/dist/lib/commands/run.js +289 -0
- package/dist/lib/commands/run.js.map +1 -0
- package/dist/lib/commands/schema.d.ts +57 -0
- package/dist/lib/commands/schema.d.ts.map +1 -0
- package/dist/lib/commands/schema.js +75 -0
- package/dist/lib/commands/schema.js.map +1 -0
- 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 +3 -0
- package/dist/lib/commands/types.d.ts.map +1 -0
- package/dist/lib/commands/types.js +151 -0
- package/dist/lib/commands/types.js.map +1 -0
- package/dist/lib/commands/update.d.ts +3 -0
- package/dist/lib/commands/update.d.ts.map +1 -0
- package/dist/lib/commands/update.js +201 -0
- package/dist/lib/commands/update.js.map +1 -0
- package/dist/lib/commands/utils/attributes.d.ts +46 -0
- package/dist/lib/commands/utils/attributes.d.ts.map +1 -0
- package/dist/lib/commands/utils/attributes.js +521 -0
- package/dist/lib/commands/utils/attributes.js.map +1 -0
- package/dist/lib/commands/utils/change-approval.d.ts +25 -0
- package/dist/lib/commands/utils/change-approval.d.ts.map +1 -0
- package/dist/lib/commands/utils/change-approval.js +129 -0
- package/dist/lib/commands/utils/change-approval.js.map +1 -0
- package/dist/lib/commands/utils/database-sync.d.ts +10 -0
- package/dist/lib/commands/utils/database-sync.d.ts.map +1 -0
- package/dist/lib/commands/utils/database-sync.js +136 -0
- package/dist/lib/commands/utils/database-sync.js.map +1 -0
- package/dist/lib/commands/utils/deployment.d.ts +34 -0
- package/dist/lib/commands/utils/deployment.d.ts.map +1 -0
- package/dist/lib/commands/utils/deployment.js +108 -0
- package/dist/lib/commands/utils/deployment.js.map +1 -0
- package/dist/lib/commands/utils/error-formatter.d.ts +19 -0
- package/dist/lib/commands/utils/error-formatter.d.ts.map +1 -0
- package/dist/lib/commands/utils/error-formatter.js +333 -0
- package/dist/lib/commands/utils/error-formatter.js.map +1 -0
- package/dist/lib/commands/utils/pools.d.ts +16 -0
- package/dist/lib/commands/utils/pools.d.ts.map +1 -0
- package/dist/lib/commands/utils/pools.js +197 -0
- package/dist/lib/commands/utils/pools.js.map +1 -0
- package/dist/lib/config.d.ts +119 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +728 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/emulation/docker.d.ts +7 -0
- package/dist/lib/emulation/docker.d.ts.map +1 -0
- package/dist/lib/emulation/docker.js +224 -0
- package/dist/lib/emulation/docker.js.map +1 -0
- package/dist/lib/emulation/utils.d.ts +29 -0
- package/dist/lib/emulation/utils.d.ts.map +1 -0
- package/dist/lib/emulation/utils.js +165 -0
- package/dist/lib/emulation/utils.js.map +1 -0
- package/dist/lib/id.d.ts +7 -0
- package/dist/lib/id.d.ts.map +1 -0
- package/dist/lib/id.js +27 -0
- package/dist/lib/id.js.map +1 -0
- package/dist/lib/paginate.d.ts +9 -0
- package/dist/lib/paginate.d.ts.map +1 -0
- package/dist/lib/paginate.js +43 -0
- package/dist/lib/paginate.js.map +1 -0
- package/dist/lib/parser.d.ts +18 -0
- package/dist/lib/parser.d.ts.map +1 -0
- package/dist/lib/parser.js +225 -0
- package/dist/lib/parser.js.map +1 -0
- package/dist/lib/questions.d.ts +59 -0
- package/dist/lib/questions.d.ts.map +1 -0
- package/dist/lib/questions.js +991 -0
- package/dist/lib/questions.js.map +1 -0
- package/dist/lib/sdks.d.ts +4 -0
- package/dist/lib/sdks.d.ts.map +1 -0
- package/dist/lib/sdks.js +61 -0
- package/dist/lib/sdks.js.map +1 -0
- 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 +28 -0
- package/dist/lib/spinner.d.ts.map +1 -0
- package/dist/lib/spinner.js +91 -0
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/type-generation/attribute.d.ts +17 -0
- package/dist/lib/type-generation/attribute.d.ts.map +1 -0
- package/dist/lib/type-generation/attribute.js +16 -0
- package/dist/lib/type-generation/attribute.js.map +1 -0
- package/dist/lib/type-generation/languages/csharp.d.ts +7 -0
- package/dist/lib/type-generation/languages/csharp.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/csharp.js +180 -0
- package/dist/lib/type-generation/languages/csharp.js.map +1 -0
- package/dist/lib/type-generation/languages/dart.d.ts +8 -0
- package/dist/lib/type-generation/languages/dart.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/dart.js +197 -0
- package/dist/lib/type-generation/languages/dart.js.map +1 -0
- package/dist/lib/type-generation/languages/java.d.ts +7 -0
- package/dist/lib/type-generation/languages/java.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/java.js +140 -0
- package/dist/lib/type-generation/languages/java.js.map +1 -0
- package/dist/lib/type-generation/languages/javascript.d.ts +9 -0
- package/dist/lib/type-generation/languages/javascript.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/javascript.js +109 -0
- package/dist/lib/type-generation/languages/javascript.js.map +1 -0
- package/dist/lib/type-generation/languages/kotlin.d.ts +7 -0
- package/dist/lib/type-generation/languages/kotlin.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/kotlin.js +95 -0
- package/dist/lib/type-generation/languages/kotlin.js.map +1 -0
- package/dist/lib/type-generation/languages/language.d.ts +43 -0
- package/dist/lib/type-generation/languages/language.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/language.js +77 -0
- package/dist/lib/type-generation/languages/language.js.map +1 -0
- package/dist/lib/type-generation/languages/php.d.ts +7 -0
- package/dist/lib/type-generation/languages/php.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/php.js +116 -0
- package/dist/lib/type-generation/languages/php.js.map +1 -0
- package/dist/lib/type-generation/languages/swift.d.ts +7 -0
- package/dist/lib/type-generation/languages/swift.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/swift.js +179 -0
- package/dist/lib/type-generation/languages/swift.js.map +1 -0
- package/dist/lib/type-generation/languages/typescript.d.ts +9 -0
- package/dist/lib/type-generation/languages/typescript.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/typescript.js +115 -0
- package/dist/lib/type-generation/languages/typescript.js.map +1 -0
- package/dist/lib/types.d.ts +63 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utils.d.ts +18 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +323 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/validations.d.ts +2 -0
- package/dist/lib/validations.d.ts.map +1 -0
- package/dist/lib/validations.js +16 -0
- package/dist/lib/validations.js.map +1 -0
- package/dist/package.json +68 -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/dist/sites/profile-website/src/lib/utils.d.ts +4 -0
- package/dist/sites/profile-website/src/lib/utils.d.ts.map +1 -0
- package/dist/sites/profile-website/src/lib/utils.js +32 -0
- package/dist/sites/profile-website/src/lib/utils.js.map +1 -0
- package/dist/sites/profile-website/tailwind.config.d.ts +3 -0
- package/dist/sites/profile-website/tailwind.config.d.ts.map +1 -0
- package/dist/sites/profile-website/tailwind.config.js +110 -0
- package/dist/sites/profile-website/tailwind.config.js.map +1 -0
- package/dist/test.d.ts +2 -0
- package/dist/test.d.ts.map +1 -0
- package/dist/test.js +38 -0
- package/dist/test.js.map +1 -0
- package/index.ts +190 -0
- package/install.ps1 +5 -8
- package/install.sh +4 -5
- package/lib/client.ts +292 -0
- package/lib/commands/config.ts +493 -0
- package/lib/commands/db.ts +324 -0
- package/lib/commands/errors.ts +93 -0
- package/lib/commands/generic.ts +440 -0
- package/lib/commands/init.ts +713 -0
- package/lib/commands/pull.ts +944 -0
- package/lib/commands/push.ts +2355 -0
- package/lib/commands/run.ts +416 -0
- package/lib/commands/schema.ts +103 -0
- 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 +220 -0
- package/lib/commands/update.ts +245 -0
- package/lib/commands/utils/attributes.ts +734 -0
- package/lib/commands/utils/change-approval.ts +186 -0
- package/lib/commands/utils/database-sync.ts +180 -0
- package/lib/commands/utils/deployment.ts +180 -0
- package/lib/commands/utils/error-formatter.ts +417 -0
- package/lib/commands/utils/pools.ts +354 -0
- package/lib/config.ts +932 -0
- package/lib/emulation/docker.ts +312 -0
- package/lib/emulation/utils.ts +207 -0
- package/lib/id.ts +30 -0
- package/lib/paginate.ts +77 -0
- package/lib/parser.ts +264 -0
- package/lib/questions.ts +1167 -0
- package/lib/sdks.ts +84 -0
- package/lib/services.ts +72 -0
- package/lib/spinner.ts +131 -0
- package/lib/type-generation/attribute.ts +18 -0
- package/lib/type-generation/languages/csharp.ts +192 -0
- package/lib/type-generation/languages/dart.ts +217 -0
- package/lib/type-generation/languages/java.ts +152 -0
- package/lib/type-generation/languages/javascript.ts +122 -0
- package/lib/type-generation/languages/kotlin.ts +107 -0
- package/lib/type-generation/languages/language.ts +127 -0
- package/lib/type-generation/languages/php.ts +128 -0
- package/lib/type-generation/languages/swift.ts +191 -0
- package/lib/type-generation/languages/typescript.ts +133 -0
- package/lib/types.ts +75 -0
- package/lib/utils.ts +394 -0
- package/lib/validations.ts +20 -0
- package/package.json +39 -21
- package/scoop/appwrite.config.json +20 -0
- package/scripts/generate-commands.ts +539 -0
- package/tsconfig.json +24 -0
- package/appwrite.config.json +0 -420
- 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 -4
- package/docs/examples/account/create-j-w-t.md +0 -1
- package/docs/examples/account/create-magic-u-r-l-token.md +0 -5
- 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-auth2session.md +0 -5
- package/docs/examples/account/create-o-auth2token.md +0 -5
- 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 -4
- 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 -5
- 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 -2
- package/docs/examples/account/list-logs.md +0 -2
- 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.md +0 -3
- package/docs/examples/account/update-m-f-a.md +0 -2
- package/docs/examples/account/update-magic-u-r-l-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-name.md +0 -2
- package/docs/examples/account/update-password.md +0 -3
- 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/avatars/get-browser.md +0 -5
- package/docs/examples/avatars/get-credit-card.md +0 -5
- package/docs/examples/avatars/get-favicon.md +0 -2
- package/docs/examples/avatars/get-flag.md +0 -5
- package/docs/examples/avatars/get-image.md +0 -4
- package/docs/examples/avatars/get-initials.md +0 -5
- package/docs/examples/avatars/get-q-r.md +0 -5
- 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 -7
- package/docs/examples/databases/create-collection.md +0 -7
- package/docs/examples/databases/create-datetime-attribute.md +0 -7
- package/docs/examples/databases/create-document.md +0 -6
- package/docs/examples/databases/create-documents.md +0 -4
- package/docs/examples/databases/create-email-attribute.md +0 -7
- package/docs/examples/databases/create-enum-attribute.md +0 -8
- package/docs/examples/databases/create-float-attribute.md +0 -9
- package/docs/examples/databases/create-index.md +0 -8
- package/docs/examples/databases/create-integer-attribute.md +0 -9
- package/docs/examples/databases/create-ip-attribute.md +0 -7
- package/docs/examples/databases/create-relationship-attribute.md +0 -9
- package/docs/examples/databases/create-string-attribute.md +0 -9
- package/docs/examples/databases/create-url-attribute.md +0 -7
- package/docs/examples/databases/create.md +0 -4
- package/docs/examples/databases/decrement-document-attribute.md +0 -7
- 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 -4
- package/docs/examples/databases/delete-index.md +0 -4
- 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 -4
- package/docs/examples/databases/get-collection.md +0 -3
- package/docs/examples/databases/get-database-usage.md +0 -3
- package/docs/examples/databases/get-document.md +0 -5
- package/docs/examples/databases/get-index.md +0 -4
- 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 -7
- package/docs/examples/databases/list-attributes.md +0 -4
- package/docs/examples/databases/list-collection-logs.md +0 -4
- package/docs/examples/databases/list-collections.md +0 -4
- package/docs/examples/databases/list-document-logs.md +0 -5
- package/docs/examples/databases/list-documents.md +0 -4
- package/docs/examples/databases/list-indexes.md +0 -4
- package/docs/examples/databases/list-logs.md +0 -3
- package/docs/examples/databases/list-usage.md +0 -2
- package/docs/examples/databases/list.md +0 -3
- package/docs/examples/databases/update-boolean-attribute.md +0 -7
- package/docs/examples/databases/update-collection.md +0 -7
- package/docs/examples/databases/update-datetime-attribute.md +0 -7
- package/docs/examples/databases/update-document.md +0 -6
- package/docs/examples/databases/update-documents.md +0 -5
- package/docs/examples/databases/update-email-attribute.md +0 -7
- package/docs/examples/databases/update-enum-attribute.md +0 -8
- package/docs/examples/databases/update-float-attribute.md +0 -9
- package/docs/examples/databases/update-integer-attribute.md +0 -9
- package/docs/examples/databases/update-ip-attribute.md +0 -7
- package/docs/examples/databases/update-relationship-attribute.md +0 -6
- package/docs/examples/databases/update-string-attribute.md +0 -8
- package/docs/examples/databases/update-url-attribute.md +0 -7
- package/docs/examples/databases/update.md +0 -4
- package/docs/examples/databases/upsert-document.md +0 -6
- package/docs/examples/databases/upsert-documents.md +0 -4
- package/docs/examples/functions/create-deployment.md +0 -6
- package/docs/examples/functions/create-duplicate-deployment.md +0 -4
- package/docs/examples/functions/create-execution.md +0 -8
- package/docs/examples/functions/create-template-deployment.md +0 -7
- package/docs/examples/functions/create-variable.md +0 -5
- package/docs/examples/functions/create-vcs-deployment.md +0 -5
- package/docs/examples/functions/create.md +0 -19
- 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 -4
- 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 -3
- 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 -4
- package/docs/examples/functions/list-executions.md +0 -3
- 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 -5
- package/docs/examples/functions/list-usage.md +0 -2
- package/docs/examples/functions/list-variables.md +0 -2
- package/docs/examples/functions/list.md +0 -3
- 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 -6
- package/docs/examples/functions/update.md +0 -19
- 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 -2
- package/docs/examples/health/get-d-b.md +0 -1
- package/docs/examples/health/get-failed-jobs.md +0 -3
- package/docs/examples/health/get-pub-sub.md +0 -1
- package/docs/examples/health/get-queue-builds.md +0 -2
- package/docs/examples/health/get-queue-certificates.md +0 -2
- package/docs/examples/health/get-queue-databases.md +0 -3
- package/docs/examples/health/get-queue-deletes.md +0 -2
- package/docs/examples/health/get-queue-functions.md +0 -2
- package/docs/examples/health/get-queue-logs.md +0 -2
- package/docs/examples/health/get-queue-mails.md +0 -2
- package/docs/examples/health/get-queue-messaging.md +0 -2
- package/docs/examples/health/get-queue-migrations.md +0 -2
- package/docs/examples/health/get-queue-stats-resources.md +0 -2
- package/docs/examples/health/get-queue-usage.md +0 -2
- package/docs/examples/health/get-queue-webhooks.md +0 -2
- 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-e-u.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 -9
- package/docs/examples/messaging/create-email.md +0 -13
- package/docs/examples/messaging/create-fcm-provider.md +0 -5
- package/docs/examples/messaging/create-mailgun-provider.md +0 -11
- package/docs/examples/messaging/create-msg91provider.md +0 -7
- package/docs/examples/messaging/create-push.md +0 -20
- package/docs/examples/messaging/create-sendgrid-provider.md +0 -9
- package/docs/examples/messaging/create-sms.md +0 -8
- package/docs/examples/messaging/create-smtp-provider.md +0 -15
- package/docs/examples/messaging/create-subscriber.md +0 -4
- package/docs/examples/messaging/create-telesign-provider.md +0 -7
- package/docs/examples/messaging/create-textmagic-provider.md +0 -7
- package/docs/examples/messaging/create-topic.md +0 -4
- package/docs/examples/messaging/create-twilio-provider.md +0 -7
- package/docs/examples/messaging/create-vonage-provider.md +0 -7
- 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 -3
- package/docs/examples/messaging/list-messages.md +0 -3
- package/docs/examples/messaging/list-provider-logs.md +0 -3
- package/docs/examples/messaging/list-providers.md +0 -3
- package/docs/examples/messaging/list-subscriber-logs.md +0 -3
- package/docs/examples/messaging/list-subscribers.md +0 -4
- package/docs/examples/messaging/list-targets.md +0 -3
- package/docs/examples/messaging/list-topic-logs.md +0 -3
- package/docs/examples/messaging/list-topics.md +0 -3
- package/docs/examples/messaging/update-apns-provider.md +0 -9
- package/docs/examples/messaging/update-email.md +0 -13
- package/docs/examples/messaging/update-fcm-provider.md +0 -5
- package/docs/examples/messaging/update-mailgun-provider.md +0 -11
- package/docs/examples/messaging/update-msg91provider.md +0 -7
- package/docs/examples/messaging/update-push.md +0 -20
- package/docs/examples/messaging/update-sendgrid-provider.md +0 -9
- package/docs/examples/messaging/update-sms.md +0 -8
- package/docs/examples/messaging/update-smtp-provider.md +0 -15
- package/docs/examples/messaging/update-telesign-provider.md +0 -7
- package/docs/examples/messaging/update-textmagic-provider.md +0 -7
- package/docs/examples/messaging/update-topic.md +0 -4
- package/docs/examples/messaging/update-twilio-provider.md +0 -7
- package/docs/examples/messaging/update-vonage-provider.md +0 -7
- package/docs/examples/migrations/create-appwrite-migration.md +0 -5
- package/docs/examples/migrations/create-csv-migration.md +0 -4
- package/docs/examples/migrations/create-firebase-migration.md +0 -3
- package/docs/examples/migrations/create-n-host-migration.md +0 -9
- package/docs/examples/migrations/create-supabase-migration.md +0 -8
- 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 -9
- package/docs/examples/migrations/get-supabase-report.md +0 -8
- package/docs/examples/migrations/get.md +0 -2
- package/docs/examples/migrations/list.md +0 -3
- package/docs/examples/migrations/retry.md +0 -2
- package/docs/examples/project/create-variable.md +0 -4
- package/docs/examples/project/delete-variable.md +0 -2
- package/docs/examples/project/get-usage.md +0 -4
- 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 -5
- package/docs/examples/projects/create-dev-key.md +0 -4
- package/docs/examples/projects/create-j-w-t.md +0 -4
- package/docs/examples/projects/create-key.md +0 -5
- package/docs/examples/projects/create-platform.md +0 -7
- package/docs/examples/projects/create-smtp-test.md +0 -11
- package/docs/examples/projects/create-webhook.md +0 -9
- package/docs/examples/projects/create.md +0 -14
- 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 -3
- 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 -3
- 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 -9
- package/docs/examples/projects/update-key.md +0 -6
- 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-auth2.md +0 -6
- package/docs/examples/projects/update-personal-data-check.md +0 -3
- package/docs/examples/projects/update-platform.md +0 -7
- 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 -11
- 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 -10
- package/docs/examples/projects/update.md +0 -12
- package/docs/examples/proxy/create-a-p-i-rule.md +0 -2
- package/docs/examples/proxy/create-function-rule.md +0 -4
- package/docs/examples/proxy/create-redirect-rule.md +0 -6
- package/docs/examples/proxy/create-site-rule.md +0 -4
- 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 -3
- package/docs/examples/proxy/update-rule-verification.md +0 -2
- package/docs/examples/sites/create-deployment.md +0 -7
- 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 -5
- package/docs/examples/sites/create-vcs-deployment.md +0 -5
- package/docs/examples/sites/create.md +0 -19
- 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 -4
- 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 -3
- 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 -4
- package/docs/examples/sites/list-frameworks.md +0 -1
- package/docs/examples/sites/list-logs.md +0 -3
- package/docs/examples/sites/list-specifications.md +0 -1
- package/docs/examples/sites/list-templates.md +0 -5
- package/docs/examples/sites/list-usage.md +0 -2
- package/docs/examples/sites/list-variables.md +0 -2
- package/docs/examples/sites/list.md +0 -3
- 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 -6
- package/docs/examples/sites/update.md +0 -19
- package/docs/examples/storage/create-bucket.md +0 -11
- package/docs/examples/storage/create-file.md +0 -5
- 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 -3
- package/docs/examples/storage/get-bucket.md +0 -2
- package/docs/examples/storage/get-file-download.md +0 -4
- package/docs/examples/storage/get-file-preview.md +0 -15
- package/docs/examples/storage/get-file-view.md +0 -4
- package/docs/examples/storage/get-file.md +0 -3
- package/docs/examples/storage/get-usage.md +0 -2
- package/docs/examples/storage/list-buckets.md +0 -3
- package/docs/examples/storage/list-files.md +0 -4
- package/docs/examples/storage/update-bucket.md +0 -11
- package/docs/examples/storage/update-file.md +0 -5
- package/docs/examples/tables/create-boolean-column.md +0 -7
- package/docs/examples/tables/create-datetime-column.md +0 -7
- package/docs/examples/tables/create-email-column.md +0 -7
- package/docs/examples/tables/create-enum-column.md +0 -8
- package/docs/examples/tables/create-float-column.md +0 -9
- package/docs/examples/tables/create-index.md +0 -8
- package/docs/examples/tables/create-integer-column.md +0 -9
- package/docs/examples/tables/create-ip-column.md +0 -7
- package/docs/examples/tables/create-relationship-column.md +0 -9
- package/docs/examples/tables/create-row.md +0 -6
- package/docs/examples/tables/create-rows.md +0 -4
- package/docs/examples/tables/create-string-column.md +0 -9
- package/docs/examples/tables/create-url-column.md +0 -7
- package/docs/examples/tables/create.md +0 -7
- package/docs/examples/tables/decrement-row-column.md +0 -7
- package/docs/examples/tables/delete-column.md +0 -4
- package/docs/examples/tables/delete-index.md +0 -4
- package/docs/examples/tables/delete-row.md +0 -4
- package/docs/examples/tables/delete-rows.md +0 -4
- package/docs/examples/tables/delete.md +0 -3
- package/docs/examples/tables/get-column.md +0 -4
- package/docs/examples/tables/get-index.md +0 -4
- package/docs/examples/tables/get-row.md +0 -5
- package/docs/examples/tables/get-usage.md +0 -4
- package/docs/examples/tables/get.md +0 -3
- package/docs/examples/tables/increment-row-column.md +0 -7
- package/docs/examples/tables/list-columns.md +0 -4
- package/docs/examples/tables/list-indexes.md +0 -4
- package/docs/examples/tables/list-logs.md +0 -4
- package/docs/examples/tables/list-row-logs.md +0 -5
- package/docs/examples/tables/list-rows.md +0 -4
- package/docs/examples/tables/list.md +0 -4
- package/docs/examples/tables/update-boolean-column.md +0 -7
- package/docs/examples/tables/update-datetime-column.md +0 -7
- package/docs/examples/tables/update-email-column.md +0 -7
- package/docs/examples/tables/update-enum-column.md +0 -8
- package/docs/examples/tables/update-float-column.md +0 -9
- package/docs/examples/tables/update-integer-column.md +0 -9
- package/docs/examples/tables/update-ip-column.md +0 -7
- package/docs/examples/tables/update-relationship-column.md +0 -6
- package/docs/examples/tables/update-row.md +0 -6
- package/docs/examples/tables/update-rows.md +0 -5
- package/docs/examples/tables/update-string-column.md +0 -8
- package/docs/examples/tables/update-url-column.md +0 -7
- package/docs/examples/tables/update.md +0 -7
- package/docs/examples/tables/upsert-row.md +0 -4
- package/docs/examples/tables/upsert-rows.md +0 -3
- package/docs/examples/teams/create-membership.md +0 -8
- package/docs/examples/teams/create.md +0 -4
- 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 -3
- package/docs/examples/teams/list-memberships.md +0 -4
- package/docs/examples/teams/list.md +0 -3
- 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 -4
- package/docs/examples/tokens/delete.md +0 -2
- package/docs/examples/tokens/get.md +0 -2
- package/docs/examples/tokens/list.md +0 -4
- package/docs/examples/tokens/update.md +0 -3
- package/docs/examples/users/create-argon2user.md +0 -5
- package/docs/examples/users/create-bcrypt-user.md +0 -5
- package/docs/examples/users/create-j-w-t.md +0 -4
- package/docs/examples/users/create-m-d5user.md +0 -5
- package/docs/examples/users/create-mfa-recovery-codes.md +0 -2
- package/docs/examples/users/create-p-h-pass-user.md +0 -5
- package/docs/examples/users/create-s-h-a-user.md +0 -6
- package/docs/examples/users/create-scrypt-modified-user.md +0 -8
- package/docs/examples/users/create-scrypt-user.md +0 -10
- package/docs/examples/users/create-session.md +0 -2
- package/docs/examples/users/create-target.md +0 -7
- package/docs/examples/users/create-token.md +0 -4
- package/docs/examples/users/create.md +0 -6
- 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 -2
- package/docs/examples/users/get.md +0 -2
- package/docs/examples/users/list-identities.md +0 -3
- package/docs/examples/users/list-logs.md +0 -3
- package/docs/examples/users/list-memberships.md +0 -4
- 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 -3
- package/docs/examples/users/list.md +0 -3
- 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 -6
- package/docs/examples/vcs/create-repository-detection.md +0 -5
- 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 -5
- package/docs/examples/vcs/get-repository.md +0 -3
- package/docs/examples/vcs/list-installations.md +0 -3
- package/docs/examples/vcs/list-repositories.md +0 -4
- package/docs/examples/vcs/list-repository-branches.md +0 -3
- package/docs/examples/vcs/update-external-deployments.md +0 -4
- package/functions/Starter function/.prettierrc.json +0 -6
- package/functions/Starter function/README.md +0 -48
- package/functions/Starter function/package-lock.json +0 -60
- package/functions/Starter function/package.json +0 -16
- package/functions/Starter function/src/main.js +0 -35
- package/generate/appwrite.d.ts +0 -55
- package/generate/appwrite.db.ts +0 -75
- package/index.js +0 -109
- package/lib/client-generation/languages/typescript.js +0 -65
- package/lib/client.js +0 -259
- package/lib/commands/account.js +0 -2074
- package/lib/commands/avatars.js +0 -491
- package/lib/commands/console.js +0 -129
- package/lib/commands/databases.js +0 -2972
- package/lib/commands/functions.js +0 -1737
- package/lib/commands/generic.js +0 -328
- package/lib/commands/graphql.js +0 -128
- package/lib/commands/health.js +0 -891
- package/lib/commands/init.js +0 -566
- package/lib/commands/locale.js +0 -324
- package/lib/commands/messaging.js +0 -2970
- package/lib/commands/migrations.js +0 -751
- package/lib/commands/organizations.js +0 -48
- package/lib/commands/project.js +0 -308
- package/lib/commands/projects.js +0 -2615
- package/lib/commands/proxy.js +0 -406
- package/lib/commands/pull.js +0 -474
- package/lib/commands/push.js +0 -2117
- package/lib/commands/run.js +0 -330
- package/lib/commands/sites.js +0 -1663
- package/lib/commands/storage.js +0 -990
- package/lib/commands/tables.js +0 -2607
- package/lib/commands/teams.js +0 -682
- package/lib/commands/tokens.js +0 -261
- package/lib/commands/types.js +0 -191
- package/lib/commands/users.js +0 -2035
- package/lib/commands/vcs.js +0 -484
- package/lib/config.js +0 -717
- package/lib/emulation/docker.js +0 -264
- package/lib/emulation/utils.js +0 -186
- package/lib/exception.js +0 -9
- package/lib/id.js +0 -30
- package/lib/paginate.js +0 -52
- package/lib/parser.js +0 -246
- package/lib/questions.js +0 -1006
- package/lib/sdks.js +0 -60
- package/lib/spinner.js +0 -104
- package/lib/type-generation/attribute.js +0 -16
- package/lib/type-generation/languages/dart.js +0 -196
- package/lib/type-generation/languages/java.js +0 -130
- package/lib/type-generation/languages/javascript.js +0 -102
- package/lib/type-generation/languages/kotlin.js +0 -85
- package/lib/type-generation/languages/language.js +0 -125
- package/lib/type-generation/languages/php.js +0 -110
- package/lib/type-generation/languages/swift.js +0 -169
- package/lib/type-generation/languages/typescript.js +0 -105
- package/lib/utils.js +0 -289
- package/lib/validations.js +0 -17
- package/scoop/appwrite.json +0 -30
- package/sites/JavaScript starter2/.env.example +0 -3
- package/sites/JavaScript starter2/LICENSE +0 -21
- package/sites/JavaScript starter2/images/appwrite.svg +0 -8
- package/sites/JavaScript starter2/images/javascript.svg +0 -5
- package/sites/JavaScript starter2/index.html +0 -250
- package/sites/JavaScript starter2/lib/appwrite.js +0 -10
- package/sites/JavaScript starter2/package-lock.json +0 -1431
- package/sites/JavaScript starter2/package.json +0 -21
- package/sites/JavaScript starter2/readme.md +0 -26
- package/sites/JavaScript starter2/src/javascript.svg +0 -1
- package/sites/JavaScript starter2/style/app.css +0 -20
- package/sites/JavaScript starter2/vite.config.js +0 -7
package/lib/commands/account.js
DELETED
|
@@ -1,2074 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const pathLib = require('path');
|
|
3
|
-
const tar = require("tar");
|
|
4
|
-
const ignore = require("ignore");
|
|
5
|
-
const { promisify } = require('util');
|
|
6
|
-
const libClient = require('../client.js');
|
|
7
|
-
const { getAllFiles, showConsoleLink } = require('../utils.js');
|
|
8
|
-
const { Command } = require('commander');
|
|
9
|
-
const { sdkForProject, sdkForConsole } = require('../sdks')
|
|
10
|
-
const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser')
|
|
11
|
-
const { localConfig, globalConfig } = require("../config");
|
|
12
|
-
const { File } = require('undici');
|
|
13
|
-
const { ReadableStream } = require('stream/web');
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @param {fs.ReadStream} readStream
|
|
17
|
-
* @returns {ReadableStream}
|
|
18
|
-
*/
|
|
19
|
-
function convertReadStreamToReadableStream(readStream) {
|
|
20
|
-
return new ReadableStream({
|
|
21
|
-
start(controller) {
|
|
22
|
-
readStream.on("data", (chunk) => {
|
|
23
|
-
controller.enqueue(chunk);
|
|
24
|
-
});
|
|
25
|
-
readStream.on("end", () => {
|
|
26
|
-
controller.close();
|
|
27
|
-
});
|
|
28
|
-
readStream.on("error", (err) => {
|
|
29
|
-
controller.error(err);
|
|
30
|
-
});
|
|
31
|
-
},
|
|
32
|
-
cancel() {
|
|
33
|
-
readStream.destroy();
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const account = new Command("account").description(commandDescriptions['account'] ?? '').configureHelp({
|
|
39
|
-
helpWidth: process.stdout.columns || 80
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @typedef {Object} AccountGetRequestParams
|
|
44
|
-
* @property {boolean} overrideForCli
|
|
45
|
-
* @property {boolean} parseOutput
|
|
46
|
-
* @property {libClient | undefined} sdk
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @param {AccountGetRequestParams} params
|
|
51
|
-
*/
|
|
52
|
-
const accountGet = async ({parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
53
|
-
let client = !sdk ? await sdkForProject() :
|
|
54
|
-
sdk;
|
|
55
|
-
let apiPath = '/account';
|
|
56
|
-
let payload = {};
|
|
57
|
-
|
|
58
|
-
let response = undefined;
|
|
59
|
-
|
|
60
|
-
response = await client.call('get', apiPath, {
|
|
61
|
-
}, payload);
|
|
62
|
-
|
|
63
|
-
if (parseOutput) {
|
|
64
|
-
if(console) {
|
|
65
|
-
showConsoleLink('account', 'get');
|
|
66
|
-
} else {
|
|
67
|
-
parse(response)
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return response;
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @typedef {Object} AccountCreateRequestParams
|
|
77
|
-
* @property {string} userId User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
78
|
-
* @property {string} email User email.
|
|
79
|
-
* @property {string} password New user password. Must be between 8 and 256 chars.
|
|
80
|
-
* @property {string} name User name. Max length: 128 chars.
|
|
81
|
-
* @property {boolean} overrideForCli
|
|
82
|
-
* @property {boolean} parseOutput
|
|
83
|
-
* @property {libClient | undefined} sdk
|
|
84
|
-
*/
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* @param {AccountCreateRequestParams} params
|
|
88
|
-
*/
|
|
89
|
-
const accountCreate = async ({userId,email,password,name,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
90
|
-
let client = !sdk ? await sdkForProject() :
|
|
91
|
-
sdk;
|
|
92
|
-
let apiPath = '/account';
|
|
93
|
-
let payload = {};
|
|
94
|
-
if (typeof userId !== 'undefined') {
|
|
95
|
-
payload['userId'] = userId;
|
|
96
|
-
}
|
|
97
|
-
if (typeof email !== 'undefined') {
|
|
98
|
-
payload['email'] = email;
|
|
99
|
-
}
|
|
100
|
-
if (typeof password !== 'undefined') {
|
|
101
|
-
payload['password'] = password;
|
|
102
|
-
}
|
|
103
|
-
if (typeof name !== 'undefined') {
|
|
104
|
-
payload['name'] = name;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
let response = undefined;
|
|
108
|
-
|
|
109
|
-
response = await client.call('post', apiPath, {
|
|
110
|
-
'content-type': 'application/json',
|
|
111
|
-
}, payload);
|
|
112
|
-
|
|
113
|
-
if (parseOutput) {
|
|
114
|
-
parse(response)
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return response;
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* @typedef {Object} AccountDeleteRequestParams
|
|
123
|
-
* @property {boolean} overrideForCli
|
|
124
|
-
* @property {boolean} parseOutput
|
|
125
|
-
* @property {libClient | undefined} sdk
|
|
126
|
-
*/
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* @param {AccountDeleteRequestParams} params
|
|
130
|
-
*/
|
|
131
|
-
const accountDelete = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
132
|
-
let client = !sdk ? await sdkForProject() :
|
|
133
|
-
sdk;
|
|
134
|
-
let apiPath = '/account';
|
|
135
|
-
let payload = {};
|
|
136
|
-
|
|
137
|
-
let response = undefined;
|
|
138
|
-
|
|
139
|
-
response = await client.call('delete', apiPath, {
|
|
140
|
-
'content-type': 'application/json',
|
|
141
|
-
}, payload);
|
|
142
|
-
|
|
143
|
-
if (parseOutput) {
|
|
144
|
-
parse(response)
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
return response;
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* @typedef {Object} AccountUpdateEmailRequestParams
|
|
153
|
-
* @property {string} email User email.
|
|
154
|
-
* @property {string} password User password. Must be at least 8 chars.
|
|
155
|
-
* @property {boolean} overrideForCli
|
|
156
|
-
* @property {boolean} parseOutput
|
|
157
|
-
* @property {libClient | undefined} sdk
|
|
158
|
-
*/
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* @param {AccountUpdateEmailRequestParams} params
|
|
162
|
-
*/
|
|
163
|
-
const accountUpdateEmail = async ({email,password,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
164
|
-
let client = !sdk ? await sdkForProject() :
|
|
165
|
-
sdk;
|
|
166
|
-
let apiPath = '/account/email';
|
|
167
|
-
let payload = {};
|
|
168
|
-
if (typeof email !== 'undefined') {
|
|
169
|
-
payload['email'] = email;
|
|
170
|
-
}
|
|
171
|
-
if (typeof password !== 'undefined') {
|
|
172
|
-
payload['password'] = password;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
let response = undefined;
|
|
176
|
-
|
|
177
|
-
response = await client.call('patch', apiPath, {
|
|
178
|
-
'content-type': 'application/json',
|
|
179
|
-
}, payload);
|
|
180
|
-
|
|
181
|
-
if (parseOutput) {
|
|
182
|
-
parse(response)
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return response;
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* @typedef {Object} AccountListIdentitiesRequestParams
|
|
191
|
-
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
|
|
192
|
-
* @property {boolean} overrideForCli
|
|
193
|
-
* @property {boolean} parseOutput
|
|
194
|
-
* @property {libClient | undefined} sdk
|
|
195
|
-
*/
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* @param {AccountListIdentitiesRequestParams} params
|
|
199
|
-
*/
|
|
200
|
-
const accountListIdentities = async ({queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
201
|
-
let client = !sdk ? await sdkForProject() :
|
|
202
|
-
sdk;
|
|
203
|
-
let apiPath = '/account/identities';
|
|
204
|
-
let payload = {};
|
|
205
|
-
if (typeof queries !== 'undefined') {
|
|
206
|
-
payload['queries'] = queries;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
let response = undefined;
|
|
210
|
-
|
|
211
|
-
response = await client.call('get', apiPath, {
|
|
212
|
-
}, payload);
|
|
213
|
-
|
|
214
|
-
if (parseOutput) {
|
|
215
|
-
parse(response)
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
return response;
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* @typedef {Object} AccountDeleteIdentityRequestParams
|
|
224
|
-
* @property {string} identityId Identity ID.
|
|
225
|
-
* @property {boolean} overrideForCli
|
|
226
|
-
* @property {boolean} parseOutput
|
|
227
|
-
* @property {libClient | undefined} sdk
|
|
228
|
-
*/
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* @param {AccountDeleteIdentityRequestParams} params
|
|
232
|
-
*/
|
|
233
|
-
const accountDeleteIdentity = async ({identityId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
234
|
-
let client = !sdk ? await sdkForProject() :
|
|
235
|
-
sdk;
|
|
236
|
-
let apiPath = '/account/identities/{identityId}'.replace('{identityId}', identityId);
|
|
237
|
-
let payload = {};
|
|
238
|
-
|
|
239
|
-
let response = undefined;
|
|
240
|
-
|
|
241
|
-
response = await client.call('delete', apiPath, {
|
|
242
|
-
'content-type': 'application/json',
|
|
243
|
-
}, payload);
|
|
244
|
-
|
|
245
|
-
if (parseOutput) {
|
|
246
|
-
parse(response)
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
return response;
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* @typedef {Object} AccountCreateJWTRequestParams
|
|
255
|
-
* @property {boolean} overrideForCli
|
|
256
|
-
* @property {boolean} parseOutput
|
|
257
|
-
* @property {libClient | undefined} sdk
|
|
258
|
-
*/
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* @param {AccountCreateJWTRequestParams} params
|
|
262
|
-
*/
|
|
263
|
-
const accountCreateJWT = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
264
|
-
let client = !sdk ? await sdkForProject() :
|
|
265
|
-
sdk;
|
|
266
|
-
let apiPath = '/account/jwts';
|
|
267
|
-
let payload = {};
|
|
268
|
-
|
|
269
|
-
let response = undefined;
|
|
270
|
-
|
|
271
|
-
response = await client.call('post', apiPath, {
|
|
272
|
-
'content-type': 'application/json',
|
|
273
|
-
}, payload);
|
|
274
|
-
|
|
275
|
-
if (parseOutput) {
|
|
276
|
-
parse(response)
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return response;
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* @typedef {Object} AccountListLogsRequestParams
|
|
285
|
-
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
286
|
-
* @property {boolean} overrideForCli
|
|
287
|
-
* @property {boolean} parseOutput
|
|
288
|
-
* @property {libClient | undefined} sdk
|
|
289
|
-
*/
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* @param {AccountListLogsRequestParams} params
|
|
293
|
-
*/
|
|
294
|
-
const accountListLogs = async ({queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
295
|
-
let client = !sdk ? await sdkForProject() :
|
|
296
|
-
sdk;
|
|
297
|
-
let apiPath = '/account/logs';
|
|
298
|
-
let payload = {};
|
|
299
|
-
if (typeof queries !== 'undefined') {
|
|
300
|
-
payload['queries'] = queries;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
let response = undefined;
|
|
304
|
-
|
|
305
|
-
response = await client.call('get', apiPath, {
|
|
306
|
-
}, payload);
|
|
307
|
-
|
|
308
|
-
if (parseOutput) {
|
|
309
|
-
parse(response)
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
return response;
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* @typedef {Object} AccountUpdateMFARequestParams
|
|
318
|
-
* @property {boolean} mfa Enable or disable MFA.
|
|
319
|
-
* @property {boolean} overrideForCli
|
|
320
|
-
* @property {boolean} parseOutput
|
|
321
|
-
* @property {libClient | undefined} sdk
|
|
322
|
-
*/
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* @param {AccountUpdateMFARequestParams} params
|
|
326
|
-
*/
|
|
327
|
-
const accountUpdateMFA = async ({mfa,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
328
|
-
let client = !sdk ? await sdkForProject() :
|
|
329
|
-
sdk;
|
|
330
|
-
let apiPath = '/account/mfa';
|
|
331
|
-
let payload = {};
|
|
332
|
-
if (typeof mfa !== 'undefined') {
|
|
333
|
-
payload['mfa'] = mfa;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
let response = undefined;
|
|
337
|
-
|
|
338
|
-
response = await client.call('patch', apiPath, {
|
|
339
|
-
'content-type': 'application/json',
|
|
340
|
-
}, payload);
|
|
341
|
-
|
|
342
|
-
if (parseOutput) {
|
|
343
|
-
parse(response)
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
return response;
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* @typedef {Object} AccountCreateMfaAuthenticatorRequestParams
|
|
352
|
-
* @property {AuthenticatorType} type Type of authenticator. Must be 'totp'
|
|
353
|
-
* @property {boolean} overrideForCli
|
|
354
|
-
* @property {boolean} parseOutput
|
|
355
|
-
* @property {libClient | undefined} sdk
|
|
356
|
-
*/
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* @param {AccountCreateMfaAuthenticatorRequestParams} params
|
|
360
|
-
*/
|
|
361
|
-
const accountCreateMfaAuthenticator = async ({type,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
362
|
-
let client = !sdk ? await sdkForProject() :
|
|
363
|
-
sdk;
|
|
364
|
-
let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
|
|
365
|
-
let payload = {};
|
|
366
|
-
|
|
367
|
-
let response = undefined;
|
|
368
|
-
|
|
369
|
-
response = await client.call('post', apiPath, {
|
|
370
|
-
'content-type': 'application/json',
|
|
371
|
-
}, payload);
|
|
372
|
-
|
|
373
|
-
if (parseOutput) {
|
|
374
|
-
parse(response)
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
return response;
|
|
378
|
-
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* @typedef {Object} AccountUpdateMfaAuthenticatorRequestParams
|
|
383
|
-
* @property {AuthenticatorType} type Type of authenticator.
|
|
384
|
-
* @property {string} otp Valid verification token.
|
|
385
|
-
* @property {boolean} overrideForCli
|
|
386
|
-
* @property {boolean} parseOutput
|
|
387
|
-
* @property {libClient | undefined} sdk
|
|
388
|
-
*/
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* @param {AccountUpdateMfaAuthenticatorRequestParams} params
|
|
392
|
-
*/
|
|
393
|
-
const accountUpdateMfaAuthenticator = async ({type,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
394
|
-
let client = !sdk ? await sdkForProject() :
|
|
395
|
-
sdk;
|
|
396
|
-
let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
|
|
397
|
-
let payload = {};
|
|
398
|
-
if (typeof otp !== 'undefined') {
|
|
399
|
-
payload['otp'] = otp;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
let response = undefined;
|
|
403
|
-
|
|
404
|
-
response = await client.call('put', apiPath, {
|
|
405
|
-
'content-type': 'application/json',
|
|
406
|
-
}, payload);
|
|
407
|
-
|
|
408
|
-
if (parseOutput) {
|
|
409
|
-
parse(response)
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
return response;
|
|
413
|
-
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* @typedef {Object} AccountDeleteMfaAuthenticatorRequestParams
|
|
418
|
-
* @property {AuthenticatorType} type Type of authenticator.
|
|
419
|
-
* @property {boolean} overrideForCli
|
|
420
|
-
* @property {boolean} parseOutput
|
|
421
|
-
* @property {libClient | undefined} sdk
|
|
422
|
-
*/
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* @param {AccountDeleteMfaAuthenticatorRequestParams} params
|
|
426
|
-
*/
|
|
427
|
-
const accountDeleteMfaAuthenticator = async ({type,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
428
|
-
let client = !sdk ? await sdkForProject() :
|
|
429
|
-
sdk;
|
|
430
|
-
let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
|
|
431
|
-
let payload = {};
|
|
432
|
-
|
|
433
|
-
let response = undefined;
|
|
434
|
-
|
|
435
|
-
response = await client.call('delete', apiPath, {
|
|
436
|
-
'content-type': 'application/json',
|
|
437
|
-
}, payload);
|
|
438
|
-
|
|
439
|
-
if (parseOutput) {
|
|
440
|
-
parse(response)
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
return response;
|
|
444
|
-
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
* @typedef {Object} AccountCreateMfaChallengeRequestParams
|
|
449
|
-
* @property {AuthenticationFactor} factor Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'.
|
|
450
|
-
* @property {boolean} overrideForCli
|
|
451
|
-
* @property {boolean} parseOutput
|
|
452
|
-
* @property {libClient | undefined} sdk
|
|
453
|
-
*/
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* @param {AccountCreateMfaChallengeRequestParams} params
|
|
457
|
-
*/
|
|
458
|
-
const accountCreateMfaChallenge = async ({factor,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
459
|
-
let client = !sdk ? await sdkForProject() :
|
|
460
|
-
sdk;
|
|
461
|
-
let apiPath = '/account/mfa/challenge';
|
|
462
|
-
let payload = {};
|
|
463
|
-
if (typeof factor !== 'undefined') {
|
|
464
|
-
payload['factor'] = factor;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
let response = undefined;
|
|
468
|
-
|
|
469
|
-
response = await client.call('post', apiPath, {
|
|
470
|
-
'content-type': 'application/json',
|
|
471
|
-
}, payload);
|
|
472
|
-
|
|
473
|
-
if (parseOutput) {
|
|
474
|
-
parse(response)
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
return response;
|
|
478
|
-
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* @typedef {Object} AccountUpdateMfaChallengeRequestParams
|
|
483
|
-
* @property {string} challengeId ID of the challenge.
|
|
484
|
-
* @property {string} otp Valid verification token.
|
|
485
|
-
* @property {boolean} overrideForCli
|
|
486
|
-
* @property {boolean} parseOutput
|
|
487
|
-
* @property {libClient | undefined} sdk
|
|
488
|
-
*/
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* @param {AccountUpdateMfaChallengeRequestParams} params
|
|
492
|
-
*/
|
|
493
|
-
const accountUpdateMfaChallenge = async ({challengeId,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
494
|
-
let client = !sdk ? await sdkForProject() :
|
|
495
|
-
sdk;
|
|
496
|
-
let apiPath = '/account/mfa/challenge';
|
|
497
|
-
let payload = {};
|
|
498
|
-
if (typeof challengeId !== 'undefined') {
|
|
499
|
-
payload['challengeId'] = challengeId;
|
|
500
|
-
}
|
|
501
|
-
if (typeof otp !== 'undefined') {
|
|
502
|
-
payload['otp'] = otp;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
let response = undefined;
|
|
506
|
-
|
|
507
|
-
response = await client.call('put', apiPath, {
|
|
508
|
-
'content-type': 'application/json',
|
|
509
|
-
}, payload);
|
|
510
|
-
|
|
511
|
-
if (parseOutput) {
|
|
512
|
-
parse(response)
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
return response;
|
|
516
|
-
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* @typedef {Object} AccountListMfaFactorsRequestParams
|
|
521
|
-
* @property {boolean} overrideForCli
|
|
522
|
-
* @property {boolean} parseOutput
|
|
523
|
-
* @property {libClient | undefined} sdk
|
|
524
|
-
*/
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* @param {AccountListMfaFactorsRequestParams} params
|
|
528
|
-
*/
|
|
529
|
-
const accountListMfaFactors = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
530
|
-
let client = !sdk ? await sdkForProject() :
|
|
531
|
-
sdk;
|
|
532
|
-
let apiPath = '/account/mfa/factors';
|
|
533
|
-
let payload = {};
|
|
534
|
-
|
|
535
|
-
let response = undefined;
|
|
536
|
-
|
|
537
|
-
response = await client.call('get', apiPath, {
|
|
538
|
-
}, payload);
|
|
539
|
-
|
|
540
|
-
if (parseOutput) {
|
|
541
|
-
parse(response)
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
return response;
|
|
545
|
-
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
/**
|
|
549
|
-
* @typedef {Object} AccountGetMfaRecoveryCodesRequestParams
|
|
550
|
-
* @property {boolean} overrideForCli
|
|
551
|
-
* @property {boolean} parseOutput
|
|
552
|
-
* @property {libClient | undefined} sdk
|
|
553
|
-
*/
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
* @param {AccountGetMfaRecoveryCodesRequestParams} params
|
|
557
|
-
*/
|
|
558
|
-
const accountGetMfaRecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
559
|
-
let client = !sdk ? await sdkForProject() :
|
|
560
|
-
sdk;
|
|
561
|
-
let apiPath = '/account/mfa/recovery-codes';
|
|
562
|
-
let payload = {};
|
|
563
|
-
|
|
564
|
-
let response = undefined;
|
|
565
|
-
|
|
566
|
-
response = await client.call('get', apiPath, {
|
|
567
|
-
}, payload);
|
|
568
|
-
|
|
569
|
-
if (parseOutput) {
|
|
570
|
-
parse(response)
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
return response;
|
|
574
|
-
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
/**
|
|
578
|
-
* @typedef {Object} AccountCreateMfaRecoveryCodesRequestParams
|
|
579
|
-
* @property {boolean} overrideForCli
|
|
580
|
-
* @property {boolean} parseOutput
|
|
581
|
-
* @property {libClient | undefined} sdk
|
|
582
|
-
*/
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* @param {AccountCreateMfaRecoveryCodesRequestParams} params
|
|
586
|
-
*/
|
|
587
|
-
const accountCreateMfaRecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
588
|
-
let client = !sdk ? await sdkForProject() :
|
|
589
|
-
sdk;
|
|
590
|
-
let apiPath = '/account/mfa/recovery-codes';
|
|
591
|
-
let payload = {};
|
|
592
|
-
|
|
593
|
-
let response = undefined;
|
|
594
|
-
|
|
595
|
-
response = await client.call('post', apiPath, {
|
|
596
|
-
'content-type': 'application/json',
|
|
597
|
-
}, payload);
|
|
598
|
-
|
|
599
|
-
if (parseOutput) {
|
|
600
|
-
parse(response)
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
return response;
|
|
604
|
-
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* @typedef {Object} AccountUpdateMfaRecoveryCodesRequestParams
|
|
609
|
-
* @property {boolean} overrideForCli
|
|
610
|
-
* @property {boolean} parseOutput
|
|
611
|
-
* @property {libClient | undefined} sdk
|
|
612
|
-
*/
|
|
613
|
-
|
|
614
|
-
/**
|
|
615
|
-
* @param {AccountUpdateMfaRecoveryCodesRequestParams} params
|
|
616
|
-
*/
|
|
617
|
-
const accountUpdateMfaRecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
618
|
-
let client = !sdk ? await sdkForProject() :
|
|
619
|
-
sdk;
|
|
620
|
-
let apiPath = '/account/mfa/recovery-codes';
|
|
621
|
-
let payload = {};
|
|
622
|
-
|
|
623
|
-
let response = undefined;
|
|
624
|
-
|
|
625
|
-
response = await client.call('patch', apiPath, {
|
|
626
|
-
'content-type': 'application/json',
|
|
627
|
-
}, payload);
|
|
628
|
-
|
|
629
|
-
if (parseOutput) {
|
|
630
|
-
parse(response)
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
return response;
|
|
634
|
-
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
/**
|
|
638
|
-
* @typedef {Object} AccountUpdateNameRequestParams
|
|
639
|
-
* @property {string} name User name. Max length: 128 chars.
|
|
640
|
-
* @property {boolean} overrideForCli
|
|
641
|
-
* @property {boolean} parseOutput
|
|
642
|
-
* @property {libClient | undefined} sdk
|
|
643
|
-
*/
|
|
644
|
-
|
|
645
|
-
/**
|
|
646
|
-
* @param {AccountUpdateNameRequestParams} params
|
|
647
|
-
*/
|
|
648
|
-
const accountUpdateName = async ({name,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
649
|
-
let client = !sdk ? await sdkForProject() :
|
|
650
|
-
sdk;
|
|
651
|
-
let apiPath = '/account/name';
|
|
652
|
-
let payload = {};
|
|
653
|
-
if (typeof name !== 'undefined') {
|
|
654
|
-
payload['name'] = name;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
let response = undefined;
|
|
658
|
-
|
|
659
|
-
response = await client.call('patch', apiPath, {
|
|
660
|
-
'content-type': 'application/json',
|
|
661
|
-
}, payload);
|
|
662
|
-
|
|
663
|
-
if (parseOutput) {
|
|
664
|
-
parse(response)
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
return response;
|
|
668
|
-
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* @typedef {Object} AccountUpdatePasswordRequestParams
|
|
673
|
-
* @property {string} password New user password. Must be at least 8 chars.
|
|
674
|
-
* @property {string} oldPassword Current user password. Must be at least 8 chars.
|
|
675
|
-
* @property {boolean} overrideForCli
|
|
676
|
-
* @property {boolean} parseOutput
|
|
677
|
-
* @property {libClient | undefined} sdk
|
|
678
|
-
*/
|
|
679
|
-
|
|
680
|
-
/**
|
|
681
|
-
* @param {AccountUpdatePasswordRequestParams} params
|
|
682
|
-
*/
|
|
683
|
-
const accountUpdatePassword = async ({password,oldPassword,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
684
|
-
let client = !sdk ? await sdkForProject() :
|
|
685
|
-
sdk;
|
|
686
|
-
let apiPath = '/account/password';
|
|
687
|
-
let payload = {};
|
|
688
|
-
if (typeof password !== 'undefined') {
|
|
689
|
-
payload['password'] = password;
|
|
690
|
-
}
|
|
691
|
-
if (typeof oldPassword !== 'undefined') {
|
|
692
|
-
payload['oldPassword'] = oldPassword;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
let response = undefined;
|
|
696
|
-
|
|
697
|
-
response = await client.call('patch', apiPath, {
|
|
698
|
-
'content-type': 'application/json',
|
|
699
|
-
}, payload);
|
|
700
|
-
|
|
701
|
-
if (parseOutput) {
|
|
702
|
-
parse(response)
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
return response;
|
|
706
|
-
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
/**
|
|
710
|
-
* @typedef {Object} AccountUpdatePhoneRequestParams
|
|
711
|
-
* @property {string} phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
712
|
-
* @property {string} password User password. Must be at least 8 chars.
|
|
713
|
-
* @property {boolean} overrideForCli
|
|
714
|
-
* @property {boolean} parseOutput
|
|
715
|
-
* @property {libClient | undefined} sdk
|
|
716
|
-
*/
|
|
717
|
-
|
|
718
|
-
/**
|
|
719
|
-
* @param {AccountUpdatePhoneRequestParams} params
|
|
720
|
-
*/
|
|
721
|
-
const accountUpdatePhone = async ({phone,password,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
722
|
-
let client = !sdk ? await sdkForProject() :
|
|
723
|
-
sdk;
|
|
724
|
-
let apiPath = '/account/phone';
|
|
725
|
-
let payload = {};
|
|
726
|
-
if (typeof phone !== 'undefined') {
|
|
727
|
-
payload['phone'] = phone;
|
|
728
|
-
}
|
|
729
|
-
if (typeof password !== 'undefined') {
|
|
730
|
-
payload['password'] = password;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
let response = undefined;
|
|
734
|
-
|
|
735
|
-
response = await client.call('patch', apiPath, {
|
|
736
|
-
'content-type': 'application/json',
|
|
737
|
-
}, payload);
|
|
738
|
-
|
|
739
|
-
if (parseOutput) {
|
|
740
|
-
parse(response)
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
return response;
|
|
744
|
-
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
/**
|
|
748
|
-
* @typedef {Object} AccountGetPrefsRequestParams
|
|
749
|
-
* @property {boolean} overrideForCli
|
|
750
|
-
* @property {boolean} parseOutput
|
|
751
|
-
* @property {libClient | undefined} sdk
|
|
752
|
-
*/
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* @param {AccountGetPrefsRequestParams} params
|
|
756
|
-
*/
|
|
757
|
-
const accountGetPrefs = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
758
|
-
let client = !sdk ? await sdkForProject() :
|
|
759
|
-
sdk;
|
|
760
|
-
let apiPath = '/account/prefs';
|
|
761
|
-
let payload = {};
|
|
762
|
-
|
|
763
|
-
let response = undefined;
|
|
764
|
-
|
|
765
|
-
response = await client.call('get', apiPath, {
|
|
766
|
-
}, payload);
|
|
767
|
-
|
|
768
|
-
if (parseOutput) {
|
|
769
|
-
parse(response)
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
return response;
|
|
773
|
-
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
* @typedef {Object} AccountUpdatePrefsRequestParams
|
|
778
|
-
* @property {object} prefs Prefs key-value JSON object.
|
|
779
|
-
* @property {boolean} overrideForCli
|
|
780
|
-
* @property {boolean} parseOutput
|
|
781
|
-
* @property {libClient | undefined} sdk
|
|
782
|
-
*/
|
|
783
|
-
|
|
784
|
-
/**
|
|
785
|
-
* @param {AccountUpdatePrefsRequestParams} params
|
|
786
|
-
*/
|
|
787
|
-
const accountUpdatePrefs = async ({prefs,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
788
|
-
let client = !sdk ? await sdkForProject() :
|
|
789
|
-
sdk;
|
|
790
|
-
let apiPath = '/account/prefs';
|
|
791
|
-
let payload = {};
|
|
792
|
-
if (typeof prefs !== 'undefined') {
|
|
793
|
-
payload['prefs'] = JSON.parse(prefs);
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
let response = undefined;
|
|
797
|
-
|
|
798
|
-
response = await client.call('patch', apiPath, {
|
|
799
|
-
'content-type': 'application/json',
|
|
800
|
-
}, payload);
|
|
801
|
-
|
|
802
|
-
if (parseOutput) {
|
|
803
|
-
parse(response)
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
return response;
|
|
807
|
-
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
/**
|
|
811
|
-
* @typedef {Object} AccountCreateRecoveryRequestParams
|
|
812
|
-
* @property {string} email User email.
|
|
813
|
-
* @property {string} url URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
814
|
-
* @property {boolean} overrideForCli
|
|
815
|
-
* @property {boolean} parseOutput
|
|
816
|
-
* @property {libClient | undefined} sdk
|
|
817
|
-
*/
|
|
818
|
-
|
|
819
|
-
/**
|
|
820
|
-
* @param {AccountCreateRecoveryRequestParams} params
|
|
821
|
-
*/
|
|
822
|
-
const accountCreateRecovery = async ({email,url,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
823
|
-
let client = !sdk ? await sdkForProject() :
|
|
824
|
-
sdk;
|
|
825
|
-
let apiPath = '/account/recovery';
|
|
826
|
-
let payload = {};
|
|
827
|
-
if (typeof email !== 'undefined') {
|
|
828
|
-
payload['email'] = email;
|
|
829
|
-
}
|
|
830
|
-
if (typeof url !== 'undefined') {
|
|
831
|
-
payload['url'] = url;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
let response = undefined;
|
|
835
|
-
|
|
836
|
-
response = await client.call('post', apiPath, {
|
|
837
|
-
'content-type': 'application/json',
|
|
838
|
-
}, payload);
|
|
839
|
-
|
|
840
|
-
if (parseOutput) {
|
|
841
|
-
parse(response)
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
return response;
|
|
845
|
-
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
/**
|
|
849
|
-
* @typedef {Object} AccountUpdateRecoveryRequestParams
|
|
850
|
-
* @property {string} userId User ID.
|
|
851
|
-
* @property {string} secret Valid reset token.
|
|
852
|
-
* @property {string} password New user password. Must be between 8 and 256 chars.
|
|
853
|
-
* @property {boolean} overrideForCli
|
|
854
|
-
* @property {boolean} parseOutput
|
|
855
|
-
* @property {libClient | undefined} sdk
|
|
856
|
-
*/
|
|
857
|
-
|
|
858
|
-
/**
|
|
859
|
-
* @param {AccountUpdateRecoveryRequestParams} params
|
|
860
|
-
*/
|
|
861
|
-
const accountUpdateRecovery = async ({userId,secret,password,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
862
|
-
let client = !sdk ? await sdkForProject() :
|
|
863
|
-
sdk;
|
|
864
|
-
let apiPath = '/account/recovery';
|
|
865
|
-
let payload = {};
|
|
866
|
-
if (typeof userId !== 'undefined') {
|
|
867
|
-
payload['userId'] = userId;
|
|
868
|
-
}
|
|
869
|
-
if (typeof secret !== 'undefined') {
|
|
870
|
-
payload['secret'] = secret;
|
|
871
|
-
}
|
|
872
|
-
if (typeof password !== 'undefined') {
|
|
873
|
-
payload['password'] = password;
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
let response = undefined;
|
|
877
|
-
|
|
878
|
-
response = await client.call('put', apiPath, {
|
|
879
|
-
'content-type': 'application/json',
|
|
880
|
-
}, payload);
|
|
881
|
-
|
|
882
|
-
if (parseOutput) {
|
|
883
|
-
parse(response)
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
return response;
|
|
887
|
-
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
/**
|
|
891
|
-
* @typedef {Object} AccountListSessionsRequestParams
|
|
892
|
-
* @property {boolean} overrideForCli
|
|
893
|
-
* @property {boolean} parseOutput
|
|
894
|
-
* @property {libClient | undefined} sdk
|
|
895
|
-
*/
|
|
896
|
-
|
|
897
|
-
/**
|
|
898
|
-
* @param {AccountListSessionsRequestParams} params
|
|
899
|
-
*/
|
|
900
|
-
const accountListSessions = async ({parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
901
|
-
let client = !sdk ? await sdkForProject() :
|
|
902
|
-
sdk;
|
|
903
|
-
let apiPath = '/account/sessions';
|
|
904
|
-
let payload = {};
|
|
905
|
-
|
|
906
|
-
let response = undefined;
|
|
907
|
-
|
|
908
|
-
response = await client.call('get', apiPath, {
|
|
909
|
-
}, payload);
|
|
910
|
-
|
|
911
|
-
if (parseOutput) {
|
|
912
|
-
if(console) {
|
|
913
|
-
showConsoleLink('account', 'listSessions');
|
|
914
|
-
} else {
|
|
915
|
-
parse(response)
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
return response;
|
|
920
|
-
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
/**
|
|
924
|
-
* @typedef {Object} AccountDeleteSessionsRequestParams
|
|
925
|
-
* @property {boolean} overrideForCli
|
|
926
|
-
* @property {boolean} parseOutput
|
|
927
|
-
* @property {libClient | undefined} sdk
|
|
928
|
-
*/
|
|
929
|
-
|
|
930
|
-
/**
|
|
931
|
-
* @param {AccountDeleteSessionsRequestParams} params
|
|
932
|
-
*/
|
|
933
|
-
const accountDeleteSessions = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
934
|
-
let client = !sdk ? await sdkForProject() :
|
|
935
|
-
sdk;
|
|
936
|
-
let apiPath = '/account/sessions';
|
|
937
|
-
let payload = {};
|
|
938
|
-
|
|
939
|
-
let response = undefined;
|
|
940
|
-
|
|
941
|
-
response = await client.call('delete', apiPath, {
|
|
942
|
-
'content-type': 'application/json',
|
|
943
|
-
}, payload);
|
|
944
|
-
|
|
945
|
-
if (parseOutput) {
|
|
946
|
-
parse(response)
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
return response;
|
|
950
|
-
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
/**
|
|
954
|
-
* @typedef {Object} AccountCreateAnonymousSessionRequestParams
|
|
955
|
-
* @property {boolean} overrideForCli
|
|
956
|
-
* @property {boolean} parseOutput
|
|
957
|
-
* @property {libClient | undefined} sdk
|
|
958
|
-
*/
|
|
959
|
-
|
|
960
|
-
/**
|
|
961
|
-
* @param {AccountCreateAnonymousSessionRequestParams} params
|
|
962
|
-
*/
|
|
963
|
-
const accountCreateAnonymousSession = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
964
|
-
let client = !sdk ? await sdkForProject() :
|
|
965
|
-
sdk;
|
|
966
|
-
let apiPath = '/account/sessions/anonymous';
|
|
967
|
-
let payload = {};
|
|
968
|
-
|
|
969
|
-
let response = undefined;
|
|
970
|
-
|
|
971
|
-
response = await client.call('post', apiPath, {
|
|
972
|
-
'content-type': 'application/json',
|
|
973
|
-
}, payload);
|
|
974
|
-
|
|
975
|
-
if (parseOutput) {
|
|
976
|
-
parse(response)
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
return response;
|
|
980
|
-
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
/**
|
|
984
|
-
* @typedef {Object} AccountCreateEmailPasswordSessionRequestParams
|
|
985
|
-
* @property {string} email User email.
|
|
986
|
-
* @property {string} password User password. Must be at least 8 chars.
|
|
987
|
-
* @property {boolean} overrideForCli
|
|
988
|
-
* @property {boolean} parseOutput
|
|
989
|
-
* @property {libClient | undefined} sdk
|
|
990
|
-
*/
|
|
991
|
-
|
|
992
|
-
/**
|
|
993
|
-
* @param {AccountCreateEmailPasswordSessionRequestParams} params
|
|
994
|
-
*/
|
|
995
|
-
const accountCreateEmailPasswordSession = async ({email,password,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
996
|
-
let client = !sdk ? await sdkForProject() :
|
|
997
|
-
sdk;
|
|
998
|
-
let apiPath = '/account/sessions/email';
|
|
999
|
-
let payload = {};
|
|
1000
|
-
if (typeof email !== 'undefined') {
|
|
1001
|
-
payload['email'] = email;
|
|
1002
|
-
}
|
|
1003
|
-
if (typeof password !== 'undefined') {
|
|
1004
|
-
payload['password'] = password;
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
let response = undefined;
|
|
1008
|
-
|
|
1009
|
-
response = await client.call('post', apiPath, {
|
|
1010
|
-
'content-type': 'application/json',
|
|
1011
|
-
}, payload);
|
|
1012
|
-
|
|
1013
|
-
if (parseOutput) {
|
|
1014
|
-
parse(response)
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
return response;
|
|
1018
|
-
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
/**
|
|
1022
|
-
* @typedef {Object} AccountUpdateMagicURLSessionRequestParams
|
|
1023
|
-
* @property {string} userId User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1024
|
-
* @property {string} secret Valid verification token.
|
|
1025
|
-
* @property {boolean} overrideForCli
|
|
1026
|
-
* @property {boolean} parseOutput
|
|
1027
|
-
* @property {libClient | undefined} sdk
|
|
1028
|
-
*/
|
|
1029
|
-
|
|
1030
|
-
/**
|
|
1031
|
-
* @param {AccountUpdateMagicURLSessionRequestParams} params
|
|
1032
|
-
*/
|
|
1033
|
-
const accountUpdateMagicURLSession = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1034
|
-
let client = !sdk ? await sdkForProject() :
|
|
1035
|
-
sdk;
|
|
1036
|
-
let apiPath = '/account/sessions/magic-url';
|
|
1037
|
-
let payload = {};
|
|
1038
|
-
if (typeof userId !== 'undefined') {
|
|
1039
|
-
payload['userId'] = userId;
|
|
1040
|
-
}
|
|
1041
|
-
if (typeof secret !== 'undefined') {
|
|
1042
|
-
payload['secret'] = secret;
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
let response = undefined;
|
|
1046
|
-
|
|
1047
|
-
response = await client.call('put', apiPath, {
|
|
1048
|
-
'content-type': 'application/json',
|
|
1049
|
-
}, payload);
|
|
1050
|
-
|
|
1051
|
-
if (parseOutput) {
|
|
1052
|
-
parse(response)
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
return response;
|
|
1056
|
-
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
/**
|
|
1060
|
-
* @typedef {Object} AccountCreateOAuth2SessionRequestParams
|
|
1061
|
-
* @property {OAuthProvider} provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.
|
|
1062
|
-
* @property {string} success URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1063
|
-
* @property {string} failure URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1064
|
-
* @property {string[]} scopes A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
|
|
1065
|
-
* @property {boolean} overrideForCli
|
|
1066
|
-
* @property {boolean} parseOutput
|
|
1067
|
-
* @property {libClient | undefined} sdk
|
|
1068
|
-
*/
|
|
1069
|
-
|
|
1070
|
-
/**
|
|
1071
|
-
* @param {AccountCreateOAuth2SessionRequestParams} params
|
|
1072
|
-
*/
|
|
1073
|
-
const accountCreateOAuth2Session = async ({provider,success,failure,scopes,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1074
|
-
let client = !sdk ? await sdkForProject() :
|
|
1075
|
-
sdk;
|
|
1076
|
-
let apiPath = '/account/sessions/oauth2/{provider}'.replace('{provider}', provider);
|
|
1077
|
-
let payload = {};
|
|
1078
|
-
if (typeof success !== 'undefined') {
|
|
1079
|
-
payload['success'] = success;
|
|
1080
|
-
}
|
|
1081
|
-
if (typeof failure !== 'undefined') {
|
|
1082
|
-
payload['failure'] = failure;
|
|
1083
|
-
}
|
|
1084
|
-
if (typeof scopes !== 'undefined') {
|
|
1085
|
-
payload['scopes'] = scopes;
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
let response = undefined;
|
|
1089
|
-
|
|
1090
|
-
response = await client.call('get', apiPath, {
|
|
1091
|
-
}, payload);
|
|
1092
|
-
|
|
1093
|
-
if (parseOutput) {
|
|
1094
|
-
parse(response)
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
return response;
|
|
1098
|
-
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
/**
|
|
1102
|
-
* @typedef {Object} AccountUpdatePhoneSessionRequestParams
|
|
1103
|
-
* @property {string} userId User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1104
|
-
* @property {string} secret Valid verification token.
|
|
1105
|
-
* @property {boolean} overrideForCli
|
|
1106
|
-
* @property {boolean} parseOutput
|
|
1107
|
-
* @property {libClient | undefined} sdk
|
|
1108
|
-
*/
|
|
1109
|
-
|
|
1110
|
-
/**
|
|
1111
|
-
* @param {AccountUpdatePhoneSessionRequestParams} params
|
|
1112
|
-
*/
|
|
1113
|
-
const accountUpdatePhoneSession = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1114
|
-
let client = !sdk ? await sdkForProject() :
|
|
1115
|
-
sdk;
|
|
1116
|
-
let apiPath = '/account/sessions/phone';
|
|
1117
|
-
let payload = {};
|
|
1118
|
-
if (typeof userId !== 'undefined') {
|
|
1119
|
-
payload['userId'] = userId;
|
|
1120
|
-
}
|
|
1121
|
-
if (typeof secret !== 'undefined') {
|
|
1122
|
-
payload['secret'] = secret;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
let response = undefined;
|
|
1126
|
-
|
|
1127
|
-
response = await client.call('put', apiPath, {
|
|
1128
|
-
'content-type': 'application/json',
|
|
1129
|
-
}, payload);
|
|
1130
|
-
|
|
1131
|
-
if (parseOutput) {
|
|
1132
|
-
parse(response)
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
return response;
|
|
1136
|
-
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
/**
|
|
1140
|
-
* @typedef {Object} AccountCreateSessionRequestParams
|
|
1141
|
-
* @property {string} userId User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1142
|
-
* @property {string} secret Secret of a token generated by login methods. For example, the 'createMagicURLToken' or 'createPhoneToken' methods.
|
|
1143
|
-
* @property {boolean} overrideForCli
|
|
1144
|
-
* @property {boolean} parseOutput
|
|
1145
|
-
* @property {libClient | undefined} sdk
|
|
1146
|
-
*/
|
|
1147
|
-
|
|
1148
|
-
/**
|
|
1149
|
-
* @param {AccountCreateSessionRequestParams} params
|
|
1150
|
-
*/
|
|
1151
|
-
const accountCreateSession = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1152
|
-
let client = !sdk ? await sdkForProject() :
|
|
1153
|
-
sdk;
|
|
1154
|
-
let apiPath = '/account/sessions/token';
|
|
1155
|
-
let payload = {};
|
|
1156
|
-
if (typeof userId !== 'undefined') {
|
|
1157
|
-
payload['userId'] = userId;
|
|
1158
|
-
}
|
|
1159
|
-
if (typeof secret !== 'undefined') {
|
|
1160
|
-
payload['secret'] = secret;
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
let response = undefined;
|
|
1164
|
-
|
|
1165
|
-
response = await client.call('post', apiPath, {
|
|
1166
|
-
'content-type': 'application/json',
|
|
1167
|
-
}, payload);
|
|
1168
|
-
|
|
1169
|
-
if (parseOutput) {
|
|
1170
|
-
parse(response)
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
return response;
|
|
1174
|
-
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
|
-
/**
|
|
1178
|
-
* @typedef {Object} AccountGetSessionRequestParams
|
|
1179
|
-
* @property {string} sessionId Session ID. Use the string 'current' to get the current device session.
|
|
1180
|
-
* @property {boolean} overrideForCli
|
|
1181
|
-
* @property {boolean} parseOutput
|
|
1182
|
-
* @property {libClient | undefined} sdk
|
|
1183
|
-
*/
|
|
1184
|
-
|
|
1185
|
-
/**
|
|
1186
|
-
* @param {AccountGetSessionRequestParams} params
|
|
1187
|
-
*/
|
|
1188
|
-
const accountGetSession = async ({sessionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1189
|
-
let client = !sdk ? await sdkForProject() :
|
|
1190
|
-
sdk;
|
|
1191
|
-
let apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId);
|
|
1192
|
-
let payload = {};
|
|
1193
|
-
|
|
1194
|
-
let response = undefined;
|
|
1195
|
-
|
|
1196
|
-
response = await client.call('get', apiPath, {
|
|
1197
|
-
}, payload);
|
|
1198
|
-
|
|
1199
|
-
if (parseOutput) {
|
|
1200
|
-
parse(response)
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
return response;
|
|
1204
|
-
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
/**
|
|
1208
|
-
* @typedef {Object} AccountUpdateSessionRequestParams
|
|
1209
|
-
* @property {string} sessionId Session ID. Use the string 'current' to update the current device session.
|
|
1210
|
-
* @property {boolean} overrideForCli
|
|
1211
|
-
* @property {boolean} parseOutput
|
|
1212
|
-
* @property {libClient | undefined} sdk
|
|
1213
|
-
*/
|
|
1214
|
-
|
|
1215
|
-
/**
|
|
1216
|
-
* @param {AccountUpdateSessionRequestParams} params
|
|
1217
|
-
*/
|
|
1218
|
-
const accountUpdateSession = async ({sessionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1219
|
-
let client = !sdk ? await sdkForProject() :
|
|
1220
|
-
sdk;
|
|
1221
|
-
let apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId);
|
|
1222
|
-
let payload = {};
|
|
1223
|
-
|
|
1224
|
-
let response = undefined;
|
|
1225
|
-
|
|
1226
|
-
response = await client.call('patch', apiPath, {
|
|
1227
|
-
'content-type': 'application/json',
|
|
1228
|
-
}, payload);
|
|
1229
|
-
|
|
1230
|
-
if (parseOutput) {
|
|
1231
|
-
parse(response)
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
return response;
|
|
1235
|
-
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
/**
|
|
1239
|
-
* @typedef {Object} AccountDeleteSessionRequestParams
|
|
1240
|
-
* @property {string} sessionId Session ID. Use the string 'current' to delete the current device session.
|
|
1241
|
-
* @property {boolean} overrideForCli
|
|
1242
|
-
* @property {boolean} parseOutput
|
|
1243
|
-
* @property {libClient | undefined} sdk
|
|
1244
|
-
*/
|
|
1245
|
-
|
|
1246
|
-
/**
|
|
1247
|
-
* @param {AccountDeleteSessionRequestParams} params
|
|
1248
|
-
*/
|
|
1249
|
-
const accountDeleteSession = async ({sessionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1250
|
-
let client = !sdk ? await sdkForProject() :
|
|
1251
|
-
sdk;
|
|
1252
|
-
let apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId);
|
|
1253
|
-
let payload = {};
|
|
1254
|
-
|
|
1255
|
-
let response = undefined;
|
|
1256
|
-
|
|
1257
|
-
response = await client.call('delete', apiPath, {
|
|
1258
|
-
'content-type': 'application/json',
|
|
1259
|
-
}, payload);
|
|
1260
|
-
|
|
1261
|
-
if (parseOutput) {
|
|
1262
|
-
parse(response)
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
return response;
|
|
1266
|
-
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
/**
|
|
1270
|
-
* @typedef {Object} AccountUpdateStatusRequestParams
|
|
1271
|
-
* @property {boolean} overrideForCli
|
|
1272
|
-
* @property {boolean} parseOutput
|
|
1273
|
-
* @property {libClient | undefined} sdk
|
|
1274
|
-
*/
|
|
1275
|
-
|
|
1276
|
-
/**
|
|
1277
|
-
* @param {AccountUpdateStatusRequestParams} params
|
|
1278
|
-
*/
|
|
1279
|
-
const accountUpdateStatus = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1280
|
-
let client = !sdk ? await sdkForProject() :
|
|
1281
|
-
sdk;
|
|
1282
|
-
let apiPath = '/account/status';
|
|
1283
|
-
let payload = {};
|
|
1284
|
-
|
|
1285
|
-
let response = undefined;
|
|
1286
|
-
|
|
1287
|
-
response = await client.call('patch', apiPath, {
|
|
1288
|
-
'content-type': 'application/json',
|
|
1289
|
-
}, payload);
|
|
1290
|
-
|
|
1291
|
-
if (parseOutput) {
|
|
1292
|
-
parse(response)
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
return response;
|
|
1296
|
-
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
/**
|
|
1300
|
-
* @typedef {Object} AccountCreatePushTargetRequestParams
|
|
1301
|
-
* @property {string} targetId Target ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1302
|
-
* @property {string} identifier The target identifier (token, email, phone etc.)
|
|
1303
|
-
* @property {string} providerId Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.
|
|
1304
|
-
* @property {boolean} overrideForCli
|
|
1305
|
-
* @property {boolean} parseOutput
|
|
1306
|
-
* @property {libClient | undefined} sdk
|
|
1307
|
-
*/
|
|
1308
|
-
|
|
1309
|
-
/**
|
|
1310
|
-
* @param {AccountCreatePushTargetRequestParams} params
|
|
1311
|
-
*/
|
|
1312
|
-
const accountCreatePushTarget = async ({targetId,identifier,providerId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1313
|
-
let client = !sdk ? await sdkForProject() :
|
|
1314
|
-
sdk;
|
|
1315
|
-
let apiPath = '/account/targets/push';
|
|
1316
|
-
let payload = {};
|
|
1317
|
-
if (typeof targetId !== 'undefined') {
|
|
1318
|
-
payload['targetId'] = targetId;
|
|
1319
|
-
}
|
|
1320
|
-
if (typeof identifier !== 'undefined') {
|
|
1321
|
-
payload['identifier'] = identifier;
|
|
1322
|
-
}
|
|
1323
|
-
if (typeof providerId !== 'undefined') {
|
|
1324
|
-
payload['providerId'] = providerId;
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
let response = undefined;
|
|
1328
|
-
|
|
1329
|
-
response = await client.call('post', apiPath, {
|
|
1330
|
-
'content-type': 'application/json',
|
|
1331
|
-
}, payload);
|
|
1332
|
-
|
|
1333
|
-
if (parseOutput) {
|
|
1334
|
-
parse(response)
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
return response;
|
|
1338
|
-
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
/**
|
|
1342
|
-
* @typedef {Object} AccountUpdatePushTargetRequestParams
|
|
1343
|
-
* @property {string} targetId Target ID.
|
|
1344
|
-
* @property {string} identifier The target identifier (token, email, phone etc.)
|
|
1345
|
-
* @property {boolean} overrideForCli
|
|
1346
|
-
* @property {boolean} parseOutput
|
|
1347
|
-
* @property {libClient | undefined} sdk
|
|
1348
|
-
*/
|
|
1349
|
-
|
|
1350
|
-
/**
|
|
1351
|
-
* @param {AccountUpdatePushTargetRequestParams} params
|
|
1352
|
-
*/
|
|
1353
|
-
const accountUpdatePushTarget = async ({targetId,identifier,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1354
|
-
let client = !sdk ? await sdkForProject() :
|
|
1355
|
-
sdk;
|
|
1356
|
-
let apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);
|
|
1357
|
-
let payload = {};
|
|
1358
|
-
if (typeof identifier !== 'undefined') {
|
|
1359
|
-
payload['identifier'] = identifier;
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
let response = undefined;
|
|
1363
|
-
|
|
1364
|
-
response = await client.call('put', apiPath, {
|
|
1365
|
-
'content-type': 'application/json',
|
|
1366
|
-
}, payload);
|
|
1367
|
-
|
|
1368
|
-
if (parseOutput) {
|
|
1369
|
-
parse(response)
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
return response;
|
|
1373
|
-
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
/**
|
|
1377
|
-
* @typedef {Object} AccountDeletePushTargetRequestParams
|
|
1378
|
-
* @property {string} targetId Target ID.
|
|
1379
|
-
* @property {boolean} overrideForCli
|
|
1380
|
-
* @property {boolean} parseOutput
|
|
1381
|
-
* @property {libClient | undefined} sdk
|
|
1382
|
-
*/
|
|
1383
|
-
|
|
1384
|
-
/**
|
|
1385
|
-
* @param {AccountDeletePushTargetRequestParams} params
|
|
1386
|
-
*/
|
|
1387
|
-
const accountDeletePushTarget = async ({targetId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1388
|
-
let client = !sdk ? await sdkForProject() :
|
|
1389
|
-
sdk;
|
|
1390
|
-
let apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);
|
|
1391
|
-
let payload = {};
|
|
1392
|
-
|
|
1393
|
-
let response = undefined;
|
|
1394
|
-
|
|
1395
|
-
response = await client.call('delete', apiPath, {
|
|
1396
|
-
'content-type': 'application/json',
|
|
1397
|
-
}, payload);
|
|
1398
|
-
|
|
1399
|
-
if (parseOutput) {
|
|
1400
|
-
parse(response)
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
return response;
|
|
1404
|
-
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
/**
|
|
1408
|
-
* @typedef {Object} AccountCreateEmailTokenRequestParams
|
|
1409
|
-
* @property {string} userId User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1410
|
-
* @property {string} email User email.
|
|
1411
|
-
* @property {boolean} phrase Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
|
|
1412
|
-
* @property {boolean} overrideForCli
|
|
1413
|
-
* @property {boolean} parseOutput
|
|
1414
|
-
* @property {libClient | undefined} sdk
|
|
1415
|
-
*/
|
|
1416
|
-
|
|
1417
|
-
/**
|
|
1418
|
-
* @param {AccountCreateEmailTokenRequestParams} params
|
|
1419
|
-
*/
|
|
1420
|
-
const accountCreateEmailToken = async ({userId,email,phrase,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1421
|
-
let client = !sdk ? await sdkForProject() :
|
|
1422
|
-
sdk;
|
|
1423
|
-
let apiPath = '/account/tokens/email';
|
|
1424
|
-
let payload = {};
|
|
1425
|
-
if (typeof userId !== 'undefined') {
|
|
1426
|
-
payload['userId'] = userId;
|
|
1427
|
-
}
|
|
1428
|
-
if (typeof email !== 'undefined') {
|
|
1429
|
-
payload['email'] = email;
|
|
1430
|
-
}
|
|
1431
|
-
if (typeof phrase !== 'undefined') {
|
|
1432
|
-
payload['phrase'] = phrase;
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
let response = undefined;
|
|
1436
|
-
|
|
1437
|
-
response = await client.call('post', apiPath, {
|
|
1438
|
-
'content-type': 'application/json',
|
|
1439
|
-
}, payload);
|
|
1440
|
-
|
|
1441
|
-
if (parseOutput) {
|
|
1442
|
-
parse(response)
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
return response;
|
|
1446
|
-
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1449
|
-
/**
|
|
1450
|
-
* @typedef {Object} AccountCreateMagicURLTokenRequestParams
|
|
1451
|
-
* @property {string} userId Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1452
|
-
* @property {string} email User email.
|
|
1453
|
-
* @property {string} url URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1454
|
-
* @property {boolean} phrase Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
|
|
1455
|
-
* @property {boolean} overrideForCli
|
|
1456
|
-
* @property {boolean} parseOutput
|
|
1457
|
-
* @property {libClient | undefined} sdk
|
|
1458
|
-
*/
|
|
1459
|
-
|
|
1460
|
-
/**
|
|
1461
|
-
* @param {AccountCreateMagicURLTokenRequestParams} params
|
|
1462
|
-
*/
|
|
1463
|
-
const accountCreateMagicURLToken = async ({userId,email,url,phrase,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1464
|
-
let client = !sdk ? await sdkForProject() :
|
|
1465
|
-
sdk;
|
|
1466
|
-
let apiPath = '/account/tokens/magic-url';
|
|
1467
|
-
let payload = {};
|
|
1468
|
-
if (typeof userId !== 'undefined') {
|
|
1469
|
-
payload['userId'] = userId;
|
|
1470
|
-
}
|
|
1471
|
-
if (typeof email !== 'undefined') {
|
|
1472
|
-
payload['email'] = email;
|
|
1473
|
-
}
|
|
1474
|
-
if (typeof url !== 'undefined') {
|
|
1475
|
-
payload['url'] = url;
|
|
1476
|
-
}
|
|
1477
|
-
if (typeof phrase !== 'undefined') {
|
|
1478
|
-
payload['phrase'] = phrase;
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
let response = undefined;
|
|
1482
|
-
|
|
1483
|
-
response = await client.call('post', apiPath, {
|
|
1484
|
-
'content-type': 'application/json',
|
|
1485
|
-
}, payload);
|
|
1486
|
-
|
|
1487
|
-
if (parseOutput) {
|
|
1488
|
-
parse(response)
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
return response;
|
|
1492
|
-
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
/**
|
|
1496
|
-
* @typedef {Object} AccountCreateOAuth2TokenRequestParams
|
|
1497
|
-
* @property {OAuthProvider} provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.
|
|
1498
|
-
* @property {string} success URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1499
|
-
* @property {string} failure URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1500
|
-
* @property {string[]} scopes A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
|
|
1501
|
-
* @property {boolean} overrideForCli
|
|
1502
|
-
* @property {boolean} parseOutput
|
|
1503
|
-
* @property {libClient | undefined} sdk
|
|
1504
|
-
*/
|
|
1505
|
-
|
|
1506
|
-
/**
|
|
1507
|
-
* @param {AccountCreateOAuth2TokenRequestParams} params
|
|
1508
|
-
*/
|
|
1509
|
-
const accountCreateOAuth2Token = async ({provider,success,failure,scopes,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1510
|
-
let client = !sdk ? await sdkForProject() :
|
|
1511
|
-
sdk;
|
|
1512
|
-
let apiPath = '/account/tokens/oauth2/{provider}'.replace('{provider}', provider);
|
|
1513
|
-
let payload = {};
|
|
1514
|
-
if (typeof success !== 'undefined') {
|
|
1515
|
-
payload['success'] = success;
|
|
1516
|
-
}
|
|
1517
|
-
if (typeof failure !== 'undefined') {
|
|
1518
|
-
payload['failure'] = failure;
|
|
1519
|
-
}
|
|
1520
|
-
if (typeof scopes !== 'undefined') {
|
|
1521
|
-
payload['scopes'] = scopes;
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
let response = undefined;
|
|
1525
|
-
|
|
1526
|
-
response = await client.call('get', apiPath, {
|
|
1527
|
-
}, payload);
|
|
1528
|
-
|
|
1529
|
-
if (parseOutput) {
|
|
1530
|
-
parse(response)
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
return response;
|
|
1534
|
-
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
/**
|
|
1538
|
-
* @typedef {Object} AccountCreatePhoneTokenRequestParams
|
|
1539
|
-
* @property {string} userId Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1540
|
-
* @property {string} phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
1541
|
-
* @property {boolean} overrideForCli
|
|
1542
|
-
* @property {boolean} parseOutput
|
|
1543
|
-
* @property {libClient | undefined} sdk
|
|
1544
|
-
*/
|
|
1545
|
-
|
|
1546
|
-
/**
|
|
1547
|
-
* @param {AccountCreatePhoneTokenRequestParams} params
|
|
1548
|
-
*/
|
|
1549
|
-
const accountCreatePhoneToken = async ({userId,phone,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1550
|
-
let client = !sdk ? await sdkForProject() :
|
|
1551
|
-
sdk;
|
|
1552
|
-
let apiPath = '/account/tokens/phone';
|
|
1553
|
-
let payload = {};
|
|
1554
|
-
if (typeof userId !== 'undefined') {
|
|
1555
|
-
payload['userId'] = userId;
|
|
1556
|
-
}
|
|
1557
|
-
if (typeof phone !== 'undefined') {
|
|
1558
|
-
payload['phone'] = phone;
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
|
-
let response = undefined;
|
|
1562
|
-
|
|
1563
|
-
response = await client.call('post', apiPath, {
|
|
1564
|
-
'content-type': 'application/json',
|
|
1565
|
-
}, payload);
|
|
1566
|
-
|
|
1567
|
-
if (parseOutput) {
|
|
1568
|
-
parse(response)
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
return response;
|
|
1572
|
-
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
/**
|
|
1576
|
-
* @typedef {Object} AccountCreateVerificationRequestParams
|
|
1577
|
-
* @property {string} url URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1578
|
-
* @property {boolean} overrideForCli
|
|
1579
|
-
* @property {boolean} parseOutput
|
|
1580
|
-
* @property {libClient | undefined} sdk
|
|
1581
|
-
*/
|
|
1582
|
-
|
|
1583
|
-
/**
|
|
1584
|
-
* @param {AccountCreateVerificationRequestParams} params
|
|
1585
|
-
*/
|
|
1586
|
-
const accountCreateVerification = async ({url,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1587
|
-
let client = !sdk ? await sdkForProject() :
|
|
1588
|
-
sdk;
|
|
1589
|
-
let apiPath = '/account/verification';
|
|
1590
|
-
let payload = {};
|
|
1591
|
-
if (typeof url !== 'undefined') {
|
|
1592
|
-
payload['url'] = url;
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
let response = undefined;
|
|
1596
|
-
|
|
1597
|
-
response = await client.call('post', apiPath, {
|
|
1598
|
-
'content-type': 'application/json',
|
|
1599
|
-
}, payload);
|
|
1600
|
-
|
|
1601
|
-
if (parseOutput) {
|
|
1602
|
-
parse(response)
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
return response;
|
|
1606
|
-
|
|
1607
|
-
}
|
|
1608
|
-
|
|
1609
|
-
/**
|
|
1610
|
-
* @typedef {Object} AccountUpdateVerificationRequestParams
|
|
1611
|
-
* @property {string} userId User ID.
|
|
1612
|
-
* @property {string} secret Valid verification token.
|
|
1613
|
-
* @property {boolean} overrideForCli
|
|
1614
|
-
* @property {boolean} parseOutput
|
|
1615
|
-
* @property {libClient | undefined} sdk
|
|
1616
|
-
*/
|
|
1617
|
-
|
|
1618
|
-
/**
|
|
1619
|
-
* @param {AccountUpdateVerificationRequestParams} params
|
|
1620
|
-
*/
|
|
1621
|
-
const accountUpdateVerification = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1622
|
-
let client = !sdk ? await sdkForProject() :
|
|
1623
|
-
sdk;
|
|
1624
|
-
let apiPath = '/account/verification';
|
|
1625
|
-
let payload = {};
|
|
1626
|
-
if (typeof userId !== 'undefined') {
|
|
1627
|
-
payload['userId'] = userId;
|
|
1628
|
-
}
|
|
1629
|
-
if (typeof secret !== 'undefined') {
|
|
1630
|
-
payload['secret'] = secret;
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
|
-
let response = undefined;
|
|
1634
|
-
|
|
1635
|
-
response = await client.call('put', apiPath, {
|
|
1636
|
-
'content-type': 'application/json',
|
|
1637
|
-
}, payload);
|
|
1638
|
-
|
|
1639
|
-
if (parseOutput) {
|
|
1640
|
-
parse(response)
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
return response;
|
|
1644
|
-
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
/**
|
|
1648
|
-
* @typedef {Object} AccountCreatePhoneVerificationRequestParams
|
|
1649
|
-
* @property {boolean} overrideForCli
|
|
1650
|
-
* @property {boolean} parseOutput
|
|
1651
|
-
* @property {libClient | undefined} sdk
|
|
1652
|
-
*/
|
|
1653
|
-
|
|
1654
|
-
/**
|
|
1655
|
-
* @param {AccountCreatePhoneVerificationRequestParams} params
|
|
1656
|
-
*/
|
|
1657
|
-
const accountCreatePhoneVerification = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1658
|
-
let client = !sdk ? await sdkForProject() :
|
|
1659
|
-
sdk;
|
|
1660
|
-
let apiPath = '/account/verification/phone';
|
|
1661
|
-
let payload = {};
|
|
1662
|
-
|
|
1663
|
-
let response = undefined;
|
|
1664
|
-
|
|
1665
|
-
response = await client.call('post', apiPath, {
|
|
1666
|
-
'content-type': 'application/json',
|
|
1667
|
-
}, payload);
|
|
1668
|
-
|
|
1669
|
-
if (parseOutput) {
|
|
1670
|
-
parse(response)
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
return response;
|
|
1674
|
-
|
|
1675
|
-
}
|
|
1676
|
-
|
|
1677
|
-
/**
|
|
1678
|
-
* @typedef {Object} AccountUpdatePhoneVerificationRequestParams
|
|
1679
|
-
* @property {string} userId User ID.
|
|
1680
|
-
* @property {string} secret Valid verification token.
|
|
1681
|
-
* @property {boolean} overrideForCli
|
|
1682
|
-
* @property {boolean} parseOutput
|
|
1683
|
-
* @property {libClient | undefined} sdk
|
|
1684
|
-
*/
|
|
1685
|
-
|
|
1686
|
-
/**
|
|
1687
|
-
* @param {AccountUpdatePhoneVerificationRequestParams} params
|
|
1688
|
-
*/
|
|
1689
|
-
const accountUpdatePhoneVerification = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1690
|
-
let client = !sdk ? await sdkForProject() :
|
|
1691
|
-
sdk;
|
|
1692
|
-
let apiPath = '/account/verification/phone';
|
|
1693
|
-
let payload = {};
|
|
1694
|
-
if (typeof userId !== 'undefined') {
|
|
1695
|
-
payload['userId'] = userId;
|
|
1696
|
-
}
|
|
1697
|
-
if (typeof secret !== 'undefined') {
|
|
1698
|
-
payload['secret'] = secret;
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
let response = undefined;
|
|
1702
|
-
|
|
1703
|
-
response = await client.call('put', apiPath, {
|
|
1704
|
-
'content-type': 'application/json',
|
|
1705
|
-
}, payload);
|
|
1706
|
-
|
|
1707
|
-
if (parseOutput) {
|
|
1708
|
-
parse(response)
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
return response;
|
|
1712
|
-
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
account
|
|
1716
|
-
.command(`get`)
|
|
1717
|
-
.description(`Get the currently logged in user.`)
|
|
1718
|
-
.option(`--console`, `Get the resource console url`)
|
|
1719
|
-
.action(actionRunner(accountGet))
|
|
1720
|
-
|
|
1721
|
-
account
|
|
1722
|
-
.command(`create`)
|
|
1723
|
-
.description(`Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).`)
|
|
1724
|
-
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
1725
|
-
.requiredOption(`--email <email>`, `User email.`)
|
|
1726
|
-
.requiredOption(`--password <password>`, `New user password. Must be between 8 and 256 chars.`)
|
|
1727
|
-
.option(`--name <name>`, `User name. Max length: 128 chars.`)
|
|
1728
|
-
.action(actionRunner(accountCreate))
|
|
1729
|
-
|
|
1730
|
-
account
|
|
1731
|
-
.command(`delete`)
|
|
1732
|
-
.description(`Delete the currently logged in user.`)
|
|
1733
|
-
.action(actionRunner(accountDelete))
|
|
1734
|
-
|
|
1735
|
-
account
|
|
1736
|
-
.command(`update-email`)
|
|
1737
|
-
.description(`Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request. This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. `)
|
|
1738
|
-
.requiredOption(`--email <email>`, `User email.`)
|
|
1739
|
-
.requiredOption(`--password <password>`, `User password. Must be at least 8 chars.`)
|
|
1740
|
-
.action(actionRunner(accountUpdateEmail))
|
|
1741
|
-
|
|
1742
|
-
account
|
|
1743
|
-
.command(`list-identities`)
|
|
1744
|
-
.description(`Get the list of identities for the currently logged in user.`)
|
|
1745
|
-
.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: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`)
|
|
1746
|
-
.action(actionRunner(accountListIdentities))
|
|
1747
|
-
|
|
1748
|
-
account
|
|
1749
|
-
.command(`delete-identity`)
|
|
1750
|
-
.description(`Delete an identity by its unique ID.`)
|
|
1751
|
-
.requiredOption(`--identity-id <identity-id>`, `Identity ID.`)
|
|
1752
|
-
.action(actionRunner(accountDeleteIdentity))
|
|
1753
|
-
|
|
1754
|
-
account
|
|
1755
|
-
.command(`create-jwt`)
|
|
1756
|
-
.description(`Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.`)
|
|
1757
|
-
.action(actionRunner(accountCreateJWT))
|
|
1758
|
-
|
|
1759
|
-
account
|
|
1760
|
-
.command(`list-logs`)
|
|
1761
|
-
.description(`Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.`)
|
|
1762
|
-
.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`)
|
|
1763
|
-
.action(actionRunner(accountListLogs))
|
|
1764
|
-
|
|
1765
|
-
account
|
|
1766
|
-
.command(`update-mfa`)
|
|
1767
|
-
.description(`Enable or disable MFA on an account.`)
|
|
1768
|
-
.requiredOption(`--mfa [value]`, `Enable or disable MFA.`, (value) => value === undefined ? true : parseBool(value))
|
|
1769
|
-
.action(actionRunner(accountUpdateMFA))
|
|
1770
|
-
|
|
1771
|
-
account
|
|
1772
|
-
.command(`create-mfa-authenticator`)
|
|
1773
|
-
.description(`Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.`)
|
|
1774
|
-
.requiredOption(`--type <type>`, `Type of authenticator. Must be 'totp'`)
|
|
1775
|
-
.action(actionRunner(accountCreateMfaAuthenticator))
|
|
1776
|
-
|
|
1777
|
-
account
|
|
1778
|
-
.command(`update-mfa-authenticator`)
|
|
1779
|
-
.description(`Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.`)
|
|
1780
|
-
.requiredOption(`--type <type>`, `Type of authenticator.`)
|
|
1781
|
-
.requiredOption(`--otp <otp>`, `Valid verification token.`)
|
|
1782
|
-
.action(actionRunner(accountUpdateMfaAuthenticator))
|
|
1783
|
-
|
|
1784
|
-
account
|
|
1785
|
-
.command(`delete-mfa-authenticator`)
|
|
1786
|
-
.description(`Delete an authenticator for a user by ID.`)
|
|
1787
|
-
.requiredOption(`--type <type>`, `Type of authenticator.`)
|
|
1788
|
-
.action(actionRunner(accountDeleteMfaAuthenticator))
|
|
1789
|
-
|
|
1790
|
-
account
|
|
1791
|
-
.command(`create-mfa-challenge`)
|
|
1792
|
-
.description(`Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.`)
|
|
1793
|
-
.requiredOption(`--factor <factor>`, `Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'.`)
|
|
1794
|
-
.action(actionRunner(accountCreateMfaChallenge))
|
|
1795
|
-
|
|
1796
|
-
account
|
|
1797
|
-
.command(`update-mfa-challenge`)
|
|
1798
|
-
.description(`Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.`)
|
|
1799
|
-
.requiredOption(`--challenge-id <challenge-id>`, `ID of the challenge.`)
|
|
1800
|
-
.requiredOption(`--otp <otp>`, `Valid verification token.`)
|
|
1801
|
-
.action(actionRunner(accountUpdateMfaChallenge))
|
|
1802
|
-
|
|
1803
|
-
account
|
|
1804
|
-
.command(`list-mfa-factors`)
|
|
1805
|
-
.description(`List the factors available on the account to be used as a MFA challange.`)
|
|
1806
|
-
.action(actionRunner(accountListMfaFactors))
|
|
1807
|
-
|
|
1808
|
-
account
|
|
1809
|
-
.command(`get-mfa-recovery-codes`)
|
|
1810
|
-
.description(`Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.`)
|
|
1811
|
-
.action(actionRunner(accountGetMfaRecoveryCodes))
|
|
1812
|
-
|
|
1813
|
-
account
|
|
1814
|
-
.command(`create-mfa-recovery-codes`)
|
|
1815
|
-
.description(`Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.`)
|
|
1816
|
-
.action(actionRunner(accountCreateMfaRecoveryCodes))
|
|
1817
|
-
|
|
1818
|
-
account
|
|
1819
|
-
.command(`update-mfa-recovery-codes`)
|
|
1820
|
-
.description(`Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.`)
|
|
1821
|
-
.action(actionRunner(accountUpdateMfaRecoveryCodes))
|
|
1822
|
-
|
|
1823
|
-
account
|
|
1824
|
-
.command(`update-name`)
|
|
1825
|
-
.description(`Update currently logged in user account name.`)
|
|
1826
|
-
.requiredOption(`--name <name>`, `User name. Max length: 128 chars.`)
|
|
1827
|
-
.action(actionRunner(accountUpdateName))
|
|
1828
|
-
|
|
1829
|
-
account
|
|
1830
|
-
.command(`update-password`)
|
|
1831
|
-
.description(`Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.`)
|
|
1832
|
-
.requiredOption(`--password <password>`, `New user password. Must be at least 8 chars.`)
|
|
1833
|
-
.option(`--old-password <old-password>`, `Current user password. Must be at least 8 chars.`)
|
|
1834
|
-
.action(actionRunner(accountUpdatePassword))
|
|
1835
|
-
|
|
1836
|
-
account
|
|
1837
|
-
.command(`update-phone`)
|
|
1838
|
-
.description(`Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.`)
|
|
1839
|
-
.requiredOption(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
|
|
1840
|
-
.requiredOption(`--password <password>`, `User password. Must be at least 8 chars.`)
|
|
1841
|
-
.action(actionRunner(accountUpdatePhone))
|
|
1842
|
-
|
|
1843
|
-
account
|
|
1844
|
-
.command(`get-prefs`)
|
|
1845
|
-
.description(`Get the preferences as a key-value object for the currently logged in user.`)
|
|
1846
|
-
.action(actionRunner(accountGetPrefs))
|
|
1847
|
-
|
|
1848
|
-
account
|
|
1849
|
-
.command(`update-prefs`)
|
|
1850
|
-
.description(`Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.`)
|
|
1851
|
-
.requiredOption(`--prefs <prefs>`, `Prefs key-value JSON object.`)
|
|
1852
|
-
.action(actionRunner(accountUpdatePrefs))
|
|
1853
|
-
|
|
1854
|
-
account
|
|
1855
|
-
.command(`create-recovery`)
|
|
1856
|
-
.description(`Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.`)
|
|
1857
|
-
.requiredOption(`--email <email>`, `User email.`)
|
|
1858
|
-
.requiredOption(`--url <url>`, `URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
|
|
1859
|
-
.action(actionRunner(accountCreateRecovery))
|
|
1860
|
-
|
|
1861
|
-
account
|
|
1862
|
-
.command(`update-recovery`)
|
|
1863
|
-
.description(`Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint. Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.`)
|
|
1864
|
-
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
1865
|
-
.requiredOption(`--secret <secret>`, `Valid reset token.`)
|
|
1866
|
-
.requiredOption(`--password <password>`, `New user password. Must be between 8 and 256 chars.`)
|
|
1867
|
-
.action(actionRunner(accountUpdateRecovery))
|
|
1868
|
-
|
|
1869
|
-
account
|
|
1870
|
-
.command(`list-sessions`)
|
|
1871
|
-
.description(`Get the list of active sessions across different devices for the currently logged in user.`)
|
|
1872
|
-
.option(`--console`, `Get the resource console url`)
|
|
1873
|
-
.action(actionRunner(accountListSessions))
|
|
1874
|
-
|
|
1875
|
-
account
|
|
1876
|
-
.command(`delete-sessions`)
|
|
1877
|
-
.description(`Delete all sessions from the user account and remove any sessions cookies from the end client.`)
|
|
1878
|
-
.action(actionRunner(accountDeleteSessions))
|
|
1879
|
-
|
|
1880
|
-
account
|
|
1881
|
-
.command(`create-anonymous-session`)
|
|
1882
|
-
.description(`Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail) or create an [OAuth2 session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).`)
|
|
1883
|
-
.action(actionRunner(accountCreateAnonymousSession))
|
|
1884
|
-
|
|
1885
|
-
account
|
|
1886
|
-
.command(`create-email-password-session`)
|
|
1887
|
-
.description(`Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`)
|
|
1888
|
-
.requiredOption(`--email <email>`, `User email.`)
|
|
1889
|
-
.requiredOption(`--password <password>`, `User password. Must be at least 8 chars.`)
|
|
1890
|
-
.action(actionRunner(accountCreateEmailPasswordSession))
|
|
1891
|
-
|
|
1892
|
-
account
|
|
1893
|
-
.command(`update-magic-url-session`)
|
|
1894
|
-
.description(`Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`)
|
|
1895
|
-
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
1896
|
-
.requiredOption(`--secret <secret>`, `Valid verification token.`)
|
|
1897
|
-
.action(actionRunner(accountUpdateMagicURLSession))
|
|
1898
|
-
|
|
1899
|
-
account
|
|
1900
|
-
.command(`create-o-auth-2-session`)
|
|
1901
|
-
.description(`Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). `)
|
|
1902
|
-
.requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`)
|
|
1903
|
-
.option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
|
|
1904
|
-
.option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
|
|
1905
|
-
.option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`)
|
|
1906
|
-
.action(actionRunner(accountCreateOAuth2Session))
|
|
1907
|
-
|
|
1908
|
-
account
|
|
1909
|
-
.command(`update-phone-session`)
|
|
1910
|
-
.description(`Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`)
|
|
1911
|
-
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
1912
|
-
.requiredOption(`--secret <secret>`, `Valid verification token.`)
|
|
1913
|
-
.action(actionRunner(accountUpdatePhoneSession))
|
|
1914
|
-
|
|
1915
|
-
account
|
|
1916
|
-
.command(`create-session`)
|
|
1917
|
-
.description(`Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`)
|
|
1918
|
-
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
1919
|
-
.requiredOption(`--secret <secret>`, `Secret of a token generated by login methods. For example, the 'createMagicURLToken' or 'createPhoneToken' methods.`)
|
|
1920
|
-
.action(actionRunner(accountCreateSession))
|
|
1921
|
-
|
|
1922
|
-
account
|
|
1923
|
-
.command(`get-session`)
|
|
1924
|
-
.description(`Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.`)
|
|
1925
|
-
.requiredOption(`--session-id <session-id>`, `Session ID. Use the string 'current' to get the current device session.`)
|
|
1926
|
-
.action(actionRunner(accountGetSession))
|
|
1927
|
-
|
|
1928
|
-
account
|
|
1929
|
-
.command(`update-session`)
|
|
1930
|
-
.description(`Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.`)
|
|
1931
|
-
.requiredOption(`--session-id <session-id>`, `Session ID. Use the string 'current' to update the current device session.`)
|
|
1932
|
-
.action(actionRunner(accountUpdateSession))
|
|
1933
|
-
|
|
1934
|
-
account
|
|
1935
|
-
.command(`delete-session`)
|
|
1936
|
-
.description(`Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.`)
|
|
1937
|
-
.requiredOption(`--session-id <session-id>`, `Session ID. Use the string 'current' to delete the current device session.`)
|
|
1938
|
-
.action(actionRunner(accountDeleteSession))
|
|
1939
|
-
|
|
1940
|
-
account
|
|
1941
|
-
.command(`update-status`)
|
|
1942
|
-
.description(`Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.`)
|
|
1943
|
-
.action(actionRunner(accountUpdateStatus))
|
|
1944
|
-
|
|
1945
|
-
account
|
|
1946
|
-
.command(`create-push-target`)
|
|
1947
|
-
.description(`Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.`)
|
|
1948
|
-
.requiredOption(`--target-id <target-id>`, `Target ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
1949
|
-
.requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
|
|
1950
|
-
.option(`--provider-id <provider-id>`, `Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.`)
|
|
1951
|
-
.action(actionRunner(accountCreatePushTarget))
|
|
1952
|
-
|
|
1953
|
-
account
|
|
1954
|
-
.command(`update-push-target`)
|
|
1955
|
-
.description(`Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.`)
|
|
1956
|
-
.requiredOption(`--target-id <target-id>`, `Target ID.`)
|
|
1957
|
-
.requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
|
|
1958
|
-
.action(actionRunner(accountUpdatePushTarget))
|
|
1959
|
-
|
|
1960
|
-
account
|
|
1961
|
-
.command(`delete-push-target`)
|
|
1962
|
-
.description(`Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.`)
|
|
1963
|
-
.requiredOption(`--target-id <target-id>`, `Target ID.`)
|
|
1964
|
-
.action(actionRunner(accountDeletePushTarget))
|
|
1965
|
-
|
|
1966
|
-
account
|
|
1967
|
-
.command(`create-email-token`)
|
|
1968
|
-
.description(`Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`)
|
|
1969
|
-
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
1970
|
-
.requiredOption(`--email <email>`, `User email.`)
|
|
1971
|
-
.option(`--phrase [value]`, `Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.`, (value) => value === undefined ? true : parseBool(value))
|
|
1972
|
-
.action(actionRunner(accountCreateEmailToken))
|
|
1973
|
-
|
|
1974
|
-
account
|
|
1975
|
-
.command(`create-magic-url-token`)
|
|
1976
|
-
.description(`Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). `)
|
|
1977
|
-
.requiredOption(`--user-id <user-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
1978
|
-
.requiredOption(`--email <email>`, `User email.`)
|
|
1979
|
-
.option(`--url <url>`, `URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
|
|
1980
|
-
.option(`--phrase [value]`, `Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.`, (value) => value === undefined ? true : parseBool(value))
|
|
1981
|
-
.action(actionRunner(accountCreateMagicURLToken))
|
|
1982
|
-
|
|
1983
|
-
account
|
|
1984
|
-
.command(`create-o-auth-2-token`)
|
|
1985
|
-
.description(`Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. If authentication succeeds, 'userId' and 'secret' of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`)
|
|
1986
|
-
.requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`)
|
|
1987
|
-
.option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
|
|
1988
|
-
.option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
|
|
1989
|
-
.option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`)
|
|
1990
|
-
.action(actionRunner(accountCreateOAuth2Token))
|
|
1991
|
-
|
|
1992
|
-
account
|
|
1993
|
-
.command(`create-phone-token`)
|
|
1994
|
-
.description(`Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`)
|
|
1995
|
-
.requiredOption(`--user-id <user-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
1996
|
-
.requiredOption(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
|
|
1997
|
-
.action(actionRunner(accountCreatePhoneToken))
|
|
1998
|
-
|
|
1999
|
-
account
|
|
2000
|
-
.command(`create-verification`)
|
|
2001
|
-
.description(`Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. `)
|
|
2002
|
-
.requiredOption(`--url <url>`, `URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
|
|
2003
|
-
.action(actionRunner(accountCreateVerification))
|
|
2004
|
-
|
|
2005
|
-
account
|
|
2006
|
-
.command(`update-verification`)
|
|
2007
|
-
.description(`Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.`)
|
|
2008
|
-
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
2009
|
-
.requiredOption(`--secret <secret>`, `Valid verification token.`)
|
|
2010
|
-
.action(actionRunner(accountUpdateVerification))
|
|
2011
|
-
|
|
2012
|
-
account
|
|
2013
|
-
.command(`create-phone-verification`)
|
|
2014
|
-
.description(`Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.`)
|
|
2015
|
-
.action(actionRunner(accountCreatePhoneVerification))
|
|
2016
|
-
|
|
2017
|
-
account
|
|
2018
|
-
.command(`update-phone-verification`)
|
|
2019
|
-
.description(`Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.`)
|
|
2020
|
-
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
2021
|
-
.requiredOption(`--secret <secret>`, `Valid verification token.`)
|
|
2022
|
-
.action(actionRunner(accountUpdatePhoneVerification))
|
|
2023
|
-
|
|
2024
|
-
module.exports = {
|
|
2025
|
-
account,
|
|
2026
|
-
accountGet,
|
|
2027
|
-
accountCreate,
|
|
2028
|
-
accountDelete,
|
|
2029
|
-
accountUpdateEmail,
|
|
2030
|
-
accountListIdentities,
|
|
2031
|
-
accountDeleteIdentity,
|
|
2032
|
-
accountCreateJWT,
|
|
2033
|
-
accountListLogs,
|
|
2034
|
-
accountUpdateMFA,
|
|
2035
|
-
accountCreateMfaAuthenticator,
|
|
2036
|
-
accountUpdateMfaAuthenticator,
|
|
2037
|
-
accountDeleteMfaAuthenticator,
|
|
2038
|
-
accountCreateMfaChallenge,
|
|
2039
|
-
accountUpdateMfaChallenge,
|
|
2040
|
-
accountListMfaFactors,
|
|
2041
|
-
accountGetMfaRecoveryCodes,
|
|
2042
|
-
accountCreateMfaRecoveryCodes,
|
|
2043
|
-
accountUpdateMfaRecoveryCodes,
|
|
2044
|
-
accountUpdateName,
|
|
2045
|
-
accountUpdatePassword,
|
|
2046
|
-
accountUpdatePhone,
|
|
2047
|
-
accountGetPrefs,
|
|
2048
|
-
accountUpdatePrefs,
|
|
2049
|
-
accountCreateRecovery,
|
|
2050
|
-
accountUpdateRecovery,
|
|
2051
|
-
accountListSessions,
|
|
2052
|
-
accountDeleteSessions,
|
|
2053
|
-
accountCreateAnonymousSession,
|
|
2054
|
-
accountCreateEmailPasswordSession,
|
|
2055
|
-
accountUpdateMagicURLSession,
|
|
2056
|
-
accountCreateOAuth2Session,
|
|
2057
|
-
accountUpdatePhoneSession,
|
|
2058
|
-
accountCreateSession,
|
|
2059
|
-
accountGetSession,
|
|
2060
|
-
accountUpdateSession,
|
|
2061
|
-
accountDeleteSession,
|
|
2062
|
-
accountUpdateStatus,
|
|
2063
|
-
accountCreatePushTarget,
|
|
2064
|
-
accountUpdatePushTarget,
|
|
2065
|
-
accountDeletePushTarget,
|
|
2066
|
-
accountCreateEmailToken,
|
|
2067
|
-
accountCreateMagicURLToken,
|
|
2068
|
-
accountCreateOAuth2Token,
|
|
2069
|
-
accountCreatePhoneToken,
|
|
2070
|
-
accountCreateVerification,
|
|
2071
|
-
accountUpdateVerification,
|
|
2072
|
-
accountCreatePhoneVerification,
|
|
2073
|
-
accountUpdatePhoneVerification
|
|
2074
|
-
};
|