appwrite-cli 13.0.0-rc.2 → 13.0.0-rc.3
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 +106 -101
- package/LICENSE.md +2 -2
- package/README.md +36 -59
- package/cli.ts +152 -0
- package/dist/bundle.cjs +4613 -3653
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +145 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -142
- package/dist/index.js.map +1 -1
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +7 -6
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/commands/config.d.ts +562 -0
- package/dist/lib/commands/config.d.ts.map +1 -0
- package/dist/lib/commands/config.js +416 -0
- package/dist/lib/commands/config.js.map +1 -0
- package/dist/lib/commands/db.d.ts +34 -0
- package/dist/lib/commands/db.d.ts.map +1 -0
- package/dist/lib/commands/db.js +247 -0
- package/dist/lib/commands/db.js.map +1 -0
- package/dist/lib/commands/errors.d.ts +68 -0
- package/dist/lib/commands/errors.d.ts.map +1 -0
- package/dist/lib/commands/errors.js +72 -0
- package/dist/lib/commands/errors.js.map +1 -0
- package/dist/lib/commands/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 +104 -2
- package/dist/lib/commands/pull.d.ts.map +1 -1
- package/dist/lib/commands/pull.js +470 -281
- package/dist/lib/commands/pull.js.map +1 -1
- package/dist/lib/commands/push.d.ts +106 -0
- package/dist/lib/commands/push.d.ts.map +1 -1
- package/dist/lib/commands/push.js +1257 -1628
- 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 +59 -0
- package/dist/lib/commands/schema.d.ts.map +1 -0
- package/dist/lib/commands/schema.js +86 -0
- package/dist/lib/commands/schema.js.map +1 -0
- 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 +64 -64
- 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 +38 -16
- 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 +9 -8
- package/dist/lib/commands/update.js.map +1 -1
- package/dist/lib/commands/utils/attributes.d.ts +47 -0
- package/dist/lib/commands/utils/attributes.d.ts.map +1 -0
- package/dist/lib/commands/utils/attributes.js +514 -0
- package/dist/lib/commands/utils/attributes.js.map +1 -0
- package/dist/lib/commands/utils/change-approval.d.ts +25 -0
- package/dist/lib/commands/utils/change-approval.d.ts.map +1 -0
- package/dist/lib/commands/utils/change-approval.js +129 -0
- package/dist/lib/commands/utils/change-approval.js.map +1 -0
- package/dist/lib/commands/utils/database-sync.d.ts +10 -0
- package/dist/lib/commands/utils/database-sync.d.ts.map +1 -0
- package/dist/lib/commands/utils/database-sync.js +136 -0
- package/dist/lib/commands/utils/database-sync.js.map +1 -0
- package/dist/lib/commands/utils/deployment.d.ts +34 -0
- package/dist/lib/commands/utils/deployment.d.ts.map +1 -0
- package/dist/lib/commands/utils/deployment.js +109 -0
- package/dist/lib/commands/utils/deployment.js.map +1 -0
- package/dist/lib/commands/utils/error-formatter.d.ts +19 -0
- package/dist/lib/commands/utils/error-formatter.d.ts.map +1 -0
- package/dist/lib/commands/utils/error-formatter.js +333 -0
- package/dist/lib/commands/utils/error-formatter.js.map +1 -0
- package/dist/lib/commands/utils/pools.d.ts +16 -0
- package/dist/lib/commands/utils/pools.d.ts.map +1 -0
- package/dist/lib/commands/utils/pools.js +198 -0
- package/dist/lib/commands/utils/pools.js.map +1 -0
- package/dist/lib/config.d.ts +27 -26
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +8 -45
- 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 +4 -4
- 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.map +1 -1
- package/dist/lib/questions.js +20 -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/types.d.ts +0 -214
- package/dist/lib/types.d.ts.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 +42 -2
- package/dist/lib/utils.js.map +1 -1
- package/dist/package.json +12 -11
- 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-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 +25 -165
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.ts +14 -6
- package/lib/commands/config.ts +494 -0
- package/lib/commands/db.ts +324 -0
- package/lib/commands/errors.ts +93 -0
- package/lib/commands/init.ts +25 -14
- package/lib/commands/pull.ts +683 -420
- package/lib/commands/push.ts +1677 -2404
- package/lib/commands/run.ts +1 -1
- package/lib/commands/schema.ts +122 -0
- 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 +182 -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 +13 -22
- package/lib/commands/utils/attributes.ts +719 -0
- package/lib/commands/utils/change-approval.ts +186 -0
- package/lib/commands/utils/database-sync.ts +180 -0
- package/lib/commands/utils/deployment.ts +184 -0
- package/lib/commands/utils/error-formatter.ts +417 -0
- package/lib/commands/utils/pools.ts +355 -0
- package/lib/config.ts +46 -82
- package/lib/constants.ts +22 -0
- package/lib/emulation/docker.ts +101 -87
- package/lib/parser.ts +16 -11
- package/lib/questions.ts +20 -21
- package/lib/sdks.ts +15 -11
- package/lib/types.ts +0 -229
- package/lib/utils.ts +45 -4
- package/package.json +12 -11
- package/scoop/appwrite.config.json +29 -19
- package/.github/workflows/build-verify.yml +0 -71
- package/bun.lock +0 -625
- 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/lib/commands/services/avatars.ts +0 -400
- package/lib/commands/services/tablesdb.ts +0 -1928
- package/scripts/generate-commands.ts +0 -539
|
@@ -3,6 +3,8 @@ 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";
|
|
@@ -32,17 +34,9 @@ export const users = new Command("users")
|
|
|
32
34
|
|
|
33
35
|
users
|
|
34
36
|
.command(`list`)
|
|
35
|
-
.description(
|
|
36
|
-
|
|
37
|
-
)
|
|
38
|
-
.option(
|
|
39
|
-
`--queries [queries...]`,
|
|
40
|
-
`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, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels`,
|
|
41
|
-
)
|
|
42
|
-
.option(
|
|
43
|
-
`--search <search>`,
|
|
44
|
-
`Search term to filter your list results. Max length: 256 chars.`,
|
|
45
|
-
)
|
|
37
|
+
.description(`Get a list of all the project's users. You can use the query params to filter your results.`)
|
|
38
|
+
.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, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels`)
|
|
39
|
+
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
46
40
|
.option(
|
|
47
41
|
`--total [value]`,
|
|
48
42
|
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
@@ -52,89 +46,58 @@ users
|
|
|
52
46
|
.action(
|
|
53
47
|
actionRunner(
|
|
54
48
|
async ({ queries, search, total }) =>
|
|
55
|
-
await (await getUsersClient()).list(queries, search, total),
|
|
49
|
+
parse(await (await getUsersClient()).list(queries, search, total)),
|
|
56
50
|
),
|
|
57
51
|
);
|
|
58
52
|
|
|
59
53
|
users
|
|
60
54
|
.command(`create`)
|
|
61
55
|
.description(`Create a new user.`)
|
|
62
|
-
.requiredOption(
|
|
63
|
-
`--user-id <user-id>`,
|
|
64
|
-
`User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`,
|
|
65
|
-
)
|
|
56
|
+
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
66
57
|
.option(`--email <email>`, `User email.`)
|
|
67
|
-
.option(
|
|
68
|
-
|
|
69
|
-
`Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`,
|
|
70
|
-
)
|
|
71
|
-
.option(
|
|
72
|
-
`--password <password>`,
|
|
73
|
-
`Plain text user password. Must be at least 8 chars.`,
|
|
74
|
-
)
|
|
58
|
+
.option(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
|
|
59
|
+
.option(`--password <password>`, `Plain text user password. Must be at least 8 chars.`)
|
|
75
60
|
.option(`--name <name>`, `User name. Max length: 128 chars.`)
|
|
76
61
|
.action(
|
|
77
62
|
actionRunner(
|
|
78
63
|
async ({ userId, email, phone, password, name }) =>
|
|
79
|
-
await (
|
|
80
|
-
await getUsersClient()
|
|
81
|
-
).create(userId, email, phone, password, name),
|
|
64
|
+
parse(await (await getUsersClient()).create(userId, email, phone, password, name)),
|
|
82
65
|
),
|
|
83
66
|
);
|
|
84
67
|
|
|
85
68
|
users
|
|
86
|
-
.command(`create-
|
|
87
|
-
.description(
|
|
88
|
-
|
|
89
|
-
)
|
|
90
|
-
.requiredOption(
|
|
91
|
-
`--user-id <user-id>`,
|
|
92
|
-
`User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`,
|
|
93
|
-
)
|
|
69
|
+
.command(`create-argon-2-user`)
|
|
70
|
+
.description(`Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
|
|
71
|
+
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
94
72
|
.requiredOption(`--email <email>`, `User email.`)
|
|
95
73
|
.requiredOption(`--password <password>`, `User password hashed using Argon2.`)
|
|
96
74
|
.option(`--name <name>`, `User name. Max length: 128 chars.`)
|
|
97
75
|
.action(
|
|
98
76
|
actionRunner(
|
|
99
77
|
async ({ userId, email, password, name }) =>
|
|
100
|
-
await (
|
|
101
|
-
await getUsersClient()
|
|
102
|
-
).createArgon2User(userId, email, password, name),
|
|
78
|
+
parse(await (await getUsersClient()).createArgon2User(userId, email, password, name)),
|
|
103
79
|
),
|
|
104
80
|
);
|
|
105
81
|
|
|
106
82
|
users
|
|
107
83
|
.command(`create-bcrypt-user`)
|
|
108
|
-
.description(
|
|
109
|
-
|
|
110
|
-
)
|
|
111
|
-
.requiredOption(
|
|
112
|
-
`--user-id <user-id>`,
|
|
113
|
-
`User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`,
|
|
114
|
-
)
|
|
84
|
+
.description(`Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
|
|
85
|
+
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
115
86
|
.requiredOption(`--email <email>`, `User email.`)
|
|
116
87
|
.requiredOption(`--password <password>`, `User password hashed using Bcrypt.`)
|
|
117
88
|
.option(`--name <name>`, `User name. Max length: 128 chars.`)
|
|
118
89
|
.action(
|
|
119
90
|
actionRunner(
|
|
120
91
|
async ({ userId, email, password, name }) =>
|
|
121
|
-
await (
|
|
122
|
-
await getUsersClient()
|
|
123
|
-
).createBcryptUser(userId, email, password, name),
|
|
92
|
+
parse(await (await getUsersClient()).createBcryptUser(userId, email, password, name)),
|
|
124
93
|
),
|
|
125
94
|
);
|
|
126
95
|
|
|
127
96
|
users
|
|
128
97
|
.command(`list-identities`)
|
|
129
98
|
.description(`Get identities for all users.`)
|
|
130
|
-
.option(
|
|
131
|
-
|
|
132
|
-
`Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`,
|
|
133
|
-
)
|
|
134
|
-
.option(
|
|
135
|
-
`--search <search>`,
|
|
136
|
-
`Search term to filter your list results. Max length: 256 chars.`,
|
|
137
|
-
)
|
|
99
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`)
|
|
100
|
+
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
138
101
|
.option(
|
|
139
102
|
`--total [value]`,
|
|
140
103
|
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
@@ -144,7 +107,7 @@ users
|
|
|
144
107
|
.action(
|
|
145
108
|
actionRunner(
|
|
146
109
|
async ({ queries, search, total }) =>
|
|
147
|
-
await (await getUsersClient()).listIdentities(queries, search, total),
|
|
110
|
+
parse(await (await getUsersClient()).listIdentities(queries, search, total)),
|
|
148
111
|
),
|
|
149
112
|
);
|
|
150
113
|
|
|
@@ -155,211 +118,98 @@ users
|
|
|
155
118
|
.action(
|
|
156
119
|
actionRunner(
|
|
157
120
|
async ({ identityId }) =>
|
|
158
|
-
await (await getUsersClient()).deleteIdentity(identityId),
|
|
121
|
+
parse(await (await getUsersClient()).deleteIdentity(identityId)),
|
|
159
122
|
),
|
|
160
123
|
);
|
|
161
124
|
|
|
162
125
|
users
|
|
163
|
-
.command(`create-
|
|
164
|
-
.description(
|
|
165
|
-
|
|
166
|
-
)
|
|
167
|
-
.requiredOption(
|
|
168
|
-
`--user-id <user-id>`,
|
|
169
|
-
`User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`,
|
|
170
|
-
)
|
|
126
|
+
.command(`create-md-5-user`)
|
|
127
|
+
.description(`Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
|
|
128
|
+
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
171
129
|
.requiredOption(`--email <email>`, `User email.`)
|
|
172
130
|
.requiredOption(`--password <password>`, `User password hashed using MD5.`)
|
|
173
131
|
.option(`--name <name>`, `User name. Max length: 128 chars.`)
|
|
174
132
|
.action(
|
|
175
133
|
actionRunner(
|
|
176
134
|
async ({ userId, email, password, name }) =>
|
|
177
|
-
await (
|
|
178
|
-
await getUsersClient()
|
|
179
|
-
).createMD5User(userId, email, password, name),
|
|
135
|
+
parse(await (await getUsersClient()).createMD5User(userId, email, password, name)),
|
|
180
136
|
),
|
|
181
137
|
);
|
|
182
138
|
|
|
183
139
|
users
|
|
184
|
-
.command(`create-
|
|
185
|
-
.description(
|
|
186
|
-
|
|
187
|
-
)
|
|
188
|
-
.requiredOption(
|
|
189
|
-
`--user-id <user-id>`,
|
|
190
|
-
`User ID. Choose a custom ID or pass the string \`ID.unique()\`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`,
|
|
191
|
-
)
|
|
140
|
+
.command(`create-ph-pass-user`)
|
|
141
|
+
.description(`Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
|
|
142
|
+
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or pass the string \`ID.unique()\`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
192
143
|
.requiredOption(`--email <email>`, `User email.`)
|
|
193
144
|
.requiredOption(`--password <password>`, `User password hashed using PHPass.`)
|
|
194
145
|
.option(`--name <name>`, `User name. Max length: 128 chars.`)
|
|
195
146
|
.action(
|
|
196
147
|
actionRunner(
|
|
197
148
|
async ({ userId, email, password, name }) =>
|
|
198
|
-
await (
|
|
199
|
-
await getUsersClient()
|
|
200
|
-
).createPHPassUser(userId, email, password, name),
|
|
149
|
+
parse(await (await getUsersClient()).createPHPassUser(userId, email, password, name)),
|
|
201
150
|
),
|
|
202
151
|
);
|
|
203
152
|
|
|
204
153
|
users
|
|
205
154
|
.command(`create-scrypt-user`)
|
|
206
|
-
.description(
|
|
207
|
-
|
|
208
|
-
)
|
|
209
|
-
.requiredOption(
|
|
210
|
-
`--user-id <user-id>`,
|
|
211
|
-
`User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`,
|
|
212
|
-
)
|
|
155
|
+
.description(`Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
|
|
156
|
+
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
213
157
|
.requiredOption(`--email <email>`, `User email.`)
|
|
214
158
|
.requiredOption(`--password <password>`, `User password hashed using Scrypt.`)
|
|
215
|
-
.requiredOption(
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
)
|
|
219
|
-
.requiredOption(
|
|
220
|
-
`--password-cpu <password-cpu>`,
|
|
221
|
-
`Optional CPU cost used to hash password.`,
|
|
222
|
-
parseInteger,
|
|
223
|
-
)
|
|
224
|
-
.requiredOption(
|
|
225
|
-
`--password-memory <password-memory>`,
|
|
226
|
-
`Optional memory cost used to hash password.`,
|
|
227
|
-
parseInteger,
|
|
228
|
-
)
|
|
229
|
-
.requiredOption(
|
|
230
|
-
`--password-parallel <password-parallel>`,
|
|
231
|
-
`Optional parallelization cost used to hash password.`,
|
|
232
|
-
parseInteger,
|
|
233
|
-
)
|
|
234
|
-
.requiredOption(
|
|
235
|
-
`--password-length <password-length>`,
|
|
236
|
-
`Optional hash length used to hash password.`,
|
|
237
|
-
parseInteger,
|
|
238
|
-
)
|
|
159
|
+
.requiredOption(`--password-salt <password-salt>`, `Optional salt used to hash password.`)
|
|
160
|
+
.requiredOption(`--password-cpu <password-cpu>`, `Optional CPU cost used to hash password.`, parseInteger)
|
|
161
|
+
.requiredOption(`--password-memory <password-memory>`, `Optional memory cost used to hash password.`, parseInteger)
|
|
162
|
+
.requiredOption(`--password-parallel <password-parallel>`, `Optional parallelization cost used to hash password.`, parseInteger)
|
|
163
|
+
.requiredOption(`--password-length <password-length>`, `Optional hash length used to hash password.`, parseInteger)
|
|
239
164
|
.option(`--name <name>`, `User name. Max length: 128 chars.`)
|
|
240
165
|
.action(
|
|
241
166
|
actionRunner(
|
|
242
|
-
async ({
|
|
243
|
-
userId,
|
|
244
|
-
email,
|
|
245
|
-
password,
|
|
246
|
-
passwordSalt,
|
|
247
|
-
passwordCpu,
|
|
248
|
-
passwordMemory,
|
|
249
|
-
passwordParallel,
|
|
250
|
-
passwordLength,
|
|
251
|
-
name,
|
|
252
|
-
}) =>
|
|
253
|
-
await (
|
|
254
|
-
await getUsersClient()
|
|
255
|
-
).createScryptUser(
|
|
256
|
-
userId,
|
|
257
|
-
email,
|
|
258
|
-
password,
|
|
259
|
-
passwordSalt,
|
|
260
|
-
passwordCpu,
|
|
261
|
-
passwordMemory,
|
|
262
|
-
passwordParallel,
|
|
263
|
-
passwordLength,
|
|
264
|
-
name,
|
|
265
|
-
),
|
|
167
|
+
async ({ userId, email, password, passwordSalt, passwordCpu, passwordMemory, passwordParallel, passwordLength, name }) =>
|
|
168
|
+
parse(await (await getUsersClient()).createScryptUser(userId, email, password, passwordSalt, passwordCpu, passwordMemory, passwordParallel, passwordLength, name)),
|
|
266
169
|
),
|
|
267
170
|
);
|
|
268
171
|
|
|
269
172
|
users
|
|
270
173
|
.command(`create-scrypt-modified-user`)
|
|
271
|
-
.description(
|
|
272
|
-
|
|
273
|
-
)
|
|
274
|
-
.requiredOption(
|
|
275
|
-
`--user-id <user-id>`,
|
|
276
|
-
`User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`,
|
|
277
|
-
)
|
|
174
|
+
.description(`Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
|
|
175
|
+
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
278
176
|
.requiredOption(`--email <email>`, `User email.`)
|
|
279
|
-
.requiredOption(
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
)
|
|
283
|
-
.requiredOption(
|
|
284
|
-
`--password-salt <password-salt>`,
|
|
285
|
-
`Salt used to hash password.`,
|
|
286
|
-
)
|
|
287
|
-
.requiredOption(
|
|
288
|
-
`--password-salt-separator <password-salt-separator>`,
|
|
289
|
-
`Salt separator used to hash password.`,
|
|
290
|
-
)
|
|
291
|
-
.requiredOption(
|
|
292
|
-
`--password-signer-key <password-signer-key>`,
|
|
293
|
-
`Signer key used to hash password.`,
|
|
294
|
-
)
|
|
177
|
+
.requiredOption(`--password <password>`, `User password hashed using Scrypt Modified.`)
|
|
178
|
+
.requiredOption(`--password-salt <password-salt>`, `Salt used to hash password.`)
|
|
179
|
+
.requiredOption(`--password-salt-separator <password-salt-separator>`, `Salt separator used to hash password.`)
|
|
180
|
+
.requiredOption(`--password-signer-key <password-signer-key>`, `Signer key used to hash password.`)
|
|
295
181
|
.option(`--name <name>`, `User name. Max length: 128 chars.`)
|
|
296
182
|
.action(
|
|
297
183
|
actionRunner(
|
|
298
|
-
async ({
|
|
299
|
-
userId,
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
await (
|
|
308
|
-
await getUsersClient()
|
|
309
|
-
).createScryptModifiedUser(
|
|
310
|
-
userId,
|
|
311
|
-
email,
|
|
312
|
-
password,
|
|
313
|
-
passwordSalt,
|
|
314
|
-
passwordSaltSeparator,
|
|
315
|
-
passwordSignerKey,
|
|
316
|
-
name,
|
|
317
|
-
),
|
|
318
|
-
),
|
|
319
|
-
);
|
|
320
|
-
|
|
321
|
-
users
|
|
322
|
-
.command(`create-shauser`)
|
|
323
|
-
.description(
|
|
324
|
-
`Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`,
|
|
325
|
-
)
|
|
326
|
-
.requiredOption(
|
|
327
|
-
`--user-id <user-id>`,
|
|
328
|
-
`User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`,
|
|
329
|
-
)
|
|
184
|
+
async ({ userId, email, password, passwordSalt, passwordSaltSeparator, passwordSignerKey, name }) =>
|
|
185
|
+
parse(await (await getUsersClient()).createScryptModifiedUser(userId, email, password, passwordSalt, passwordSaltSeparator, passwordSignerKey, name)),
|
|
186
|
+
),
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
users
|
|
190
|
+
.command(`create-sha-user`)
|
|
191
|
+
.description(`Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
|
|
192
|
+
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
330
193
|
.requiredOption(`--email <email>`, `User email.`)
|
|
331
194
|
.requiredOption(`--password <password>`, `User password hashed using SHA.`)
|
|
332
|
-
.option(
|
|
333
|
-
`--password-version <password-version>`,
|
|
334
|
-
`Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512/224', 'sha512/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'`,
|
|
335
|
-
)
|
|
195
|
+
.option(`--password-version <password-version>`, `Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512/224', 'sha512/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'`)
|
|
336
196
|
.option(`--name <name>`, `User name. Max length: 128 chars.`)
|
|
337
197
|
.action(
|
|
338
198
|
actionRunner(
|
|
339
199
|
async ({ userId, email, password, passwordVersion, name }) =>
|
|
340
|
-
await (
|
|
341
|
-
await getUsersClient()
|
|
342
|
-
).createSHAUser(
|
|
343
|
-
userId,
|
|
344
|
-
email,
|
|
345
|
-
password,
|
|
346
|
-
passwordVersion as PasswordHash,
|
|
347
|
-
name,
|
|
348
|
-
),
|
|
200
|
+
parse(await (await getUsersClient()).createSHAUser(userId, email, password, passwordVersion as PasswordHash, name)),
|
|
349
201
|
),
|
|
350
202
|
);
|
|
351
203
|
|
|
352
204
|
users
|
|
353
205
|
.command(`get-usage`)
|
|
354
|
-
.description(
|
|
355
|
-
|
|
356
|
-
`,
|
|
357
|
-
)
|
|
206
|
+
.description(`Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
207
|
+
`)
|
|
358
208
|
.option(`--range <range>`, `Date range.`)
|
|
359
209
|
.action(
|
|
360
210
|
actionRunner(
|
|
361
211
|
async ({ range }) =>
|
|
362
|
-
await (await getUsersClient()).getUsage(range as UsageRange),
|
|
212
|
+
parse(await (await getUsersClient()).getUsage(range as UsageRange)),
|
|
363
213
|
),
|
|
364
214
|
);
|
|
365
215
|
|
|
@@ -369,19 +219,19 @@ users
|
|
|
369
219
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
370
220
|
.action(
|
|
371
221
|
actionRunner(
|
|
372
|
-
async ({ userId }) =>
|
|
222
|
+
async ({ userId }) =>
|
|
223
|
+
parse(await (await getUsersClient()).get(userId)),
|
|
373
224
|
),
|
|
374
225
|
);
|
|
375
226
|
|
|
376
227
|
users
|
|
377
228
|
.command(`delete`)
|
|
378
|
-
.description(
|
|
379
|
-
`Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead.`,
|
|
380
|
-
)
|
|
229
|
+
.description(`Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead.`)
|
|
381
230
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
382
231
|
.action(
|
|
383
232
|
actionRunner(
|
|
384
|
-
async ({ userId }) =>
|
|
233
|
+
async ({ userId }) =>
|
|
234
|
+
parse(await (await getUsersClient()).delete(userId)),
|
|
385
235
|
),
|
|
386
236
|
);
|
|
387
237
|
|
|
@@ -393,48 +243,34 @@ users
|
|
|
393
243
|
.action(
|
|
394
244
|
actionRunner(
|
|
395
245
|
async ({ userId, email }) =>
|
|
396
|
-
await (await getUsersClient()).updateEmail(userId, email),
|
|
246
|
+
parse(await (await getUsersClient()).updateEmail(userId, email)),
|
|
397
247
|
),
|
|
398
248
|
);
|
|
399
249
|
|
|
400
250
|
users
|
|
401
251
|
.command(`create-jwt`)
|
|
402
|
-
.description(
|
|
403
|
-
`Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.`,
|
|
404
|
-
)
|
|
252
|
+
.description(`Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.`)
|
|
405
253
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
406
|
-
.option(
|
|
407
|
-
|
|
408
|
-
`Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.`,
|
|
409
|
-
)
|
|
410
|
-
.option(
|
|
411
|
-
`--duration <duration>`,
|
|
412
|
-
`Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.`,
|
|
413
|
-
parseInteger,
|
|
414
|
-
)
|
|
254
|
+
.option(`--session-id <session-id>`, `Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.`)
|
|
255
|
+
.option(`--duration <duration>`, `Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.`, parseInteger)
|
|
415
256
|
.action(
|
|
416
257
|
actionRunner(
|
|
417
258
|
async ({ userId, sessionId, duration }) =>
|
|
418
|
-
await (await getUsersClient()).createJWT(userId, sessionId, duration),
|
|
259
|
+
parse(await (await getUsersClient()).createJWT(userId, sessionId, duration)),
|
|
419
260
|
),
|
|
420
261
|
);
|
|
421
262
|
|
|
422
263
|
users
|
|
423
264
|
.command(`update-labels`)
|
|
424
|
-
.description(
|
|
425
|
-
`Update the user labels by its unique ID.
|
|
265
|
+
.description(`Update the user labels by its unique ID.
|
|
426
266
|
|
|
427
|
-
Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info
|
|
428
|
-
)
|
|
267
|
+
Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info.`)
|
|
429
268
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
430
|
-
.requiredOption(
|
|
431
|
-
`--labels [labels...]`,
|
|
432
|
-
`Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.`,
|
|
433
|
-
)
|
|
269
|
+
.requiredOption(`--labels [labels...]`, `Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.`)
|
|
434
270
|
.action(
|
|
435
271
|
actionRunner(
|
|
436
272
|
async ({ userId, labels }) =>
|
|
437
|
-
await (await getUsersClient()).updateLabels(userId, labels),
|
|
273
|
+
parse(await (await getUsersClient()).updateLabels(userId, labels)),
|
|
438
274
|
),
|
|
439
275
|
);
|
|
440
276
|
|
|
@@ -442,10 +278,7 @@ users
|
|
|
442
278
|
.command(`list-logs`)
|
|
443
279
|
.description(`Get the user activity logs list by its unique ID.`)
|
|
444
280
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
445
|
-
.option(
|
|
446
|
-
`--queries [queries...]`,
|
|
447
|
-
`Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`,
|
|
448
|
-
)
|
|
281
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
|
|
449
282
|
.option(
|
|
450
283
|
`--total [value]`,
|
|
451
284
|
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
@@ -455,7 +288,7 @@ users
|
|
|
455
288
|
.action(
|
|
456
289
|
actionRunner(
|
|
457
290
|
async ({ userId, queries, total }) =>
|
|
458
|
-
await (await getUsersClient()).listLogs(userId, queries, total),
|
|
291
|
+
parse(await (await getUsersClient()).listLogs(userId, queries, total)),
|
|
459
292
|
),
|
|
460
293
|
);
|
|
461
294
|
|
|
@@ -463,14 +296,8 @@ users
|
|
|
463
296
|
.command(`list-memberships`)
|
|
464
297
|
.description(`Get the user membership list by its unique ID.`)
|
|
465
298
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
466
|
-
.option(
|
|
467
|
-
|
|
468
|
-
`Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles`,
|
|
469
|
-
)
|
|
470
|
-
.option(
|
|
471
|
-
`--search <search>`,
|
|
472
|
-
`Search term to filter your list results. Max length: 256 chars.`,
|
|
473
|
-
)
|
|
299
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles`)
|
|
300
|
+
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
474
301
|
.option(
|
|
475
302
|
`--total [value]`,
|
|
476
303
|
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
@@ -480,91 +307,75 @@ users
|
|
|
480
307
|
.action(
|
|
481
308
|
actionRunner(
|
|
482
309
|
async ({ userId, queries, search, total }) =>
|
|
483
|
-
await (
|
|
484
|
-
await getUsersClient()
|
|
485
|
-
).listMemberships(userId, queries, search, total),
|
|
310
|
+
parse(await (await getUsersClient()).listMemberships(userId, queries, search, total)),
|
|
486
311
|
),
|
|
487
312
|
);
|
|
488
313
|
|
|
489
314
|
users
|
|
490
315
|
.command(`update-mfa`)
|
|
491
|
-
.description(
|
|
492
|
-
`[**DEPRECATED** - This command is deprecated. Please use 'users updateMfa' instead] Enable or disable MFA on a user account.`,
|
|
493
|
-
)
|
|
316
|
+
.description(`Enable or disable MFA on a user account.`)
|
|
494
317
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
495
318
|
.requiredOption(`--mfa <mfa>`, `Enable or disable MFA.`, parseBool)
|
|
496
319
|
.action(
|
|
497
320
|
actionRunner(
|
|
498
321
|
async ({ userId, mfa }) =>
|
|
499
|
-
await (await getUsersClient()).updateMfa(userId, mfa),
|
|
322
|
+
parse(await (await getUsersClient()).updateMfa(userId, mfa)),
|
|
500
323
|
),
|
|
501
324
|
);
|
|
502
325
|
|
|
503
326
|
users
|
|
504
327
|
.command(`delete-mfa-authenticator`)
|
|
505
|
-
.description(
|
|
506
|
-
`[**DEPRECATED** - This command is deprecated. Please use 'users deleteMfaAuthenticator' instead] Delete an authenticator app.`,
|
|
507
|
-
)
|
|
328
|
+
.description(`Delete an authenticator app.`)
|
|
508
329
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
509
330
|
.requiredOption(`--type <type>`, `Type of authenticator.`)
|
|
510
331
|
.action(
|
|
511
332
|
actionRunner(
|
|
512
|
-
async ({ userId,
|
|
513
|
-
await (
|
|
514
|
-
await getUsersClient()
|
|
515
|
-
).deleteMfaAuthenticator(userId, xType as AuthenticatorType),
|
|
333
|
+
async ({ userId, type }) =>
|
|
334
|
+
parse(await (await getUsersClient()).deleteMfaAuthenticator(userId, type as AuthenticatorType)),
|
|
516
335
|
),
|
|
517
336
|
);
|
|
518
337
|
|
|
519
338
|
users
|
|
520
339
|
.command(`list-mfa-factors`)
|
|
521
|
-
.description(
|
|
522
|
-
`[**DEPRECATED** - This command is deprecated. Please use 'users listMfaFactors' instead] List the factors available on the account to be used as a MFA challange.`,
|
|
523
|
-
)
|
|
340
|
+
.description(`List the factors available on the account to be used as a MFA challange.`)
|
|
524
341
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
525
342
|
.action(
|
|
526
343
|
actionRunner(
|
|
527
344
|
async ({ userId }) =>
|
|
528
|
-
await (await getUsersClient()).listMfaFactors(userId),
|
|
345
|
+
parse(await (await getUsersClient()).listMfaFactors(userId)),
|
|
529
346
|
),
|
|
530
347
|
);
|
|
531
348
|
|
|
532
349
|
users
|
|
533
350
|
.command(`get-mfa-recovery-codes`)
|
|
534
|
-
.description(
|
|
535
|
-
`[**DEPRECATED** - This command is deprecated. Please use 'users getMfaRecoveryCodes' instead] Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.`,
|
|
536
|
-
)
|
|
351
|
+
.description(`Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.`)
|
|
537
352
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
538
353
|
.action(
|
|
539
354
|
actionRunner(
|
|
540
355
|
async ({ userId }) =>
|
|
541
|
-
await (await getUsersClient()).getMfaRecoveryCodes(userId),
|
|
356
|
+
parse(await (await getUsersClient()).getMfaRecoveryCodes(userId)),
|
|
542
357
|
),
|
|
543
358
|
);
|
|
544
359
|
|
|
545
360
|
users
|
|
546
361
|
.command(`update-mfa-recovery-codes`)
|
|
547
|
-
.description(
|
|
548
|
-
`[**DEPRECATED** - This command is deprecated. Please use 'users updateMfaRecoveryCodes' instead] Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.`,
|
|
549
|
-
)
|
|
362
|
+
.description(`Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.`)
|
|
550
363
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
551
364
|
.action(
|
|
552
365
|
actionRunner(
|
|
553
366
|
async ({ userId }) =>
|
|
554
|
-
await (await getUsersClient()).updateMfaRecoveryCodes(userId),
|
|
367
|
+
parse(await (await getUsersClient()).updateMfaRecoveryCodes(userId)),
|
|
555
368
|
),
|
|
556
369
|
);
|
|
557
370
|
|
|
558
371
|
users
|
|
559
372
|
.command(`create-mfa-recovery-codes`)
|
|
560
|
-
.description(
|
|
561
|
-
`[**DEPRECATED** - This command is deprecated. Please use 'users createMfaRecoveryCodes' instead] Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK.`,
|
|
562
|
-
)
|
|
373
|
+
.description(`Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK.`)
|
|
563
374
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
564
375
|
.action(
|
|
565
376
|
actionRunner(
|
|
566
377
|
async ({ userId }) =>
|
|
567
|
-
await (await getUsersClient()).createMfaRecoveryCodes(userId),
|
|
378
|
+
parse(await (await getUsersClient()).createMfaRecoveryCodes(userId)),
|
|
568
379
|
),
|
|
569
380
|
);
|
|
570
381
|
|
|
@@ -576,7 +387,7 @@ users
|
|
|
576
387
|
.action(
|
|
577
388
|
actionRunner(
|
|
578
389
|
async ({ userId, name }) =>
|
|
579
|
-
await (await getUsersClient()).updateName(userId, name),
|
|
390
|
+
parse(await (await getUsersClient()).updateName(userId, name)),
|
|
580
391
|
),
|
|
581
392
|
);
|
|
582
393
|
|
|
@@ -584,14 +395,11 @@ users
|
|
|
584
395
|
.command(`update-password`)
|
|
585
396
|
.description(`Update the user password by its unique ID.`)
|
|
586
397
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
587
|
-
.requiredOption(
|
|
588
|
-
`--password <password>`,
|
|
589
|
-
`New user password. Must be at least 8 chars.`,
|
|
590
|
-
)
|
|
398
|
+
.requiredOption(`--password <password>`, `New user password. Must be at least 8 chars.`)
|
|
591
399
|
.action(
|
|
592
400
|
actionRunner(
|
|
593
401
|
async ({ userId, password }) =>
|
|
594
|
-
await (await getUsersClient()).updatePassword(userId, password),
|
|
402
|
+
parse(await (await getUsersClient()).updatePassword(userId, password)),
|
|
595
403
|
),
|
|
596
404
|
);
|
|
597
405
|
|
|
@@ -603,7 +411,7 @@ users
|
|
|
603
411
|
.action(
|
|
604
412
|
actionRunner(
|
|
605
413
|
async ({ userId, number }) =>
|
|
606
|
-
await (await getUsersClient()).updatePhone(userId, number),
|
|
414
|
+
parse(await (await getUsersClient()).updatePhone(userId, number)),
|
|
607
415
|
),
|
|
608
416
|
);
|
|
609
417
|
|
|
@@ -613,21 +421,20 @@ users
|
|
|
613
421
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
614
422
|
.action(
|
|
615
423
|
actionRunner(
|
|
616
|
-
async ({ userId }) =>
|
|
424
|
+
async ({ userId }) =>
|
|
425
|
+
parse(await (await getUsersClient()).getPrefs(userId)),
|
|
617
426
|
),
|
|
618
427
|
);
|
|
619
428
|
|
|
620
429
|
users
|
|
621
430
|
.command(`update-prefs`)
|
|
622
|
-
.description(
|
|
623
|
-
`Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.`,
|
|
624
|
-
)
|
|
431
|
+
.description(`Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.`)
|
|
625
432
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
626
433
|
.requiredOption(`--prefs <prefs>`, `Prefs key-value JSON object.`)
|
|
627
434
|
.action(
|
|
628
435
|
actionRunner(
|
|
629
436
|
async ({ userId, prefs }) =>
|
|
630
|
-
await (await getUsersClient()).updatePrefs(userId, JSON.parse(prefs)),
|
|
437
|
+
parse(await (await getUsersClient()).updatePrefs(userId, JSON.parse(prefs))),
|
|
631
438
|
),
|
|
632
439
|
);
|
|
633
440
|
|
|
@@ -644,25 +451,20 @@ users
|
|
|
644
451
|
.action(
|
|
645
452
|
actionRunner(
|
|
646
453
|
async ({ userId, total }) =>
|
|
647
|
-
await (await getUsersClient()).listSessions(userId, total),
|
|
454
|
+
parse(await (await getUsersClient()).listSessions(userId, total)),
|
|
648
455
|
),
|
|
649
456
|
);
|
|
650
457
|
|
|
651
458
|
users
|
|
652
459
|
.command(`create-session`)
|
|
653
|
-
.description(
|
|
654
|
-
`Creates a session for a user. Returns an immediately usable session object.
|
|
460
|
+
.description(`Creates a session for a user. Returns an immediately usable session object.
|
|
655
461
|
|
|
656
|
-
If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint
|
|
657
|
-
)
|
|
658
|
-
.requiredOption(
|
|
659
|
-
`--user-id <user-id>`,
|
|
660
|
-
`User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`,
|
|
661
|
-
)
|
|
462
|
+
If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint.`)
|
|
463
|
+
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
662
464
|
.action(
|
|
663
465
|
actionRunner(
|
|
664
466
|
async ({ userId }) =>
|
|
665
|
-
await (await getUsersClient()).createSession(userId),
|
|
467
|
+
parse(await (await getUsersClient()).createSession(userId)),
|
|
666
468
|
),
|
|
667
469
|
);
|
|
668
470
|
|
|
@@ -673,7 +475,7 @@ users
|
|
|
673
475
|
.action(
|
|
674
476
|
actionRunner(
|
|
675
477
|
async ({ userId }) =>
|
|
676
|
-
await (await getUsersClient()).deleteSessions(userId),
|
|
478
|
+
parse(await (await getUsersClient()).deleteSessions(userId)),
|
|
677
479
|
),
|
|
678
480
|
);
|
|
679
481
|
|
|
@@ -685,25 +487,19 @@ users
|
|
|
685
487
|
.action(
|
|
686
488
|
actionRunner(
|
|
687
489
|
async ({ userId, sessionId }) =>
|
|
688
|
-
await (await getUsersClient()).deleteSession(userId, sessionId),
|
|
490
|
+
parse(await (await getUsersClient()).deleteSession(userId, sessionId)),
|
|
689
491
|
),
|
|
690
492
|
);
|
|
691
493
|
|
|
692
494
|
users
|
|
693
495
|
.command(`update-status`)
|
|
694
|
-
.description(
|
|
695
|
-
`Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.`,
|
|
696
|
-
)
|
|
496
|
+
.description(`Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.`)
|
|
697
497
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
698
|
-
.requiredOption(
|
|
699
|
-
`--status <status>`,
|
|
700
|
-
`User Status. To activate the user pass \`true\` and to block the user pass \`false\`.`,
|
|
701
|
-
parseBool,
|
|
702
|
-
)
|
|
498
|
+
.requiredOption(`--status <status>`, `User Status. To activate the user pass \`true\` and to block the user pass \`false\`.`, parseBool)
|
|
703
499
|
.action(
|
|
704
500
|
actionRunner(
|
|
705
501
|
async ({ userId, status }) =>
|
|
706
|
-
await (await getUsersClient()).updateStatus(userId, status),
|
|
502
|
+
parse(await (await getUsersClient()).updateStatus(userId, status)),
|
|
707
503
|
),
|
|
708
504
|
);
|
|
709
505
|
|
|
@@ -711,10 +507,7 @@ users
|
|
|
711
507
|
.command(`list-targets`)
|
|
712
508
|
.description(`List the messaging targets that are associated with a user.`)
|
|
713
509
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
714
|
-
.option(
|
|
715
|
-
`--queries [queries...]`,
|
|
716
|
-
`Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType`,
|
|
717
|
-
)
|
|
510
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType`)
|
|
718
511
|
.option(
|
|
719
512
|
`--total [value]`,
|
|
720
513
|
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
@@ -724,7 +517,7 @@ users
|
|
|
724
517
|
.action(
|
|
725
518
|
actionRunner(
|
|
726
519
|
async ({ userId, queries, total }) =>
|
|
727
|
-
await (await getUsersClient()).listTargets(userId, queries, total),
|
|
520
|
+
parse(await (await getUsersClient()).listTargets(userId, queries, total)),
|
|
728
521
|
),
|
|
729
522
|
);
|
|
730
523
|
|
|
@@ -732,46 +525,15 @@ users
|
|
|
732
525
|
.command(`create-target`)
|
|
733
526
|
.description(`Create a messaging target.`)
|
|
734
527
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
735
|
-
.requiredOption(
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
)
|
|
739
|
-
.
|
|
740
|
-
`--provider-type <provider-type>`,
|
|
741
|
-
`The target provider type. Can be one of the following: \`email\`, \`sms\` or \`push\`.`,
|
|
742
|
-
)
|
|
743
|
-
.requiredOption(
|
|
744
|
-
`--identifier <identifier>`,
|
|
745
|
-
`The target identifier (token, email, phone etc.)`,
|
|
746
|
-
)
|
|
747
|
-
.option(
|
|
748
|
-
`--provider-id <provider-id>`,
|
|
749
|
-
`Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.`,
|
|
750
|
-
)
|
|
751
|
-
.option(
|
|
752
|
-
`--name <name>`,
|
|
753
|
-
`Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.`,
|
|
754
|
-
)
|
|
528
|
+
.requiredOption(`--target-id <target-id>`, `Target ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
529
|
+
.requiredOption(`--provider-type <provider-type>`, `The target provider type. Can be one of the following: \`email\`, \`sms\` or \`push\`.`)
|
|
530
|
+
.requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
|
|
531
|
+
.option(`--provider-id <provider-id>`, `Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.`)
|
|
532
|
+
.option(`--name <name>`, `Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.`)
|
|
755
533
|
.action(
|
|
756
534
|
actionRunner(
|
|
757
|
-
async ({
|
|
758
|
-
userId,
|
|
759
|
-
targetId,
|
|
760
|
-
providerType,
|
|
761
|
-
identifier,
|
|
762
|
-
providerId,
|
|
763
|
-
name,
|
|
764
|
-
}) =>
|
|
765
|
-
await (
|
|
766
|
-
await getUsersClient()
|
|
767
|
-
).createTarget(
|
|
768
|
-
userId,
|
|
769
|
-
targetId,
|
|
770
|
-
providerType as MessagingProviderType,
|
|
771
|
-
identifier,
|
|
772
|
-
providerId,
|
|
773
|
-
name,
|
|
774
|
-
),
|
|
535
|
+
async ({ userId, targetId, providerType, identifier, providerId, name }) =>
|
|
536
|
+
parse(await (await getUsersClient()).createTarget(userId, targetId, providerType as MessagingProviderType, identifier, providerId, name)),
|
|
775
537
|
),
|
|
776
538
|
);
|
|
777
539
|
|
|
@@ -783,7 +545,7 @@ users
|
|
|
783
545
|
.action(
|
|
784
546
|
actionRunner(
|
|
785
547
|
async ({ userId, targetId }) =>
|
|
786
|
-
await (await getUsersClient()).getTarget(userId, targetId),
|
|
548
|
+
parse(await (await getUsersClient()).getTarget(userId, targetId)),
|
|
787
549
|
),
|
|
788
550
|
);
|
|
789
551
|
|
|
@@ -792,24 +554,13 @@ users
|
|
|
792
554
|
.description(`Update a messaging target.`)
|
|
793
555
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
794
556
|
.requiredOption(`--target-id <target-id>`, `Target ID.`)
|
|
795
|
-
.option(
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
)
|
|
799
|
-
.option(
|
|
800
|
-
`--provider-id <provider-id>`,
|
|
801
|
-
`Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.`,
|
|
802
|
-
)
|
|
803
|
-
.option(
|
|
804
|
-
`--name <name>`,
|
|
805
|
-
`Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.`,
|
|
806
|
-
)
|
|
557
|
+
.option(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
|
|
558
|
+
.option(`--provider-id <provider-id>`, `Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.`)
|
|
559
|
+
.option(`--name <name>`, `Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.`)
|
|
807
560
|
.action(
|
|
808
561
|
actionRunner(
|
|
809
562
|
async ({ userId, targetId, identifier, providerId, name }) =>
|
|
810
|
-
await (
|
|
811
|
-
await getUsersClient()
|
|
812
|
-
).updateTarget(userId, targetId, identifier, providerId, name),
|
|
563
|
+
parse(await (await getUsersClient()).updateTarget(userId, targetId, identifier, providerId, name)),
|
|
813
564
|
),
|
|
814
565
|
);
|
|
815
566
|
|
|
@@ -821,31 +572,21 @@ users
|
|
|
821
572
|
.action(
|
|
822
573
|
actionRunner(
|
|
823
574
|
async ({ userId, targetId }) =>
|
|
824
|
-
await (await getUsersClient()).deleteTarget(userId, targetId),
|
|
575
|
+
parse(await (await getUsersClient()).deleteTarget(userId, targetId)),
|
|
825
576
|
),
|
|
826
577
|
);
|
|
827
578
|
|
|
828
579
|
users
|
|
829
580
|
.command(`create-token`)
|
|
830
|
-
.description(
|
|
831
|
-
|
|
832
|
-
`,
|
|
833
|
-
)
|
|
581
|
+
.description(`Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process.
|
|
582
|
+
`)
|
|
834
583
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
835
|
-
.option(
|
|
836
|
-
|
|
837
|
-
`Token length in characters. The default length is 6 characters`,
|
|
838
|
-
parseInteger,
|
|
839
|
-
)
|
|
840
|
-
.option(
|
|
841
|
-
`--expire <expire>`,
|
|
842
|
-
`Token expiration period in seconds. The default expiration is 15 minutes.`,
|
|
843
|
-
parseInteger,
|
|
844
|
-
)
|
|
584
|
+
.option(`--length <length>`, `Token length in characters. The default length is 6 characters`, parseInteger)
|
|
585
|
+
.option(`--expire <expire>`, `Token expiration period in seconds. The default expiration is 15 minutes.`, parseInteger)
|
|
845
586
|
.action(
|
|
846
587
|
actionRunner(
|
|
847
588
|
async ({ userId, length, expire }) =>
|
|
848
|
-
await (await getUsersClient()).createToken(userId, length, expire),
|
|
589
|
+
parse(await (await getUsersClient()).createToken(userId, length, expire)),
|
|
849
590
|
),
|
|
850
591
|
);
|
|
851
592
|
|
|
@@ -853,17 +594,11 @@ users
|
|
|
853
594
|
.command(`update-email-verification`)
|
|
854
595
|
.description(`Update the user email verification status by its unique ID.`)
|
|
855
596
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
856
|
-
.requiredOption(
|
|
857
|
-
`--email-verification <email-verification>`,
|
|
858
|
-
`User email verification status.`,
|
|
859
|
-
parseBool,
|
|
860
|
-
)
|
|
597
|
+
.requiredOption(`--email-verification <email-verification>`, `User email verification status.`, parseBool)
|
|
861
598
|
.action(
|
|
862
599
|
actionRunner(
|
|
863
600
|
async ({ userId, emailVerification }) =>
|
|
864
|
-
await (
|
|
865
|
-
await getUsersClient()
|
|
866
|
-
).updateEmailVerification(userId, emailVerification),
|
|
601
|
+
parse(await (await getUsersClient()).updateEmailVerification(userId, emailVerification)),
|
|
867
602
|
),
|
|
868
603
|
);
|
|
869
604
|
|
|
@@ -871,16 +606,11 @@ users
|
|
|
871
606
|
.command(`update-phone-verification`)
|
|
872
607
|
.description(`Update the user phone verification status by its unique ID.`)
|
|
873
608
|
.requiredOption(`--user-id <user-id>`, `User ID.`)
|
|
874
|
-
.requiredOption(
|
|
875
|
-
`--phone-verification <phone-verification>`,
|
|
876
|
-
`User phone verification status.`,
|
|
877
|
-
parseBool,
|
|
878
|
-
)
|
|
609
|
+
.requiredOption(`--phone-verification <phone-verification>`, `User phone verification status.`, parseBool)
|
|
879
610
|
.action(
|
|
880
611
|
actionRunner(
|
|
881
612
|
async ({ userId, phoneVerification }) =>
|
|
882
|
-
await (
|
|
883
|
-
await getUsersClient()
|
|
884
|
-
).updatePhoneVerification(userId, phoneVerification),
|
|
613
|
+
parse(await (await getUsersClient()).updatePhoneVerification(userId, phoneVerification)),
|
|
885
614
|
),
|
|
886
615
|
);
|
|
616
|
+
|