chirag-appwrite-cli 0.1.0 → 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.json +0 -164
- 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.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-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/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 -18
- package/index.js +0 -109
- 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/teams.js +0 -682
- package/lib/commands/tokens.js +0 -261
- package/lib/commands/types.js +0 -156
- package/lib/commands/users.js +0 -2035
- package/lib/commands/vcs.js +0 -484
- package/lib/config.js +0 -705
- 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 -84
- package/lib/type-generation/languages/language.js +0 -125
- package/lib/type-generation/languages/php.js +0 -109
- package/lib/type-generation/languages/swift.js +0 -169
- package/lib/type-generation/languages/typescript.js +0 -102
- package/lib/utils.js +0 -289
- package/lib/validations.js +0 -17
- package/scoop/appwrite.json +0 -30
- package/sites/JavaScript starter/.env.example +0 -3
- package/sites/JavaScript starter/LICENSE +0 -21
- package/sites/JavaScript starter/images/appwrite.svg +0 -8
- package/sites/JavaScript starter/images/javascript.svg +0 -5
- package/sites/JavaScript starter/index.html +0 -250
- package/sites/JavaScript starter/lib/appwrite.js +0 -10
- package/sites/JavaScript starter/package-lock.json +0 -1431
- package/sites/JavaScript starter/package.json +0 -21
- package/sites/JavaScript starter/readme.md +0 -26
- package/sites/JavaScript starter/src/javascript.svg +0 -1
- package/sites/JavaScript starter/style/app.css +0 -20
- package/sites/JavaScript starter/vite.config.js +0 -7
|
@@ -0,0 +1,1317 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { sdkForProject } from "../../sdks.js";
|
|
3
|
+
import {
|
|
4
|
+
actionRunner,
|
|
5
|
+
commandDescriptions,
|
|
6
|
+
parseBool,
|
|
7
|
+
parseInteger,
|
|
8
|
+
} from "../../parser.js";
|
|
9
|
+
import {
|
|
10
|
+
Projects,
|
|
11
|
+
AuthMethod,
|
|
12
|
+
OAuthProvider,
|
|
13
|
+
PlatformType,
|
|
14
|
+
ApiService,
|
|
15
|
+
SMTPSecure,
|
|
16
|
+
EmailTemplateType,
|
|
17
|
+
EmailTemplateLocale,
|
|
18
|
+
SmsTemplateType,
|
|
19
|
+
SmsTemplateLocale,
|
|
20
|
+
} from "@appwrite.io/console";
|
|
21
|
+
|
|
22
|
+
let projectsClient: Projects | null = null;
|
|
23
|
+
|
|
24
|
+
const getProjectsClient = async (): Promise<Projects> => {
|
|
25
|
+
if (!projectsClient) {
|
|
26
|
+
const sdkClient = await sdkForProject();
|
|
27
|
+
projectsClient = new Projects(sdkClient);
|
|
28
|
+
}
|
|
29
|
+
return projectsClient;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const projects = new Command("projects")
|
|
33
|
+
.description(commandDescriptions["projects"] ?? "")
|
|
34
|
+
.configureHelp({
|
|
35
|
+
helpWidth: process.stdout.columns || 80,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
projects
|
|
39
|
+
.command(`list`)
|
|
40
|
+
.description(
|
|
41
|
+
`Get a list of all projects. You can use the query params to filter your results. `,
|
|
42
|
+
)
|
|
43
|
+
.option(
|
|
44
|
+
`--queries [queries...]`,
|
|
45
|
+
`Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId`,
|
|
46
|
+
)
|
|
47
|
+
.option(
|
|
48
|
+
`--search <search>`,
|
|
49
|
+
`Search term to filter your list results. Max length: 256 chars.`,
|
|
50
|
+
)
|
|
51
|
+
.option(
|
|
52
|
+
`--total [value]`,
|
|
53
|
+
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
54
|
+
(value: string | undefined) =>
|
|
55
|
+
value === undefined ? true : parseBool(value),
|
|
56
|
+
)
|
|
57
|
+
.action(
|
|
58
|
+
actionRunner(
|
|
59
|
+
async ({ queries, search, total }) =>
|
|
60
|
+
await (await getProjectsClient()).list(queries, search, total),
|
|
61
|
+
),
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
projects
|
|
65
|
+
.command(`create`)
|
|
66
|
+
.description(
|
|
67
|
+
`Create a new project. You can create a maximum of 100 projects per account. `,
|
|
68
|
+
)
|
|
69
|
+
.requiredOption(
|
|
70
|
+
`--project-id <project-id>`,
|
|
71
|
+
`Unique Id. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.`,
|
|
72
|
+
)
|
|
73
|
+
.requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
|
|
74
|
+
.requiredOption(`--team-id <team-id>`, `Team unique ID.`)
|
|
75
|
+
.option(`--region <region>`, `Project Region.`)
|
|
76
|
+
.option(
|
|
77
|
+
`--description <description>`,
|
|
78
|
+
`Project description. Max length: 256 chars.`,
|
|
79
|
+
)
|
|
80
|
+
.option(`--logo <logo>`, `Project logo.`)
|
|
81
|
+
.option(`--url <url>`, `Project URL.`)
|
|
82
|
+
.option(
|
|
83
|
+
`--legal-name <legal-name>`,
|
|
84
|
+
`Project legal Name. Max length: 256 chars.`,
|
|
85
|
+
)
|
|
86
|
+
.option(
|
|
87
|
+
`--legal-country <legal-country>`,
|
|
88
|
+
`Project legal Country. Max length: 256 chars.`,
|
|
89
|
+
)
|
|
90
|
+
.option(
|
|
91
|
+
`--legal-state <legal-state>`,
|
|
92
|
+
`Project legal State. Max length: 256 chars.`,
|
|
93
|
+
)
|
|
94
|
+
.option(
|
|
95
|
+
`--legal-city <legal-city>`,
|
|
96
|
+
`Project legal City. Max length: 256 chars.`,
|
|
97
|
+
)
|
|
98
|
+
.option(
|
|
99
|
+
`--legal-address <legal-address>`,
|
|
100
|
+
`Project legal Address. Max length: 256 chars.`,
|
|
101
|
+
)
|
|
102
|
+
.option(
|
|
103
|
+
`--legal-tax-id <legal-tax-id>`,
|
|
104
|
+
`Project legal Tax ID. Max length: 256 chars.`,
|
|
105
|
+
)
|
|
106
|
+
.action(
|
|
107
|
+
actionRunner(
|
|
108
|
+
async ({
|
|
109
|
+
projectId,
|
|
110
|
+
name,
|
|
111
|
+
teamId,
|
|
112
|
+
region,
|
|
113
|
+
description,
|
|
114
|
+
logo,
|
|
115
|
+
url,
|
|
116
|
+
legalName,
|
|
117
|
+
legalCountry,
|
|
118
|
+
legalState,
|
|
119
|
+
legalCity,
|
|
120
|
+
legalAddress,
|
|
121
|
+
legalTaxId,
|
|
122
|
+
}) =>
|
|
123
|
+
await (
|
|
124
|
+
await getProjectsClient()
|
|
125
|
+
).create(
|
|
126
|
+
projectId,
|
|
127
|
+
name,
|
|
128
|
+
teamId,
|
|
129
|
+
region,
|
|
130
|
+
description,
|
|
131
|
+
logo,
|
|
132
|
+
url,
|
|
133
|
+
legalName,
|
|
134
|
+
legalCountry,
|
|
135
|
+
legalState,
|
|
136
|
+
legalCity,
|
|
137
|
+
legalAddress,
|
|
138
|
+
legalTaxId,
|
|
139
|
+
),
|
|
140
|
+
),
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
projects
|
|
144
|
+
.command(`get`)
|
|
145
|
+
.description(
|
|
146
|
+
`Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. `,
|
|
147
|
+
)
|
|
148
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
149
|
+
.action(
|
|
150
|
+
actionRunner(
|
|
151
|
+
async ({ projectId }) => await (await getProjectsClient()).get(projectId),
|
|
152
|
+
),
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
projects
|
|
156
|
+
.command(`update`)
|
|
157
|
+
.description(`Update a project by its unique ID.`)
|
|
158
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
159
|
+
.requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
|
|
160
|
+
.option(
|
|
161
|
+
`--description <description>`,
|
|
162
|
+
`Project description. Max length: 256 chars.`,
|
|
163
|
+
)
|
|
164
|
+
.option(`--logo <logo>`, `Project logo.`)
|
|
165
|
+
.option(`--url <url>`, `Project URL.`)
|
|
166
|
+
.option(
|
|
167
|
+
`--legal-name <legal-name>`,
|
|
168
|
+
`Project legal name. Max length: 256 chars.`,
|
|
169
|
+
)
|
|
170
|
+
.option(
|
|
171
|
+
`--legal-country <legal-country>`,
|
|
172
|
+
`Project legal country. Max length: 256 chars.`,
|
|
173
|
+
)
|
|
174
|
+
.option(
|
|
175
|
+
`--legal-state <legal-state>`,
|
|
176
|
+
`Project legal state. Max length: 256 chars.`,
|
|
177
|
+
)
|
|
178
|
+
.option(
|
|
179
|
+
`--legal-city <legal-city>`,
|
|
180
|
+
`Project legal city. Max length: 256 chars.`,
|
|
181
|
+
)
|
|
182
|
+
.option(
|
|
183
|
+
`--legal-address <legal-address>`,
|
|
184
|
+
`Project legal address. Max length: 256 chars.`,
|
|
185
|
+
)
|
|
186
|
+
.option(
|
|
187
|
+
`--legal-tax-id <legal-tax-id>`,
|
|
188
|
+
`Project legal tax ID. Max length: 256 chars.`,
|
|
189
|
+
)
|
|
190
|
+
.action(
|
|
191
|
+
actionRunner(
|
|
192
|
+
async ({
|
|
193
|
+
projectId,
|
|
194
|
+
name,
|
|
195
|
+
description,
|
|
196
|
+
logo,
|
|
197
|
+
url,
|
|
198
|
+
legalName,
|
|
199
|
+
legalCountry,
|
|
200
|
+
legalState,
|
|
201
|
+
legalCity,
|
|
202
|
+
legalAddress,
|
|
203
|
+
legalTaxId,
|
|
204
|
+
}) =>
|
|
205
|
+
await (
|
|
206
|
+
await getProjectsClient()
|
|
207
|
+
).update(
|
|
208
|
+
projectId,
|
|
209
|
+
name,
|
|
210
|
+
description,
|
|
211
|
+
logo,
|
|
212
|
+
url,
|
|
213
|
+
legalName,
|
|
214
|
+
legalCountry,
|
|
215
|
+
legalState,
|
|
216
|
+
legalCity,
|
|
217
|
+
legalAddress,
|
|
218
|
+
legalTaxId,
|
|
219
|
+
),
|
|
220
|
+
),
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
projects
|
|
224
|
+
.command(`delete`)
|
|
225
|
+
.description(`Delete a project by its unique ID.`)
|
|
226
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
227
|
+
.action(
|
|
228
|
+
actionRunner(
|
|
229
|
+
async ({ projectId }) =>
|
|
230
|
+
await (await getProjectsClient()).delete(projectId),
|
|
231
|
+
),
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
projects
|
|
235
|
+
.command(`update-api-status`)
|
|
236
|
+
.description(
|
|
237
|
+
`[**DEPRECATED** - This command is deprecated. Please use 'projects updateApiStatus' instead] Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`,
|
|
238
|
+
)
|
|
239
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
240
|
+
.requiredOption(`--api <api>`, `API name.`)
|
|
241
|
+
.requiredOption(`--status <status>`, `API status.`, parseBool)
|
|
242
|
+
.action(
|
|
243
|
+
actionRunner(
|
|
244
|
+
async ({ projectId, api, status }) =>
|
|
245
|
+
await (
|
|
246
|
+
await getProjectsClient()
|
|
247
|
+
).updateApiStatus(projectId, api, status),
|
|
248
|
+
),
|
|
249
|
+
);
|
|
250
|
+
|
|
251
|
+
projects
|
|
252
|
+
.command(`update-api-status-all`)
|
|
253
|
+
.description(
|
|
254
|
+
`[**DEPRECATED** - This command is deprecated. Please use 'projects updateApiStatusAll' instead] Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.`,
|
|
255
|
+
)
|
|
256
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
257
|
+
.requiredOption(`--status <status>`, `API status.`, parseBool)
|
|
258
|
+
.action(
|
|
259
|
+
actionRunner(
|
|
260
|
+
async ({ projectId, status }) =>
|
|
261
|
+
await (await getProjectsClient()).updateApiStatusAll(projectId, status),
|
|
262
|
+
),
|
|
263
|
+
);
|
|
264
|
+
|
|
265
|
+
projects
|
|
266
|
+
.command(`update-auth-duration`)
|
|
267
|
+
.description(
|
|
268
|
+
`Update how long sessions created within a project should stay active for.`,
|
|
269
|
+
)
|
|
270
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
271
|
+
.requiredOption(
|
|
272
|
+
`--duration <duration>`,
|
|
273
|
+
`Project session length in seconds. Max length: 31536000 seconds.`,
|
|
274
|
+
parseInteger,
|
|
275
|
+
)
|
|
276
|
+
.action(
|
|
277
|
+
actionRunner(
|
|
278
|
+
async ({ projectId, duration }) =>
|
|
279
|
+
await (
|
|
280
|
+
await getProjectsClient()
|
|
281
|
+
).updateAuthDuration(projectId, duration),
|
|
282
|
+
),
|
|
283
|
+
);
|
|
284
|
+
|
|
285
|
+
projects
|
|
286
|
+
.command(`update-auth-limit`)
|
|
287
|
+
.description(
|
|
288
|
+
`Update the maximum number of users allowed in this project. Set to 0 for unlimited users. `,
|
|
289
|
+
)
|
|
290
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
291
|
+
.requiredOption(
|
|
292
|
+
`--limit <limit>`,
|
|
293
|
+
`Set the max number of users allowed in this project. Use 0 for unlimited.`,
|
|
294
|
+
parseInteger,
|
|
295
|
+
)
|
|
296
|
+
.action(
|
|
297
|
+
actionRunner(
|
|
298
|
+
async ({ projectId, limit }) =>
|
|
299
|
+
await (await getProjectsClient()).updateAuthLimit(projectId, limit),
|
|
300
|
+
),
|
|
301
|
+
);
|
|
302
|
+
|
|
303
|
+
projects
|
|
304
|
+
.command(`update-auth-sessions-limit`)
|
|
305
|
+
.description(
|
|
306
|
+
`Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.`,
|
|
307
|
+
)
|
|
308
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
309
|
+
.requiredOption(
|
|
310
|
+
`--limit <limit>`,
|
|
311
|
+
`Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10`,
|
|
312
|
+
parseInteger,
|
|
313
|
+
)
|
|
314
|
+
.action(
|
|
315
|
+
actionRunner(
|
|
316
|
+
async ({ projectId, limit }) =>
|
|
317
|
+
await (
|
|
318
|
+
await getProjectsClient()
|
|
319
|
+
).updateAuthSessionsLimit(projectId, limit),
|
|
320
|
+
),
|
|
321
|
+
);
|
|
322
|
+
|
|
323
|
+
projects
|
|
324
|
+
.command(`update-memberships-privacy`)
|
|
325
|
+
.description(
|
|
326
|
+
`Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. `,
|
|
327
|
+
)
|
|
328
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
329
|
+
.requiredOption(
|
|
330
|
+
`--user-name <user-name>`,
|
|
331
|
+
`Set to true to show userName to members of a team.`,
|
|
332
|
+
parseBool,
|
|
333
|
+
)
|
|
334
|
+
.requiredOption(
|
|
335
|
+
`--user-email <user-email>`,
|
|
336
|
+
`Set to true to show email to members of a team.`,
|
|
337
|
+
parseBool,
|
|
338
|
+
)
|
|
339
|
+
.requiredOption(
|
|
340
|
+
`--mfa <mfa>`,
|
|
341
|
+
`Set to true to show mfa to members of a team.`,
|
|
342
|
+
parseBool,
|
|
343
|
+
)
|
|
344
|
+
.action(
|
|
345
|
+
actionRunner(
|
|
346
|
+
async ({ projectId, userName, userEmail, mfa }) =>
|
|
347
|
+
await (
|
|
348
|
+
await getProjectsClient()
|
|
349
|
+
).updateMembershipsPrivacy(projectId, userName, userEmail, mfa),
|
|
350
|
+
),
|
|
351
|
+
);
|
|
352
|
+
|
|
353
|
+
projects
|
|
354
|
+
.command(`update-mock-numbers`)
|
|
355
|
+
.description(
|
|
356
|
+
`Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. `,
|
|
357
|
+
)
|
|
358
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
359
|
+
.requiredOption(
|
|
360
|
+
`--numbers [numbers...]`,
|
|
361
|
+
`An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.`,
|
|
362
|
+
)
|
|
363
|
+
.action(
|
|
364
|
+
actionRunner(
|
|
365
|
+
async ({ projectId, numbers }) =>
|
|
366
|
+
await (await getProjectsClient()).updateMockNumbers(projectId, numbers),
|
|
367
|
+
),
|
|
368
|
+
);
|
|
369
|
+
|
|
370
|
+
projects
|
|
371
|
+
.command(`update-auth-password-dictionary`)
|
|
372
|
+
.description(
|
|
373
|
+
`Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. `,
|
|
374
|
+
)
|
|
375
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
376
|
+
.requiredOption(
|
|
377
|
+
`--enabled <enabled>`,
|
|
378
|
+
`Set whether or not to enable checking user's password against most commonly used passwords. Default is false.`,
|
|
379
|
+
parseBool,
|
|
380
|
+
)
|
|
381
|
+
.action(
|
|
382
|
+
actionRunner(
|
|
383
|
+
async ({ projectId, enabled }) =>
|
|
384
|
+
await (
|
|
385
|
+
await getProjectsClient()
|
|
386
|
+
).updateAuthPasswordDictionary(projectId, enabled),
|
|
387
|
+
),
|
|
388
|
+
);
|
|
389
|
+
|
|
390
|
+
projects
|
|
391
|
+
.command(`update-auth-password-history`)
|
|
392
|
+
.description(
|
|
393
|
+
`Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.`,
|
|
394
|
+
)
|
|
395
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
396
|
+
.requiredOption(
|
|
397
|
+
`--limit <limit>`,
|
|
398
|
+
`Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0`,
|
|
399
|
+
parseInteger,
|
|
400
|
+
)
|
|
401
|
+
.action(
|
|
402
|
+
actionRunner(
|
|
403
|
+
async ({ projectId, limit }) =>
|
|
404
|
+
await (
|
|
405
|
+
await getProjectsClient()
|
|
406
|
+
).updateAuthPasswordHistory(projectId, limit),
|
|
407
|
+
),
|
|
408
|
+
);
|
|
409
|
+
|
|
410
|
+
projects
|
|
411
|
+
.command(`update-personal-data-check`)
|
|
412
|
+
.description(
|
|
413
|
+
`Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. `,
|
|
414
|
+
)
|
|
415
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
416
|
+
.requiredOption(
|
|
417
|
+
`--enabled <enabled>`,
|
|
418
|
+
`Set whether or not to check a password for similarity with personal data. Default is false.`,
|
|
419
|
+
parseBool,
|
|
420
|
+
)
|
|
421
|
+
.action(
|
|
422
|
+
actionRunner(
|
|
423
|
+
async ({ projectId, enabled }) =>
|
|
424
|
+
await (
|
|
425
|
+
await getProjectsClient()
|
|
426
|
+
).updatePersonalDataCheck(projectId, enabled),
|
|
427
|
+
),
|
|
428
|
+
);
|
|
429
|
+
|
|
430
|
+
projects
|
|
431
|
+
.command(`update-session-alerts`)
|
|
432
|
+
.description(
|
|
433
|
+
`Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.`,
|
|
434
|
+
)
|
|
435
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
436
|
+
.requiredOption(
|
|
437
|
+
`--alerts <alerts>`,
|
|
438
|
+
`Set to true to enable session emails.`,
|
|
439
|
+
parseBool,
|
|
440
|
+
)
|
|
441
|
+
.action(
|
|
442
|
+
actionRunner(
|
|
443
|
+
async ({ projectId, alerts }) =>
|
|
444
|
+
await (
|
|
445
|
+
await getProjectsClient()
|
|
446
|
+
).updateSessionAlerts(projectId, alerts),
|
|
447
|
+
),
|
|
448
|
+
);
|
|
449
|
+
|
|
450
|
+
projects
|
|
451
|
+
.command(`update-session-invalidation`)
|
|
452
|
+
.description(
|
|
453
|
+
`Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.`,
|
|
454
|
+
)
|
|
455
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
456
|
+
.requiredOption(
|
|
457
|
+
`--enabled <enabled>`,
|
|
458
|
+
`Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change`,
|
|
459
|
+
parseBool,
|
|
460
|
+
)
|
|
461
|
+
.action(
|
|
462
|
+
actionRunner(
|
|
463
|
+
async ({ projectId, enabled }) =>
|
|
464
|
+
await (
|
|
465
|
+
await getProjectsClient()
|
|
466
|
+
).updateSessionInvalidation(projectId, enabled),
|
|
467
|
+
),
|
|
468
|
+
);
|
|
469
|
+
|
|
470
|
+
projects
|
|
471
|
+
.command(`update-auth-status`)
|
|
472
|
+
.description(
|
|
473
|
+
`Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. `,
|
|
474
|
+
)
|
|
475
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
476
|
+
.requiredOption(
|
|
477
|
+
`--method <method>`,
|
|
478
|
+
`Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone`,
|
|
479
|
+
)
|
|
480
|
+
.requiredOption(
|
|
481
|
+
`--status <status>`,
|
|
482
|
+
`Set the status of this auth method.`,
|
|
483
|
+
parseBool,
|
|
484
|
+
)
|
|
485
|
+
.action(
|
|
486
|
+
actionRunner(
|
|
487
|
+
async ({ projectId, method, status }) =>
|
|
488
|
+
await (
|
|
489
|
+
await getProjectsClient()
|
|
490
|
+
).updateAuthStatus(projectId, method as AuthMethod, status),
|
|
491
|
+
),
|
|
492
|
+
);
|
|
493
|
+
|
|
494
|
+
projects
|
|
495
|
+
.command(`list-dev-keys`)
|
|
496
|
+
.description(
|
|
497
|
+
`List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'`,
|
|
498
|
+
)
|
|
499
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
500
|
+
.option(
|
|
501
|
+
`--queries [queries...]`,
|
|
502
|
+
`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: accessedAt, expire`,
|
|
503
|
+
)
|
|
504
|
+
.action(
|
|
505
|
+
actionRunner(
|
|
506
|
+
async ({ projectId, queries }) =>
|
|
507
|
+
await (await getProjectsClient()).listDevKeys(projectId, queries),
|
|
508
|
+
),
|
|
509
|
+
);
|
|
510
|
+
|
|
511
|
+
projects
|
|
512
|
+
.command(`create-dev-key`)
|
|
513
|
+
.description(
|
|
514
|
+
`Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.`,
|
|
515
|
+
)
|
|
516
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
517
|
+
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
518
|
+
.requiredOption(
|
|
519
|
+
`--expire <expire>`,
|
|
520
|
+
`Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.`,
|
|
521
|
+
)
|
|
522
|
+
.action(
|
|
523
|
+
actionRunner(
|
|
524
|
+
async ({ projectId, name, expire }) =>
|
|
525
|
+
await (await getProjectsClient()).createDevKey(projectId, name, expire),
|
|
526
|
+
),
|
|
527
|
+
);
|
|
528
|
+
|
|
529
|
+
projects
|
|
530
|
+
.command(`get-dev-key`)
|
|
531
|
+
.description(
|
|
532
|
+
`Get a project\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.`,
|
|
533
|
+
)
|
|
534
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
535
|
+
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
536
|
+
.action(
|
|
537
|
+
actionRunner(
|
|
538
|
+
async ({ projectId, keyId }) =>
|
|
539
|
+
await (await getProjectsClient()).getDevKey(projectId, keyId),
|
|
540
|
+
),
|
|
541
|
+
);
|
|
542
|
+
|
|
543
|
+
projects
|
|
544
|
+
.command(`update-dev-key`)
|
|
545
|
+
.description(
|
|
546
|
+
`Update a project\'s dev key by its unique ID. Use this endpoint to update a project\'s dev key name or expiration time.'`,
|
|
547
|
+
)
|
|
548
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
549
|
+
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
550
|
+
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
551
|
+
.requiredOption(
|
|
552
|
+
`--expire <expire>`,
|
|
553
|
+
`Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.`,
|
|
554
|
+
)
|
|
555
|
+
.action(
|
|
556
|
+
actionRunner(
|
|
557
|
+
async ({ projectId, keyId, name, expire }) =>
|
|
558
|
+
await (
|
|
559
|
+
await getProjectsClient()
|
|
560
|
+
).updateDevKey(projectId, keyId, name, expire),
|
|
561
|
+
),
|
|
562
|
+
);
|
|
563
|
+
|
|
564
|
+
projects
|
|
565
|
+
.command(`delete-dev-key`)
|
|
566
|
+
.description(
|
|
567
|
+
`Delete a project\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.`,
|
|
568
|
+
)
|
|
569
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
570
|
+
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
571
|
+
.action(
|
|
572
|
+
actionRunner(
|
|
573
|
+
async ({ projectId, keyId }) =>
|
|
574
|
+
await (await getProjectsClient()).deleteDevKey(projectId, keyId),
|
|
575
|
+
),
|
|
576
|
+
);
|
|
577
|
+
|
|
578
|
+
projects
|
|
579
|
+
.command(`create-jwt`)
|
|
580
|
+
.description(
|
|
581
|
+
`Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. `,
|
|
582
|
+
)
|
|
583
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
584
|
+
.requiredOption(
|
|
585
|
+
`--scopes [scopes...]`,
|
|
586
|
+
`List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.`,
|
|
587
|
+
)
|
|
588
|
+
.option(
|
|
589
|
+
`--duration <duration>`,
|
|
590
|
+
`Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.`,
|
|
591
|
+
parseInteger,
|
|
592
|
+
)
|
|
593
|
+
.action(
|
|
594
|
+
actionRunner(
|
|
595
|
+
async ({ projectId, scopes, duration }) =>
|
|
596
|
+
await (
|
|
597
|
+
await getProjectsClient()
|
|
598
|
+
).createJWT(projectId, scopes, duration),
|
|
599
|
+
),
|
|
600
|
+
);
|
|
601
|
+
|
|
602
|
+
projects
|
|
603
|
+
.command(`list-keys`)
|
|
604
|
+
.description(`Get a list of all API keys from the current project. `)
|
|
605
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
606
|
+
.option(
|
|
607
|
+
`--total [value]`,
|
|
608
|
+
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
609
|
+
(value: string | undefined) =>
|
|
610
|
+
value === undefined ? true : parseBool(value),
|
|
611
|
+
)
|
|
612
|
+
.action(
|
|
613
|
+
actionRunner(
|
|
614
|
+
async ({ projectId, total }) =>
|
|
615
|
+
await (await getProjectsClient()).listKeys(projectId, total),
|
|
616
|
+
),
|
|
617
|
+
);
|
|
618
|
+
|
|
619
|
+
projects
|
|
620
|
+
.command(`create-key`)
|
|
621
|
+
.description(
|
|
622
|
+
`Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.`,
|
|
623
|
+
)
|
|
624
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
625
|
+
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
626
|
+
.requiredOption(
|
|
627
|
+
`--scopes [scopes...]`,
|
|
628
|
+
`Key scopes list. Maximum of 100 scopes are allowed.`,
|
|
629
|
+
)
|
|
630
|
+
.option(
|
|
631
|
+
`--expire <expire>`,
|
|
632
|
+
`Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`,
|
|
633
|
+
)
|
|
634
|
+
.action(
|
|
635
|
+
actionRunner(
|
|
636
|
+
async ({ projectId, name, scopes, expire }) =>
|
|
637
|
+
await (
|
|
638
|
+
await getProjectsClient()
|
|
639
|
+
).createKey(projectId, name, scopes, expire),
|
|
640
|
+
),
|
|
641
|
+
);
|
|
642
|
+
|
|
643
|
+
projects
|
|
644
|
+
.command(`get-key`)
|
|
645
|
+
.description(
|
|
646
|
+
`Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.`,
|
|
647
|
+
)
|
|
648
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
649
|
+
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
650
|
+
.action(
|
|
651
|
+
actionRunner(
|
|
652
|
+
async ({ projectId, keyId }) =>
|
|
653
|
+
await (await getProjectsClient()).getKey(projectId, keyId),
|
|
654
|
+
),
|
|
655
|
+
);
|
|
656
|
+
|
|
657
|
+
projects
|
|
658
|
+
.command(`update-key`)
|
|
659
|
+
.description(
|
|
660
|
+
`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. `,
|
|
661
|
+
)
|
|
662
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
663
|
+
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
664
|
+
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
665
|
+
.requiredOption(
|
|
666
|
+
`--scopes [scopes...]`,
|
|
667
|
+
`Key scopes list. Maximum of 100 events are allowed.`,
|
|
668
|
+
)
|
|
669
|
+
.option(
|
|
670
|
+
`--expire <expire>`,
|
|
671
|
+
`Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`,
|
|
672
|
+
)
|
|
673
|
+
.action(
|
|
674
|
+
actionRunner(
|
|
675
|
+
async ({ projectId, keyId, name, scopes, expire }) =>
|
|
676
|
+
await (
|
|
677
|
+
await getProjectsClient()
|
|
678
|
+
).updateKey(projectId, keyId, name, scopes, expire),
|
|
679
|
+
),
|
|
680
|
+
);
|
|
681
|
+
|
|
682
|
+
projects
|
|
683
|
+
.command(`delete-key`)
|
|
684
|
+
.description(
|
|
685
|
+
`Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. `,
|
|
686
|
+
)
|
|
687
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
688
|
+
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
689
|
+
.action(
|
|
690
|
+
actionRunner(
|
|
691
|
+
async ({ projectId, keyId }) =>
|
|
692
|
+
await (await getProjectsClient()).deleteKey(projectId, keyId),
|
|
693
|
+
),
|
|
694
|
+
);
|
|
695
|
+
|
|
696
|
+
projects
|
|
697
|
+
.command(`update-oauth2`)
|
|
698
|
+
.description(
|
|
699
|
+
`Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers. `,
|
|
700
|
+
)
|
|
701
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
702
|
+
.requiredOption(`--provider <provider>`, `Provider Name`)
|
|
703
|
+
.option(`--app-id <app-id>`, `Provider app ID. Max length: 256 chars.`)
|
|
704
|
+
.option(`--secret <secret>`, `Provider secret key. Max length: 512 chars.`)
|
|
705
|
+
.option(
|
|
706
|
+
`--enabled [value]`,
|
|
707
|
+
`Provider status. Set to 'false' to disable new session creation.`,
|
|
708
|
+
(value: string | undefined) =>
|
|
709
|
+
value === undefined ? true : parseBool(value),
|
|
710
|
+
)
|
|
711
|
+
.action(
|
|
712
|
+
actionRunner(
|
|
713
|
+
async ({ projectId, provider, appId, secret, enabled }) =>
|
|
714
|
+
await (
|
|
715
|
+
await getProjectsClient()
|
|
716
|
+
).updateOAuth2(
|
|
717
|
+
projectId,
|
|
718
|
+
provider as OAuthProvider,
|
|
719
|
+
appId,
|
|
720
|
+
secret,
|
|
721
|
+
enabled,
|
|
722
|
+
),
|
|
723
|
+
),
|
|
724
|
+
);
|
|
725
|
+
|
|
726
|
+
projects
|
|
727
|
+
.command(`list-platforms`)
|
|
728
|
+
.description(
|
|
729
|
+
`Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. `,
|
|
730
|
+
)
|
|
731
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
732
|
+
.option(
|
|
733
|
+
`--total [value]`,
|
|
734
|
+
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
735
|
+
(value: string | undefined) =>
|
|
736
|
+
value === undefined ? true : parseBool(value),
|
|
737
|
+
)
|
|
738
|
+
.action(
|
|
739
|
+
actionRunner(
|
|
740
|
+
async ({ projectId, total }) =>
|
|
741
|
+
await (await getProjectsClient()).listPlatforms(projectId, total),
|
|
742
|
+
),
|
|
743
|
+
);
|
|
744
|
+
|
|
745
|
+
projects
|
|
746
|
+
.command(`create-platform`)
|
|
747
|
+
.description(
|
|
748
|
+
`Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.`,
|
|
749
|
+
)
|
|
750
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
751
|
+
.requiredOption(
|
|
752
|
+
`--type <type>`,
|
|
753
|
+
`Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.`,
|
|
754
|
+
)
|
|
755
|
+
.requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
|
|
756
|
+
.option(
|
|
757
|
+
`--key <key>`,
|
|
758
|
+
`Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.`,
|
|
759
|
+
)
|
|
760
|
+
.option(
|
|
761
|
+
`--store <store>`,
|
|
762
|
+
`App store or Google Play store ID. Max length: 256 chars.`,
|
|
763
|
+
)
|
|
764
|
+
.option(
|
|
765
|
+
`--hostname <hostname>`,
|
|
766
|
+
`Platform client hostname. Max length: 256 chars.`,
|
|
767
|
+
)
|
|
768
|
+
.action(
|
|
769
|
+
actionRunner(
|
|
770
|
+
async ({ projectId, xType, name, key, store, hostname }) =>
|
|
771
|
+
await (
|
|
772
|
+
await getProjectsClient()
|
|
773
|
+
).createPlatform(
|
|
774
|
+
projectId,
|
|
775
|
+
xType as PlatformType,
|
|
776
|
+
name,
|
|
777
|
+
key,
|
|
778
|
+
store,
|
|
779
|
+
hostname,
|
|
780
|
+
),
|
|
781
|
+
),
|
|
782
|
+
);
|
|
783
|
+
|
|
784
|
+
projects
|
|
785
|
+
.command(`get-platform`)
|
|
786
|
+
.description(
|
|
787
|
+
`Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. `,
|
|
788
|
+
)
|
|
789
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
790
|
+
.requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
|
|
791
|
+
.action(
|
|
792
|
+
actionRunner(
|
|
793
|
+
async ({ projectId, platformId }) =>
|
|
794
|
+
await (await getProjectsClient()).getPlatform(projectId, platformId),
|
|
795
|
+
),
|
|
796
|
+
);
|
|
797
|
+
|
|
798
|
+
projects
|
|
799
|
+
.command(`update-platform`)
|
|
800
|
+
.description(
|
|
801
|
+
`Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. `,
|
|
802
|
+
)
|
|
803
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
804
|
+
.requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
|
|
805
|
+
.requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
|
|
806
|
+
.option(
|
|
807
|
+
`--key <key>`,
|
|
808
|
+
`Package name for android or bundle ID for iOS. Max length: 256 chars.`,
|
|
809
|
+
)
|
|
810
|
+
.option(
|
|
811
|
+
`--store <store>`,
|
|
812
|
+
`App store or Google Play store ID. Max length: 256 chars.`,
|
|
813
|
+
)
|
|
814
|
+
.option(
|
|
815
|
+
`--hostname <hostname>`,
|
|
816
|
+
`Platform client URL. Max length: 256 chars.`,
|
|
817
|
+
)
|
|
818
|
+
.action(
|
|
819
|
+
actionRunner(
|
|
820
|
+
async ({ projectId, platformId, name, key, store, hostname }) =>
|
|
821
|
+
await (
|
|
822
|
+
await getProjectsClient()
|
|
823
|
+
).updatePlatform(projectId, platformId, name, key, store, hostname),
|
|
824
|
+
),
|
|
825
|
+
);
|
|
826
|
+
|
|
827
|
+
projects
|
|
828
|
+
.command(`delete-platform`)
|
|
829
|
+
.description(
|
|
830
|
+
`Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. `,
|
|
831
|
+
)
|
|
832
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
833
|
+
.requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
|
|
834
|
+
.action(
|
|
835
|
+
actionRunner(
|
|
836
|
+
async ({ projectId, platformId }) =>
|
|
837
|
+
await (await getProjectsClient()).deletePlatform(projectId, platformId),
|
|
838
|
+
),
|
|
839
|
+
);
|
|
840
|
+
|
|
841
|
+
projects
|
|
842
|
+
.command(`update-service-status`)
|
|
843
|
+
.description(
|
|
844
|
+
`Update the status of a specific service. Use this endpoint to enable or disable a service in your project. `,
|
|
845
|
+
)
|
|
846
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
847
|
+
.requiredOption(`--service <service>`, `Service name.`)
|
|
848
|
+
.requiredOption(`--status <status>`, `Service status.`, parseBool)
|
|
849
|
+
.action(
|
|
850
|
+
actionRunner(
|
|
851
|
+
async ({ projectId, service, status }) =>
|
|
852
|
+
await (
|
|
853
|
+
await getProjectsClient()
|
|
854
|
+
).updateServiceStatus(projectId, service as ApiService, status),
|
|
855
|
+
),
|
|
856
|
+
);
|
|
857
|
+
|
|
858
|
+
projects
|
|
859
|
+
.command(`update-service-status-all`)
|
|
860
|
+
.description(
|
|
861
|
+
`Update the status of all services. Use this endpoint to enable or disable all optional services at once. `,
|
|
862
|
+
)
|
|
863
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
864
|
+
.requiredOption(`--status <status>`, `Service status.`, parseBool)
|
|
865
|
+
.action(
|
|
866
|
+
actionRunner(
|
|
867
|
+
async ({ projectId, status }) =>
|
|
868
|
+
await (
|
|
869
|
+
await getProjectsClient()
|
|
870
|
+
).updateServiceStatusAll(projectId, status),
|
|
871
|
+
),
|
|
872
|
+
);
|
|
873
|
+
|
|
874
|
+
projects
|
|
875
|
+
.command(`update-smtp`)
|
|
876
|
+
.description(
|
|
877
|
+
`[**DEPRECATED** - This command is deprecated. Please use 'projects updateSmtp' instead] Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. `,
|
|
878
|
+
)
|
|
879
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
880
|
+
.requiredOption(
|
|
881
|
+
`--enabled <enabled>`,
|
|
882
|
+
`Enable custom SMTP service`,
|
|
883
|
+
parseBool,
|
|
884
|
+
)
|
|
885
|
+
.option(`--sender-name <sender-name>`, `Name of the email sender`)
|
|
886
|
+
.option(`--sender-email <sender-email>`, `Email of the sender`)
|
|
887
|
+
.option(`--reply-to <reply-to>`, `Reply to email`)
|
|
888
|
+
.option(`--host <host>`, `SMTP server host name`)
|
|
889
|
+
.option(`--port <port>`, `SMTP server port`, parseInteger)
|
|
890
|
+
.option(`--username <username>`, `SMTP server username`)
|
|
891
|
+
.option(`--password <password>`, `SMTP server password`)
|
|
892
|
+
.option(`--secure <secure>`, `Does SMTP server use secure connection`)
|
|
893
|
+
.action(
|
|
894
|
+
actionRunner(
|
|
895
|
+
async ({
|
|
896
|
+
projectId,
|
|
897
|
+
enabled,
|
|
898
|
+
senderName,
|
|
899
|
+
senderEmail,
|
|
900
|
+
replyTo,
|
|
901
|
+
host,
|
|
902
|
+
port,
|
|
903
|
+
username,
|
|
904
|
+
password,
|
|
905
|
+
secure,
|
|
906
|
+
}) =>
|
|
907
|
+
await (
|
|
908
|
+
await getProjectsClient()
|
|
909
|
+
).updateSmtp(
|
|
910
|
+
projectId,
|
|
911
|
+
enabled,
|
|
912
|
+
senderName,
|
|
913
|
+
senderEmail,
|
|
914
|
+
replyTo,
|
|
915
|
+
host,
|
|
916
|
+
port,
|
|
917
|
+
username,
|
|
918
|
+
password,
|
|
919
|
+
secure as SMTPSecure,
|
|
920
|
+
),
|
|
921
|
+
),
|
|
922
|
+
);
|
|
923
|
+
|
|
924
|
+
projects
|
|
925
|
+
.command(`create-smtp-test`)
|
|
926
|
+
.description(
|
|
927
|
+
`[**DEPRECATED** - This command is deprecated. Please use 'projects createSmtpTest' instead] Send a test email to verify SMTP configuration. `,
|
|
928
|
+
)
|
|
929
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
930
|
+
.requiredOption(
|
|
931
|
+
`--emails [emails...]`,
|
|
932
|
+
`Array of emails to send test email to. Maximum of 10 emails are allowed.`,
|
|
933
|
+
)
|
|
934
|
+
.requiredOption(`--sender-name <sender-name>`, `Name of the email sender`)
|
|
935
|
+
.requiredOption(`--sender-email <sender-email>`, `Email of the sender`)
|
|
936
|
+
.option(`--reply-to <reply-to>`, `Reply to email`)
|
|
937
|
+
.requiredOption(`--host <host>`, `SMTP server host name`)
|
|
938
|
+
.option(`--port <port>`, `SMTP server port`, parseInteger)
|
|
939
|
+
.option(`--username <username>`, `SMTP server username`)
|
|
940
|
+
.option(`--password <password>`, `SMTP server password`)
|
|
941
|
+
.option(`--secure <secure>`, `Does SMTP server use secure connection`)
|
|
942
|
+
.action(
|
|
943
|
+
actionRunner(
|
|
944
|
+
async ({
|
|
945
|
+
projectId,
|
|
946
|
+
emails,
|
|
947
|
+
senderName,
|
|
948
|
+
senderEmail,
|
|
949
|
+
replyTo,
|
|
950
|
+
host,
|
|
951
|
+
port,
|
|
952
|
+
username,
|
|
953
|
+
password,
|
|
954
|
+
secure,
|
|
955
|
+
}) =>
|
|
956
|
+
await (
|
|
957
|
+
await getProjectsClient()
|
|
958
|
+
).createSmtpTest(
|
|
959
|
+
projectId,
|
|
960
|
+
emails,
|
|
961
|
+
senderName,
|
|
962
|
+
senderEmail,
|
|
963
|
+
replyTo,
|
|
964
|
+
host,
|
|
965
|
+
port,
|
|
966
|
+
username,
|
|
967
|
+
password,
|
|
968
|
+
secure as SMTPSecure,
|
|
969
|
+
),
|
|
970
|
+
),
|
|
971
|
+
);
|
|
972
|
+
|
|
973
|
+
projects
|
|
974
|
+
.command(`update-team`)
|
|
975
|
+
.description(
|
|
976
|
+
`Update the team ID of a project allowing for it to be transferred to another team.`,
|
|
977
|
+
)
|
|
978
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
979
|
+
.requiredOption(
|
|
980
|
+
`--team-id <team-id>`,
|
|
981
|
+
`Team ID of the team to transfer project to.`,
|
|
982
|
+
)
|
|
983
|
+
.action(
|
|
984
|
+
actionRunner(
|
|
985
|
+
async ({ projectId, teamId }) =>
|
|
986
|
+
await (await getProjectsClient()).updateTeam(projectId, teamId),
|
|
987
|
+
),
|
|
988
|
+
);
|
|
989
|
+
|
|
990
|
+
projects
|
|
991
|
+
.command(`get-email-template`)
|
|
992
|
+
.description(
|
|
993
|
+
`Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. `,
|
|
994
|
+
)
|
|
995
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
996
|
+
.requiredOption(`--type <type>`, `Template type`)
|
|
997
|
+
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
998
|
+
.action(
|
|
999
|
+
actionRunner(
|
|
1000
|
+
async ({ projectId, xType, locale }) =>
|
|
1001
|
+
await (
|
|
1002
|
+
await getProjectsClient()
|
|
1003
|
+
).getEmailTemplate(
|
|
1004
|
+
projectId,
|
|
1005
|
+
xType as EmailTemplateType,
|
|
1006
|
+
locale as EmailTemplateLocale,
|
|
1007
|
+
),
|
|
1008
|
+
),
|
|
1009
|
+
);
|
|
1010
|
+
|
|
1011
|
+
projects
|
|
1012
|
+
.command(`update-email-template`)
|
|
1013
|
+
.description(
|
|
1014
|
+
`Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.`,
|
|
1015
|
+
)
|
|
1016
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1017
|
+
.requiredOption(`--type <type>`, `Template type`)
|
|
1018
|
+
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1019
|
+
.requiredOption(`--subject <subject>`, `Email Subject`)
|
|
1020
|
+
.requiredOption(`--message <message>`, `Template message`)
|
|
1021
|
+
.option(`--sender-name <sender-name>`, `Name of the email sender`)
|
|
1022
|
+
.option(`--sender-email <sender-email>`, `Email of the sender`)
|
|
1023
|
+
.option(`--reply-to <reply-to>`, `Reply to email`)
|
|
1024
|
+
.action(
|
|
1025
|
+
actionRunner(
|
|
1026
|
+
async ({
|
|
1027
|
+
projectId,
|
|
1028
|
+
xType,
|
|
1029
|
+
locale,
|
|
1030
|
+
subject,
|
|
1031
|
+
message,
|
|
1032
|
+
senderName,
|
|
1033
|
+
senderEmail,
|
|
1034
|
+
replyTo,
|
|
1035
|
+
}) =>
|
|
1036
|
+
await (
|
|
1037
|
+
await getProjectsClient()
|
|
1038
|
+
).updateEmailTemplate(
|
|
1039
|
+
projectId,
|
|
1040
|
+
xType as EmailTemplateType,
|
|
1041
|
+
locale as EmailTemplateLocale,
|
|
1042
|
+
subject,
|
|
1043
|
+
message,
|
|
1044
|
+
senderName,
|
|
1045
|
+
senderEmail,
|
|
1046
|
+
replyTo,
|
|
1047
|
+
),
|
|
1048
|
+
),
|
|
1049
|
+
);
|
|
1050
|
+
|
|
1051
|
+
projects
|
|
1052
|
+
.command(`delete-email-template`)
|
|
1053
|
+
.description(
|
|
1054
|
+
`Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. `,
|
|
1055
|
+
)
|
|
1056
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1057
|
+
.requiredOption(`--type <type>`, `Template type`)
|
|
1058
|
+
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1059
|
+
.action(
|
|
1060
|
+
actionRunner(
|
|
1061
|
+
async ({ projectId, xType, locale }) =>
|
|
1062
|
+
await (
|
|
1063
|
+
await getProjectsClient()
|
|
1064
|
+
).deleteEmailTemplate(
|
|
1065
|
+
projectId,
|
|
1066
|
+
xType as EmailTemplateType,
|
|
1067
|
+
locale as EmailTemplateLocale,
|
|
1068
|
+
),
|
|
1069
|
+
),
|
|
1070
|
+
);
|
|
1071
|
+
|
|
1072
|
+
projects
|
|
1073
|
+
.command(`get-sms-template`)
|
|
1074
|
+
.description(
|
|
1075
|
+
`[**DEPRECATED** - This command is deprecated. Please use 'projects getSmsTemplate' instead] Get a custom SMS template for the specified locale and type returning it's contents.`,
|
|
1076
|
+
)
|
|
1077
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1078
|
+
.requiredOption(`--type <type>`, `Template type`)
|
|
1079
|
+
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1080
|
+
.action(
|
|
1081
|
+
actionRunner(
|
|
1082
|
+
async ({ projectId, xType, locale }) =>
|
|
1083
|
+
await (
|
|
1084
|
+
await getProjectsClient()
|
|
1085
|
+
).getSmsTemplate(
|
|
1086
|
+
projectId,
|
|
1087
|
+
xType as SmsTemplateType,
|
|
1088
|
+
locale as SmsTemplateLocale,
|
|
1089
|
+
),
|
|
1090
|
+
),
|
|
1091
|
+
);
|
|
1092
|
+
|
|
1093
|
+
projects
|
|
1094
|
+
.command(`update-sms-template`)
|
|
1095
|
+
.description(
|
|
1096
|
+
`[**DEPRECATED** - This command is deprecated. Please use 'projects updateSmsTemplate' instead] Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `,
|
|
1097
|
+
)
|
|
1098
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1099
|
+
.requiredOption(`--type <type>`, `Template type`)
|
|
1100
|
+
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1101
|
+
.requiredOption(`--message <message>`, `Template message`)
|
|
1102
|
+
.action(
|
|
1103
|
+
actionRunner(
|
|
1104
|
+
async ({ projectId, xType, locale, message }) =>
|
|
1105
|
+
await (
|
|
1106
|
+
await getProjectsClient()
|
|
1107
|
+
).updateSmsTemplate(
|
|
1108
|
+
projectId,
|
|
1109
|
+
xType as SmsTemplateType,
|
|
1110
|
+
locale as SmsTemplateLocale,
|
|
1111
|
+
message,
|
|
1112
|
+
),
|
|
1113
|
+
),
|
|
1114
|
+
);
|
|
1115
|
+
|
|
1116
|
+
projects
|
|
1117
|
+
.command(`delete-sms-template`)
|
|
1118
|
+
.description(
|
|
1119
|
+
`[**DEPRECATED** - This command is deprecated. Please use 'projects deleteSmsTemplate' instead] Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `,
|
|
1120
|
+
)
|
|
1121
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1122
|
+
.requiredOption(`--type <type>`, `Template type`)
|
|
1123
|
+
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1124
|
+
.action(
|
|
1125
|
+
actionRunner(
|
|
1126
|
+
async ({ projectId, xType, locale }) =>
|
|
1127
|
+
await (
|
|
1128
|
+
await getProjectsClient()
|
|
1129
|
+
).deleteSmsTemplate(
|
|
1130
|
+
projectId,
|
|
1131
|
+
xType as SmsTemplateType,
|
|
1132
|
+
locale as SmsTemplateLocale,
|
|
1133
|
+
),
|
|
1134
|
+
),
|
|
1135
|
+
);
|
|
1136
|
+
|
|
1137
|
+
projects
|
|
1138
|
+
.command(`list-webhooks`)
|
|
1139
|
+
.description(
|
|
1140
|
+
`Get a list of all webhooks belonging to the project. You can use the query params to filter your results. `,
|
|
1141
|
+
)
|
|
1142
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1143
|
+
.option(
|
|
1144
|
+
`--total [value]`,
|
|
1145
|
+
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
1146
|
+
(value: string | undefined) =>
|
|
1147
|
+
value === undefined ? true : parseBool(value),
|
|
1148
|
+
)
|
|
1149
|
+
.action(
|
|
1150
|
+
actionRunner(
|
|
1151
|
+
async ({ projectId, total }) =>
|
|
1152
|
+
await (await getProjectsClient()).listWebhooks(projectId, total),
|
|
1153
|
+
),
|
|
1154
|
+
);
|
|
1155
|
+
|
|
1156
|
+
projects
|
|
1157
|
+
.command(`create-webhook`)
|
|
1158
|
+
.description(
|
|
1159
|
+
`Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. `,
|
|
1160
|
+
)
|
|
1161
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1162
|
+
.requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
|
|
1163
|
+
.option(
|
|
1164
|
+
`--enabled [value]`,
|
|
1165
|
+
`Enable or disable a webhook.`,
|
|
1166
|
+
(value: string | undefined) =>
|
|
1167
|
+
value === undefined ? true : parseBool(value),
|
|
1168
|
+
)
|
|
1169
|
+
.requiredOption(
|
|
1170
|
+
`--events [events...]`,
|
|
1171
|
+
`Events list. Maximum of 100 events are allowed.`,
|
|
1172
|
+
)
|
|
1173
|
+
.requiredOption(`--url <url>`, `Webhook URL.`)
|
|
1174
|
+
.requiredOption(
|
|
1175
|
+
`--security <security>`,
|
|
1176
|
+
`Certificate verification, false for disabled or true for enabled.`,
|
|
1177
|
+
parseBool,
|
|
1178
|
+
)
|
|
1179
|
+
.option(
|
|
1180
|
+
`--http-user <http-user>`,
|
|
1181
|
+
`Webhook HTTP user. Max length: 256 chars.`,
|
|
1182
|
+
)
|
|
1183
|
+
.option(
|
|
1184
|
+
`--http-pass <http-pass>`,
|
|
1185
|
+
`Webhook HTTP password. Max length: 256 chars.`,
|
|
1186
|
+
)
|
|
1187
|
+
.action(
|
|
1188
|
+
actionRunner(
|
|
1189
|
+
async ({
|
|
1190
|
+
projectId,
|
|
1191
|
+
name,
|
|
1192
|
+
enabled,
|
|
1193
|
+
events,
|
|
1194
|
+
url,
|
|
1195
|
+
security,
|
|
1196
|
+
httpUser,
|
|
1197
|
+
httpPass,
|
|
1198
|
+
}) =>
|
|
1199
|
+
await (
|
|
1200
|
+
await getProjectsClient()
|
|
1201
|
+
).createWebhook(
|
|
1202
|
+
projectId,
|
|
1203
|
+
name,
|
|
1204
|
+
enabled,
|
|
1205
|
+
events,
|
|
1206
|
+
url,
|
|
1207
|
+
security,
|
|
1208
|
+
httpUser,
|
|
1209
|
+
httpPass,
|
|
1210
|
+
),
|
|
1211
|
+
),
|
|
1212
|
+
);
|
|
1213
|
+
|
|
1214
|
+
projects
|
|
1215
|
+
.command(`get-webhook`)
|
|
1216
|
+
.description(
|
|
1217
|
+
`Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. `,
|
|
1218
|
+
)
|
|
1219
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1220
|
+
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
1221
|
+
.action(
|
|
1222
|
+
actionRunner(
|
|
1223
|
+
async ({ projectId, webhookId }) =>
|
|
1224
|
+
await (await getProjectsClient()).getWebhook(projectId, webhookId),
|
|
1225
|
+
),
|
|
1226
|
+
);
|
|
1227
|
+
|
|
1228
|
+
projects
|
|
1229
|
+
.command(`update-webhook`)
|
|
1230
|
+
.description(
|
|
1231
|
+
`Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. `,
|
|
1232
|
+
)
|
|
1233
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1234
|
+
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
1235
|
+
.requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
|
|
1236
|
+
.option(
|
|
1237
|
+
`--enabled [value]`,
|
|
1238
|
+
`Enable or disable a webhook.`,
|
|
1239
|
+
(value: string | undefined) =>
|
|
1240
|
+
value === undefined ? true : parseBool(value),
|
|
1241
|
+
)
|
|
1242
|
+
.requiredOption(
|
|
1243
|
+
`--events [events...]`,
|
|
1244
|
+
`Events list. Maximum of 100 events are allowed.`,
|
|
1245
|
+
)
|
|
1246
|
+
.requiredOption(`--url <url>`, `Webhook URL.`)
|
|
1247
|
+
.requiredOption(
|
|
1248
|
+
`--security <security>`,
|
|
1249
|
+
`Certificate verification, false for disabled or true for enabled.`,
|
|
1250
|
+
parseBool,
|
|
1251
|
+
)
|
|
1252
|
+
.option(
|
|
1253
|
+
`--http-user <http-user>`,
|
|
1254
|
+
`Webhook HTTP user. Max length: 256 chars.`,
|
|
1255
|
+
)
|
|
1256
|
+
.option(
|
|
1257
|
+
`--http-pass <http-pass>`,
|
|
1258
|
+
`Webhook HTTP password. Max length: 256 chars.`,
|
|
1259
|
+
)
|
|
1260
|
+
.action(
|
|
1261
|
+
actionRunner(
|
|
1262
|
+
async ({
|
|
1263
|
+
projectId,
|
|
1264
|
+
webhookId,
|
|
1265
|
+
name,
|
|
1266
|
+
enabled,
|
|
1267
|
+
events,
|
|
1268
|
+
url,
|
|
1269
|
+
security,
|
|
1270
|
+
httpUser,
|
|
1271
|
+
httpPass,
|
|
1272
|
+
}) =>
|
|
1273
|
+
await (
|
|
1274
|
+
await getProjectsClient()
|
|
1275
|
+
).updateWebhook(
|
|
1276
|
+
projectId,
|
|
1277
|
+
webhookId,
|
|
1278
|
+
name,
|
|
1279
|
+
enabled,
|
|
1280
|
+
events,
|
|
1281
|
+
url,
|
|
1282
|
+
security,
|
|
1283
|
+
httpUser,
|
|
1284
|
+
httpPass,
|
|
1285
|
+
),
|
|
1286
|
+
),
|
|
1287
|
+
);
|
|
1288
|
+
|
|
1289
|
+
projects
|
|
1290
|
+
.command(`delete-webhook`)
|
|
1291
|
+
.description(
|
|
1292
|
+
`Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. `,
|
|
1293
|
+
)
|
|
1294
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1295
|
+
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
1296
|
+
.action(
|
|
1297
|
+
actionRunner(
|
|
1298
|
+
async ({ projectId, webhookId }) =>
|
|
1299
|
+
await (await getProjectsClient()).deleteWebhook(projectId, webhookId),
|
|
1300
|
+
),
|
|
1301
|
+
);
|
|
1302
|
+
|
|
1303
|
+
projects
|
|
1304
|
+
.command(`update-webhook-signature`)
|
|
1305
|
+
.description(
|
|
1306
|
+
`Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. `,
|
|
1307
|
+
)
|
|
1308
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1309
|
+
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
1310
|
+
.action(
|
|
1311
|
+
actionRunner(
|
|
1312
|
+
async ({ projectId, webhookId }) =>
|
|
1313
|
+
await (
|
|
1314
|
+
await getProjectsClient()
|
|
1315
|
+
).updateWebhookSignature(projectId, webhookId),
|
|
1316
|
+
),
|
|
1317
|
+
);
|