appwrite-cli 8.2.2 → 9.0.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/CHANGELOG.md +12 -0
- package/README.md +5 -5
- package/docs/examples/account/create-anonymous-session.md +1 -1
- package/docs/examples/account/create-email-password-session.md +3 -3
- package/docs/examples/account/create-email-token.md +3 -4
- 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 -2
- package/docs/examples/account/create-mfa-challenge.md +2 -2
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
- 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 -3
- package/docs/examples/account/create-phone-verification.md +1 -1
- package/docs/examples/account/create-push-target.md +3 -4
- package/docs/examples/account/create-recovery.md +3 -3
- package/docs/examples/account/create-session.md +3 -3
- package/docs/examples/account/create-verification.md +2 -2
- package/docs/examples/account/create.md +3 -4
- package/docs/examples/account/delete-identity.md +2 -2
- package/docs/examples/account/delete-mfa-authenticator.md +2 -2
- package/docs/examples/account/delete-push-target.md +2 -2
- package/docs/examples/account/delete-session.md +2 -2
- package/docs/examples/account/delete-sessions.md +1 -1
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/get-prefs.md +1 -1
- package/docs/examples/account/get-session.md +2 -2
- package/docs/examples/account/list-identities.md +1 -2
- package/docs/examples/account/list-logs.md +1 -2
- package/docs/examples/account/list-mfa-factors.md +1 -1
- package/docs/examples/account/list-sessions.md +1 -1
- package/docs/examples/account/update-email.md +3 -3
- package/docs/examples/account/update-magic-url-session.md +3 -0
- package/docs/examples/account/update-mfa-authenticator.md +3 -3
- package/docs/examples/account/update-mfa-challenge.md +3 -3
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/update-mfa.md +2 -0
- package/docs/examples/account/update-name.md +2 -2
- package/docs/examples/account/update-password.md +2 -3
- package/docs/examples/account/update-phone-session.md +3 -3
- package/docs/examples/account/update-phone-verification.md +3 -3
- package/docs/examples/account/update-phone.md +3 -3
- package/docs/examples/account/update-prefs.md +2 -2
- package/docs/examples/account/update-push-target.md +3 -3
- package/docs/examples/account/update-recovery.md +4 -4
- package/docs/examples/account/update-session.md +2 -2
- package/docs/examples/account/update-status.md +1 -1
- package/docs/examples/account/update-verification.md +3 -3
- package/docs/examples/avatars/get-browser.md +2 -5
- package/docs/examples/avatars/get-credit-card.md +2 -5
- package/docs/examples/avatars/get-favicon.md +2 -2
- package/docs/examples/avatars/get-flag.md +2 -5
- package/docs/examples/avatars/get-image.md +2 -4
- package/docs/examples/avatars/get-initials.md +1 -5
- package/docs/examples/avatars/get-qr.md +2 -0
- package/docs/examples/console/get-resource.md +3 -3
- package/docs/examples/databases/create-boolean-attribute.md +5 -7
- package/docs/examples/databases/create-collection.md +4 -7
- package/docs/examples/databases/create-datetime-attribute.md +5 -7
- package/docs/examples/databases/create-document.md +5 -6
- package/docs/examples/databases/create-documents.md +4 -4
- package/docs/examples/databases/create-email-attribute.md +5 -7
- package/docs/examples/databases/create-enum-attribute.md +6 -8
- package/docs/examples/databases/create-float-attribute.md +5 -9
- package/docs/examples/databases/create-index.md +6 -8
- package/docs/examples/databases/create-integer-attribute.md +5 -9
- package/docs/examples/databases/create-ip-attribute.md +5 -7
- package/docs/examples/databases/create-relationship-attribute.md +5 -9
- package/docs/examples/databases/create-string-attribute.md +6 -9
- package/docs/examples/databases/create-url-attribute.md +5 -7
- package/docs/examples/databases/create.md +2 -3
- package/docs/examples/databases/decrement-document-attribute.md +5 -0
- package/docs/examples/databases/delete-attribute.md +4 -4
- package/docs/examples/databases/delete-collection.md +3 -3
- package/docs/examples/databases/delete-document.md +4 -4
- package/docs/examples/databases/delete-documents.md +3 -4
- package/docs/examples/databases/delete-index.md +4 -4
- package/docs/examples/databases/delete.md +1 -1
- package/docs/examples/databases/get-attribute.md +4 -4
- package/docs/examples/databases/get-collection-usage.md +3 -4
- package/docs/examples/databases/get-collection.md +3 -3
- package/docs/examples/databases/get-document.md +4 -5
- package/docs/examples/databases/get-index.md +4 -4
- package/docs/examples/databases/get-usage.md +2 -2
- package/docs/examples/databases/get.md +1 -1
- package/docs/examples/databases/increment-document-attribute.md +5 -0
- package/docs/examples/databases/list-attributes.md +3 -4
- package/docs/examples/databases/list-collection-logs.md +3 -4
- package/docs/examples/databases/list-collections.md +2 -4
- package/docs/examples/databases/list-document-logs.md +4 -5
- package/docs/examples/databases/list-documents.md +3 -4
- package/docs/examples/databases/list-indexes.md +3 -4
- package/docs/examples/databases/list-logs.md +2 -3
- package/docs/examples/databases/list-usage.md +1 -0
- package/docs/examples/databases/list.md +1 -3
- package/docs/examples/databases/update-boolean-attribute.md +6 -7
- package/docs/examples/databases/update-collection.md +4 -7
- package/docs/examples/databases/update-datetime-attribute.md +6 -7
- package/docs/examples/databases/update-document.md +4 -6
- package/docs/examples/databases/update-documents.md +3 -5
- package/docs/examples/databases/update-email-attribute.md +6 -7
- package/docs/examples/databases/update-enum-attribute.md +7 -8
- package/docs/examples/databases/update-float-attribute.md +6 -9
- package/docs/examples/databases/update-integer-attribute.md +6 -9
- package/docs/examples/databases/update-ip-attribute.md +6 -7
- package/docs/examples/databases/update-relationship-attribute.md +4 -6
- package/docs/examples/databases/update-string-attribute.md +6 -8
- package/docs/examples/databases/update-url-attribute.md +6 -7
- package/docs/examples/databases/update.md +2 -3
- package/docs/examples/databases/upsert-document.md +5 -6
- package/docs/examples/databases/upsert-documents.md +4 -4
- package/docs/examples/functions/create-deployment.md +4 -6
- package/docs/examples/functions/create-duplicate-deployment.md +3 -4
- package/docs/examples/functions/create-execution.md +2 -8
- package/docs/examples/functions/create-template-deployment.md +6 -7
- package/docs/examples/functions/create-variable.md +4 -5
- package/docs/examples/functions/create-vcs-deployment.md +4 -5
- package/docs/examples/functions/create.md +3 -18
- package/docs/examples/functions/delete-deployment.md +3 -3
- package/docs/examples/functions/delete-execution.md +3 -3
- package/docs/examples/functions/delete-variable.md +3 -3
- package/docs/examples/functions/delete.md +1 -1
- package/docs/examples/functions/get-deployment-download.md +3 -4
- package/docs/examples/functions/get-deployment.md +3 -3
- package/docs/examples/functions/get-execution.md +3 -3
- package/docs/examples/functions/get-template.md +2 -2
- package/docs/examples/functions/get-usage.md +2 -3
- package/docs/examples/functions/get-variable.md +3 -3
- package/docs/examples/functions/get.md +1 -1
- package/docs/examples/functions/list-deployments.md +2 -4
- package/docs/examples/functions/list-executions.md +2 -3
- package/docs/examples/functions/list-runtimes.md +1 -1
- package/docs/examples/functions/list-specifications.md +1 -1
- package/docs/examples/functions/list-templates.md +1 -5
- package/docs/examples/functions/list-usage.md +1 -2
- package/docs/examples/functions/list-variables.md +2 -2
- package/docs/examples/functions/list.md +1 -3
- package/docs/examples/functions/update-deployment-status.md +3 -3
- package/docs/examples/functions/update-function-deployment.md +3 -3
- package/docs/examples/functions/update-variable.md +4 -6
- package/docs/examples/functions/update.md +2 -18
- package/docs/examples/graphql/mutation.md +1 -1
- package/docs/examples/graphql/query.md +1 -1
- package/docs/examples/health/get-antivirus.md +1 -1
- package/docs/examples/health/get-cache.md +1 -1
- package/docs/examples/health/get-certificate.md +1 -2
- package/docs/examples/health/get-db.md +1 -0
- package/docs/examples/health/get-failed-jobs.md +2 -3
- package/docs/examples/health/get-pub-sub.md +1 -1
- package/docs/examples/health/get-queue-builds.md +1 -2
- package/docs/examples/health/get-queue-certificates.md +1 -2
- package/docs/examples/health/get-queue-databases.md +1 -3
- package/docs/examples/health/get-queue-deletes.md +1 -2
- package/docs/examples/health/get-queue-functions.md +1 -2
- package/docs/examples/health/get-queue-logs.md +1 -2
- package/docs/examples/health/get-queue-mails.md +1 -2
- package/docs/examples/health/get-queue-messaging.md +1 -2
- package/docs/examples/health/get-queue-migrations.md +1 -2
- package/docs/examples/health/get-queue-stats-resources.md +1 -2
- package/docs/examples/health/get-queue-usage.md +1 -2
- package/docs/examples/health/get-queue-webhooks.md +1 -2
- package/docs/examples/health/get-storage-local.md +1 -1
- package/docs/examples/health/get-storage.md +1 -1
- package/docs/examples/health/get-time.md +1 -1
- package/docs/examples/locale/list-codes.md +1 -1
- package/docs/examples/locale/list-continents.md +1 -1
- package/docs/examples/locale/list-countries-eu.md +1 -0
- package/docs/examples/locale/list-countries-phones.md +1 -1
- package/docs/examples/locale/list-countries.md +1 -1
- package/docs/examples/locale/list-currencies.md +1 -1
- package/docs/examples/locale/list-languages.md +1 -1
- package/docs/examples/messaging/create-apns-provider.md +3 -9
- package/docs/examples/messaging/create-email.md +4 -13
- package/docs/examples/messaging/create-fcm-provider.md +3 -5
- package/docs/examples/messaging/create-mailgun-provider.md +3 -11
- package/docs/examples/messaging/create-msg-91-provider.md +3 -0
- package/docs/examples/messaging/create-push.md +2 -20
- package/docs/examples/messaging/create-sendgrid-provider.md +3 -9
- package/docs/examples/messaging/create-sms.md +3 -8
- package/docs/examples/messaging/create-smtp-provider.md +4 -15
- package/docs/examples/messaging/create-subscriber.md +4 -4
- package/docs/examples/messaging/create-telesign-provider.md +3 -7
- package/docs/examples/messaging/create-textmagic-provider.md +3 -7
- package/docs/examples/messaging/create-topic.md +3 -4
- package/docs/examples/messaging/create-twilio-provider.md +3 -7
- package/docs/examples/messaging/create-vonage-provider.md +3 -7
- package/docs/examples/messaging/delete-provider.md +2 -2
- package/docs/examples/messaging/delete-subscriber.md +3 -3
- package/docs/examples/messaging/delete-topic.md +2 -2
- package/docs/examples/messaging/delete.md +1 -1
- package/docs/examples/messaging/get-message.md +2 -2
- package/docs/examples/messaging/get-provider.md +2 -2
- package/docs/examples/messaging/get-subscriber.md +3 -3
- package/docs/examples/messaging/get-topic.md +2 -2
- package/docs/examples/messaging/list-message-logs.md +2 -3
- package/docs/examples/messaging/list-messages.md +1 -3
- package/docs/examples/messaging/list-provider-logs.md +2 -3
- package/docs/examples/messaging/list-providers.md +1 -3
- package/docs/examples/messaging/list-subscriber-logs.md +2 -3
- package/docs/examples/messaging/list-subscribers.md +2 -4
- package/docs/examples/messaging/list-targets.md +2 -3
- package/docs/examples/messaging/list-topic-logs.md +2 -3
- package/docs/examples/messaging/list-topics.md +1 -3
- package/docs/examples/messaging/update-apns-provider.md +2 -9
- package/docs/examples/messaging/update-email.md +2 -13
- package/docs/examples/messaging/update-fcm-provider.md +2 -5
- package/docs/examples/messaging/update-mailgun-provider.md +2 -11
- package/docs/examples/messaging/update-msg-91-provider.md +2 -0
- package/docs/examples/messaging/update-push.md +2 -20
- package/docs/examples/messaging/update-sendgrid-provider.md +2 -9
- package/docs/examples/messaging/update-sms.md +2 -8
- package/docs/examples/messaging/update-smtp-provider.md +2 -15
- package/docs/examples/messaging/update-telesign-provider.md +2 -7
- package/docs/examples/messaging/update-textmagic-provider.md +2 -7
- package/docs/examples/messaging/update-topic.md +2 -4
- package/docs/examples/messaging/update-twilio-provider.md +2 -7
- package/docs/examples/messaging/update-vonage-provider.md +2 -7
- package/docs/examples/migrations/create-appwrite-migration.md +5 -5
- package/docs/examples/migrations/create-csv-migration.md +4 -4
- package/docs/examples/migrations/create-firebase-migration.md +3 -3
- package/docs/examples/migrations/create-n-host-migration.md +8 -9
- package/docs/examples/migrations/create-supabase-migration.md +7 -8
- package/docs/examples/migrations/delete.md +1 -1
- package/docs/examples/migrations/get-appwrite-report.md +5 -5
- package/docs/examples/migrations/get-firebase-report.md +3 -3
- package/docs/examples/migrations/get-n-host-report.md +8 -9
- package/docs/examples/migrations/get-supabase-report.md +7 -8
- package/docs/examples/migrations/get.md +1 -1
- package/docs/examples/migrations/list.md +1 -3
- package/docs/examples/migrations/retry.md +1 -1
- package/docs/examples/project/create-variable.md +3 -4
- package/docs/examples/project/delete-variable.md +2 -2
- package/docs/examples/project/get-usage.md +3 -4
- package/docs/examples/project/get-variable.md +2 -2
- package/docs/examples/project/list-variables.md +1 -1
- package/docs/examples/project/update-variable.md +3 -5
- package/docs/examples/projects/create-dev-key.md +4 -4
- package/docs/examples/projects/create-jwt.md +3 -0
- package/docs/examples/projects/create-key.md +4 -5
- package/docs/examples/projects/create-platform.md +4 -7
- package/docs/examples/projects/create-smtp-test.md +6 -11
- package/docs/examples/projects/create-webhook.md +6 -9
- package/docs/examples/projects/create.md +3 -13
- package/docs/examples/projects/delete-dev-key.md +3 -3
- package/docs/examples/projects/delete-email-template.md +4 -4
- package/docs/examples/projects/delete-key.md +3 -3
- package/docs/examples/projects/delete-platform.md +3 -3
- package/docs/examples/projects/delete-sms-template.md +4 -4
- package/docs/examples/projects/delete-webhook.md +3 -3
- package/docs/examples/projects/delete.md +1 -1
- package/docs/examples/projects/get-dev-key.md +3 -3
- package/docs/examples/projects/get-email-template.md +4 -4
- package/docs/examples/projects/get-key.md +3 -3
- package/docs/examples/projects/get-platform.md +3 -3
- package/docs/examples/projects/get-sms-template.md +4 -4
- package/docs/examples/projects/get-webhook.md +3 -3
- package/docs/examples/projects/get.md +1 -1
- package/docs/examples/projects/list-dev-keys.md +2 -3
- package/docs/examples/projects/list-keys.md +2 -2
- package/docs/examples/projects/list-platforms.md +2 -2
- package/docs/examples/projects/list-webhooks.md +2 -2
- package/docs/examples/projects/list.md +1 -3
- package/docs/examples/projects/update-api-status-all.md +3 -3
- package/docs/examples/projects/update-api-status.md +4 -4
- package/docs/examples/projects/update-auth-duration.md +3 -3
- package/docs/examples/projects/update-auth-limit.md +3 -3
- package/docs/examples/projects/update-auth-password-dictionary.md +3 -3
- package/docs/examples/projects/update-auth-password-history.md +3 -3
- package/docs/examples/projects/update-auth-sessions-limit.md +3 -3
- package/docs/examples/projects/update-auth-status.md +4 -4
- package/docs/examples/projects/update-dev-key.md +5 -5
- package/docs/examples/projects/update-email-template.md +6 -9
- package/docs/examples/projects/update-key.md +5 -6
- package/docs/examples/projects/update-memberships-privacy.md +5 -5
- package/docs/examples/projects/update-mock-numbers.md +3 -3
- package/docs/examples/projects/update-o-auth-2.md +3 -0
- package/docs/examples/projects/update-personal-data-check.md +3 -3
- package/docs/examples/projects/update-platform.md +4 -7
- package/docs/examples/projects/update-service-status-all.md +3 -3
- package/docs/examples/projects/update-service-status.md +4 -4
- package/docs/examples/projects/update-session-alerts.md +3 -3
- package/docs/examples/projects/update-session-invalidation.md +3 -0
- package/docs/examples/projects/update-sms-template.md +5 -5
- package/docs/examples/projects/update-smtp.md +3 -11
- package/docs/examples/projects/update-team.md +3 -3
- package/docs/examples/projects/update-webhook-signature.md +3 -3
- package/docs/examples/projects/update-webhook.md +7 -10
- package/docs/examples/projects/update.md +2 -11
- package/docs/examples/proxy/create-api-rule.md +2 -0
- package/docs/examples/proxy/create-function-rule.md +3 -4
- package/docs/examples/proxy/create-redirect-rule.md +6 -6
- package/docs/examples/proxy/create-site-rule.md +3 -4
- package/docs/examples/proxy/delete-rule.md +2 -2
- package/docs/examples/proxy/get-rule.md +2 -2
- package/docs/examples/proxy/list-rules.md +1 -3
- package/docs/examples/proxy/update-rule-verification.md +2 -2
- package/docs/examples/sites/create-deployment.md +4 -7
- package/docs/examples/sites/create-duplicate-deployment.md +3 -3
- package/docs/examples/sites/create-template-deployment.md +6 -7
- package/docs/examples/sites/create-variable.md +4 -5
- package/docs/examples/sites/create-vcs-deployment.md +4 -5
- package/docs/examples/sites/create.md +4 -18
- package/docs/examples/sites/delete-deployment.md +3 -3
- package/docs/examples/sites/delete-log.md +3 -3
- package/docs/examples/sites/delete-variable.md +3 -3
- package/docs/examples/sites/delete.md +1 -1
- package/docs/examples/sites/get-deployment-download.md +3 -4
- package/docs/examples/sites/get-deployment.md +3 -3
- package/docs/examples/sites/get-log.md +3 -3
- package/docs/examples/sites/get-template.md +2 -2
- package/docs/examples/sites/get-usage.md +2 -3
- package/docs/examples/sites/get-variable.md +3 -3
- package/docs/examples/sites/get.md +1 -1
- package/docs/examples/sites/list-deployments.md +2 -4
- package/docs/examples/sites/list-frameworks.md +1 -1
- package/docs/examples/sites/list-logs.md +2 -3
- package/docs/examples/sites/list-specifications.md +1 -1
- package/docs/examples/sites/list-templates.md +1 -5
- package/docs/examples/sites/list-usage.md +1 -2
- package/docs/examples/sites/list-variables.md +2 -2
- package/docs/examples/sites/list.md +1 -3
- package/docs/examples/sites/update-deployment-status.md +3 -3
- package/docs/examples/sites/update-site-deployment.md +3 -3
- package/docs/examples/sites/update-variable.md +4 -6
- package/docs/examples/sites/update.md +3 -18
- package/docs/examples/storage/create-bucket.md +3 -11
- package/docs/examples/storage/create-file.md +4 -5
- package/docs/examples/storage/delete-bucket.md +2 -2
- package/docs/examples/storage/delete-file.md +3 -3
- package/docs/examples/storage/get-bucket-usage.md +2 -3
- package/docs/examples/storage/get-bucket.md +2 -2
- package/docs/examples/storage/get-file-download.md +3 -4
- package/docs/examples/storage/get-file-preview.md +3 -15
- package/docs/examples/storage/get-file-view.md +3 -4
- package/docs/examples/storage/get-file.md +3 -3
- package/docs/examples/storage/get-usage.md +1 -2
- package/docs/examples/storage/list-buckets.md +1 -3
- package/docs/examples/storage/list-files.md +2 -4
- package/docs/examples/storage/update-bucket.md +3 -11
- package/docs/examples/storage/update-file.md +3 -5
- 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-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-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.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-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-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-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-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 -8
- package/docs/examples/teams/create.md +2 -3
- package/docs/examples/teams/delete-membership.md +3 -3
- package/docs/examples/teams/delete.md +1 -1
- package/docs/examples/teams/get-membership.md +3 -3
- package/docs/examples/teams/get-prefs.md +2 -2
- package/docs/examples/teams/get.md +1 -1
- package/docs/examples/teams/list-logs.md +2 -3
- package/docs/examples/teams/list-memberships.md +2 -4
- package/docs/examples/teams/list.md +1 -3
- package/docs/examples/teams/update-membership-status.md +5 -5
- package/docs/examples/teams/update-membership.md +4 -4
- package/docs/examples/teams/update-name.md +3 -3
- package/docs/examples/teams/update-prefs.md +3 -3
- package/docs/examples/tokens/create-file-token.md +3 -4
- package/docs/examples/tokens/delete.md +1 -1
- package/docs/examples/tokens/get.md +1 -1
- package/docs/examples/tokens/list.md +2 -3
- package/docs/examples/tokens/update.md +1 -2
- package/docs/examples/users/create-argon-2-user.md +4 -0
- package/docs/examples/users/create-bcrypt-user.md +4 -5
- 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 -2
- package/docs/examples/users/create-ph-pass-user.md +4 -0
- package/docs/examples/users/create-scrypt-modified-user.md +7 -8
- package/docs/examples/users/create-scrypt-user.md +9 -10
- package/docs/examples/users/create-session.md +2 -2
- package/docs/examples/users/create-sha-user.md +4 -0
- package/docs/examples/users/create-target.md +5 -7
- package/docs/examples/users/create-token.md +2 -4
- package/docs/examples/users/create.md +1 -5
- package/docs/examples/users/delete-identity.md +2 -2
- package/docs/examples/users/delete-mfa-authenticator.md +3 -3
- package/docs/examples/users/delete-session.md +3 -3
- package/docs/examples/users/delete-sessions.md +2 -2
- package/docs/examples/users/delete-target.md +3 -3
- package/docs/examples/users/delete.md +1 -1
- package/docs/examples/users/get-mfa-recovery-codes.md +2 -2
- package/docs/examples/users/get-prefs.md +2 -2
- package/docs/examples/users/get-target.md +3 -3
- package/docs/examples/users/get-usage.md +1 -2
- package/docs/examples/users/get.md +1 -1
- package/docs/examples/users/list-identities.md +1 -3
- package/docs/examples/users/list-logs.md +2 -3
- package/docs/examples/users/list-memberships.md +2 -4
- package/docs/examples/users/list-mfa-factors.md +2 -2
- package/docs/examples/users/list-sessions.md +2 -2
- package/docs/examples/users/list-targets.md +2 -3
- package/docs/examples/users/list.md +1 -3
- package/docs/examples/users/update-email-verification.md +3 -3
- package/docs/examples/users/update-email.md +3 -3
- package/docs/examples/users/update-labels.md +3 -3
- package/docs/examples/users/update-mfa-recovery-codes.md +2 -2
- package/docs/examples/users/update-mfa.md +3 -3
- package/docs/examples/users/update-name.md +3 -3
- package/docs/examples/users/update-password.md +3 -3
- package/docs/examples/users/update-phone-verification.md +3 -3
- package/docs/examples/users/update-phone.md +3 -3
- package/docs/examples/users/update-prefs.md +3 -3
- package/docs/examples/users/update-status.md +3 -3
- package/docs/examples/users/update-target.md +3 -6
- package/docs/examples/vcs/create-repository-detection.md +4 -5
- package/docs/examples/vcs/create-repository.md +4 -4
- package/docs/examples/vcs/delete-installation.md +2 -2
- package/docs/examples/vcs/get-installation.md +2 -2
- package/docs/examples/vcs/get-repository-contents.md +3 -5
- package/docs/examples/vcs/get-repository.md +3 -3
- package/docs/examples/vcs/list-installations.md +1 -3
- package/docs/examples/vcs/list-repositories.md +3 -4
- package/docs/examples/vcs/list-repository-branches.md +3 -3
- package/docs/examples/vcs/update-external-deployments.md +4 -4
- package/index.js +40 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +3 -8
- package/lib/commands/account.js +55 -103
- package/lib/commands/avatars.js +1 -8
- package/lib/commands/console.js +1 -3
- package/lib/commands/databases.js +279 -226
- package/lib/commands/functions.js +3 -33
- package/lib/commands/graphql.js +1 -3
- package/lib/commands/health.js +1 -23
- package/lib/commands/init.js +1 -1
- package/lib/commands/locale.js +1 -9
- package/lib/commands/messaging.js +41 -87
- package/lib/commands/migrations.js +7 -15
- package/lib/commands/project.js +1 -7
- package/lib/commands/projects.js +77 -86
- package/lib/commands/proxy.js +1 -9
- package/lib/commands/pull.js +62 -1
- package/lib/commands/push.js +163 -8
- package/lib/commands/run.js +1 -1
- package/lib/commands/sites.js +3 -32
- package/lib/commands/storage.js +3 -18
- package/lib/commands/tables-db.js +2896 -0
- package/lib/commands/teams.js +1 -15
- package/lib/commands/tokens.js +1 -6
- package/lib/commands/types.js +7 -9
- package/lib/commands/update.js +218 -0
- package/lib/commands/users.js +34 -77
- package/lib/commands/vcs.js +2 -12
- package/lib/config.js +99 -14
- package/lib/parser.js +2 -1
- package/lib/questions.js +32 -7
- package/lib/type-generation/languages/dart.js +13 -13
- package/lib/type-generation/languages/java.js +13 -13
- package/lib/type-generation/languages/javascript.js +14 -14
- package/lib/type-generation/languages/kotlin.js +11 -10
- package/lib/type-generation/languages/php.js +15 -14
- package/lib/type-generation/languages/swift.js +13 -13
- package/lib/type-generation/languages/typescript.js +8 -8
- package/lib/utils.js +39 -2
- package/package.json +1 -1
- package/scoop/{appwrite.json → appwrite.config.json} +3 -3
- package/docs/examples/account/create-j-w-t.md +0 -1
- package/docs/examples/account/create-magic-u-r-l-token.md +0 -5
- package/docs/examples/account/create-o-auth2session.md +0 -5
- package/docs/examples/account/create-o-auth2token.md +0 -5
- package/docs/examples/account/update-m-f-a.md +0 -2
- package/docs/examples/account/update-magic-u-r-l-session.md +0 -3
- package/docs/examples/avatars/get-q-r.md +0 -5
- package/docs/examples/databases/get-database-usage.md +0 -3
- package/docs/examples/health/get-d-b.md +0 -1
- package/docs/examples/locale/list-countries-e-u.md +0 -1
- package/docs/examples/messaging/create-msg91provider.md +0 -7
- package/docs/examples/messaging/update-msg91provider.md +0 -7
- package/docs/examples/projects/create-j-w-t.md +0 -4
- package/docs/examples/projects/update-o-auth2.md +0 -6
- package/docs/examples/proxy/create-a-p-i-rule.md +0 -2
- package/docs/examples/users/create-argon2user.md +0 -5
- package/docs/examples/users/create-j-w-t.md +0 -4
- package/docs/examples/users/create-m-d5user.md +0 -5
- package/docs/examples/users/create-p-h-pass-user.md +0 -5
- package/docs/examples/users/create-s-h-a-user.md +0 -6
package/lib/commands/account.js
CHANGED
|
@@ -7,7 +7,7 @@ const libClient = require('../client.js');
|
|
|
7
7
|
const { getAllFiles, showConsoleLink } = require('../utils.js');
|
|
8
8
|
const { Command } = require('commander');
|
|
9
9
|
const { sdkForProject, sdkForConsole } = require('../sdks')
|
|
10
|
-
const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser')
|
|
10
|
+
const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser')
|
|
11
11
|
const { localConfig, globalConfig } = require("../config");
|
|
12
12
|
const { File } = require('undici');
|
|
13
13
|
const { ReadableStream } = require('stream/web');
|
|
@@ -71,7 +71,6 @@ const accountGet = async ({parseOutput = true, overrideForCli = false, sdk = und
|
|
|
71
71
|
return response;
|
|
72
72
|
|
|
73
73
|
}
|
|
74
|
-
|
|
75
74
|
/**
|
|
76
75
|
* @typedef {Object} AccountCreateRequestParams
|
|
77
76
|
* @property {string} userId User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
@@ -117,7 +116,6 @@ const accountCreate = async ({userId,email,password,name,parseOutput = true, ove
|
|
|
117
116
|
return response;
|
|
118
117
|
|
|
119
118
|
}
|
|
120
|
-
|
|
121
119
|
/**
|
|
122
120
|
* @typedef {Object} AccountDeleteRequestParams
|
|
123
121
|
* @property {boolean} overrideForCli
|
|
@@ -147,7 +145,6 @@ const accountDelete = async ({parseOutput = true, overrideForCli = false, sdk =
|
|
|
147
145
|
return response;
|
|
148
146
|
|
|
149
147
|
}
|
|
150
|
-
|
|
151
148
|
/**
|
|
152
149
|
* @typedef {Object} AccountUpdateEmailRequestParams
|
|
153
150
|
* @property {string} email User email.
|
|
@@ -185,7 +182,6 @@ const accountUpdateEmail = async ({email,password,parseOutput = true, overrideFo
|
|
|
185
182
|
return response;
|
|
186
183
|
|
|
187
184
|
}
|
|
188
|
-
|
|
189
185
|
/**
|
|
190
186
|
* @typedef {Object} AccountListIdentitiesRequestParams
|
|
191
187
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
|
|
@@ -218,7 +214,6 @@ const accountListIdentities = async ({queries,parseOutput = true, overrideForCli
|
|
|
218
214
|
return response;
|
|
219
215
|
|
|
220
216
|
}
|
|
221
|
-
|
|
222
217
|
/**
|
|
223
218
|
* @typedef {Object} AccountDeleteIdentityRequestParams
|
|
224
219
|
* @property {string} identityId Identity ID.
|
|
@@ -249,7 +244,6 @@ const accountDeleteIdentity = async ({identityId,parseOutput = true, overrideFor
|
|
|
249
244
|
return response;
|
|
250
245
|
|
|
251
246
|
}
|
|
252
|
-
|
|
253
247
|
/**
|
|
254
248
|
* @typedef {Object} AccountCreateJWTRequestParams
|
|
255
249
|
* @property {boolean} overrideForCli
|
|
@@ -279,7 +273,6 @@ const accountCreateJWT = async ({parseOutput = true, overrideForCli = false, sdk
|
|
|
279
273
|
return response;
|
|
280
274
|
|
|
281
275
|
}
|
|
282
|
-
|
|
283
276
|
/**
|
|
284
277
|
* @typedef {Object} AccountListLogsRequestParams
|
|
285
278
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
@@ -312,7 +305,6 @@ const accountListLogs = async ({queries,parseOutput = true, overrideForCli = fal
|
|
|
312
305
|
return response;
|
|
313
306
|
|
|
314
307
|
}
|
|
315
|
-
|
|
316
308
|
/**
|
|
317
309
|
* @typedef {Object} AccountUpdateMFARequestParams
|
|
318
310
|
* @property {boolean} mfa Enable or disable MFA.
|
|
@@ -346,9 +338,8 @@ const accountUpdateMFA = async ({mfa,parseOutput = true, overrideForCli = false,
|
|
|
346
338
|
return response;
|
|
347
339
|
|
|
348
340
|
}
|
|
349
|
-
|
|
350
341
|
/**
|
|
351
|
-
* @typedef {Object}
|
|
342
|
+
* @typedef {Object} AccountCreateMFAAuthenticatorRequestParams
|
|
352
343
|
* @property {AuthenticatorType} type Type of authenticator. Must be 'totp'
|
|
353
344
|
* @property {boolean} overrideForCli
|
|
354
345
|
* @property {boolean} parseOutput
|
|
@@ -356,9 +347,9 @@ const accountUpdateMFA = async ({mfa,parseOutput = true, overrideForCli = false,
|
|
|
356
347
|
*/
|
|
357
348
|
|
|
358
349
|
/**
|
|
359
|
-
* @param {
|
|
350
|
+
* @param {AccountCreateMFAAuthenticatorRequestParams} params
|
|
360
351
|
*/
|
|
361
|
-
const
|
|
352
|
+
const accountCreateMFAAuthenticator = async ({type,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
362
353
|
let client = !sdk ? await sdkForProject() :
|
|
363
354
|
sdk;
|
|
364
355
|
let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
|
|
@@ -377,9 +368,8 @@ const accountCreateMfaAuthenticator = async ({type,parseOutput = true, overrideF
|
|
|
377
368
|
return response;
|
|
378
369
|
|
|
379
370
|
}
|
|
380
|
-
|
|
381
371
|
/**
|
|
382
|
-
* @typedef {Object}
|
|
372
|
+
* @typedef {Object} AccountUpdateMFAAuthenticatorRequestParams
|
|
383
373
|
* @property {AuthenticatorType} type Type of authenticator.
|
|
384
374
|
* @property {string} otp Valid verification token.
|
|
385
375
|
* @property {boolean} overrideForCli
|
|
@@ -388,9 +378,9 @@ const accountCreateMfaAuthenticator = async ({type,parseOutput = true, overrideF
|
|
|
388
378
|
*/
|
|
389
379
|
|
|
390
380
|
/**
|
|
391
|
-
* @param {
|
|
381
|
+
* @param {AccountUpdateMFAAuthenticatorRequestParams} params
|
|
392
382
|
*/
|
|
393
|
-
const
|
|
383
|
+
const accountUpdateMFAAuthenticator = async ({type,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
394
384
|
let client = !sdk ? await sdkForProject() :
|
|
395
385
|
sdk;
|
|
396
386
|
let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
|
|
@@ -412,9 +402,8 @@ const accountUpdateMfaAuthenticator = async ({type,otp,parseOutput = true, overr
|
|
|
412
402
|
return response;
|
|
413
403
|
|
|
414
404
|
}
|
|
415
|
-
|
|
416
405
|
/**
|
|
417
|
-
* @typedef {Object}
|
|
406
|
+
* @typedef {Object} AccountDeleteMFAAuthenticatorRequestParams
|
|
418
407
|
* @property {AuthenticatorType} type Type of authenticator.
|
|
419
408
|
* @property {boolean} overrideForCli
|
|
420
409
|
* @property {boolean} parseOutput
|
|
@@ -422,9 +411,9 @@ const accountUpdateMfaAuthenticator = async ({type,otp,parseOutput = true, overr
|
|
|
422
411
|
*/
|
|
423
412
|
|
|
424
413
|
/**
|
|
425
|
-
* @param {
|
|
414
|
+
* @param {AccountDeleteMFAAuthenticatorRequestParams} params
|
|
426
415
|
*/
|
|
427
|
-
const
|
|
416
|
+
const accountDeleteMFAAuthenticator = async ({type,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
428
417
|
let client = !sdk ? await sdkForProject() :
|
|
429
418
|
sdk;
|
|
430
419
|
let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
|
|
@@ -443,9 +432,8 @@ const accountDeleteMfaAuthenticator = async ({type,parseOutput = true, overrideF
|
|
|
443
432
|
return response;
|
|
444
433
|
|
|
445
434
|
}
|
|
446
|
-
|
|
447
435
|
/**
|
|
448
|
-
* @typedef {Object}
|
|
436
|
+
* @typedef {Object} AccountCreateMFAChallengeRequestParams
|
|
449
437
|
* @property {AuthenticationFactor} factor Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'.
|
|
450
438
|
* @property {boolean} overrideForCli
|
|
451
439
|
* @property {boolean} parseOutput
|
|
@@ -453,9 +441,9 @@ const accountDeleteMfaAuthenticator = async ({type,parseOutput = true, overrideF
|
|
|
453
441
|
*/
|
|
454
442
|
|
|
455
443
|
/**
|
|
456
|
-
* @param {
|
|
444
|
+
* @param {AccountCreateMFAChallengeRequestParams} params
|
|
457
445
|
*/
|
|
458
|
-
const
|
|
446
|
+
const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
459
447
|
let client = !sdk ? await sdkForProject() :
|
|
460
448
|
sdk;
|
|
461
449
|
let apiPath = '/account/mfa/challenge';
|
|
@@ -477,9 +465,8 @@ const accountCreateMfaChallenge = async ({factor,parseOutput = true, overrideFor
|
|
|
477
465
|
return response;
|
|
478
466
|
|
|
479
467
|
}
|
|
480
|
-
|
|
481
468
|
/**
|
|
482
|
-
* @typedef {Object}
|
|
469
|
+
* @typedef {Object} AccountUpdateMFAChallengeRequestParams
|
|
483
470
|
* @property {string} challengeId ID of the challenge.
|
|
484
471
|
* @property {string} otp Valid verification token.
|
|
485
472
|
* @property {boolean} overrideForCli
|
|
@@ -488,9 +475,9 @@ const accountCreateMfaChallenge = async ({factor,parseOutput = true, overrideFor
|
|
|
488
475
|
*/
|
|
489
476
|
|
|
490
477
|
/**
|
|
491
|
-
* @param {
|
|
478
|
+
* @param {AccountUpdateMFAChallengeRequestParams} params
|
|
492
479
|
*/
|
|
493
|
-
const
|
|
480
|
+
const accountUpdateMFAChallenge = async ({challengeId,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
494
481
|
let client = !sdk ? await sdkForProject() :
|
|
495
482
|
sdk;
|
|
496
483
|
let apiPath = '/account/mfa/challenge';
|
|
@@ -515,18 +502,17 @@ const accountUpdateMfaChallenge = async ({challengeId,otp,parseOutput = true, ov
|
|
|
515
502
|
return response;
|
|
516
503
|
|
|
517
504
|
}
|
|
518
|
-
|
|
519
505
|
/**
|
|
520
|
-
* @typedef {Object}
|
|
506
|
+
* @typedef {Object} AccountListMFAFactorsRequestParams
|
|
521
507
|
* @property {boolean} overrideForCli
|
|
522
508
|
* @property {boolean} parseOutput
|
|
523
509
|
* @property {libClient | undefined} sdk
|
|
524
510
|
*/
|
|
525
511
|
|
|
526
512
|
/**
|
|
527
|
-
* @param {
|
|
513
|
+
* @param {AccountListMFAFactorsRequestParams} params
|
|
528
514
|
*/
|
|
529
|
-
const
|
|
515
|
+
const accountListMFAFactors = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
530
516
|
let client = !sdk ? await sdkForProject() :
|
|
531
517
|
sdk;
|
|
532
518
|
let apiPath = '/account/mfa/factors';
|
|
@@ -544,18 +530,17 @@ const accountListMfaFactors = async ({parseOutput = true, overrideForCli = false
|
|
|
544
530
|
return response;
|
|
545
531
|
|
|
546
532
|
}
|
|
547
|
-
|
|
548
533
|
/**
|
|
549
|
-
* @typedef {Object}
|
|
534
|
+
* @typedef {Object} AccountGetMFARecoveryCodesRequestParams
|
|
550
535
|
* @property {boolean} overrideForCli
|
|
551
536
|
* @property {boolean} parseOutput
|
|
552
537
|
* @property {libClient | undefined} sdk
|
|
553
538
|
*/
|
|
554
539
|
|
|
555
540
|
/**
|
|
556
|
-
* @param {
|
|
541
|
+
* @param {AccountGetMFARecoveryCodesRequestParams} params
|
|
557
542
|
*/
|
|
558
|
-
const
|
|
543
|
+
const accountGetMFARecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
559
544
|
let client = !sdk ? await sdkForProject() :
|
|
560
545
|
sdk;
|
|
561
546
|
let apiPath = '/account/mfa/recovery-codes';
|
|
@@ -573,18 +558,17 @@ const accountGetMfaRecoveryCodes = async ({parseOutput = true, overrideForCli =
|
|
|
573
558
|
return response;
|
|
574
559
|
|
|
575
560
|
}
|
|
576
|
-
|
|
577
561
|
/**
|
|
578
|
-
* @typedef {Object}
|
|
562
|
+
* @typedef {Object} AccountCreateMFARecoveryCodesRequestParams
|
|
579
563
|
* @property {boolean} overrideForCli
|
|
580
564
|
* @property {boolean} parseOutput
|
|
581
565
|
* @property {libClient | undefined} sdk
|
|
582
566
|
*/
|
|
583
567
|
|
|
584
568
|
/**
|
|
585
|
-
* @param {
|
|
569
|
+
* @param {AccountCreateMFARecoveryCodesRequestParams} params
|
|
586
570
|
*/
|
|
587
|
-
const
|
|
571
|
+
const accountCreateMFARecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
588
572
|
let client = !sdk ? await sdkForProject() :
|
|
589
573
|
sdk;
|
|
590
574
|
let apiPath = '/account/mfa/recovery-codes';
|
|
@@ -603,18 +587,17 @@ const accountCreateMfaRecoveryCodes = async ({parseOutput = true, overrideForCli
|
|
|
603
587
|
return response;
|
|
604
588
|
|
|
605
589
|
}
|
|
606
|
-
|
|
607
590
|
/**
|
|
608
|
-
* @typedef {Object}
|
|
591
|
+
* @typedef {Object} AccountUpdateMFARecoveryCodesRequestParams
|
|
609
592
|
* @property {boolean} overrideForCli
|
|
610
593
|
* @property {boolean} parseOutput
|
|
611
594
|
* @property {libClient | undefined} sdk
|
|
612
595
|
*/
|
|
613
596
|
|
|
614
597
|
/**
|
|
615
|
-
* @param {
|
|
598
|
+
* @param {AccountUpdateMFARecoveryCodesRequestParams} params
|
|
616
599
|
*/
|
|
617
|
-
const
|
|
600
|
+
const accountUpdateMFARecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
618
601
|
let client = !sdk ? await sdkForProject() :
|
|
619
602
|
sdk;
|
|
620
603
|
let apiPath = '/account/mfa/recovery-codes';
|
|
@@ -633,7 +616,6 @@ const accountUpdateMfaRecoveryCodes = async ({parseOutput = true, overrideForCli
|
|
|
633
616
|
return response;
|
|
634
617
|
|
|
635
618
|
}
|
|
636
|
-
|
|
637
619
|
/**
|
|
638
620
|
* @typedef {Object} AccountUpdateNameRequestParams
|
|
639
621
|
* @property {string} name User name. Max length: 128 chars.
|
|
@@ -667,7 +649,6 @@ const accountUpdateName = async ({name,parseOutput = true, overrideForCli = fals
|
|
|
667
649
|
return response;
|
|
668
650
|
|
|
669
651
|
}
|
|
670
|
-
|
|
671
652
|
/**
|
|
672
653
|
* @typedef {Object} AccountUpdatePasswordRequestParams
|
|
673
654
|
* @property {string} password New user password. Must be at least 8 chars.
|
|
@@ -705,7 +686,6 @@ const accountUpdatePassword = async ({password,oldPassword,parseOutput = true, o
|
|
|
705
686
|
return response;
|
|
706
687
|
|
|
707
688
|
}
|
|
708
|
-
|
|
709
689
|
/**
|
|
710
690
|
* @typedef {Object} AccountUpdatePhoneRequestParams
|
|
711
691
|
* @property {string} phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
@@ -743,7 +723,6 @@ const accountUpdatePhone = async ({phone,password,parseOutput = true, overrideFo
|
|
|
743
723
|
return response;
|
|
744
724
|
|
|
745
725
|
}
|
|
746
|
-
|
|
747
726
|
/**
|
|
748
727
|
* @typedef {Object} AccountGetPrefsRequestParams
|
|
749
728
|
* @property {boolean} overrideForCli
|
|
@@ -772,7 +751,6 @@ const accountGetPrefs = async ({parseOutput = true, overrideForCli = false, sdk
|
|
|
772
751
|
return response;
|
|
773
752
|
|
|
774
753
|
}
|
|
775
|
-
|
|
776
754
|
/**
|
|
777
755
|
* @typedef {Object} AccountUpdatePrefsRequestParams
|
|
778
756
|
* @property {object} prefs Prefs key-value JSON object.
|
|
@@ -806,7 +784,6 @@ const accountUpdatePrefs = async ({prefs,parseOutput = true, overrideForCli = fa
|
|
|
806
784
|
return response;
|
|
807
785
|
|
|
808
786
|
}
|
|
809
|
-
|
|
810
787
|
/**
|
|
811
788
|
* @typedef {Object} AccountCreateRecoveryRequestParams
|
|
812
789
|
* @property {string} email User email.
|
|
@@ -844,7 +821,6 @@ const accountCreateRecovery = async ({email,url,parseOutput = true, overrideForC
|
|
|
844
821
|
return response;
|
|
845
822
|
|
|
846
823
|
}
|
|
847
|
-
|
|
848
824
|
/**
|
|
849
825
|
* @typedef {Object} AccountUpdateRecoveryRequestParams
|
|
850
826
|
* @property {string} userId User ID.
|
|
@@ -886,7 +862,6 @@ const accountUpdateRecovery = async ({userId,secret,password,parseOutput = true,
|
|
|
886
862
|
return response;
|
|
887
863
|
|
|
888
864
|
}
|
|
889
|
-
|
|
890
865
|
/**
|
|
891
866
|
* @typedef {Object} AccountListSessionsRequestParams
|
|
892
867
|
* @property {boolean} overrideForCli
|
|
@@ -919,7 +894,6 @@ const accountListSessions = async ({parseOutput = true, overrideForCli = false,
|
|
|
919
894
|
return response;
|
|
920
895
|
|
|
921
896
|
}
|
|
922
|
-
|
|
923
897
|
/**
|
|
924
898
|
* @typedef {Object} AccountDeleteSessionsRequestParams
|
|
925
899
|
* @property {boolean} overrideForCli
|
|
@@ -949,7 +923,6 @@ const accountDeleteSessions = async ({parseOutput = true, overrideForCli = false
|
|
|
949
923
|
return response;
|
|
950
924
|
|
|
951
925
|
}
|
|
952
|
-
|
|
953
926
|
/**
|
|
954
927
|
* @typedef {Object} AccountCreateAnonymousSessionRequestParams
|
|
955
928
|
* @property {boolean} overrideForCli
|
|
@@ -979,7 +952,6 @@ const accountCreateAnonymousSession = async ({parseOutput = true, overrideForCli
|
|
|
979
952
|
return response;
|
|
980
953
|
|
|
981
954
|
}
|
|
982
|
-
|
|
983
955
|
/**
|
|
984
956
|
* @typedef {Object} AccountCreateEmailPasswordSessionRequestParams
|
|
985
957
|
* @property {string} email User email.
|
|
@@ -1017,7 +989,6 @@ const accountCreateEmailPasswordSession = async ({email,password,parseOutput = t
|
|
|
1017
989
|
return response;
|
|
1018
990
|
|
|
1019
991
|
}
|
|
1020
|
-
|
|
1021
992
|
/**
|
|
1022
993
|
* @typedef {Object} AccountUpdateMagicURLSessionRequestParams
|
|
1023
994
|
* @property {string} userId User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
@@ -1055,7 +1026,6 @@ const accountUpdateMagicURLSession = async ({userId,secret,parseOutput = true, o
|
|
|
1055
1026
|
return response;
|
|
1056
1027
|
|
|
1057
1028
|
}
|
|
1058
|
-
|
|
1059
1029
|
/**
|
|
1060
1030
|
* @typedef {Object} AccountCreateOAuth2SessionRequestParams
|
|
1061
1031
|
* @property {OAuthProvider} provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.
|
|
@@ -1097,7 +1067,6 @@ const accountCreateOAuth2Session = async ({provider,success,failure,scopes,parse
|
|
|
1097
1067
|
return response;
|
|
1098
1068
|
|
|
1099
1069
|
}
|
|
1100
|
-
|
|
1101
1070
|
/**
|
|
1102
1071
|
* @typedef {Object} AccountUpdatePhoneSessionRequestParams
|
|
1103
1072
|
* @property {string} userId User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
@@ -1135,7 +1104,6 @@ const accountUpdatePhoneSession = async ({userId,secret,parseOutput = true, over
|
|
|
1135
1104
|
return response;
|
|
1136
1105
|
|
|
1137
1106
|
}
|
|
1138
|
-
|
|
1139
1107
|
/**
|
|
1140
1108
|
* @typedef {Object} AccountCreateSessionRequestParams
|
|
1141
1109
|
* @property {string} userId User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
@@ -1173,7 +1141,6 @@ const accountCreateSession = async ({userId,secret,parseOutput = true, overrideF
|
|
|
1173
1141
|
return response;
|
|
1174
1142
|
|
|
1175
1143
|
}
|
|
1176
|
-
|
|
1177
1144
|
/**
|
|
1178
1145
|
* @typedef {Object} AccountGetSessionRequestParams
|
|
1179
1146
|
* @property {string} sessionId Session ID. Use the string 'current' to get the current device session.
|
|
@@ -1203,7 +1170,6 @@ const accountGetSession = async ({sessionId,parseOutput = true, overrideForCli =
|
|
|
1203
1170
|
return response;
|
|
1204
1171
|
|
|
1205
1172
|
}
|
|
1206
|
-
|
|
1207
1173
|
/**
|
|
1208
1174
|
* @typedef {Object} AccountUpdateSessionRequestParams
|
|
1209
1175
|
* @property {string} sessionId Session ID. Use the string 'current' to update the current device session.
|
|
@@ -1234,7 +1200,6 @@ const accountUpdateSession = async ({sessionId,parseOutput = true, overrideForCl
|
|
|
1234
1200
|
return response;
|
|
1235
1201
|
|
|
1236
1202
|
}
|
|
1237
|
-
|
|
1238
1203
|
/**
|
|
1239
1204
|
* @typedef {Object} AccountDeleteSessionRequestParams
|
|
1240
1205
|
* @property {string} sessionId Session ID. Use the string 'current' to delete the current device session.
|
|
@@ -1265,7 +1230,6 @@ const accountDeleteSession = async ({sessionId,parseOutput = true, overrideForCl
|
|
|
1265
1230
|
return response;
|
|
1266
1231
|
|
|
1267
1232
|
}
|
|
1268
|
-
|
|
1269
1233
|
/**
|
|
1270
1234
|
* @typedef {Object} AccountUpdateStatusRequestParams
|
|
1271
1235
|
* @property {boolean} overrideForCli
|
|
@@ -1295,7 +1259,6 @@ const accountUpdateStatus = async ({parseOutput = true, overrideForCli = false,
|
|
|
1295
1259
|
return response;
|
|
1296
1260
|
|
|
1297
1261
|
}
|
|
1298
|
-
|
|
1299
1262
|
/**
|
|
1300
1263
|
* @typedef {Object} AccountCreatePushTargetRequestParams
|
|
1301
1264
|
* @property {string} targetId Target ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
@@ -1337,7 +1300,6 @@ const accountCreatePushTarget = async ({targetId,identifier,providerId,parseOutp
|
|
|
1337
1300
|
return response;
|
|
1338
1301
|
|
|
1339
1302
|
}
|
|
1340
|
-
|
|
1341
1303
|
/**
|
|
1342
1304
|
* @typedef {Object} AccountUpdatePushTargetRequestParams
|
|
1343
1305
|
* @property {string} targetId Target ID.
|
|
@@ -1372,7 +1334,6 @@ const accountUpdatePushTarget = async ({targetId,identifier,parseOutput = true,
|
|
|
1372
1334
|
return response;
|
|
1373
1335
|
|
|
1374
1336
|
}
|
|
1375
|
-
|
|
1376
1337
|
/**
|
|
1377
1338
|
* @typedef {Object} AccountDeletePushTargetRequestParams
|
|
1378
1339
|
* @property {string} targetId Target ID.
|
|
@@ -1403,10 +1364,9 @@ const accountDeletePushTarget = async ({targetId,parseOutput = true, overrideFor
|
|
|
1403
1364
|
return response;
|
|
1404
1365
|
|
|
1405
1366
|
}
|
|
1406
|
-
|
|
1407
1367
|
/**
|
|
1408
1368
|
* @typedef {Object} AccountCreateEmailTokenRequestParams
|
|
1409
|
-
* @property {string} userId User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1369
|
+
* @property {string} userId User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.
|
|
1410
1370
|
* @property {string} email User email.
|
|
1411
1371
|
* @property {boolean} phrase Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
|
|
1412
1372
|
* @property {boolean} overrideForCli
|
|
@@ -1445,10 +1405,9 @@ const accountCreateEmailToken = async ({userId,email,phrase,parseOutput = true,
|
|
|
1445
1405
|
return response;
|
|
1446
1406
|
|
|
1447
1407
|
}
|
|
1448
|
-
|
|
1449
1408
|
/**
|
|
1450
1409
|
* @typedef {Object} AccountCreateMagicURLTokenRequestParams
|
|
1451
|
-
* @property {string} userId Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1410
|
+
* @property {string} userId Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.
|
|
1452
1411
|
* @property {string} email User email.
|
|
1453
1412
|
* @property {string} url URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1454
1413
|
* @property {boolean} phrase Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
|
|
@@ -1491,7 +1450,6 @@ const accountCreateMagicURLToken = async ({userId,email,url,phrase,parseOutput =
|
|
|
1491
1450
|
return response;
|
|
1492
1451
|
|
|
1493
1452
|
}
|
|
1494
|
-
|
|
1495
1453
|
/**
|
|
1496
1454
|
* @typedef {Object} AccountCreateOAuth2TokenRequestParams
|
|
1497
1455
|
* @property {OAuthProvider} provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.
|
|
@@ -1533,10 +1491,9 @@ const accountCreateOAuth2Token = async ({provider,success,failure,scopes,parseOu
|
|
|
1533
1491
|
return response;
|
|
1534
1492
|
|
|
1535
1493
|
}
|
|
1536
|
-
|
|
1537
1494
|
/**
|
|
1538
1495
|
* @typedef {Object} AccountCreatePhoneTokenRequestParams
|
|
1539
|
-
* @property {string} userId Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1496
|
+
* @property {string} userId Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.
|
|
1540
1497
|
* @property {string} phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
1541
1498
|
* @property {boolean} overrideForCli
|
|
1542
1499
|
* @property {boolean} parseOutput
|
|
@@ -1571,7 +1528,6 @@ const accountCreatePhoneToken = async ({userId,phone,parseOutput = true, overrid
|
|
|
1571
1528
|
return response;
|
|
1572
1529
|
|
|
1573
1530
|
}
|
|
1574
|
-
|
|
1575
1531
|
/**
|
|
1576
1532
|
* @typedef {Object} AccountCreateVerificationRequestParams
|
|
1577
1533
|
* @property {string} url URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
@@ -1605,7 +1561,6 @@ const accountCreateVerification = async ({url,parseOutput = true, overrideForCli
|
|
|
1605
1561
|
return response;
|
|
1606
1562
|
|
|
1607
1563
|
}
|
|
1608
|
-
|
|
1609
1564
|
/**
|
|
1610
1565
|
* @typedef {Object} AccountUpdateVerificationRequestParams
|
|
1611
1566
|
* @property {string} userId User ID.
|
|
@@ -1643,7 +1598,6 @@ const accountUpdateVerification = async ({userId,secret,parseOutput = true, over
|
|
|
1643
1598
|
return response;
|
|
1644
1599
|
|
|
1645
1600
|
}
|
|
1646
|
-
|
|
1647
1601
|
/**
|
|
1648
1602
|
* @typedef {Object} AccountCreatePhoneVerificationRequestParams
|
|
1649
1603
|
* @property {boolean} overrideForCli
|
|
@@ -1673,7 +1627,6 @@ const accountCreatePhoneVerification = async ({parseOutput = true, overrideForCl
|
|
|
1673
1627
|
return response;
|
|
1674
1628
|
|
|
1675
1629
|
}
|
|
1676
|
-
|
|
1677
1630
|
/**
|
|
1678
1631
|
* @typedef {Object} AccountUpdatePhoneVerificationRequestParams
|
|
1679
1632
|
* @property {string} userId User ID.
|
|
@@ -1711,7 +1664,6 @@ const accountUpdatePhoneVerification = async ({userId,secret,parseOutput = true,
|
|
|
1711
1664
|
return response;
|
|
1712
1665
|
|
|
1713
1666
|
}
|
|
1714
|
-
|
|
1715
1667
|
account
|
|
1716
1668
|
.command(`get`)
|
|
1717
1669
|
.description(`Get the currently logged in user.`)
|
|
@@ -1772,53 +1724,53 @@ account
|
|
|
1772
1724
|
.command(`create-mfa-authenticator`)
|
|
1773
1725
|
.description(`Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.`)
|
|
1774
1726
|
.requiredOption(`--type <type>`, `Type of authenticator. Must be 'totp'`)
|
|
1775
|
-
.action(actionRunner(
|
|
1727
|
+
.action(actionRunner(accountCreateMFAAuthenticator))
|
|
1776
1728
|
|
|
1777
1729
|
account
|
|
1778
1730
|
.command(`update-mfa-authenticator`)
|
|
1779
1731
|
.description(`Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.`)
|
|
1780
1732
|
.requiredOption(`--type <type>`, `Type of authenticator.`)
|
|
1781
1733
|
.requiredOption(`--otp <otp>`, `Valid verification token.`)
|
|
1782
|
-
.action(actionRunner(
|
|
1734
|
+
.action(actionRunner(accountUpdateMFAAuthenticator))
|
|
1783
1735
|
|
|
1784
1736
|
account
|
|
1785
1737
|
.command(`delete-mfa-authenticator`)
|
|
1786
1738
|
.description(`Delete an authenticator for a user by ID.`)
|
|
1787
1739
|
.requiredOption(`--type <type>`, `Type of authenticator.`)
|
|
1788
|
-
.action(actionRunner(
|
|
1740
|
+
.action(actionRunner(accountDeleteMFAAuthenticator))
|
|
1789
1741
|
|
|
1790
1742
|
account
|
|
1791
1743
|
.command(`create-mfa-challenge`)
|
|
1792
1744
|
.description(`Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.`)
|
|
1793
1745
|
.requiredOption(`--factor <factor>`, `Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'.`)
|
|
1794
|
-
.action(actionRunner(
|
|
1746
|
+
.action(actionRunner(accountCreateMFAChallenge))
|
|
1795
1747
|
|
|
1796
1748
|
account
|
|
1797
1749
|
.command(`update-mfa-challenge`)
|
|
1798
1750
|
.description(`Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.`)
|
|
1799
1751
|
.requiredOption(`--challenge-id <challenge-id>`, `ID of the challenge.`)
|
|
1800
1752
|
.requiredOption(`--otp <otp>`, `Valid verification token.`)
|
|
1801
|
-
.action(actionRunner(
|
|
1753
|
+
.action(actionRunner(accountUpdateMFAChallenge))
|
|
1802
1754
|
|
|
1803
1755
|
account
|
|
1804
1756
|
.command(`list-mfa-factors`)
|
|
1805
1757
|
.description(`List the factors available on the account to be used as a MFA challange.`)
|
|
1806
|
-
.action(actionRunner(
|
|
1758
|
+
.action(actionRunner(accountListMFAFactors))
|
|
1807
1759
|
|
|
1808
1760
|
account
|
|
1809
1761
|
.command(`get-mfa-recovery-codes`)
|
|
1810
1762
|
.description(`Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.`)
|
|
1811
|
-
.action(actionRunner(
|
|
1763
|
+
.action(actionRunner(accountGetMFARecoveryCodes))
|
|
1812
1764
|
|
|
1813
1765
|
account
|
|
1814
1766
|
.command(`create-mfa-recovery-codes`)
|
|
1815
1767
|
.description(`Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.`)
|
|
1816
|
-
.action(actionRunner(
|
|
1768
|
+
.action(actionRunner(accountCreateMFARecoveryCodes))
|
|
1817
1769
|
|
|
1818
1770
|
account
|
|
1819
1771
|
.command(`update-mfa-recovery-codes`)
|
|
1820
1772
|
.description(`Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.`)
|
|
1821
|
-
.action(actionRunner(
|
|
1773
|
+
.action(actionRunner(accountUpdateMFARecoveryCodes))
|
|
1822
1774
|
|
|
1823
1775
|
account
|
|
1824
1776
|
.command(`update-name`)
|
|
@@ -1891,7 +1843,7 @@ account
|
|
|
1891
1843
|
|
|
1892
1844
|
account
|
|
1893
1845
|
.command(`update-magic-url-session`)
|
|
1894
|
-
.description(`Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`)
|
|
1846
|
+
.description(`[**DEPRECATED** - This command is deprecated.] Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`)
|
|
1895
1847
|
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
1896
1848
|
.requiredOption(`--secret <secret>`, `Valid verification token.`)
|
|
1897
1849
|
.action(actionRunner(accountUpdateMagicURLSession))
|
|
@@ -1907,7 +1859,7 @@ account
|
|
|
1907
1859
|
|
|
1908
1860
|
account
|
|
1909
1861
|
.command(`update-phone-session`)
|
|
1910
|
-
.description(`Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`)
|
|
1862
|
+
.description(`[**DEPRECATED** - This command is deprecated.] Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`)
|
|
1911
1863
|
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
1912
1864
|
.requiredOption(`--secret <secret>`, `Valid verification token.`)
|
|
1913
1865
|
.action(actionRunner(accountUpdatePhoneSession))
|
|
@@ -1965,8 +1917,8 @@ account
|
|
|
1965
1917
|
|
|
1966
1918
|
account
|
|
1967
1919
|
.command(`create-email-token`)
|
|
1968
|
-
.description(`Sends the user an email with a secret key for creating a session. If the
|
|
1969
|
-
.requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
1920
|
+
.description(`Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided 'userId'. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). `)
|
|
1921
|
+
.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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.`)
|
|
1970
1922
|
.requiredOption(`--email <email>`, `User email.`)
|
|
1971
1923
|
.option(`--phrase [value]`, `Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.`, (value) => value === undefined ? true : parseBool(value))
|
|
1972
1924
|
.action(actionRunner(accountCreateEmailToken))
|
|
@@ -1974,7 +1926,7 @@ account
|
|
|
1974
1926
|
account
|
|
1975
1927
|
.command(`create-magic-url-token`)
|
|
1976
1928
|
.description(`Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). `)
|
|
1977
|
-
.requiredOption(`--user-id <user-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
1929
|
+
.requiredOption(`--user-id <user-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.`)
|
|
1978
1930
|
.requiredOption(`--email <email>`, `User email.`)
|
|
1979
1931
|
.option(`--url <url>`, `URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
|
|
1980
1932
|
.option(`--phrase [value]`, `Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.`, (value) => value === undefined ? true : parseBool(value))
|
|
@@ -1992,7 +1944,7 @@ account
|
|
|
1992
1944
|
account
|
|
1993
1945
|
.command(`create-phone-token`)
|
|
1994
1946
|
.description(`Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`)
|
|
1995
|
-
.requiredOption(`--user-id <user-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
1947
|
+
.requiredOption(`--user-id <user-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.`)
|
|
1996
1948
|
.requiredOption(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
|
|
1997
1949
|
.action(actionRunner(accountCreatePhoneToken))
|
|
1998
1950
|
|
|
@@ -2032,15 +1984,15 @@ module.exports = {
|
|
|
2032
1984
|
accountCreateJWT,
|
|
2033
1985
|
accountListLogs,
|
|
2034
1986
|
accountUpdateMFA,
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
1987
|
+
accountCreateMFAAuthenticator,
|
|
1988
|
+
accountUpdateMFAAuthenticator,
|
|
1989
|
+
accountDeleteMFAAuthenticator,
|
|
1990
|
+
accountCreateMFAChallenge,
|
|
1991
|
+
accountUpdateMFAChallenge,
|
|
1992
|
+
accountListMFAFactors,
|
|
1993
|
+
accountGetMFARecoveryCodes,
|
|
1994
|
+
accountCreateMFARecoveryCodes,
|
|
1995
|
+
accountUpdateMFARecoveryCodes,
|
|
2044
1996
|
accountUpdateName,
|
|
2045
1997
|
accountUpdatePassword,
|
|
2046
1998
|
accountUpdatePhone,
|