chirag-appwrite-cli 0.2.0 → 0.3.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/{npm-publish.yml → publish.yml} +1 -1
- package/CHANGELOG.md +1 -190
- package/Formula/appwrite.rb +3 -3
- package/LICENSE.md +1 -12
- package/README.md +18 -185
- package/cli.ts +162 -0
- package/dist/bundle.cjs +74100 -86261
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +149 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -144
- package/dist/index.js.map +1 -1
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +8 -7
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/commands/config.d.ts +23 -12
- package/dist/lib/commands/config.d.ts.map +1 -1
- package/dist/lib/commands/config.js +17 -6
- package/dist/lib/commands/config.js.map +1 -1
- package/dist/lib/commands/generate.d.ts +6 -0
- package/dist/lib/commands/generate.d.ts.map +1 -0
- package/dist/lib/commands/generate.js +53 -0
- package/dist/lib/commands/generate.js.map +1 -0
- package/dist/lib/commands/generators/databases.d.ts +25 -0
- package/dist/lib/commands/generators/databases.d.ts.map +1 -0
- package/dist/lib/commands/generators/databases.js +405 -0
- package/dist/lib/commands/generators/databases.js.map +1 -0
- package/dist/lib/commands/init.d.ts.map +1 -1
- package/dist/lib/commands/init.js +15 -14
- package/dist/lib/commands/init.js.map +1 -1
- package/dist/lib/commands/pull.d.ts.map +1 -1
- package/dist/lib/commands/pull.js +181 -155
- package/dist/lib/commands/pull.js.map +1 -1
- package/dist/lib/commands/push.d.ts +32 -4
- package/dist/lib/commands/push.d.ts.map +1 -1
- package/dist/lib/commands/push.js +272 -106
- package/dist/lib/commands/push.js.map +1 -1
- package/dist/lib/commands/run.js +1 -1
- package/dist/lib/commands/run.js.map +1 -1
- package/dist/lib/commands/schema.d.ts +8 -6
- package/dist/lib/commands/schema.d.ts.map +1 -1
- package/dist/lib/commands/schema.js +20 -9
- package/dist/lib/commands/schema.js.map +1 -1
- package/dist/lib/commands/services/account.d.ts.map +1 -1
- package/dist/lib/commands/services/account.js +86 -64
- package/dist/lib/commands/services/account.js.map +1 -1
- package/dist/lib/commands/services/console.d.ts.map +1 -1
- package/dist/lib/commands/services/console.js +4 -17
- package/dist/lib/commands/services/console.js.map +1 -1
- package/dist/lib/commands/services/databases.d.ts.map +1 -1
- package/dist/lib/commands/services/databases.js +160 -152
- package/dist/lib/commands/services/databases.js.map +1 -1
- package/dist/lib/commands/services/functions.d.ts.map +1 -1
- package/dist/lib/commands/services/functions.js +41 -33
- package/dist/lib/commands/services/functions.js.map +1 -1
- package/dist/lib/commands/services/graphql.d.ts.map +1 -1
- package/dist/lib/commands/services/graphql.js +3 -3
- package/dist/lib/commands/services/graphql.js.map +1 -1
- package/dist/lib/commands/services/health.d.ts.map +1 -1
- package/dist/lib/commands/services/health.js +24 -24
- package/dist/lib/commands/services/health.js.map +1 -1
- package/dist/lib/commands/services/locale.d.ts.map +1 -1
- package/dist/lib/commands/services/locale.js +9 -9
- package/dist/lib/commands/services/locale.js.map +1 -1
- package/dist/lib/commands/services/messaging.d.ts.map +1 -1
- package/dist/lib/commands/services/messaging.js +59 -59
- package/dist/lib/commands/services/messaging.js.map +1 -1
- package/dist/lib/commands/services/migrations.d.ts.map +1 -1
- package/dist/lib/commands/services/migrations.js +19 -19
- package/dist/lib/commands/services/migrations.js.map +1 -1
- package/dist/lib/commands/services/project.d.ts.map +1 -1
- package/dist/lib/commands/services/project.js +8 -8
- package/dist/lib/commands/services/project.js.map +1 -1
- package/dist/lib/commands/services/projects.d.ts.map +1 -1
- package/dist/lib/commands/services/projects.js +71 -65
- package/dist/lib/commands/services/projects.js.map +1 -1
- package/dist/lib/commands/services/proxy.d.ts.map +1 -1
- package/dist/lib/commands/services/proxy.js +11 -11
- package/dist/lib/commands/services/proxy.js.map +1 -1
- package/dist/lib/commands/services/sites.d.ts.map +1 -1
- package/dist/lib/commands/services/sites.js +41 -33
- package/dist/lib/commands/services/sites.js.map +1 -1
- package/dist/lib/commands/services/storage.d.ts.map +1 -1
- package/dist/lib/commands/services/storage.js +40 -18
- package/dist/lib/commands/services/storage.js.map +1 -1
- package/dist/lib/commands/services/tables-db.d.ts +3 -0
- package/dist/lib/commands/services/tables-db.d.ts.map +1 -0
- package/dist/lib/commands/services/{tablesdb.js → tables-db.js} +171 -163
- package/dist/lib/commands/services/tables-db.js.map +1 -0
- package/dist/lib/commands/services/teams.d.ts.map +1 -1
- package/dist/lib/commands/services/teams.js +16 -16
- package/dist/lib/commands/services/teams.js.map +1 -1
- package/dist/lib/commands/services/tokens.d.ts.map +1 -1
- package/dist/lib/commands/services/tokens.js +6 -6
- package/dist/lib/commands/services/tokens.js.map +1 -1
- package/dist/lib/commands/services/users.d.ts.map +1 -1
- package/dist/lib/commands/services/users.js +54 -54
- package/dist/lib/commands/services/users.js.map +1 -1
- package/dist/lib/commands/services/vcs.d.ts.map +1 -1
- package/dist/lib/commands/services/vcs.js +13 -13
- package/dist/lib/commands/services/vcs.js.map +1 -1
- package/dist/lib/commands/types.d.ts.map +1 -1
- package/dist/lib/commands/types.js +1 -1
- package/dist/lib/commands/types.js.map +1 -1
- package/dist/lib/commands/update.d.ts.map +1 -1
- package/dist/lib/commands/update.js +8 -7
- package/dist/lib/commands/update.js.map +1 -1
- package/dist/lib/commands/utils/attributes.d.ts +2 -1
- package/dist/lib/commands/utils/attributes.d.ts.map +1 -1
- package/dist/lib/commands/utils/attributes.js +32 -34
- package/dist/lib/commands/utils/attributes.js.map +1 -1
- package/dist/lib/commands/utils/deployment.d.ts.map +1 -1
- package/dist/lib/commands/utils/deployment.js +3 -2
- package/dist/lib/commands/utils/deployment.js.map +1 -1
- package/dist/lib/commands/utils/pools.d.ts.map +1 -1
- package/dist/lib/commands/utils/pools.js +7 -6
- package/dist/lib/commands/utils/pools.js.map +1 -1
- package/dist/lib/config.d.ts +1 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +45 -4
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/constants.d.ts +14 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +19 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/emulation/docker.d.ts.map +1 -1
- package/dist/lib/emulation/docker.js +80 -67
- package/dist/lib/emulation/docker.js.map +1 -1
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/parser.js +11 -10
- package/dist/lib/parser.js.map +1 -1
- package/dist/lib/questions.d.ts +2 -0
- package/dist/lib/questions.d.ts.map +1 -1
- package/dist/lib/questions.js +34 -20
- package/dist/lib/questions.js.map +1 -1
- package/dist/lib/sdks.d.ts.map +1 -1
- package/dist/lib/sdks.js +10 -11
- package/dist/lib/sdks.js.map +1 -1
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +29 -2
- package/dist/lib/utils.js.map +1 -1
- package/dist/package.json +12 -12
- package/docs/examples/account/create-anonymous-session.md +1 -0
- package/docs/examples/account/create-email-password-session.md +3 -0
- package/docs/examples/account/create-email-token.md +3 -0
- package/docs/examples/account/create-email-verification.md +2 -0
- package/docs/examples/account/create-jwt.md +1 -0
- package/docs/examples/account/create-magic-url-token.md +3 -0
- package/docs/examples/account/create-mfa-authenticator.md +2 -0
- package/docs/examples/account/create-mfa-challenge.md +2 -0
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -0
- package/docs/examples/account/create-o-auth-2-session.md +2 -0
- package/docs/examples/account/create-o-auth-2-token.md +2 -0
- package/docs/examples/account/create-phone-token.md +3 -0
- package/docs/examples/account/create-phone-verification.md +1 -0
- package/docs/examples/account/create-push-target.md +3 -0
- package/docs/examples/account/create-recovery.md +3 -0
- package/docs/examples/account/create-session.md +3 -0
- package/docs/examples/account/create-verification.md +2 -0
- package/docs/examples/account/create.md +4 -0
- package/docs/examples/account/delete-identity.md +2 -0
- package/docs/examples/account/delete-mfa-authenticator.md +2 -0
- package/docs/examples/account/delete-push-target.md +2 -0
- package/docs/examples/account/delete-session.md +2 -0
- package/docs/examples/account/delete-sessions.md +1 -0
- package/docs/examples/account/delete.md +1 -0
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -0
- package/docs/examples/account/get-prefs.md +1 -0
- package/docs/examples/account/get-session.md +2 -0
- package/docs/examples/account/get.md +1 -0
- package/docs/examples/account/list-identities.md +1 -0
- package/docs/examples/account/list-logs.md +1 -0
- package/docs/examples/account/list-mfa-factors.md +1 -0
- package/docs/examples/account/list-sessions.md +1 -0
- package/docs/examples/account/update-email-verification.md +3 -0
- package/docs/examples/account/update-email.md +3 -0
- package/docs/examples/account/update-magic-url-session.md +3 -0
- package/docs/examples/account/update-mfa-authenticator.md +3 -0
- package/docs/examples/account/update-mfa-challenge.md +3 -0
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -0
- package/docs/examples/account/update-mfa.md +2 -0
- package/docs/examples/account/update-name.md +2 -0
- package/docs/examples/account/update-password.md +2 -0
- package/docs/examples/account/update-phone-session.md +3 -0
- package/docs/examples/account/update-phone-verification.md +3 -0
- package/docs/examples/account/update-phone.md +3 -0
- package/docs/examples/account/update-prefs.md +2 -0
- package/docs/examples/account/update-push-target.md +3 -0
- package/docs/examples/account/update-recovery.md +4 -0
- package/docs/examples/account/update-session.md +2 -0
- package/docs/examples/account/update-status.md +1 -0
- package/docs/examples/account/update-verification.md +3 -0
- package/docs/examples/console/get-resource.md +3 -0
- package/docs/examples/console/variables.md +1 -0
- package/docs/examples/databases/create-boolean-attribute.md +5 -0
- package/docs/examples/databases/create-collection.md +4 -0
- package/docs/examples/databases/create-datetime-attribute.md +5 -0
- package/docs/examples/databases/create-document.md +5 -0
- package/docs/examples/databases/create-documents.md +4 -0
- package/docs/examples/databases/create-email-attribute.md +5 -0
- package/docs/examples/databases/create-enum-attribute.md +6 -0
- package/docs/examples/databases/create-float-attribute.md +5 -0
- package/docs/examples/databases/create-index.md +6 -0
- package/docs/examples/databases/create-integer-attribute.md +5 -0
- package/docs/examples/databases/create-ip-attribute.md +5 -0
- package/docs/examples/databases/create-line-attribute.md +5 -0
- package/docs/examples/databases/create-operations.md +2 -0
- package/docs/examples/databases/create-point-attribute.md +5 -0
- package/docs/examples/databases/create-polygon-attribute.md +5 -0
- package/docs/examples/databases/create-relationship-attribute.md +5 -0
- package/docs/examples/databases/create-string-attribute.md +6 -0
- package/docs/examples/databases/create-transaction.md +1 -0
- package/docs/examples/databases/create-url-attribute.md +5 -0
- package/docs/examples/databases/create.md +3 -0
- package/docs/examples/databases/decrement-document-attribute.md +5 -0
- package/docs/examples/databases/delete-attribute.md +4 -0
- package/docs/examples/databases/delete-collection.md +3 -0
- package/docs/examples/databases/delete-document.md +4 -0
- package/docs/examples/databases/delete-documents.md +3 -0
- package/docs/examples/databases/delete-index.md +4 -0
- package/docs/examples/databases/delete-transaction.md +2 -0
- package/docs/examples/databases/delete.md +2 -0
- package/docs/examples/databases/get-attribute.md +4 -0
- package/docs/examples/databases/get-collection-usage.md +3 -0
- package/docs/examples/databases/get-collection.md +3 -0
- package/docs/examples/databases/get-document.md +4 -0
- package/docs/examples/databases/get-index.md +4 -0
- package/docs/examples/databases/get-transaction.md +2 -0
- package/docs/examples/databases/get-usage.md +2 -0
- package/docs/examples/databases/get.md +2 -0
- package/docs/examples/databases/increment-document-attribute.md +5 -0
- package/docs/examples/databases/list-attributes.md +3 -0
- package/docs/examples/databases/list-collection-logs.md +3 -0
- package/docs/examples/databases/list-collections.md +2 -0
- package/docs/examples/databases/list-document-logs.md +4 -0
- package/docs/examples/databases/list-documents.md +3 -0
- package/docs/examples/databases/list-indexes.md +3 -0
- package/docs/examples/databases/list-logs.md +2 -0
- package/docs/examples/databases/list-transactions.md +1 -0
- package/docs/examples/databases/list-usage.md +1 -0
- package/docs/examples/databases/list.md +1 -0
- package/docs/examples/databases/update-boolean-attribute.md +6 -0
- package/docs/examples/databases/update-collection.md +4 -0
- package/docs/examples/databases/update-datetime-attribute.md +6 -0
- package/docs/examples/databases/update-document.md +4 -0
- package/docs/examples/databases/update-documents.md +3 -0
- package/docs/examples/databases/update-email-attribute.md +6 -0
- package/docs/examples/databases/update-enum-attribute.md +7 -0
- package/docs/examples/databases/update-float-attribute.md +6 -0
- package/docs/examples/databases/update-integer-attribute.md +6 -0
- package/docs/examples/databases/update-ip-attribute.md +6 -0
- package/docs/examples/databases/update-line-attribute.md +5 -0
- package/docs/examples/databases/update-point-attribute.md +5 -0
- package/docs/examples/databases/update-polygon-attribute.md +5 -0
- package/docs/examples/databases/update-relationship-attribute.md +4 -0
- package/docs/examples/databases/update-string-attribute.md +6 -0
- package/docs/examples/databases/update-transaction.md +2 -0
- package/docs/examples/databases/update-url-attribute.md +6 -0
- package/docs/examples/databases/update.md +3 -0
- package/docs/examples/databases/upsert-document.md +4 -0
- package/docs/examples/databases/upsert-documents.md +4 -0
- package/docs/examples/functions/create-deployment.md +4 -0
- package/docs/examples/functions/create-duplicate-deployment.md +3 -0
- package/docs/examples/functions/create-execution.md +2 -0
- package/docs/examples/functions/create-template-deployment.md +7 -0
- package/docs/examples/functions/create-variable.md +4 -0
- package/docs/examples/functions/create-vcs-deployment.md +4 -0
- package/docs/examples/functions/create.md +4 -0
- package/docs/examples/functions/delete-deployment.md +3 -0
- package/docs/examples/functions/delete-execution.md +3 -0
- package/docs/examples/functions/delete-variable.md +3 -0
- package/docs/examples/functions/delete.md +2 -0
- package/docs/examples/functions/get-deployment-download.md +3 -0
- package/docs/examples/functions/get-deployment.md +3 -0
- package/docs/examples/functions/get-execution.md +3 -0
- package/docs/examples/functions/get-template.md +2 -0
- package/docs/examples/functions/get-usage.md +2 -0
- package/docs/examples/functions/get-variable.md +3 -0
- package/docs/examples/functions/get.md +2 -0
- package/docs/examples/functions/list-deployments.md +2 -0
- package/docs/examples/functions/list-executions.md +2 -0
- package/docs/examples/functions/list-runtimes.md +1 -0
- package/docs/examples/functions/list-specifications.md +1 -0
- package/docs/examples/functions/list-templates.md +1 -0
- package/docs/examples/functions/list-usage.md +1 -0
- package/docs/examples/functions/list-variables.md +2 -0
- package/docs/examples/functions/list.md +1 -0
- package/docs/examples/functions/update-deployment-status.md +3 -0
- package/docs/examples/functions/update-function-deployment.md +3 -0
- package/docs/examples/functions/update-variable.md +4 -0
- package/docs/examples/functions/update.md +3 -0
- package/docs/examples/graphql/mutation.md +2 -0
- package/docs/examples/graphql/query.md +2 -0
- package/docs/examples/health/get-antivirus.md +1 -0
- package/docs/examples/health/get-cache.md +1 -0
- package/docs/examples/health/get-certificate.md +1 -0
- package/docs/examples/health/get-db.md +1 -0
- package/docs/examples/health/get-failed-jobs.md +2 -0
- package/docs/examples/health/get-pub-sub.md +1 -0
- package/docs/examples/health/get-queue-builds.md +1 -0
- package/docs/examples/health/get-queue-certificates.md +1 -0
- package/docs/examples/health/get-queue-databases.md +1 -0
- package/docs/examples/health/get-queue-deletes.md +1 -0
- package/docs/examples/health/get-queue-functions.md +1 -0
- package/docs/examples/health/get-queue-logs.md +1 -0
- package/docs/examples/health/get-queue-mails.md +1 -0
- package/docs/examples/health/get-queue-messaging.md +1 -0
- package/docs/examples/health/get-queue-migrations.md +1 -0
- package/docs/examples/health/get-queue-stats-resources.md +1 -0
- package/docs/examples/health/get-queue-usage.md +1 -0
- package/docs/examples/health/get-queue-webhooks.md +1 -0
- package/docs/examples/health/get-storage-local.md +1 -0
- package/docs/examples/health/get-storage.md +1 -0
- package/docs/examples/health/get-time.md +1 -0
- package/docs/examples/health/get.md +1 -0
- package/docs/examples/locale/get.md +1 -0
- package/docs/examples/locale/list-codes.md +1 -0
- package/docs/examples/locale/list-continents.md +1 -0
- package/docs/examples/locale/list-countries-eu.md +1 -0
- package/docs/examples/locale/list-countries-phones.md +1 -0
- package/docs/examples/locale/list-countries.md +1 -0
- package/docs/examples/locale/list-currencies.md +1 -0
- package/docs/examples/locale/list-languages.md +1 -0
- package/docs/examples/messaging/create-apns-provider.md +3 -0
- package/docs/examples/messaging/create-email.md +4 -0
- package/docs/examples/messaging/create-fcm-provider.md +3 -0
- package/docs/examples/messaging/create-mailgun-provider.md +3 -0
- package/docs/examples/messaging/create-msg-91-provider.md +3 -0
- package/docs/examples/messaging/create-push.md +2 -0
- package/docs/examples/messaging/create-resend-provider.md +3 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +3 -0
- package/docs/examples/messaging/create-sms.md +3 -0
- package/docs/examples/messaging/create-smtp-provider.md +4 -0
- package/docs/examples/messaging/create-subscriber.md +4 -0
- package/docs/examples/messaging/create-telesign-provider.md +3 -0
- package/docs/examples/messaging/create-textmagic-provider.md +3 -0
- package/docs/examples/messaging/create-topic.md +3 -0
- package/docs/examples/messaging/create-twilio-provider.md +3 -0
- package/docs/examples/messaging/create-vonage-provider.md +3 -0
- package/docs/examples/messaging/delete-provider.md +2 -0
- package/docs/examples/messaging/delete-subscriber.md +3 -0
- package/docs/examples/messaging/delete-topic.md +2 -0
- package/docs/examples/messaging/delete.md +2 -0
- package/docs/examples/messaging/get-message.md +2 -0
- package/docs/examples/messaging/get-provider.md +2 -0
- package/docs/examples/messaging/get-subscriber.md +3 -0
- package/docs/examples/messaging/get-topic.md +2 -0
- package/docs/examples/messaging/list-message-logs.md +2 -0
- package/docs/examples/messaging/list-messages.md +1 -0
- package/docs/examples/messaging/list-provider-logs.md +2 -0
- package/docs/examples/messaging/list-providers.md +1 -0
- package/docs/examples/messaging/list-subscriber-logs.md +2 -0
- package/docs/examples/messaging/list-subscribers.md +2 -0
- package/docs/examples/messaging/list-targets.md +2 -0
- package/docs/examples/messaging/list-topic-logs.md +2 -0
- package/docs/examples/messaging/list-topics.md +1 -0
- package/docs/examples/messaging/update-apns-provider.md +2 -0
- package/docs/examples/messaging/update-email.md +2 -0
- package/docs/examples/messaging/update-fcm-provider.md +2 -0
- package/docs/examples/messaging/update-mailgun-provider.md +2 -0
- package/docs/examples/messaging/update-msg-91-provider.md +2 -0
- package/docs/examples/messaging/update-push.md +2 -0
- package/docs/examples/messaging/update-resend-provider.md +2 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +2 -0
- package/docs/examples/messaging/update-sms.md +2 -0
- package/docs/examples/messaging/update-smtp-provider.md +2 -0
- package/docs/examples/messaging/update-telesign-provider.md +2 -0
- package/docs/examples/messaging/update-textmagic-provider.md +2 -0
- package/docs/examples/messaging/update-topic.md +2 -0
- package/docs/examples/messaging/update-twilio-provider.md +2 -0
- package/docs/examples/messaging/update-vonage-provider.md +2 -0
- package/docs/examples/migrations/create-appwrite-migration.md +5 -0
- package/docs/examples/migrations/create-csv-export.md +3 -0
- package/docs/examples/migrations/create-csv-import.md +4 -0
- package/docs/examples/migrations/create-firebase-migration.md +3 -0
- package/docs/examples/migrations/create-n-host-migration.md +8 -0
- package/docs/examples/migrations/create-supabase-migration.md +7 -0
- package/docs/examples/migrations/delete.md +2 -0
- package/docs/examples/migrations/get-appwrite-report.md +5 -0
- package/docs/examples/migrations/get-firebase-report.md +3 -0
- package/docs/examples/migrations/get-n-host-report.md +8 -0
- package/docs/examples/migrations/get-supabase-report.md +7 -0
- package/docs/examples/migrations/get.md +2 -0
- package/docs/examples/migrations/list.md +1 -0
- package/docs/examples/migrations/retry.md +2 -0
- package/docs/examples/project/create-variable.md +3 -0
- package/docs/examples/project/delete-variable.md +2 -0
- package/docs/examples/project/get-usage.md +3 -0
- package/docs/examples/project/get-variable.md +2 -0
- package/docs/examples/project/list-variables.md +1 -0
- package/docs/examples/project/update-variable.md +3 -0
- package/docs/examples/projects/create-dev-key.md +4 -0
- package/docs/examples/projects/create-jwt.md +3 -0
- package/docs/examples/projects/create-key.md +4 -0
- package/docs/examples/projects/create-platform.md +4 -0
- package/docs/examples/projects/create-smtp-test.md +6 -0
- package/docs/examples/projects/create-webhook.md +6 -0
- package/docs/examples/projects/create.md +4 -0
- package/docs/examples/projects/delete-dev-key.md +3 -0
- package/docs/examples/projects/delete-email-template.md +4 -0
- package/docs/examples/projects/delete-key.md +3 -0
- package/docs/examples/projects/delete-platform.md +3 -0
- package/docs/examples/projects/delete-sms-template.md +4 -0
- package/docs/examples/projects/delete-webhook.md +3 -0
- package/docs/examples/projects/delete.md +2 -0
- package/docs/examples/projects/get-dev-key.md +3 -0
- package/docs/examples/projects/get-email-template.md +4 -0
- package/docs/examples/projects/get-key.md +3 -0
- package/docs/examples/projects/get-platform.md +3 -0
- package/docs/examples/projects/get-sms-template.md +4 -0
- package/docs/examples/projects/get-webhook.md +3 -0
- package/docs/examples/projects/get.md +2 -0
- package/docs/examples/projects/list-dev-keys.md +2 -0
- package/docs/examples/projects/list-keys.md +2 -0
- package/docs/examples/projects/list-platforms.md +2 -0
- package/docs/examples/projects/list-webhooks.md +2 -0
- package/docs/examples/projects/list.md +1 -0
- package/docs/examples/projects/update-api-status-all.md +3 -0
- package/docs/examples/projects/update-api-status.md +4 -0
- package/docs/examples/projects/update-auth-duration.md +3 -0
- package/docs/examples/projects/update-auth-limit.md +3 -0
- package/docs/examples/projects/update-auth-password-dictionary.md +3 -0
- package/docs/examples/projects/update-auth-password-history.md +3 -0
- package/docs/examples/projects/update-auth-sessions-limit.md +3 -0
- package/docs/examples/projects/update-auth-status.md +4 -0
- package/docs/examples/projects/update-dev-key.md +5 -0
- package/docs/examples/projects/update-email-template.md +6 -0
- package/docs/examples/projects/update-key.md +5 -0
- package/docs/examples/projects/update-labels.md +3 -0
- package/docs/examples/projects/update-memberships-privacy.md +5 -0
- package/docs/examples/projects/update-mock-numbers.md +3 -0
- package/docs/examples/projects/update-o-auth-2.md +3 -0
- package/docs/examples/projects/update-personal-data-check.md +3 -0
- package/docs/examples/projects/update-platform.md +4 -0
- package/docs/examples/projects/update-service-status-all.md +3 -0
- package/docs/examples/projects/update-service-status.md +4 -0
- package/docs/examples/projects/update-session-alerts.md +3 -0
- package/docs/examples/projects/update-session-invalidation.md +3 -0
- package/docs/examples/projects/update-sms-template.md +5 -0
- package/docs/examples/projects/update-smtp.md +3 -0
- package/docs/examples/projects/update-team.md +3 -0
- package/docs/examples/projects/update-webhook-signature.md +3 -0
- package/docs/examples/projects/update-webhook.md +7 -0
- package/docs/examples/projects/update.md +3 -0
- package/docs/examples/proxy/create-api-rule.md +2 -0
- package/docs/examples/proxy/create-function-rule.md +3 -0
- package/docs/examples/proxy/create-redirect-rule.md +6 -0
- package/docs/examples/proxy/create-site-rule.md +3 -0
- package/docs/examples/proxy/delete-rule.md +2 -0
- package/docs/examples/proxy/get-rule.md +2 -0
- package/docs/examples/proxy/list-rules.md +1 -0
- package/docs/examples/proxy/update-rule-verification.md +2 -0
- package/docs/examples/sites/create-deployment.md +4 -0
- package/docs/examples/sites/create-duplicate-deployment.md +3 -0
- package/docs/examples/sites/create-template-deployment.md +7 -0
- package/docs/examples/sites/create-variable.md +4 -0
- package/docs/examples/sites/create-vcs-deployment.md +4 -0
- package/docs/examples/sites/create.md +5 -0
- package/docs/examples/sites/delete-deployment.md +3 -0
- package/docs/examples/sites/delete-log.md +3 -0
- package/docs/examples/sites/delete-variable.md +3 -0
- package/docs/examples/sites/delete.md +2 -0
- package/docs/examples/sites/get-deployment-download.md +3 -0
- package/docs/examples/sites/get-deployment.md +3 -0
- package/docs/examples/sites/get-log.md +3 -0
- package/docs/examples/sites/get-template.md +2 -0
- package/docs/examples/sites/get-usage.md +2 -0
- package/docs/examples/sites/get-variable.md +3 -0
- package/docs/examples/sites/get.md +2 -0
- package/docs/examples/sites/list-deployments.md +2 -0
- package/docs/examples/sites/list-frameworks.md +1 -0
- package/docs/examples/sites/list-logs.md +2 -0
- package/docs/examples/sites/list-specifications.md +1 -0
- package/docs/examples/sites/list-templates.md +1 -0
- package/docs/examples/sites/list-usage.md +1 -0
- package/docs/examples/sites/list-variables.md +2 -0
- package/docs/examples/sites/list.md +1 -0
- package/docs/examples/sites/update-deployment-status.md +3 -0
- package/docs/examples/sites/update-site-deployment.md +3 -0
- package/docs/examples/sites/update-variable.md +4 -0
- package/docs/examples/sites/update.md +4 -0
- package/docs/examples/storage/create-bucket.md +3 -0
- package/docs/examples/storage/create-file.md +4 -0
- package/docs/examples/storage/delete-bucket.md +2 -0
- package/docs/examples/storage/delete-file.md +3 -0
- package/docs/examples/storage/get-bucket-usage.md +2 -0
- package/docs/examples/storage/get-bucket.md +2 -0
- package/docs/examples/storage/get-file-download.md +3 -0
- package/docs/examples/storage/get-file-preview.md +3 -0
- package/docs/examples/storage/get-file-view.md +3 -0
- package/docs/examples/storage/get-file.md +3 -0
- package/docs/examples/storage/get-usage.md +1 -0
- package/docs/examples/storage/list-buckets.md +1 -0
- package/docs/examples/storage/list-files.md +2 -0
- package/docs/examples/storage/update-bucket.md +3 -0
- package/docs/examples/storage/update-file.md +3 -0
- package/docs/examples/tablesdb/create-boolean-column.md +5 -0
- package/docs/examples/tablesdb/create-datetime-column.md +5 -0
- package/docs/examples/tablesdb/create-email-column.md +5 -0
- package/docs/examples/tablesdb/create-enum-column.md +6 -0
- package/docs/examples/tablesdb/create-float-column.md +5 -0
- package/docs/examples/tablesdb/create-index.md +6 -0
- package/docs/examples/tablesdb/create-integer-column.md +5 -0
- package/docs/examples/tablesdb/create-ip-column.md +5 -0
- package/docs/examples/tablesdb/create-line-column.md +5 -0
- package/docs/examples/tablesdb/create-operations.md +2 -0
- package/docs/examples/tablesdb/create-point-column.md +5 -0
- package/docs/examples/tablesdb/create-polygon-column.md +5 -0
- package/docs/examples/tablesdb/create-relationship-column.md +5 -0
- package/docs/examples/tablesdb/create-row.md +5 -0
- package/docs/examples/tablesdb/create-rows.md +4 -0
- package/docs/examples/tablesdb/create-string-column.md +6 -0
- package/docs/examples/tablesdb/create-table.md +4 -0
- package/docs/examples/tablesdb/create-transaction.md +1 -0
- package/docs/examples/tablesdb/create-url-column.md +5 -0
- package/docs/examples/tablesdb/create.md +3 -0
- package/docs/examples/tablesdb/decrement-row-column.md +5 -0
- package/docs/examples/tablesdb/delete-column.md +4 -0
- package/docs/examples/tablesdb/delete-index.md +4 -0
- package/docs/examples/tablesdb/delete-row.md +4 -0
- package/docs/examples/tablesdb/delete-rows.md +3 -0
- package/docs/examples/tablesdb/delete-table.md +3 -0
- package/docs/examples/tablesdb/delete-transaction.md +2 -0
- package/docs/examples/tablesdb/delete.md +2 -0
- package/docs/examples/tablesdb/get-column.md +4 -0
- package/docs/examples/tablesdb/get-index.md +4 -0
- package/docs/examples/tablesdb/get-row.md +4 -0
- package/docs/examples/tablesdb/get-table-usage.md +3 -0
- package/docs/examples/tablesdb/get-table.md +3 -0
- package/docs/examples/tablesdb/get-transaction.md +2 -0
- package/docs/examples/tablesdb/get-usage.md +2 -0
- package/docs/examples/tablesdb/get.md +2 -0
- package/docs/examples/tablesdb/increment-row-column.md +5 -0
- package/docs/examples/tablesdb/list-columns.md +3 -0
- package/docs/examples/tablesdb/list-indexes.md +3 -0
- package/docs/examples/tablesdb/list-row-logs.md +4 -0
- package/docs/examples/tablesdb/list-rows.md +3 -0
- package/docs/examples/tablesdb/list-table-logs.md +3 -0
- package/docs/examples/tablesdb/list-tables.md +2 -0
- package/docs/examples/tablesdb/list-transactions.md +1 -0
- package/docs/examples/tablesdb/list-usage.md +1 -0
- package/docs/examples/tablesdb/list.md +1 -0
- package/docs/examples/tablesdb/update-boolean-column.md +6 -0
- package/docs/examples/tablesdb/update-datetime-column.md +6 -0
- package/docs/examples/tablesdb/update-email-column.md +6 -0
- package/docs/examples/tablesdb/update-enum-column.md +7 -0
- package/docs/examples/tablesdb/update-float-column.md +6 -0
- package/docs/examples/tablesdb/update-integer-column.md +6 -0
- package/docs/examples/tablesdb/update-ip-column.md +6 -0
- package/docs/examples/tablesdb/update-line-column.md +5 -0
- package/docs/examples/tablesdb/update-point-column.md +5 -0
- package/docs/examples/tablesdb/update-polygon-column.md +5 -0
- package/docs/examples/tablesdb/update-relationship-column.md +4 -0
- package/docs/examples/tablesdb/update-row.md +4 -0
- package/docs/examples/tablesdb/update-rows.md +3 -0
- package/docs/examples/tablesdb/update-string-column.md +6 -0
- package/docs/examples/tablesdb/update-table.md +4 -0
- package/docs/examples/tablesdb/update-transaction.md +2 -0
- package/docs/examples/tablesdb/update-url-column.md +6 -0
- package/docs/examples/tablesdb/update.md +3 -0
- package/docs/examples/tablesdb/upsert-row.md +4 -0
- package/docs/examples/tablesdb/upsert-rows.md +4 -0
- package/docs/examples/teams/create-membership.md +3 -0
- package/docs/examples/teams/create.md +3 -0
- package/docs/examples/teams/delete-membership.md +3 -0
- package/docs/examples/teams/delete.md +2 -0
- package/docs/examples/teams/get-membership.md +3 -0
- package/docs/examples/teams/get-prefs.md +2 -0
- package/docs/examples/teams/get.md +2 -0
- package/docs/examples/teams/list-logs.md +2 -0
- package/docs/examples/teams/list-memberships.md +2 -0
- package/docs/examples/teams/list.md +1 -0
- package/docs/examples/teams/update-membership-status.md +5 -0
- package/docs/examples/teams/update-membership.md +4 -0
- package/docs/examples/teams/update-name.md +3 -0
- package/docs/examples/teams/update-prefs.md +3 -0
- package/docs/examples/tokens/create-file-token.md +3 -0
- package/docs/examples/tokens/delete.md +2 -0
- package/docs/examples/tokens/get.md +2 -0
- package/docs/examples/tokens/list.md +3 -0
- package/docs/examples/tokens/update.md +2 -0
- package/docs/examples/users/create-argon-2-user.md +4 -0
- package/docs/examples/users/create-bcrypt-user.md +4 -0
- package/docs/examples/users/create-jwt.md +2 -0
- package/docs/examples/users/create-md-5-user.md +4 -0
- package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/create-ph-pass-user.md +4 -0
- package/docs/examples/users/create-scrypt-modified-user.md +7 -0
- package/docs/examples/users/create-scrypt-user.md +9 -0
- package/docs/examples/users/create-session.md +2 -0
- package/docs/examples/users/create-sha-user.md +4 -0
- package/docs/examples/users/create-target.md +5 -0
- package/docs/examples/users/create-token.md +2 -0
- package/docs/examples/users/create.md +2 -0
- package/docs/examples/users/delete-identity.md +2 -0
- package/docs/examples/users/delete-mfa-authenticator.md +3 -0
- package/docs/examples/users/delete-session.md +3 -0
- package/docs/examples/users/delete-sessions.md +2 -0
- package/docs/examples/users/delete-target.md +3 -0
- package/docs/examples/users/delete.md +2 -0
- package/docs/examples/users/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/get-prefs.md +2 -0
- package/docs/examples/users/get-target.md +3 -0
- package/docs/examples/users/get-usage.md +1 -0
- package/docs/examples/users/get.md +2 -0
- package/docs/examples/users/list-identities.md +1 -0
- package/docs/examples/users/list-logs.md +2 -0
- package/docs/examples/users/list-memberships.md +2 -0
- package/docs/examples/users/list-mfa-factors.md +2 -0
- package/docs/examples/users/list-sessions.md +2 -0
- package/docs/examples/users/list-targets.md +2 -0
- package/docs/examples/users/list.md +1 -0
- package/docs/examples/users/update-email-verification.md +3 -0
- package/docs/examples/users/update-email.md +3 -0
- package/docs/examples/users/update-labels.md +3 -0
- package/docs/examples/users/update-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/update-mfa.md +3 -0
- package/docs/examples/users/update-name.md +3 -0
- package/docs/examples/users/update-password.md +3 -0
- package/docs/examples/users/update-phone-verification.md +3 -0
- package/docs/examples/users/update-phone.md +3 -0
- package/docs/examples/users/update-prefs.md +3 -0
- package/docs/examples/users/update-status.md +3 -0
- package/docs/examples/users/update-target.md +3 -0
- package/docs/examples/vcs/create-repository-detection.md +4 -0
- package/docs/examples/vcs/create-repository.md +4 -0
- package/docs/examples/vcs/delete-installation.md +2 -0
- package/docs/examples/vcs/get-installation.md +2 -0
- package/docs/examples/vcs/get-repository-contents.md +3 -0
- package/docs/examples/vcs/get-repository.md +3 -0
- package/docs/examples/vcs/list-installations.md +1 -0
- package/docs/examples/vcs/list-repositories.md +3 -0
- package/docs/examples/vcs/list-repository-branches.md +3 -0
- package/docs/examples/vcs/update-external-deployments.md +4 -0
- package/index.ts +5 -167
- package/install.ps1 +3 -3
- package/install.sh +3 -3
- package/lib/client.ts +15 -7
- package/lib/commands/config.ts +22 -6
- package/lib/commands/generate.ts +76 -0
- package/lib/commands/generators/databases.ts +508 -0
- package/lib/commands/init.ts +25 -14
- package/lib/commands/pull.ts +245 -193
- package/lib/commands/push.ts +336 -130
- package/lib/commands/run.ts +1 -1
- package/lib/commands/schema.ts +30 -11
- package/lib/commands/services/account.ts +200 -385
- package/lib/commands/services/console.ts +13 -34
- package/lib/commands/services/databases.ts +298 -1215
- package/lib/commands/services/functions.ts +115 -434
- package/lib/commands/services/graphql.ts +5 -2
- package/lib/commands/services/health.ts +87 -149
- package/lib/commands/services/locale.ts +36 -33
- package/lib/commands/services/messaging.ts +180 -999
- package/lib/commands/services/migrations.ts +54 -226
- package/lib/commands/services/project.ts +19 -23
- package/lib/commands/services/projects.ts +194 -714
- package/lib/commands/services/proxy.ts +30 -58
- package/lib/commands/services/sites.ts +107 -379
- package/lib/commands/services/storage.ts +93 -302
- package/lib/commands/services/tables-db.ts +1150 -0
- package/lib/commands/services/teams.ts +48 -110
- package/lib/commands/services/tokens.ts +16 -28
- package/lib/commands/services/users.ts +133 -403
- package/lib/commands/services/vcs.ts +48 -151
- package/lib/commands/types.ts +1 -1
- package/lib/commands/update.ts +12 -11
- package/lib/commands/utils/attributes.ts +44 -53
- package/lib/commands/utils/deployment.ts +6 -2
- package/lib/commands/utils/pools.ts +7 -6
- package/lib/config.ts +51 -4
- package/lib/constants.ts +22 -0
- package/lib/emulation/docker.ts +97 -83
- package/lib/parser.ts +16 -11
- package/lib/questions.ts +36 -21
- package/lib/sdks.ts +15 -11
- package/lib/utils.ts +35 -4
- package/package.json +12 -12
- package/scoop/appwrite.config.json +29 -19
- package/.github/workflows/build-verify.yml +0 -71
- package/bun.lock +0 -627
- package/dist/lib/commands/db.d.ts +0 -34
- package/dist/lib/commands/db.d.ts.map +0 -1
- package/dist/lib/commands/db.js +0 -247
- package/dist/lib/commands/db.js.map +0 -1
- package/dist/lib/commands/services/avatars.d.ts +0 -3
- package/dist/lib/commands/services/avatars.d.ts.map +0 -1
- package/dist/lib/commands/services/avatars.js +0 -118
- package/dist/lib/commands/services/avatars.js.map +0 -1
- package/dist/lib/commands/services/tablesdb.d.ts +0 -3
- package/dist/lib/commands/services/tablesdb.d.ts.map +0 -1
- package/dist/lib/commands/services/tablesdb.js.map +0 -1
- package/dist/scripts/generate-commands.d.ts +0 -2
- package/dist/scripts/generate-commands.d.ts.map +0 -1
- package/dist/scripts/generate-commands.js +0 -398
- package/dist/scripts/generate-commands.js.map +0 -1
- package/dist/sites/profile-website/src/lib/utils.d.ts +0 -4
- package/dist/sites/profile-website/src/lib/utils.d.ts.map +0 -1
- package/dist/sites/profile-website/src/lib/utils.js +0 -32
- package/dist/sites/profile-website/src/lib/utils.js.map +0 -1
- package/dist/sites/profile-website/tailwind.config.d.ts +0 -3
- package/dist/sites/profile-website/tailwind.config.d.ts.map +0 -1
- package/dist/sites/profile-website/tailwind.config.js +0 -110
- package/dist/sites/profile-website/tailwind.config.js.map +0 -1
- package/dist/test.d.ts +0 -2
- package/dist/test.d.ts.map +0 -1
- package/dist/test.js +0 -38
- package/dist/test.js.map +0 -1
- package/lib/commands/db.ts +0 -324
- package/lib/commands/services/avatars.ts +0 -400
- package/lib/commands/services/tablesdb.ts +0 -1928
- package/scripts/generate-commands.ts +0 -539
|
@@ -3,11 +3,15 @@ import { sdkForProject } from "../../sdks.js";
|
|
|
3
3
|
import {
|
|
4
4
|
actionRunner,
|
|
5
5
|
commandDescriptions,
|
|
6
|
+
success,
|
|
7
|
+
parse,
|
|
6
8
|
parseBool,
|
|
7
9
|
parseInteger,
|
|
8
10
|
} from "../../parser.js";
|
|
9
11
|
import {
|
|
10
12
|
Projects,
|
|
13
|
+
Region,
|
|
14
|
+
Api,
|
|
11
15
|
AuthMethod,
|
|
12
16
|
OAuthProvider,
|
|
13
17
|
PlatformType,
|
|
@@ -37,17 +41,9 @@ export const projects = new Command("projects")
|
|
|
37
41
|
|
|
38
42
|
projects
|
|
39
43
|
.command(`list`)
|
|
40
|
-
.description(
|
|
41
|
-
|
|
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
|
-
)
|
|
44
|
+
.description(`Get a list of all projects. You can use the query params to filter your results. `)
|
|
45
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId, labels, search`)
|
|
46
|
+
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
51
47
|
.option(
|
|
52
48
|
`--total [value]`,
|
|
53
49
|
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
@@ -57,98 +53,41 @@ projects
|
|
|
57
53
|
.action(
|
|
58
54
|
actionRunner(
|
|
59
55
|
async ({ queries, search, total }) =>
|
|
60
|
-
await (await getProjectsClient()).list(queries, search, total),
|
|
56
|
+
parse(await (await getProjectsClient()).list(queries, search, total)),
|
|
61
57
|
),
|
|
62
58
|
);
|
|
63
59
|
|
|
64
60
|
projects
|
|
65
61
|
.command(`create`)
|
|
66
|
-
.description(
|
|
67
|
-
|
|
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
|
-
)
|
|
62
|
+
.description(`Create a new project. You can create a maximum of 100 projects per account. `)
|
|
63
|
+
.requiredOption(`--project-id <project-id>`, `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.`)
|
|
73
64
|
.requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
|
|
74
65
|
.requiredOption(`--team-id <team-id>`, `Team unique ID.`)
|
|
75
66
|
.option(`--region <region>`, `Project Region.`)
|
|
76
|
-
.option(
|
|
77
|
-
`--description <description>`,
|
|
78
|
-
`Project description. Max length: 256 chars.`,
|
|
79
|
-
)
|
|
67
|
+
.option(`--description <description>`, `Project description. Max length: 256 chars.`)
|
|
80
68
|
.option(`--logo <logo>`, `Project logo.`)
|
|
81
69
|
.option(`--url <url>`, `Project URL.`)
|
|
82
|
-
.option(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
)
|
|
86
|
-
.option(
|
|
87
|
-
|
|
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
|
-
)
|
|
70
|
+
.option(`--legal-name <legal-name>`, `Project legal Name. Max length: 256 chars.`)
|
|
71
|
+
.option(`--legal-country <legal-country>`, `Project legal Country. Max length: 256 chars.`)
|
|
72
|
+
.option(`--legal-state <legal-state>`, `Project legal State. Max length: 256 chars.`)
|
|
73
|
+
.option(`--legal-city <legal-city>`, `Project legal City. Max length: 256 chars.`)
|
|
74
|
+
.option(`--legal-address <legal-address>`, `Project legal Address. Max length: 256 chars.`)
|
|
75
|
+
.option(`--legal-tax-id <legal-tax-id>`, `Project legal Tax ID. Max length: 256 chars.`)
|
|
106
76
|
.action(
|
|
107
77
|
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
|
-
),
|
|
78
|
+
async ({ projectId, name, teamId, region, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId }) =>
|
|
79
|
+
parse(await (await getProjectsClient()).create(projectId, name, teamId, region as Region, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId)),
|
|
140
80
|
),
|
|
141
81
|
);
|
|
142
82
|
|
|
143
83
|
projects
|
|
144
84
|
.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
|
-
)
|
|
85
|
+
.description(`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. `)
|
|
148
86
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
149
87
|
.action(
|
|
150
88
|
actionRunner(
|
|
151
|
-
async ({ projectId }) =>
|
|
89
|
+
async ({ projectId }) =>
|
|
90
|
+
parse(await (await getProjectsClient()).get(projectId)),
|
|
152
91
|
),
|
|
153
92
|
);
|
|
154
93
|
|
|
@@ -157,66 +96,19 @@ projects
|
|
|
157
96
|
.description(`Update a project by its unique ID.`)
|
|
158
97
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
159
98
|
.requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
|
|
160
|
-
.option(
|
|
161
|
-
`--description <description>`,
|
|
162
|
-
`Project description. Max length: 256 chars.`,
|
|
163
|
-
)
|
|
99
|
+
.option(`--description <description>`, `Project description. Max length: 256 chars.`)
|
|
164
100
|
.option(`--logo <logo>`, `Project logo.`)
|
|
165
101
|
.option(`--url <url>`, `Project URL.`)
|
|
166
|
-
.option(
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
)
|
|
170
|
-
.option(
|
|
171
|
-
|
|
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
|
-
)
|
|
102
|
+
.option(`--legal-name <legal-name>`, `Project legal name. Max length: 256 chars.`)
|
|
103
|
+
.option(`--legal-country <legal-country>`, `Project legal country. Max length: 256 chars.`)
|
|
104
|
+
.option(`--legal-state <legal-state>`, `Project legal state. Max length: 256 chars.`)
|
|
105
|
+
.option(`--legal-city <legal-city>`, `Project legal city. Max length: 256 chars.`)
|
|
106
|
+
.option(`--legal-address <legal-address>`, `Project legal address. Max length: 256 chars.`)
|
|
107
|
+
.option(`--legal-tax-id <legal-tax-id>`, `Project legal tax ID. Max length: 256 chars.`)
|
|
190
108
|
.action(
|
|
191
109
|
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
|
-
),
|
|
110
|
+
async ({ projectId, name, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId }) =>
|
|
111
|
+
parse(await (await getProjectsClient()).update(projectId, name, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId)),
|
|
220
112
|
),
|
|
221
113
|
);
|
|
222
114
|
|
|
@@ -227,375 +119,243 @@ projects
|
|
|
227
119
|
.action(
|
|
228
120
|
actionRunner(
|
|
229
121
|
async ({ projectId }) =>
|
|
230
|
-
await (await getProjectsClient()).delete(projectId),
|
|
122
|
+
parse(await (await getProjectsClient()).delete(projectId)),
|
|
231
123
|
),
|
|
232
124
|
);
|
|
233
125
|
|
|
234
126
|
projects
|
|
235
127
|
.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
|
-
)
|
|
128
|
+
.description(`Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`)
|
|
239
129
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
240
130
|
.requiredOption(`--api <api>`, `API name.`)
|
|
241
131
|
.requiredOption(`--status <status>`, `API status.`, parseBool)
|
|
242
132
|
.action(
|
|
243
133
|
actionRunner(
|
|
244
134
|
async ({ projectId, api, status }) =>
|
|
245
|
-
await (
|
|
246
|
-
await getProjectsClient()
|
|
247
|
-
).updateApiStatus(projectId, api, status),
|
|
135
|
+
parse(await (await getProjectsClient()).updateApiStatus(projectId, api as Api, status)),
|
|
248
136
|
),
|
|
249
137
|
);
|
|
250
138
|
|
|
251
139
|
projects
|
|
252
140
|
.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
|
-
)
|
|
141
|
+
.description(`Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.`)
|
|
256
142
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
257
143
|
.requiredOption(`--status <status>`, `API status.`, parseBool)
|
|
258
144
|
.action(
|
|
259
145
|
actionRunner(
|
|
260
146
|
async ({ projectId, status }) =>
|
|
261
|
-
await (await getProjectsClient()).updateApiStatusAll(projectId, status),
|
|
147
|
+
parse(await (await getProjectsClient()).updateApiStatusAll(projectId, status)),
|
|
262
148
|
),
|
|
263
149
|
);
|
|
264
150
|
|
|
265
151
|
projects
|
|
266
152
|
.command(`update-auth-duration`)
|
|
267
|
-
.description(
|
|
268
|
-
`Update how long sessions created within a project should stay active for.`,
|
|
269
|
-
)
|
|
153
|
+
.description(`Update how long sessions created within a project should stay active for.`)
|
|
270
154
|
.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
|
-
)
|
|
155
|
+
.requiredOption(`--duration <duration>`, `Project session length in seconds. Max length: 31536000 seconds.`, parseInteger)
|
|
276
156
|
.action(
|
|
277
157
|
actionRunner(
|
|
278
158
|
async ({ projectId, duration }) =>
|
|
279
|
-
await (
|
|
280
|
-
await getProjectsClient()
|
|
281
|
-
).updateAuthDuration(projectId, duration),
|
|
159
|
+
parse(await (await getProjectsClient()).updateAuthDuration(projectId, duration)),
|
|
282
160
|
),
|
|
283
161
|
);
|
|
284
162
|
|
|
285
163
|
projects
|
|
286
164
|
.command(`update-auth-limit`)
|
|
287
|
-
.description(
|
|
288
|
-
`Update the maximum number of users allowed in this project. Set to 0 for unlimited users. `,
|
|
289
|
-
)
|
|
165
|
+
.description(`Update the maximum number of users allowed in this project. Set to 0 for unlimited users. `)
|
|
290
166
|
.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
|
-
)
|
|
167
|
+
.requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Use 0 for unlimited.`, parseInteger)
|
|
296
168
|
.action(
|
|
297
169
|
actionRunner(
|
|
298
170
|
async ({ projectId, limit }) =>
|
|
299
|
-
await (await getProjectsClient()).updateAuthLimit(projectId, limit),
|
|
171
|
+
parse(await (await getProjectsClient()).updateAuthLimit(projectId, limit)),
|
|
300
172
|
),
|
|
301
173
|
);
|
|
302
174
|
|
|
303
175
|
projects
|
|
304
176
|
.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
|
-
)
|
|
177
|
+
.description(`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.`)
|
|
308
178
|
.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
|
-
)
|
|
179
|
+
.requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10`, parseInteger)
|
|
314
180
|
.action(
|
|
315
181
|
actionRunner(
|
|
316
182
|
async ({ projectId, limit }) =>
|
|
317
|
-
await (
|
|
318
|
-
await getProjectsClient()
|
|
319
|
-
).updateAuthSessionsLimit(projectId, limit),
|
|
183
|
+
parse(await (await getProjectsClient()).updateAuthSessionsLimit(projectId, limit)),
|
|
320
184
|
),
|
|
321
185
|
);
|
|
322
186
|
|
|
323
187
|
projects
|
|
324
188
|
.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
|
-
)
|
|
189
|
+
.description(`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. `)
|
|
328
190
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
329
|
-
.requiredOption(
|
|
330
|
-
|
|
331
|
-
|
|
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
|
-
)
|
|
191
|
+
.requiredOption(`--user-name <user-name>`, `Set to true to show userName to members of a team.`, parseBool)
|
|
192
|
+
.requiredOption(`--user-email <user-email>`, `Set to true to show email to members of a team.`, parseBool)
|
|
193
|
+
.requiredOption(`--mfa <mfa>`, `Set to true to show mfa to members of a team.`, parseBool)
|
|
344
194
|
.action(
|
|
345
195
|
actionRunner(
|
|
346
196
|
async ({ projectId, userName, userEmail, mfa }) =>
|
|
347
|
-
await (
|
|
348
|
-
await getProjectsClient()
|
|
349
|
-
).updateMembershipsPrivacy(projectId, userName, userEmail, mfa),
|
|
197
|
+
parse(await (await getProjectsClient()).updateMembershipsPrivacy(projectId, userName, userEmail, mfa)),
|
|
350
198
|
),
|
|
351
199
|
);
|
|
352
200
|
|
|
353
201
|
projects
|
|
354
202
|
.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
|
-
)
|
|
203
|
+
.description(`Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. `)
|
|
358
204
|
.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
|
-
)
|
|
205
|
+
.requiredOption(`--numbers [numbers...]`, `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.`)
|
|
363
206
|
.action(
|
|
364
207
|
actionRunner(
|
|
365
208
|
async ({ projectId, numbers }) =>
|
|
366
|
-
await (await getProjectsClient()).updateMockNumbers(projectId, numbers),
|
|
209
|
+
parse(await (await getProjectsClient()).updateMockNumbers(projectId, numbers)),
|
|
367
210
|
),
|
|
368
211
|
);
|
|
369
212
|
|
|
370
213
|
projects
|
|
371
214
|
.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
|
-
)
|
|
215
|
+
.description(`Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. `)
|
|
375
216
|
.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
|
-
)
|
|
217
|
+
.requiredOption(`--enabled <enabled>`, `Set whether or not to enable checking user's password against most commonly used passwords. Default is false.`, parseBool)
|
|
381
218
|
.action(
|
|
382
219
|
actionRunner(
|
|
383
220
|
async ({ projectId, enabled }) =>
|
|
384
|
-
await (
|
|
385
|
-
await getProjectsClient()
|
|
386
|
-
).updateAuthPasswordDictionary(projectId, enabled),
|
|
221
|
+
parse(await (await getProjectsClient()).updateAuthPasswordDictionary(projectId, enabled)),
|
|
387
222
|
),
|
|
388
223
|
);
|
|
389
224
|
|
|
390
225
|
projects
|
|
391
226
|
.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
|
-
)
|
|
227
|
+
.description(`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.`)
|
|
395
228
|
.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
|
-
)
|
|
229
|
+
.requiredOption(`--limit <limit>`, `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`, parseInteger)
|
|
401
230
|
.action(
|
|
402
231
|
actionRunner(
|
|
403
232
|
async ({ projectId, limit }) =>
|
|
404
|
-
await (
|
|
405
|
-
await getProjectsClient()
|
|
406
|
-
).updateAuthPasswordHistory(projectId, limit),
|
|
233
|
+
parse(await (await getProjectsClient()).updateAuthPasswordHistory(projectId, limit)),
|
|
407
234
|
),
|
|
408
235
|
);
|
|
409
236
|
|
|
410
237
|
projects
|
|
411
238
|
.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
|
-
)
|
|
239
|
+
.description(`Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. `)
|
|
415
240
|
.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
|
-
)
|
|
241
|
+
.requiredOption(`--enabled <enabled>`, `Set whether or not to check a password for similarity with personal data. Default is false.`, parseBool)
|
|
421
242
|
.action(
|
|
422
243
|
actionRunner(
|
|
423
244
|
async ({ projectId, enabled }) =>
|
|
424
|
-
await (
|
|
425
|
-
await getProjectsClient()
|
|
426
|
-
).updatePersonalDataCheck(projectId, enabled),
|
|
245
|
+
parse(await (await getProjectsClient()).updatePersonalDataCheck(projectId, enabled)),
|
|
427
246
|
),
|
|
428
247
|
);
|
|
429
248
|
|
|
430
249
|
projects
|
|
431
250
|
.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
|
-
)
|
|
251
|
+
.description(`Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.`)
|
|
435
252
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
436
|
-
.requiredOption(
|
|
437
|
-
`--alerts <alerts>`,
|
|
438
|
-
`Set to true to enable session emails.`,
|
|
439
|
-
parseBool,
|
|
440
|
-
)
|
|
253
|
+
.requiredOption(`--alerts <alerts>`, `Set to true to enable session emails.`, parseBool)
|
|
441
254
|
.action(
|
|
442
255
|
actionRunner(
|
|
443
256
|
async ({ projectId, alerts }) =>
|
|
444
|
-
await (
|
|
445
|
-
await getProjectsClient()
|
|
446
|
-
).updateSessionAlerts(projectId, alerts),
|
|
257
|
+
parse(await (await getProjectsClient()).updateSessionAlerts(projectId, alerts)),
|
|
447
258
|
),
|
|
448
259
|
);
|
|
449
260
|
|
|
450
261
|
projects
|
|
451
262
|
.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
|
-
)
|
|
263
|
+
.description(`Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.`)
|
|
455
264
|
.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
|
-
)
|
|
265
|
+
.requiredOption(`--enabled <enabled>`, `Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change`, parseBool)
|
|
461
266
|
.action(
|
|
462
267
|
actionRunner(
|
|
463
268
|
async ({ projectId, enabled }) =>
|
|
464
|
-
await (
|
|
465
|
-
await getProjectsClient()
|
|
466
|
-
).updateSessionInvalidation(projectId, enabled),
|
|
269
|
+
parse(await (await getProjectsClient()).updateSessionInvalidation(projectId, enabled)),
|
|
467
270
|
),
|
|
468
271
|
);
|
|
469
272
|
|
|
470
273
|
projects
|
|
471
274
|
.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
|
-
)
|
|
275
|
+
.description(`Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. `)
|
|
475
276
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
476
|
-
.requiredOption(
|
|
477
|
-
|
|
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
|
-
)
|
|
277
|
+
.requiredOption(`--method <method>`, `Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone`)
|
|
278
|
+
.requiredOption(`--status <status>`, `Set the status of this auth method.`, parseBool)
|
|
485
279
|
.action(
|
|
486
280
|
actionRunner(
|
|
487
281
|
async ({ projectId, method, status }) =>
|
|
488
|
-
await (
|
|
489
|
-
await getProjectsClient()
|
|
490
|
-
).updateAuthStatus(projectId, method as AuthMethod, status),
|
|
282
|
+
parse(await (await getProjectsClient()).updateAuthStatus(projectId, method as AuthMethod, status)),
|
|
491
283
|
),
|
|
492
284
|
);
|
|
493
285
|
|
|
494
286
|
projects
|
|
495
287
|
.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
|
-
)
|
|
288
|
+
.description(`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.'`)
|
|
499
289
|
.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
|
-
)
|
|
290
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire`)
|
|
504
291
|
.action(
|
|
505
292
|
actionRunner(
|
|
506
293
|
async ({ projectId, queries }) =>
|
|
507
|
-
await (await getProjectsClient()).listDevKeys(projectId, queries),
|
|
294
|
+
parse(await (await getProjectsClient()).listDevKeys(projectId, queries)),
|
|
508
295
|
),
|
|
509
296
|
);
|
|
510
297
|
|
|
511
298
|
projects
|
|
512
299
|
.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
|
-
)
|
|
300
|
+
.description(`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.`)
|
|
516
301
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
517
302
|
.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
|
-
)
|
|
303
|
+
.requiredOption(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.`)
|
|
522
304
|
.action(
|
|
523
305
|
actionRunner(
|
|
524
306
|
async ({ projectId, name, expire }) =>
|
|
525
|
-
await (await getProjectsClient()).createDevKey(projectId, name, expire),
|
|
307
|
+
parse(await (await getProjectsClient()).createDevKey(projectId, name, expire)),
|
|
526
308
|
),
|
|
527
309
|
);
|
|
528
310
|
|
|
529
311
|
projects
|
|
530
312
|
.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
|
-
)
|
|
313
|
+
.description(`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.`)
|
|
534
314
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
535
315
|
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
536
316
|
.action(
|
|
537
317
|
actionRunner(
|
|
538
318
|
async ({ projectId, keyId }) =>
|
|
539
|
-
await (await getProjectsClient()).getDevKey(projectId, keyId),
|
|
319
|
+
parse(await (await getProjectsClient()).getDevKey(projectId, keyId)),
|
|
540
320
|
),
|
|
541
321
|
);
|
|
542
322
|
|
|
543
323
|
projects
|
|
544
324
|
.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
|
-
)
|
|
325
|
+
.description(`Update a project\'s dev key by its unique ID. Use this endpoint to update a project\'s dev key name or expiration time.'`)
|
|
548
326
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
549
327
|
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
550
328
|
.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
|
-
)
|
|
329
|
+
.requiredOption(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.`)
|
|
555
330
|
.action(
|
|
556
331
|
actionRunner(
|
|
557
332
|
async ({ projectId, keyId, name, expire }) =>
|
|
558
|
-
await (
|
|
559
|
-
await getProjectsClient()
|
|
560
|
-
).updateDevKey(projectId, keyId, name, expire),
|
|
333
|
+
parse(await (await getProjectsClient()).updateDevKey(projectId, keyId, name, expire)),
|
|
561
334
|
),
|
|
562
335
|
);
|
|
563
336
|
|
|
564
337
|
projects
|
|
565
338
|
.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
|
-
)
|
|
339
|
+
.description(`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.`)
|
|
569
340
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
570
341
|
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
571
342
|
.action(
|
|
572
343
|
actionRunner(
|
|
573
344
|
async ({ projectId, keyId }) =>
|
|
574
|
-
await (await getProjectsClient()).deleteDevKey(projectId, keyId),
|
|
345
|
+
parse(await (await getProjectsClient()).deleteDevKey(projectId, keyId)),
|
|
575
346
|
),
|
|
576
347
|
);
|
|
577
348
|
|
|
578
349
|
projects
|
|
579
350
|
.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
|
-
)
|
|
351
|
+
.description(`Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. `)
|
|
583
352
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
584
|
-
.requiredOption(
|
|
585
|
-
|
|
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
|
-
)
|
|
353
|
+
.requiredOption(`--scopes [scopes...]`, `List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.`)
|
|
354
|
+
.option(`--duration <duration>`, `Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.`, parseInteger)
|
|
593
355
|
.action(
|
|
594
356
|
actionRunner(
|
|
595
357
|
async ({ projectId, scopes, duration }) =>
|
|
596
|
-
await (
|
|
597
|
-
await getProjectsClient()
|
|
598
|
-
).createJWT(projectId, scopes, duration),
|
|
358
|
+
parse(await (await getProjectsClient()).createJWT(projectId, scopes, duration)),
|
|
599
359
|
),
|
|
600
360
|
);
|
|
601
361
|
|
|
@@ -612,92 +372,78 @@ projects
|
|
|
612
372
|
.action(
|
|
613
373
|
actionRunner(
|
|
614
374
|
async ({ projectId, total }) =>
|
|
615
|
-
await (await getProjectsClient()).listKeys(projectId, total),
|
|
375
|
+
parse(await (await getProjectsClient()).listKeys(projectId, total)),
|
|
616
376
|
),
|
|
617
377
|
);
|
|
618
378
|
|
|
619
379
|
projects
|
|
620
380
|
.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
|
-
)
|
|
381
|
+
.description(`Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.`)
|
|
624
382
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
625
383
|
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
626
|
-
.requiredOption(
|
|
627
|
-
|
|
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
|
-
)
|
|
384
|
+
.requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`)
|
|
385
|
+
.option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`)
|
|
634
386
|
.action(
|
|
635
387
|
actionRunner(
|
|
636
388
|
async ({ projectId, name, scopes, expire }) =>
|
|
637
|
-
await (
|
|
638
|
-
await getProjectsClient()
|
|
639
|
-
).createKey(projectId, name, scopes, expire),
|
|
389
|
+
parse(await (await getProjectsClient()).createKey(projectId, name, scopes, expire)),
|
|
640
390
|
),
|
|
641
391
|
);
|
|
642
392
|
|
|
643
393
|
projects
|
|
644
394
|
.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
|
-
)
|
|
395
|
+
.description(`Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.`)
|
|
648
396
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
649
397
|
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
650
398
|
.action(
|
|
651
399
|
actionRunner(
|
|
652
400
|
async ({ projectId, keyId }) =>
|
|
653
|
-
await (await getProjectsClient()).getKey(projectId, keyId),
|
|
401
|
+
parse(await (await getProjectsClient()).getKey(projectId, keyId)),
|
|
654
402
|
),
|
|
655
403
|
);
|
|
656
404
|
|
|
657
405
|
projects
|
|
658
406
|
.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
|
-
)
|
|
407
|
+
.description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. `)
|
|
662
408
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
663
409
|
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
664
410
|
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
665
|
-
.requiredOption(
|
|
666
|
-
|
|
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
|
-
)
|
|
411
|
+
.requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 events are allowed.`)
|
|
412
|
+
.option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`)
|
|
673
413
|
.action(
|
|
674
414
|
actionRunner(
|
|
675
415
|
async ({ projectId, keyId, name, scopes, expire }) =>
|
|
676
|
-
await (
|
|
677
|
-
await getProjectsClient()
|
|
678
|
-
).updateKey(projectId, keyId, name, scopes, expire),
|
|
416
|
+
parse(await (await getProjectsClient()).updateKey(projectId, keyId, name, scopes, expire)),
|
|
679
417
|
),
|
|
680
418
|
);
|
|
681
419
|
|
|
682
420
|
projects
|
|
683
421
|
.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
|
-
)
|
|
422
|
+
.description(`Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. `)
|
|
687
423
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
688
424
|
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
689
425
|
.action(
|
|
690
426
|
actionRunner(
|
|
691
427
|
async ({ projectId, keyId }) =>
|
|
692
|
-
await (await getProjectsClient()).deleteKey(projectId, keyId),
|
|
428
|
+
parse(await (await getProjectsClient()).deleteKey(projectId, keyId)),
|
|
693
429
|
),
|
|
694
430
|
);
|
|
695
431
|
|
|
696
432
|
projects
|
|
697
|
-
.command(`update-
|
|
698
|
-
.description(
|
|
699
|
-
|
|
700
|
-
)
|
|
433
|
+
.command(`update-labels`)
|
|
434
|
+
.description(`Update the project labels by its unique ID. Labels can be used to easily filter projects in an organization.`)
|
|
435
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
436
|
+
.requiredOption(`--labels [labels...]`, `Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.`)
|
|
437
|
+
.action(
|
|
438
|
+
actionRunner(
|
|
439
|
+
async ({ projectId, labels }) =>
|
|
440
|
+
parse(await (await getProjectsClient()).updateLabels(projectId, labels)),
|
|
441
|
+
),
|
|
442
|
+
);
|
|
443
|
+
|
|
444
|
+
projects
|
|
445
|
+
.command(`update-o-auth-2`)
|
|
446
|
+
.description(`Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers. `)
|
|
701
447
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
702
448
|
.requiredOption(`--provider <provider>`, `Provider Name`)
|
|
703
449
|
.option(`--app-id <app-id>`, `Provider app ID. Max length: 256 chars.`)
|
|
@@ -711,23 +457,13 @@ projects
|
|
|
711
457
|
.action(
|
|
712
458
|
actionRunner(
|
|
713
459
|
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
|
-
),
|
|
460
|
+
parse(await (await getProjectsClient()).updateOAuth2(projectId, provider as OAuthProvider, appId, secret, enabled)),
|
|
723
461
|
),
|
|
724
462
|
);
|
|
725
463
|
|
|
726
464
|
projects
|
|
727
465
|
.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
|
-
)
|
|
466
|
+
.description(`Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. `)
|
|
731
467
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
732
468
|
.option(
|
|
733
469
|
`--total [value]`,
|
|
@@ -738,150 +474,96 @@ projects
|
|
|
738
474
|
.action(
|
|
739
475
|
actionRunner(
|
|
740
476
|
async ({ projectId, total }) =>
|
|
741
|
-
await (await getProjectsClient()).listPlatforms(projectId, total),
|
|
477
|
+
parse(await (await getProjectsClient()).listPlatforms(projectId, total)),
|
|
742
478
|
),
|
|
743
479
|
);
|
|
744
480
|
|
|
745
481
|
projects
|
|
746
482
|
.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
|
-
)
|
|
483
|
+
.description(`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.`)
|
|
750
484
|
.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
|
-
)
|
|
485
|
+
.requiredOption(`--type <type>`, `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.`)
|
|
755
486
|
.requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
|
|
756
|
-
.option(
|
|
757
|
-
|
|
758
|
-
|
|
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
|
-
)
|
|
487
|
+
.option(`--key <key>`, `Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.`)
|
|
488
|
+
.option(`--store <store>`, `App store or Google Play store ID. Max length: 256 chars.`)
|
|
489
|
+
.option(`--hostname <hostname>`, `Platform client hostname. Max length: 256 chars.`)
|
|
768
490
|
.action(
|
|
769
491
|
actionRunner(
|
|
770
|
-
async ({ projectId,
|
|
771
|
-
await (
|
|
772
|
-
await getProjectsClient()
|
|
773
|
-
).createPlatform(
|
|
774
|
-
projectId,
|
|
775
|
-
xType as PlatformType,
|
|
776
|
-
name,
|
|
777
|
-
key,
|
|
778
|
-
store,
|
|
779
|
-
hostname,
|
|
780
|
-
),
|
|
492
|
+
async ({ projectId, type, name, key, store, hostname }) =>
|
|
493
|
+
parse(await (await getProjectsClient()).createPlatform(projectId, type as PlatformType, name, key, store, hostname)),
|
|
781
494
|
),
|
|
782
495
|
);
|
|
783
496
|
|
|
784
497
|
projects
|
|
785
498
|
.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
|
-
)
|
|
499
|
+
.description(`Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. `)
|
|
789
500
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
790
501
|
.requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
|
|
791
502
|
.action(
|
|
792
503
|
actionRunner(
|
|
793
504
|
async ({ projectId, platformId }) =>
|
|
794
|
-
await (await getProjectsClient()).getPlatform(projectId, platformId),
|
|
505
|
+
parse(await (await getProjectsClient()).getPlatform(projectId, platformId)),
|
|
795
506
|
),
|
|
796
507
|
);
|
|
797
508
|
|
|
798
509
|
projects
|
|
799
510
|
.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
|
-
)
|
|
511
|
+
.description(`Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. `)
|
|
803
512
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
804
513
|
.requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
|
|
805
514
|
.requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
|
|
806
|
-
.option(
|
|
807
|
-
|
|
808
|
-
|
|
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
|
-
)
|
|
515
|
+
.option(`--key <key>`, `Package name for android or bundle ID for iOS. Max length: 256 chars.`)
|
|
516
|
+
.option(`--store <store>`, `App store or Google Play store ID. Max length: 256 chars.`)
|
|
517
|
+
.option(`--hostname <hostname>`, `Platform client URL. Max length: 256 chars.`)
|
|
818
518
|
.action(
|
|
819
519
|
actionRunner(
|
|
820
520
|
async ({ projectId, platformId, name, key, store, hostname }) =>
|
|
821
|
-
await (
|
|
822
|
-
await getProjectsClient()
|
|
823
|
-
).updatePlatform(projectId, platformId, name, key, store, hostname),
|
|
521
|
+
parse(await (await getProjectsClient()).updatePlatform(projectId, platformId, name, key, store, hostname)),
|
|
824
522
|
),
|
|
825
523
|
);
|
|
826
524
|
|
|
827
525
|
projects
|
|
828
526
|
.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
|
-
)
|
|
527
|
+
.description(`Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. `)
|
|
832
528
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
833
529
|
.requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
|
|
834
530
|
.action(
|
|
835
531
|
actionRunner(
|
|
836
532
|
async ({ projectId, platformId }) =>
|
|
837
|
-
await (await getProjectsClient()).deletePlatform(projectId, platformId),
|
|
533
|
+
parse(await (await getProjectsClient()).deletePlatform(projectId, platformId)),
|
|
838
534
|
),
|
|
839
535
|
);
|
|
840
536
|
|
|
841
537
|
projects
|
|
842
538
|
.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
|
-
)
|
|
539
|
+
.description(`Update the status of a specific service. Use this endpoint to enable or disable a service in your project. `)
|
|
846
540
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
847
541
|
.requiredOption(`--service <service>`, `Service name.`)
|
|
848
542
|
.requiredOption(`--status <status>`, `Service status.`, parseBool)
|
|
849
543
|
.action(
|
|
850
544
|
actionRunner(
|
|
851
545
|
async ({ projectId, service, status }) =>
|
|
852
|
-
await (
|
|
853
|
-
await getProjectsClient()
|
|
854
|
-
).updateServiceStatus(projectId, service as ApiService, status),
|
|
546
|
+
parse(await (await getProjectsClient()).updateServiceStatus(projectId, service as ApiService, status)),
|
|
855
547
|
),
|
|
856
548
|
);
|
|
857
549
|
|
|
858
550
|
projects
|
|
859
551
|
.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
|
-
)
|
|
552
|
+
.description(`Update the status of all services. Use this endpoint to enable or disable all optional services at once. `)
|
|
863
553
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
864
554
|
.requiredOption(`--status <status>`, `Service status.`, parseBool)
|
|
865
555
|
.action(
|
|
866
556
|
actionRunner(
|
|
867
557
|
async ({ projectId, status }) =>
|
|
868
|
-
await (
|
|
869
|
-
await getProjectsClient()
|
|
870
|
-
).updateServiceStatusAll(projectId, status),
|
|
558
|
+
parse(await (await getProjectsClient()).updateServiceStatusAll(projectId, status)),
|
|
871
559
|
),
|
|
872
560
|
);
|
|
873
561
|
|
|
874
562
|
projects
|
|
875
563
|
.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
|
-
)
|
|
564
|
+
.description(`Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. `)
|
|
879
565
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
880
|
-
.requiredOption(
|
|
881
|
-
`--enabled <enabled>`,
|
|
882
|
-
`Enable custom SMTP service`,
|
|
883
|
-
parseBool,
|
|
884
|
-
)
|
|
566
|
+
.requiredOption(`--enabled <enabled>`, `Enable custom SMTP service`, parseBool)
|
|
885
567
|
.option(`--sender-name <sender-name>`, `Name of the email sender`)
|
|
886
568
|
.option(`--sender-email <sender-email>`, `Email of the sender`)
|
|
887
569
|
.option(`--reply-to <reply-to>`, `Reply to email`)
|
|
@@ -892,127 +574,59 @@ projects
|
|
|
892
574
|
.option(`--secure <secure>`, `Does SMTP server use secure connection`)
|
|
893
575
|
.action(
|
|
894
576
|
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
|
-
),
|
|
577
|
+
async ({ projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure }) =>
|
|
578
|
+
parse(await (await getProjectsClient()).updateSmtp(projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure as SMTPSecure)),
|
|
921
579
|
),
|
|
922
580
|
);
|
|
923
581
|
|
|
924
582
|
projects
|
|
925
583
|
.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
|
-
)
|
|
584
|
+
.description(`Send a test email to verify SMTP configuration. `)
|
|
929
585
|
.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
|
-
)
|
|
586
|
+
.requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`)
|
|
934
587
|
.requiredOption(`--sender-name <sender-name>`, `Name of the email sender`)
|
|
935
588
|
.requiredOption(`--sender-email <sender-email>`, `Email of the sender`)
|
|
936
|
-
.option(`--reply-to <reply-to>`, `Reply to email`)
|
|
937
589
|
.requiredOption(`--host <host>`, `SMTP server host name`)
|
|
590
|
+
.option(`--reply-to <reply-to>`, `Reply to email`)
|
|
938
591
|
.option(`--port <port>`, `SMTP server port`, parseInteger)
|
|
939
592
|
.option(`--username <username>`, `SMTP server username`)
|
|
940
593
|
.option(`--password <password>`, `SMTP server password`)
|
|
941
594
|
.option(`--secure <secure>`, `Does SMTP server use secure connection`)
|
|
942
595
|
.action(
|
|
943
596
|
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
|
-
),
|
|
597
|
+
async ({ projectId, emails, senderName, senderEmail, host, replyTo, port, username, password, secure }) =>
|
|
598
|
+
parse(await (await getProjectsClient()).createSmtpTest(projectId, emails, senderName, senderEmail, host, replyTo, port, username, password, secure as SMTPSecure)),
|
|
970
599
|
),
|
|
971
600
|
);
|
|
972
601
|
|
|
973
602
|
projects
|
|
974
603
|
.command(`update-team`)
|
|
975
|
-
.description(
|
|
976
|
-
`Update the team ID of a project allowing for it to be transferred to another team.`,
|
|
977
|
-
)
|
|
604
|
+
.description(`Update the team ID of a project allowing for it to be transferred to another team.`)
|
|
978
605
|
.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
|
-
)
|
|
606
|
+
.requiredOption(`--team-id <team-id>`, `Team ID of the team to transfer project to.`)
|
|
983
607
|
.action(
|
|
984
608
|
actionRunner(
|
|
985
609
|
async ({ projectId, teamId }) =>
|
|
986
|
-
await (await getProjectsClient()).updateTeam(projectId, teamId),
|
|
610
|
+
parse(await (await getProjectsClient()).updateTeam(projectId, teamId)),
|
|
987
611
|
),
|
|
988
612
|
);
|
|
989
613
|
|
|
990
614
|
projects
|
|
991
615
|
.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
|
-
)
|
|
616
|
+
.description(`Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. `)
|
|
995
617
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
996
618
|
.requiredOption(`--type <type>`, `Template type`)
|
|
997
619
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
998
620
|
.action(
|
|
999
621
|
actionRunner(
|
|
1000
|
-
async ({ projectId,
|
|
1001
|
-
await (
|
|
1002
|
-
await getProjectsClient()
|
|
1003
|
-
).getEmailTemplate(
|
|
1004
|
-
projectId,
|
|
1005
|
-
xType as EmailTemplateType,
|
|
1006
|
-
locale as EmailTemplateLocale,
|
|
1007
|
-
),
|
|
622
|
+
async ({ projectId, type, locale }) =>
|
|
623
|
+
parse(await (await getProjectsClient()).getEmailTemplate(projectId, type as EmailTemplateType, locale as EmailTemplateLocale)),
|
|
1008
624
|
),
|
|
1009
625
|
);
|
|
1010
626
|
|
|
1011
627
|
projects
|
|
1012
628
|
.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
|
-
)
|
|
629
|
+
.description(`Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.`)
|
|
1016
630
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1017
631
|
.requiredOption(`--type <type>`, `Template type`)
|
|
1018
632
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
@@ -1023,122 +637,67 @@ projects
|
|
|
1023
637
|
.option(`--reply-to <reply-to>`, `Reply to email`)
|
|
1024
638
|
.action(
|
|
1025
639
|
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
|
-
),
|
|
640
|
+
async ({ projectId, type, locale, subject, message, senderName, senderEmail, replyTo }) =>
|
|
641
|
+
parse(await (await getProjectsClient()).updateEmailTemplate(projectId, type as EmailTemplateType, locale as EmailTemplateLocale, subject, message, senderName, senderEmail, replyTo)),
|
|
1048
642
|
),
|
|
1049
643
|
);
|
|
1050
644
|
|
|
1051
645
|
projects
|
|
1052
646
|
.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
|
-
)
|
|
647
|
+
.description(`Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. `)
|
|
1056
648
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1057
649
|
.requiredOption(`--type <type>`, `Template type`)
|
|
1058
650
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1059
651
|
.action(
|
|
1060
652
|
actionRunner(
|
|
1061
|
-
async ({ projectId,
|
|
1062
|
-
await (
|
|
1063
|
-
await getProjectsClient()
|
|
1064
|
-
).deleteEmailTemplate(
|
|
1065
|
-
projectId,
|
|
1066
|
-
xType as EmailTemplateType,
|
|
1067
|
-
locale as EmailTemplateLocale,
|
|
1068
|
-
),
|
|
653
|
+
async ({ projectId, type, locale }) =>
|
|
654
|
+
parse(await (await getProjectsClient()).deleteEmailTemplate(projectId, type as EmailTemplateType, locale as EmailTemplateLocale)),
|
|
1069
655
|
),
|
|
1070
656
|
);
|
|
1071
657
|
|
|
1072
658
|
projects
|
|
1073
659
|
.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
|
-
)
|
|
660
|
+
.description(`Get a custom SMS template for the specified locale and type returning it's contents.`)
|
|
1077
661
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1078
662
|
.requiredOption(`--type <type>`, `Template type`)
|
|
1079
663
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1080
664
|
.action(
|
|
1081
665
|
actionRunner(
|
|
1082
|
-
async ({ projectId,
|
|
1083
|
-
await (
|
|
1084
|
-
await getProjectsClient()
|
|
1085
|
-
).getSmsTemplate(
|
|
1086
|
-
projectId,
|
|
1087
|
-
xType as SmsTemplateType,
|
|
1088
|
-
locale as SmsTemplateLocale,
|
|
1089
|
-
),
|
|
666
|
+
async ({ projectId, type, locale }) =>
|
|
667
|
+
parse(await (await getProjectsClient()).getSmsTemplate(projectId, type as SmsTemplateType, locale as SmsTemplateLocale)),
|
|
1090
668
|
),
|
|
1091
669
|
);
|
|
1092
670
|
|
|
1093
671
|
projects
|
|
1094
672
|
.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
|
-
)
|
|
673
|
+
.description(`Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `)
|
|
1098
674
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1099
675
|
.requiredOption(`--type <type>`, `Template type`)
|
|
1100
676
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1101
677
|
.requiredOption(`--message <message>`, `Template message`)
|
|
1102
678
|
.action(
|
|
1103
679
|
actionRunner(
|
|
1104
|
-
async ({ projectId,
|
|
1105
|
-
await (
|
|
1106
|
-
await getProjectsClient()
|
|
1107
|
-
).updateSmsTemplate(
|
|
1108
|
-
projectId,
|
|
1109
|
-
xType as SmsTemplateType,
|
|
1110
|
-
locale as SmsTemplateLocale,
|
|
1111
|
-
message,
|
|
1112
|
-
),
|
|
680
|
+
async ({ projectId, type, locale, message }) =>
|
|
681
|
+
parse(await (await getProjectsClient()).updateSmsTemplate(projectId, type as SmsTemplateType, locale as SmsTemplateLocale, message)),
|
|
1113
682
|
),
|
|
1114
683
|
);
|
|
1115
684
|
|
|
1116
685
|
projects
|
|
1117
686
|
.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
|
-
)
|
|
687
|
+
.description(`Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `)
|
|
1121
688
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1122
689
|
.requiredOption(`--type <type>`, `Template type`)
|
|
1123
690
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1124
691
|
.action(
|
|
1125
692
|
actionRunner(
|
|
1126
|
-
async ({ projectId,
|
|
1127
|
-
await (
|
|
1128
|
-
await getProjectsClient()
|
|
1129
|
-
).deleteSmsTemplate(
|
|
1130
|
-
projectId,
|
|
1131
|
-
xType as SmsTemplateType,
|
|
1132
|
-
locale as SmsTemplateLocale,
|
|
1133
|
-
),
|
|
693
|
+
async ({ projectId, type, locale }) =>
|
|
694
|
+
parse(await (await getProjectsClient()).deleteSmsTemplate(projectId, type as SmsTemplateType, locale as SmsTemplateLocale)),
|
|
1134
695
|
),
|
|
1135
696
|
);
|
|
1136
697
|
|
|
1137
698
|
projects
|
|
1138
699
|
.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
|
-
)
|
|
700
|
+
.description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results. `)
|
|
1142
701
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1143
702
|
.option(
|
|
1144
703
|
`--total [value]`,
|
|
@@ -1149,169 +708,90 @@ projects
|
|
|
1149
708
|
.action(
|
|
1150
709
|
actionRunner(
|
|
1151
710
|
async ({ projectId, total }) =>
|
|
1152
|
-
await (await getProjectsClient()).listWebhooks(projectId, total),
|
|
711
|
+
parse(await (await getProjectsClient()).listWebhooks(projectId, total)),
|
|
1153
712
|
),
|
|
1154
713
|
);
|
|
1155
714
|
|
|
1156
715
|
projects
|
|
1157
716
|
.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
|
-
)
|
|
717
|
+
.description(`Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. `)
|
|
1161
718
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1162
719
|
.requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
|
|
720
|
+
.requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
|
|
721
|
+
.requiredOption(`--url <url>`, `Webhook URL.`)
|
|
722
|
+
.requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool)
|
|
1163
723
|
.option(
|
|
1164
724
|
`--enabled [value]`,
|
|
1165
725
|
`Enable or disable a webhook.`,
|
|
1166
726
|
(value: string | undefined) =>
|
|
1167
727
|
value === undefined ? true : parseBool(value),
|
|
1168
728
|
)
|
|
1169
|
-
.
|
|
1170
|
-
|
|
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
|
-
)
|
|
729
|
+
.option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`)
|
|
730
|
+
.option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`)
|
|
1187
731
|
.action(
|
|
1188
732
|
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
|
-
),
|
|
733
|
+
async ({ projectId, name, events, url, security, enabled, httpUser, httpPass }) =>
|
|
734
|
+
parse(await (await getProjectsClient()).createWebhook(projectId, name, events, url, security, enabled, httpUser, httpPass)),
|
|
1211
735
|
),
|
|
1212
736
|
);
|
|
1213
737
|
|
|
1214
738
|
projects
|
|
1215
739
|
.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
|
-
)
|
|
740
|
+
.description(`Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. `)
|
|
1219
741
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1220
742
|
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
1221
743
|
.action(
|
|
1222
744
|
actionRunner(
|
|
1223
745
|
async ({ projectId, webhookId }) =>
|
|
1224
|
-
await (await getProjectsClient()).getWebhook(projectId, webhookId),
|
|
746
|
+
parse(await (await getProjectsClient()).getWebhook(projectId, webhookId)),
|
|
1225
747
|
),
|
|
1226
748
|
);
|
|
1227
749
|
|
|
1228
750
|
projects
|
|
1229
751
|
.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
|
-
)
|
|
752
|
+
.description(`Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. `)
|
|
1233
753
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1234
754
|
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
1235
755
|
.requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
|
|
756
|
+
.requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
|
|
757
|
+
.requiredOption(`--url <url>`, `Webhook URL.`)
|
|
758
|
+
.requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool)
|
|
1236
759
|
.option(
|
|
1237
760
|
`--enabled [value]`,
|
|
1238
761
|
`Enable or disable a webhook.`,
|
|
1239
762
|
(value: string | undefined) =>
|
|
1240
763
|
value === undefined ? true : parseBool(value),
|
|
1241
764
|
)
|
|
1242
|
-
.
|
|
1243
|
-
|
|
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
|
-
)
|
|
765
|
+
.option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`)
|
|
766
|
+
.option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`)
|
|
1260
767
|
.action(
|
|
1261
768
|
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
|
-
),
|
|
769
|
+
async ({ projectId, webhookId, name, events, url, security, enabled, httpUser, httpPass }) =>
|
|
770
|
+
parse(await (await getProjectsClient()).updateWebhook(projectId, webhookId, name, events, url, security, enabled, httpUser, httpPass)),
|
|
1286
771
|
),
|
|
1287
772
|
);
|
|
1288
773
|
|
|
1289
774
|
projects
|
|
1290
775
|
.command(`delete-webhook`)
|
|
1291
|
-
.description(
|
|
1292
|
-
`Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. `,
|
|
1293
|
-
)
|
|
776
|
+
.description(`Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. `)
|
|
1294
777
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1295
778
|
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
1296
779
|
.action(
|
|
1297
780
|
actionRunner(
|
|
1298
781
|
async ({ projectId, webhookId }) =>
|
|
1299
|
-
await (await getProjectsClient()).deleteWebhook(projectId, webhookId),
|
|
782
|
+
parse(await (await getProjectsClient()).deleteWebhook(projectId, webhookId)),
|
|
1300
783
|
),
|
|
1301
784
|
);
|
|
1302
785
|
|
|
1303
786
|
projects
|
|
1304
787
|
.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
|
-
)
|
|
788
|
+
.description(`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. `)
|
|
1308
789
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1309
790
|
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
1310
791
|
.action(
|
|
1311
792
|
actionRunner(
|
|
1312
793
|
async ({ projectId, webhookId }) =>
|
|
1313
|
-
await (
|
|
1314
|
-
await getProjectsClient()
|
|
1315
|
-
).updateWebhookSignature(projectId, webhookId),
|
|
794
|
+
parse(await (await getProjectsClient()).updateWebhookSignature(projectId, webhookId)),
|
|
1316
795
|
),
|
|
1317
796
|
);
|
|
797
|
+
|