@appwrite.io/console 0.6.0-rc.9 → 0.6.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/.travis.yml +32 -0
- package/README.md +5 -5
- package/dist/cjs/sdk.js +1140 -418
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1141 -419
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +1140 -418
- package/docs/examples/account/create-anonymous-session.md +6 -13
- package/docs/examples/account/create-email-password-session.md +9 -13
- package/docs/examples/account/create-email-token.md +10 -13
- package/docs/examples/account/create-j-w-t.md +6 -13
- package/docs/examples/account/create-magic-u-r-l-token.md +11 -13
- package/docs/examples/account/create-mfa-authenticator.md +13 -0
- package/docs/examples/account/create-mfa-challenge.md +13 -0
- package/docs/examples/account/create-mfa-recovery-codes.md +11 -0
- package/docs/examples/account/create-o-auth2session.md +10 -9
- package/docs/examples/account/create-o-auth2token.md +15 -0
- package/docs/examples/account/create-phone-token.md +9 -13
- package/docs/examples/account/create-phone-verification.md +6 -13
- package/docs/examples/account/create-push-target.md +10 -13
- package/docs/examples/account/create-recovery.md +9 -13
- package/docs/examples/account/create-session.md +9 -13
- package/docs/examples/account/create-verification.md +8 -13
- package/docs/examples/account/create.md +11 -13
- package/docs/examples/account/delete-identity.md +8 -13
- package/docs/examples/account/delete-mfa-authenticator.md +14 -0
- package/docs/examples/account/delete-push-target.md +8 -13
- package/docs/examples/account/delete-session.md +8 -13
- package/docs/examples/account/delete-sessions.md +6 -13
- package/docs/examples/account/delete.md +6 -13
- package/docs/examples/account/get-mfa-recovery-codes.md +11 -0
- package/docs/examples/account/get-prefs.md +6 -13
- package/docs/examples/account/get-session.md +8 -13
- package/docs/examples/account/get.md +6 -13
- package/docs/examples/account/list-identities.md +8 -13
- package/docs/examples/account/list-logs.md +8 -13
- package/docs/examples/account/list-mfa-factors.md +11 -0
- package/docs/examples/account/list-sessions.md +6 -13
- package/docs/examples/account/update-email.md +9 -13
- package/docs/examples/account/update-m-f-a.md +8 -13
- package/docs/examples/account/update-magic-u-r-l-session.md +9 -13
- package/docs/examples/account/update-mfa-authenticator.md +14 -0
- package/docs/examples/account/update-mfa-challenge.md +14 -0
- package/docs/examples/account/update-mfa-recovery-codes.md +11 -0
- package/docs/examples/account/update-name.md +8 -13
- package/docs/examples/account/update-password.md +9 -13
- package/docs/examples/account/update-phone-session.md +14 -0
- package/docs/examples/account/update-phone-verification.md +9 -13
- package/docs/examples/account/update-phone.md +9 -13
- package/docs/examples/account/update-prefs.md +8 -13
- package/docs/examples/account/update-push-target.md +9 -13
- package/docs/examples/account/update-recovery.md +10 -13
- package/docs/examples/account/update-session.md +8 -13
- package/docs/examples/account/update-status.md +6 -13
- package/docs/examples/account/update-verification.md +9 -13
- package/docs/examples/assistant/chat.md +8 -13
- package/docs/examples/avatars/get-browser.md +11 -9
- package/docs/examples/avatars/get-credit-card.md +11 -9
- package/docs/examples/avatars/get-favicon.md +8 -9
- package/docs/examples/avatars/get-flag.md +11 -9
- package/docs/examples/avatars/get-image.md +10 -9
- package/docs/examples/avatars/get-initials.md +11 -9
- package/docs/examples/avatars/get-q-r.md +11 -9
- package/docs/examples/console/variables.md +6 -13
- package/docs/examples/databases/create-boolean-attribute.md +13 -13
- package/docs/examples/databases/create-collection.md +13 -13
- package/docs/examples/databases/create-datetime-attribute.md +13 -13
- package/docs/examples/databases/create-document.md +12 -13
- package/docs/examples/databases/create-email-attribute.md +13 -13
- package/docs/examples/databases/create-enum-attribute.md +14 -13
- package/docs/examples/databases/create-float-attribute.md +15 -13
- package/docs/examples/databases/create-index.md +13 -13
- package/docs/examples/databases/create-integer-attribute.md +15 -13
- package/docs/examples/databases/create-ip-attribute.md +13 -13
- package/docs/examples/databases/create-relationship-attribute.md +15 -13
- package/docs/examples/databases/create-string-attribute.md +15 -13
- package/docs/examples/databases/create-url-attribute.md +13 -13
- package/docs/examples/databases/create.md +10 -13
- package/docs/examples/databases/delete-attribute.md +10 -13
- package/docs/examples/databases/delete-collection.md +9 -13
- package/docs/examples/databases/delete-document.md +10 -13
- package/docs/examples/databases/delete-index.md +10 -13
- package/docs/examples/databases/delete.md +8 -13
- package/docs/examples/databases/get-attribute.md +10 -13
- package/docs/examples/databases/get-collection-usage.md +10 -13
- package/docs/examples/databases/get-collection.md +9 -13
- package/docs/examples/databases/get-database-usage.md +9 -13
- package/docs/examples/databases/get-document.md +11 -13
- package/docs/examples/databases/get-index.md +10 -13
- package/docs/examples/databases/get-usage.md +8 -13
- package/docs/examples/databases/get.md +8 -13
- package/docs/examples/databases/list-attributes.md +10 -13
- package/docs/examples/databases/list-collection-logs.md +10 -13
- package/docs/examples/databases/list-collections.md +10 -13
- package/docs/examples/databases/list-document-logs.md +11 -13
- package/docs/examples/databases/list-documents.md +10 -13
- package/docs/examples/databases/list-indexes.md +10 -13
- package/docs/examples/databases/list-logs.md +9 -13
- package/docs/examples/databases/list.md +9 -13
- package/docs/examples/databases/update-boolean-attribute.md +12 -13
- package/docs/examples/databases/update-collection.md +13 -13
- package/docs/examples/databases/update-datetime-attribute.md +12 -13
- package/docs/examples/databases/update-document.md +12 -13
- package/docs/examples/databases/update-email-attribute.md +12 -13
- package/docs/examples/databases/update-enum-attribute.md +13 -13
- package/docs/examples/databases/update-float-attribute.md +14 -13
- package/docs/examples/databases/update-integer-attribute.md +14 -13
- package/docs/examples/databases/update-ip-attribute.md +12 -13
- package/docs/examples/databases/update-relationship-attribute.md +11 -13
- package/docs/examples/databases/update-string-attribute.md +12 -13
- package/docs/examples/databases/update-url-attribute.md +12 -13
- package/docs/examples/databases/update.md +10 -13
- package/docs/examples/functions/create-build.md +10 -13
- package/docs/examples/functions/create-deployment.md +12 -13
- package/docs/examples/functions/create-execution.md +13 -13
- package/docs/examples/functions/create-variable.md +10 -13
- package/docs/examples/functions/create.md +27 -13
- package/docs/examples/functions/delete-deployment.md +9 -13
- package/docs/examples/functions/delete-variable.md +9 -13
- package/docs/examples/functions/delete.md +8 -13
- package/docs/examples/functions/download-deployment.md +9 -9
- package/docs/examples/functions/get-deployment.md +9 -13
- package/docs/examples/functions/get-execution.md +9 -13
- package/docs/examples/functions/get-function-usage.md +9 -13
- package/docs/examples/functions/get-usage.md +8 -13
- package/docs/examples/functions/get-variable.md +9 -13
- package/docs/examples/functions/get.md +8 -13
- package/docs/examples/functions/list-deployments.md +10 -13
- package/docs/examples/functions/list-executions.md +10 -13
- package/docs/examples/functions/list-runtimes.md +6 -13
- package/docs/examples/functions/list-variables.md +8 -13
- package/docs/examples/functions/list.md +9 -13
- package/docs/examples/functions/update-deployment.md +9 -13
- package/docs/examples/functions/update-variable.md +11 -13
- package/docs/examples/functions/update.md +23 -13
- package/docs/examples/graphql/mutation.md +8 -13
- package/docs/examples/graphql/query.md +8 -13
- package/docs/examples/health/get-antivirus.md +6 -13
- package/docs/examples/health/get-cache.md +6 -13
- package/docs/examples/health/get-certificate.md +13 -0
- package/docs/examples/health/get-d-b.md +6 -13
- package/docs/examples/health/get-failed-jobs.md +14 -0
- package/docs/examples/health/get-pub-sub.md +6 -13
- package/docs/examples/health/get-queue-builds.md +8 -13
- package/docs/examples/health/get-queue-certificates.md +8 -13
- package/docs/examples/health/get-queue-databases.md +9 -13
- package/docs/examples/health/get-queue-deletes.md +8 -13
- package/docs/examples/health/get-queue-functions.md +8 -13
- package/docs/examples/health/get-queue-logs.md +8 -13
- package/docs/examples/health/get-queue-mails.md +8 -13
- package/docs/examples/health/get-queue-messaging.md +8 -13
- package/docs/examples/health/get-queue-migrations.md +8 -13
- package/docs/examples/health/get-queue-usage-dump.md +13 -0
- package/docs/examples/health/get-queue-usage.md +13 -0
- package/docs/examples/health/get-queue-webhooks.md +8 -13
- package/docs/examples/health/get-queue.md +6 -13
- package/docs/examples/health/get-storage-local.md +6 -13
- package/docs/examples/health/get-storage.md +11 -0
- package/docs/examples/health/get-time.md +6 -13
- package/docs/examples/health/get.md +6 -13
- package/docs/examples/locale/get.md +6 -13
- package/docs/examples/locale/list-codes.md +6 -13
- package/docs/examples/locale/list-continents.md +6 -13
- package/docs/examples/locale/list-countries-e-u.md +6 -13
- package/docs/examples/locale/list-countries-phones.md +6 -13
- package/docs/examples/locale/list-countries.md +6 -13
- package/docs/examples/locale/list-currencies.md +6 -13
- package/docs/examples/locale/list-languages.md +6 -13
- package/docs/examples/messaging/create-apns-provider.md +20 -0
- package/docs/examples/messaging/create-email.md +19 -13
- package/docs/examples/messaging/create-fcm-provider.md +16 -0
- package/docs/examples/messaging/create-mailgun-provider.md +17 -13
- package/docs/examples/messaging/create-msg91provider.md +13 -13
- package/docs/examples/messaging/create-push.md +23 -13
- package/docs/examples/messaging/create-sendgrid-provider.md +15 -13
- package/docs/examples/messaging/create-sms.md +19 -0
- package/docs/examples/messaging/create-smtp-provider.md +26 -0
- package/docs/examples/messaging/create-subscriber.md +10 -13
- package/docs/examples/messaging/create-telesign-provider.md +13 -13
- package/docs/examples/messaging/create-textmagic-provider.md +13 -13
- package/docs/examples/messaging/create-topic.md +10 -13
- package/docs/examples/messaging/create-twilio-provider.md +13 -13
- package/docs/examples/messaging/create-vonage-provider.md +13 -13
- package/docs/examples/messaging/delete-provider.md +8 -13
- package/docs/examples/messaging/delete-subscriber.md +9 -13
- package/docs/examples/messaging/delete-topic.md +8 -13
- package/docs/examples/messaging/delete.md +8 -13
- package/docs/examples/messaging/get-message.md +8 -13
- package/docs/examples/messaging/get-provider.md +8 -13
- package/docs/examples/messaging/get-subscriber.md +9 -13
- package/docs/examples/messaging/get-topic.md +8 -13
- package/docs/examples/messaging/list-message-logs.md +9 -13
- package/docs/examples/messaging/list-messages.md +9 -13
- package/docs/examples/messaging/list-provider-logs.md +9 -13
- package/docs/examples/messaging/list-providers.md +9 -13
- package/docs/examples/messaging/list-subscriber-logs.md +9 -13
- package/docs/examples/messaging/list-subscribers.md +10 -13
- package/docs/examples/messaging/list-targets.md +9 -13
- package/docs/examples/messaging/list-topic-logs.md +9 -13
- package/docs/examples/messaging/list-topics.md +9 -13
- package/docs/examples/messaging/update-apns-provider.md +20 -0
- package/docs/examples/messaging/update-email.md +18 -13
- package/docs/examples/messaging/update-fcm-provider.md +16 -0
- package/docs/examples/messaging/update-mailgun-provider.md +17 -13
- package/docs/examples/messaging/update-msg91provider.md +13 -13
- package/docs/examples/messaging/update-push.md +23 -13
- package/docs/examples/messaging/update-sendgrid-provider.md +15 -13
- package/docs/examples/messaging/update-sms.md +19 -0
- package/docs/examples/messaging/update-smtp-provider.md +26 -0
- package/docs/examples/messaging/update-telesign-provider.md +13 -13
- package/docs/examples/messaging/update-textmagic-provider.md +13 -13
- package/docs/examples/messaging/update-topic.md +10 -13
- package/docs/examples/messaging/update-twilio-provider.md +13 -13
- package/docs/examples/messaging/update-vonage-provider.md +13 -13
- package/docs/examples/migrations/create-appwrite-migration.md +11 -13
- package/docs/examples/migrations/create-firebase-migration.md +9 -13
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +9 -13
- package/docs/examples/migrations/create-n-host-migration.md +15 -13
- package/docs/examples/migrations/create-supabase-migration.md +14 -13
- package/docs/examples/migrations/delete-firebase-auth.md +6 -13
- package/docs/examples/migrations/delete.md +8 -13
- package/docs/examples/migrations/get-appwrite-report.md +11 -13
- package/docs/examples/migrations/get-firebase-report-o-auth.md +9 -13
- package/docs/examples/migrations/get-firebase-report.md +9 -13
- package/docs/examples/migrations/get-n-host-report.md +15 -13
- package/docs/examples/migrations/get-supabase-report.md +14 -13
- package/docs/examples/migrations/get.md +8 -13
- package/docs/examples/migrations/list-firebase-projects.md +6 -13
- package/docs/examples/migrations/list.md +9 -13
- package/docs/examples/migrations/retry.md +8 -13
- package/docs/examples/project/create-variable.md +9 -13
- package/docs/examples/project/delete-variable.md +8 -13
- package/docs/examples/project/get-usage.md +10 -13
- package/docs/examples/project/get-variable.md +8 -13
- package/docs/examples/project/list-variables.md +6 -13
- package/docs/examples/project/update-variable.md +10 -13
- package/docs/examples/projects/create-key.md +11 -13
- package/docs/examples/projects/create-platform.md +13 -13
- package/docs/examples/projects/create-smtp-test.md +17 -13
- package/docs/examples/projects/create-webhook.md +15 -13
- package/docs/examples/projects/create.md +20 -13
- package/docs/examples/projects/delete-email-template.md +10 -13
- package/docs/examples/projects/delete-key.md +9 -13
- package/docs/examples/projects/delete-platform.md +9 -13
- package/docs/examples/projects/delete-sms-template.md +10 -13
- package/docs/examples/projects/delete-webhook.md +9 -13
- package/docs/examples/projects/delete.md +8 -13
- package/docs/examples/projects/get-email-template.md +10 -13
- package/docs/examples/projects/get-key.md +9 -13
- package/docs/examples/projects/get-platform.md +9 -13
- package/docs/examples/projects/get-sms-template.md +10 -13
- package/docs/examples/projects/get-webhook.md +9 -13
- package/docs/examples/projects/get.md +8 -13
- package/docs/examples/projects/list-keys.md +8 -13
- package/docs/examples/projects/list-platforms.md +8 -13
- package/docs/examples/projects/list-webhooks.md +8 -13
- package/docs/examples/projects/list.md +9 -13
- package/docs/examples/projects/update-api-status-all.md +14 -0
- package/docs/examples/projects/update-api-status.md +15 -0
- package/docs/examples/projects/update-auth-duration.md +9 -13
- package/docs/examples/projects/update-auth-limit.md +9 -13
- package/docs/examples/projects/update-auth-password-dictionary.md +9 -13
- package/docs/examples/projects/update-auth-password-history.md +9 -13
- package/docs/examples/projects/update-auth-sessions-limit.md +9 -13
- package/docs/examples/projects/update-auth-status.md +10 -13
- package/docs/examples/projects/update-email-template.md +15 -13
- package/docs/examples/projects/update-key.md +12 -13
- package/docs/examples/projects/update-o-auth2.md +12 -13
- package/docs/examples/projects/update-personal-data-check.md +9 -13
- package/docs/examples/projects/update-platform.md +13 -13
- package/docs/examples/projects/update-service-status-all.md +9 -13
- package/docs/examples/projects/update-service-status.md +10 -13
- package/docs/examples/projects/update-sms-template.md +11 -13
- package/docs/examples/projects/update-smtp.md +17 -13
- package/docs/examples/projects/update-team.md +9 -13
- package/docs/examples/projects/update-webhook-signature.md +9 -13
- package/docs/examples/projects/update-webhook.md +16 -13
- package/docs/examples/projects/update.md +18 -13
- package/docs/examples/proxy/create-rule.md +10 -13
- package/docs/examples/proxy/delete-rule.md +8 -13
- package/docs/examples/proxy/get-rule.md +8 -13
- package/docs/examples/proxy/list-rules.md +9 -13
- package/docs/examples/proxy/update-rule-verification.md +8 -13
- package/docs/examples/storage/create-bucket.md +17 -13
- package/docs/examples/storage/create-file.md +11 -13
- package/docs/examples/storage/delete-bucket.md +8 -13
- package/docs/examples/storage/delete-file.md +9 -13
- package/docs/examples/storage/get-bucket-usage.md +9 -13
- package/docs/examples/storage/get-bucket.md +8 -13
- package/docs/examples/storage/get-file-download.md +9 -9
- package/docs/examples/storage/get-file-preview.md +20 -9
- package/docs/examples/storage/get-file-view.md +9 -9
- package/docs/examples/storage/get-file.md +9 -13
- package/docs/examples/storage/get-usage.md +8 -13
- package/docs/examples/storage/list-buckets.md +9 -13
- package/docs/examples/storage/list-files.md +10 -13
- package/docs/examples/storage/update-bucket.md +17 -13
- package/docs/examples/storage/update-file.md +11 -13
- package/docs/examples/teams/create-membership.md +14 -13
- package/docs/examples/teams/create.md +10 -13
- package/docs/examples/teams/delete-membership.md +9 -13
- package/docs/examples/teams/delete.md +8 -13
- package/docs/examples/teams/get-membership.md +9 -13
- package/docs/examples/teams/get-prefs.md +8 -13
- package/docs/examples/teams/get.md +8 -13
- package/docs/examples/teams/list-logs.md +9 -13
- package/docs/examples/teams/list-memberships.md +10 -13
- package/docs/examples/teams/list.md +9 -13
- package/docs/examples/teams/update-membership-status.md +11 -13
- package/docs/examples/teams/update-membership.md +10 -13
- package/docs/examples/teams/update-name.md +9 -13
- package/docs/examples/teams/update-prefs.md +9 -13
- package/docs/examples/users/create-argon2user.md +11 -13
- package/docs/examples/users/create-bcrypt-user.md +11 -13
- package/docs/examples/users/create-m-d5user.md +11 -13
- package/docs/examples/users/create-mfa-recovery-codes.md +13 -0
- package/docs/examples/users/create-p-h-pass-user.md +11 -13
- package/docs/examples/users/create-s-h-a-user.md +12 -13
- package/docs/examples/users/create-scrypt-modified-user.md +14 -13
- package/docs/examples/users/create-scrypt-user.md +16 -13
- package/docs/examples/users/create-session.md +8 -13
- package/docs/examples/users/create-target.md +13 -13
- package/docs/examples/users/create-token.md +10 -13
- package/docs/examples/users/create.md +12 -13
- package/docs/examples/users/delete-identity.md +8 -13
- package/docs/examples/users/delete-mfa-authenticator.md +14 -0
- package/docs/examples/users/delete-session.md +9 -13
- package/docs/examples/users/delete-sessions.md +8 -13
- package/docs/examples/users/delete-target.md +9 -13
- package/docs/examples/users/delete.md +8 -13
- package/docs/examples/users/get-mfa-recovery-codes.md +13 -0
- package/docs/examples/users/get-prefs.md +8 -13
- package/docs/examples/users/get-target.md +9 -13
- package/docs/examples/users/get-usage.md +8 -13
- package/docs/examples/users/get.md +8 -13
- package/docs/examples/users/list-identities.md +9 -13
- package/docs/examples/users/list-logs.md +9 -13
- package/docs/examples/users/list-memberships.md +8 -13
- package/docs/examples/users/list-mfa-factors.md +13 -0
- package/docs/examples/users/list-sessions.md +8 -13
- package/docs/examples/users/list-targets.md +9 -13
- package/docs/examples/users/list.md +9 -13
- package/docs/examples/users/update-email-verification.md +9 -13
- package/docs/examples/users/update-email.md +9 -13
- package/docs/examples/users/update-labels.md +9 -13
- package/docs/examples/users/update-mfa-recovery-codes.md +13 -0
- package/docs/examples/users/update-mfa.md +9 -13
- package/docs/examples/users/update-name.md +9 -13
- package/docs/examples/users/update-password.md +9 -13
- package/docs/examples/users/update-phone-verification.md +9 -13
- package/docs/examples/users/update-phone.md +9 -13
- package/docs/examples/users/update-prefs.md +9 -13
- package/docs/examples/users/update-status.md +9 -13
- package/docs/examples/users/update-target.md +12 -13
- package/docs/examples/vcs/create-repository-detection.md +10 -13
- package/docs/examples/vcs/create-repository.md +10 -13
- package/docs/examples/vcs/delete-installation.md +8 -13
- package/docs/examples/vcs/get-installation.md +8 -13
- package/docs/examples/vcs/get-repository.md +9 -13
- package/docs/examples/vcs/list-installations.md +9 -13
- package/docs/examples/vcs/list-repositories.md +9 -13
- package/docs/examples/vcs/list-repository-branches.md +9 -13
- package/docs/examples/vcs/update-external-deployments.md +10 -13
- package/package.json +1 -1
- package/src/client.ts +3 -3
- package/src/enums/{a-p-i-service.ts → api-service.ts} +1 -1
- package/src/enums/api.ts +5 -0
- package/src/enums/authentication-factor.ts +6 -0
- package/src/enums/authenticator-type.ts +3 -0
- package/src/enums/email-template-locale.ts +133 -0
- package/src/enums/email-template-type.ts +7 -0
- package/src/enums/index-type.ts +0 -1
- package/src/enums/name.ts +15 -0
- package/src/enums/{password-version.ts → password-hash.ts} +1 -1
- package/src/enums/region.ts +1 -0
- package/src/enums/runtime.ts +40 -0
- package/src/enums/{template-locale.ts → sms-template-locale.ts} +1 -1
- package/src/enums/{template-type.ts → sms-template-type.ts} +2 -1
- package/src/enums/{s-m-t-p-encryption.ts → smtp-encryption.ts} +1 -1
- package/src/index.ts +11 -8
- package/src/models.ts +57 -19
- package/src/query.ts +2 -2
- package/src/service.ts +0 -3
- package/src/services/account.ts +239 -66
- package/src/services/assistant.ts +0 -1
- package/src/services/avatars.ts +0 -1
- package/src/services/console.ts +0 -1
- package/src/services/databases.ts +20 -4
- package/src/services/functions.ts +0 -1
- package/src/services/graphql.ts +0 -1
- package/src/services/health.ts +121 -1
- package/src/services/locale.ts +0 -1
- package/src/services/messaging.ts +161 -70
- package/src/services/migrations.ts +0 -1
- package/src/services/project.ts +1 -2
- package/src/services/projects.ts +97 -24
- package/src/services/proxy.ts +0 -1
- package/src/services/storage.ts +2 -3
- package/src/services/teams.ts +0 -1
- package/src/services/users.ts +115 -39
- package/src/services/vcs.ts +0 -1
- package/types/enums/{a-p-i-service.d.ts → api-service.d.ts} +1 -1
- package/types/enums/api.d.ts +5 -0
- package/types/enums/authentication-factor.d.ts +6 -0
- package/types/enums/authenticator-type.d.ts +3 -0
- package/types/enums/email-template-locale.d.ts +133 -0
- package/types/enums/email-template-type.d.ts +7 -0
- package/types/enums/index-type.d.ts +1 -2
- package/types/enums/name.d.ts +15 -0
- package/types/enums/{password-version.d.ts → password-hash.d.ts} +1 -1
- package/types/enums/region.d.ts +2 -1
- package/types/enums/runtime.d.ts +41 -1
- package/types/enums/{template-locale.d.ts → sms-template-locale.d.ts} +1 -1
- package/types/enums/sms-template-type.d.ts +6 -0
- package/types/enums/{s-m-t-p-encryption.d.ts → smtp-encryption.d.ts} +1 -1
- package/types/index.d.ts +11 -8
- package/types/models.d.ts +57 -19
- package/types/query.d.ts +2 -2
- package/types/services/account.d.ts +121 -28
- package/types/services/databases.d.ts +20 -3
- package/types/services/health.d.ts +56 -0
- package/types/services/messaging.d.ts +109 -49
- package/types/services/project.d.ts +1 -1
- package/types/services/projects.d.ts +47 -23
- package/types/services/storage.d.ts +2 -2
- package/types/services/users.d.ts +63 -17
- package/docs/examples/account/add-authenticator.md +0 -18
- package/docs/examples/account/create-challenge.md +0 -18
- package/docs/examples/account/delete-authenticator.md +0 -18
- package/docs/examples/account/list-factors.md +0 -18
- package/docs/examples/account/update-challenge.md +0 -18
- package/docs/examples/account/verify-authenticator.md +0 -18
- package/docs/examples/messaging/create-a-p-n-s-provider.md +0 -18
- package/docs/examples/messaging/create-f-c-m-provider.md +0 -18
- package/docs/examples/messaging/create-s-m-s.md +0 -18
- package/docs/examples/messaging/create-s-m-t-p-provider.md +0 -18
- package/docs/examples/messaging/update-a-p-n-s-provider.md +0 -18
- package/docs/examples/messaging/update-f-c-m-provider.md +0 -18
- package/docs/examples/messaging/update-s-m-s.md +0 -18
- package/docs/examples/messaging/update-s-m-t-p-provider.md +0 -18
- package/docs/examples/users/delete-authenticator.md +0 -18
- package/docs/examples/users/list-providers.md +0 -18
- package/src/enums/authenticator-factor.ts +0 -3
- package/src/enums/authenticator-provider.ts +0 -3
- package/src/enums/message-type.ts +0 -5
- package/types/enums/authenticator-factor.d.ts +0 -3
- package/types/enums/authenticator-provider.d.ts +0 -3
- package/types/enums/message-type.d.ts +0 -5
- package/types/enums/template-type.d.ts +0 -5
|
@@ -2,7 +2,6 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import type { UploadProgress, Payload } from '../client';
|
|
5
|
-
import { Query } from '../query';
|
|
6
5
|
|
|
7
6
|
export class Migrations extends Service {
|
|
8
7
|
|
package/src/services/project.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import type { UploadProgress, Payload } from '../client';
|
|
5
|
-
import { Query } from '../query';
|
|
6
5
|
import { ProjectUsageRange } from '../enums/project-usage-range';
|
|
7
6
|
|
|
8
7
|
export class Project extends Service {
|
|
@@ -13,7 +12,7 @@ export class Project extends Service {
|
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
|
-
* Get usage stats
|
|
15
|
+
* Get project usage stats
|
|
17
16
|
*
|
|
18
17
|
*
|
|
19
18
|
* @param {string} startDate
|
package/src/services/projects.ts
CHANGED
|
@@ -2,15 +2,17 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import type { UploadProgress, Payload } from '../client';
|
|
5
|
-
import { Query } from '../query';
|
|
6
5
|
import { Region } from '../enums/region';
|
|
6
|
+
import { Api } from '../enums/api';
|
|
7
7
|
import { AuthMethod } from '../enums/auth-method';
|
|
8
8
|
import { OAuthProvider } from '../enums/o-auth-provider';
|
|
9
9
|
import { PlatformType } from '../enums/platform-type';
|
|
10
|
-
import {
|
|
10
|
+
import { ApiService } from '../enums/api-service';
|
|
11
11
|
import { SMTPSecure } from '../enums/s-m-t-p-secure';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { EmailTemplateType } from '../enums/email-template-type';
|
|
13
|
+
import { EmailTemplateLocale } from '../enums/email-template-locale';
|
|
14
|
+
import { SmsTemplateType } from '../enums/sms-template-type';
|
|
15
|
+
import { SmsTemplateLocale } from '../enums/sms-template-locale';
|
|
14
16
|
|
|
15
17
|
export class Projects extends Service {
|
|
16
18
|
|
|
@@ -260,6 +262,77 @@ export class Projects extends Service {
|
|
|
260
262
|
}, payload);
|
|
261
263
|
}
|
|
262
264
|
|
|
265
|
+
/**
|
|
266
|
+
* Update API status
|
|
267
|
+
*
|
|
268
|
+
*
|
|
269
|
+
* @param {string} projectId
|
|
270
|
+
* @param {Api} api
|
|
271
|
+
* @param {boolean} status
|
|
272
|
+
* @throws {AppwriteException}
|
|
273
|
+
* @returns {Promise}
|
|
274
|
+
*/
|
|
275
|
+
async updateApiStatus(projectId: string, api: Api, status: boolean): Promise<Models.Project> {
|
|
276
|
+
if (typeof projectId === 'undefined') {
|
|
277
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
if (typeof api === 'undefined') {
|
|
281
|
+
throw new AppwriteException('Missing required parameter: "api"');
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
if (typeof status === 'undefined') {
|
|
285
|
+
throw new AppwriteException('Missing required parameter: "status"');
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
|
|
289
|
+
const payload: Payload = {};
|
|
290
|
+
|
|
291
|
+
if (typeof api !== 'undefined') {
|
|
292
|
+
payload['api'] = api;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (typeof status !== 'undefined') {
|
|
296
|
+
payload['status'] = status;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
300
|
+
return await this.client.call('patch', uri, {
|
|
301
|
+
'content-type': 'application/json',
|
|
302
|
+
}, payload);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Update all API status
|
|
307
|
+
*
|
|
308
|
+
*
|
|
309
|
+
* @param {string} projectId
|
|
310
|
+
* @param {boolean} status
|
|
311
|
+
* @throws {AppwriteException}
|
|
312
|
+
* @returns {Promise}
|
|
313
|
+
*/
|
|
314
|
+
async updateApiStatusAll(projectId: string, status: boolean): Promise<Models.Project> {
|
|
315
|
+
if (typeof projectId === 'undefined') {
|
|
316
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
if (typeof status === 'undefined') {
|
|
320
|
+
throw new AppwriteException('Missing required parameter: "status"');
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
|
|
324
|
+
const payload: Payload = {};
|
|
325
|
+
|
|
326
|
+
if (typeof status !== 'undefined') {
|
|
327
|
+
payload['status'] = status;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
331
|
+
return await this.client.call('patch', uri, {
|
|
332
|
+
'content-type': 'application/json',
|
|
333
|
+
}, payload);
|
|
334
|
+
}
|
|
335
|
+
|
|
263
336
|
/**
|
|
264
337
|
* Update project authentication duration
|
|
265
338
|
*
|
|
@@ -886,12 +959,12 @@ export class Projects extends Service {
|
|
|
886
959
|
*
|
|
887
960
|
*
|
|
888
961
|
* @param {string} projectId
|
|
889
|
-
* @param {
|
|
962
|
+
* @param {ApiService} service
|
|
890
963
|
* @param {boolean} status
|
|
891
964
|
* @throws {AppwriteException}
|
|
892
965
|
* @returns {Promise}
|
|
893
966
|
*/
|
|
894
|
-
async updateServiceStatus(projectId: string, service:
|
|
967
|
+
async updateServiceStatus(projectId: string, service: ApiService, status: boolean): Promise<Models.Project> {
|
|
895
968
|
if (typeof projectId === 'undefined') {
|
|
896
969
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
897
970
|
}
|
|
@@ -1142,12 +1215,12 @@ export class Projects extends Service {
|
|
|
1142
1215
|
*
|
|
1143
1216
|
*
|
|
1144
1217
|
* @param {string} projectId
|
|
1145
|
-
* @param {
|
|
1146
|
-
* @param {
|
|
1218
|
+
* @param {EmailTemplateType} type
|
|
1219
|
+
* @param {EmailTemplateLocale} locale
|
|
1147
1220
|
* @throws {AppwriteException}
|
|
1148
1221
|
* @returns {Promise}
|
|
1149
1222
|
*/
|
|
1150
|
-
async getEmailTemplate(projectId: string, type:
|
|
1223
|
+
async getEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate> {
|
|
1151
1224
|
if (typeof projectId === 'undefined') {
|
|
1152
1225
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1153
1226
|
}
|
|
@@ -1174,8 +1247,8 @@ export class Projects extends Service {
|
|
|
1174
1247
|
*
|
|
1175
1248
|
*
|
|
1176
1249
|
* @param {string} projectId
|
|
1177
|
-
* @param {
|
|
1178
|
-
* @param {
|
|
1250
|
+
* @param {EmailTemplateType} type
|
|
1251
|
+
* @param {EmailTemplateLocale} locale
|
|
1179
1252
|
* @param {string} subject
|
|
1180
1253
|
* @param {string} message
|
|
1181
1254
|
* @param {string} senderName
|
|
@@ -1184,7 +1257,7 @@ export class Projects extends Service {
|
|
|
1184
1257
|
* @throws {AppwriteException}
|
|
1185
1258
|
* @returns {Promise}
|
|
1186
1259
|
*/
|
|
1187
|
-
async updateEmailTemplate(projectId: string, type:
|
|
1260
|
+
async updateEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string): Promise<Models.Project> {
|
|
1188
1261
|
if (typeof projectId === 'undefined') {
|
|
1189
1262
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1190
1263
|
}
|
|
@@ -1239,12 +1312,12 @@ export class Projects extends Service {
|
|
|
1239
1312
|
*
|
|
1240
1313
|
*
|
|
1241
1314
|
* @param {string} projectId
|
|
1242
|
-
* @param {
|
|
1243
|
-
* @param {
|
|
1315
|
+
* @param {EmailTemplateType} type
|
|
1316
|
+
* @param {EmailTemplateLocale} locale
|
|
1244
1317
|
* @throws {AppwriteException}
|
|
1245
1318
|
* @returns {Promise}
|
|
1246
1319
|
*/
|
|
1247
|
-
async deleteEmailTemplate(projectId: string, type:
|
|
1320
|
+
async deleteEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate> {
|
|
1248
1321
|
if (typeof projectId === 'undefined') {
|
|
1249
1322
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1250
1323
|
}
|
|
@@ -1271,12 +1344,12 @@ export class Projects extends Service {
|
|
|
1271
1344
|
*
|
|
1272
1345
|
*
|
|
1273
1346
|
* @param {string} projectId
|
|
1274
|
-
* @param {
|
|
1275
|
-
* @param {
|
|
1347
|
+
* @param {SmsTemplateType} type
|
|
1348
|
+
* @param {SmsTemplateLocale} locale
|
|
1276
1349
|
* @throws {AppwriteException}
|
|
1277
1350
|
* @returns {Promise}
|
|
1278
1351
|
*/
|
|
1279
|
-
async getSmsTemplate(projectId: string, type:
|
|
1352
|
+
async getSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate> {
|
|
1280
1353
|
if (typeof projectId === 'undefined') {
|
|
1281
1354
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1282
1355
|
}
|
|
@@ -1303,13 +1376,13 @@ export class Projects extends Service {
|
|
|
1303
1376
|
*
|
|
1304
1377
|
*
|
|
1305
1378
|
* @param {string} projectId
|
|
1306
|
-
* @param {
|
|
1307
|
-
* @param {
|
|
1379
|
+
* @param {SmsTemplateType} type
|
|
1380
|
+
* @param {SmsTemplateLocale} locale
|
|
1308
1381
|
* @param {string} message
|
|
1309
1382
|
* @throws {AppwriteException}
|
|
1310
1383
|
* @returns {Promise}
|
|
1311
1384
|
*/
|
|
1312
|
-
async updateSmsTemplate(projectId: string, type:
|
|
1385
|
+
async updateSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string): Promise<Models.SmsTemplate> {
|
|
1313
1386
|
if (typeof projectId === 'undefined') {
|
|
1314
1387
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1315
1388
|
}
|
|
@@ -1344,12 +1417,12 @@ export class Projects extends Service {
|
|
|
1344
1417
|
*
|
|
1345
1418
|
*
|
|
1346
1419
|
* @param {string} projectId
|
|
1347
|
-
* @param {
|
|
1348
|
-
* @param {
|
|
1420
|
+
* @param {SmsTemplateType} type
|
|
1421
|
+
* @param {SmsTemplateLocale} locale
|
|
1349
1422
|
* @throws {AppwriteException}
|
|
1350
1423
|
* @returns {Promise}
|
|
1351
1424
|
*/
|
|
1352
|
-
async deleteSmsTemplate(projectId: string, type:
|
|
1425
|
+
async deleteSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate> {
|
|
1353
1426
|
if (typeof projectId === 'undefined') {
|
|
1354
1427
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1355
1428
|
}
|
package/src/services/proxy.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import type { UploadProgress, Payload } from '../client';
|
|
5
|
-
import { Query } from '../query';
|
|
6
5
|
import { ResourceType } from '../enums/resource-type';
|
|
7
6
|
|
|
8
7
|
export class Proxy extends Service {
|
package/src/services/storage.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import type { UploadProgress, Payload } from '../client';
|
|
5
|
-
import { Query } from '../query';
|
|
6
5
|
import { Compression } from '../enums/compression';
|
|
7
6
|
import { ImageGravity } from '../enums/image-gravity';
|
|
8
7
|
import { ImageFormat } from '../enums/image-format';
|
|
@@ -641,7 +640,7 @@ export class Storage extends Service {
|
|
|
641
640
|
}
|
|
642
641
|
|
|
643
642
|
/**
|
|
644
|
-
* Get usage stats
|
|
643
|
+
* Get storage usage stats
|
|
645
644
|
*
|
|
646
645
|
*
|
|
647
646
|
* @param {StorageUsageRange} range
|
|
@@ -663,7 +662,7 @@ export class Storage extends Service {
|
|
|
663
662
|
}
|
|
664
663
|
|
|
665
664
|
/**
|
|
666
|
-
* Get usage stats
|
|
665
|
+
* Get bucket usage stats
|
|
667
666
|
*
|
|
668
667
|
*
|
|
669
668
|
* @param {string} bucketId
|
package/src/services/teams.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import type { UploadProgress, Payload } from '../client';
|
|
5
|
-
import { Query } from '../query';
|
|
6
5
|
|
|
7
6
|
export class Teams extends Service {
|
|
8
7
|
|
package/src/services/users.ts
CHANGED
|
@@ -2,10 +2,9 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import type { UploadProgress, Payload } from '../client';
|
|
5
|
-
import {
|
|
6
|
-
import { PasswordVersion } from '../enums/password-version';
|
|
5
|
+
import { PasswordHash } from '../enums/password-hash';
|
|
7
6
|
import { UserUsageRange } from '../enums/user-usage-range';
|
|
8
|
-
import {
|
|
7
|
+
import { AuthenticatorType } from '../enums/authenticator-type';
|
|
9
8
|
import { MessagingProviderType } from '../enums/messaging-provider-type';
|
|
10
9
|
|
|
11
10
|
export class Users extends Service {
|
|
@@ -544,12 +543,12 @@ export class Users extends Service {
|
|
|
544
543
|
* @param {string} userId
|
|
545
544
|
* @param {string} email
|
|
546
545
|
* @param {string} password
|
|
547
|
-
* @param {
|
|
546
|
+
* @param {PasswordHash} passwordVersion
|
|
548
547
|
* @param {string} name
|
|
549
548
|
* @throws {AppwriteException}
|
|
550
549
|
* @returns {Promise}
|
|
551
550
|
*/
|
|
552
|
-
async createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?:
|
|
551
|
+
async createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string): Promise<Models.User<Preferences>> {
|
|
553
552
|
if (typeof userId === 'undefined') {
|
|
554
553
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
555
554
|
}
|
|
@@ -592,7 +591,7 @@ export class Users extends Service {
|
|
|
592
591
|
}
|
|
593
592
|
|
|
594
593
|
/**
|
|
595
|
-
* Get usage stats
|
|
594
|
+
* Get users usage stats
|
|
596
595
|
*
|
|
597
596
|
*
|
|
598
597
|
* @param {UserUsageRange} range
|
|
@@ -787,6 +786,7 @@ export class Users extends Service {
|
|
|
787
786
|
/**
|
|
788
787
|
* Update MFA
|
|
789
788
|
*
|
|
789
|
+
* Enable or disable MFA on a user account.
|
|
790
790
|
*
|
|
791
791
|
* @param {string} userId
|
|
792
792
|
* @param {boolean} mfa
|
|
@@ -818,35 +818,128 @@ export class Users extends Service {
|
|
|
818
818
|
/**
|
|
819
819
|
* Delete Authenticator
|
|
820
820
|
*
|
|
821
|
+
* Delete an authenticator app.
|
|
821
822
|
*
|
|
822
823
|
* @param {string} userId
|
|
823
|
-
* @param {
|
|
824
|
-
* @param {string} otp
|
|
824
|
+
* @param {AuthenticatorType} type
|
|
825
825
|
* @throws {AppwriteException}
|
|
826
826
|
* @returns {Promise}
|
|
827
827
|
*/
|
|
828
|
-
async
|
|
828
|
+
async deleteMfaAuthenticator<Preferences extends Models.Preferences>(userId: string, type: AuthenticatorType): Promise<Models.User<Preferences>> {
|
|
829
829
|
if (typeof userId === 'undefined') {
|
|
830
830
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
831
831
|
}
|
|
832
832
|
|
|
833
|
-
if (typeof
|
|
834
|
-
throw new AppwriteException('Missing required parameter: "
|
|
833
|
+
if (typeof type === 'undefined') {
|
|
834
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
835
835
|
}
|
|
836
836
|
|
|
837
|
-
|
|
838
|
-
|
|
837
|
+
const apiPath = '/users/{userId}/mfa/authenticators/{type}'.replace('{userId}', userId).replace('{type}', type);
|
|
838
|
+
const payload: Payload = {};
|
|
839
|
+
|
|
840
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
841
|
+
return await this.client.call('delete', uri, {
|
|
842
|
+
'content-type': 'application/json',
|
|
843
|
+
}, payload);
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* List Factors
|
|
848
|
+
*
|
|
849
|
+
* List the factors available on the account to be used as a MFA challange.
|
|
850
|
+
*
|
|
851
|
+
* @param {string} userId
|
|
852
|
+
* @throws {AppwriteException}
|
|
853
|
+
* @returns {Promise}
|
|
854
|
+
*/
|
|
855
|
+
async listMfaFactors(userId: string): Promise<Models.MfaFactors> {
|
|
856
|
+
if (typeof userId === 'undefined') {
|
|
857
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
839
858
|
}
|
|
840
859
|
|
|
841
|
-
const apiPath = '/users/{userId}/mfa/
|
|
860
|
+
const apiPath = '/users/{userId}/mfa/factors'.replace('{userId}', userId);
|
|
842
861
|
const payload: Payload = {};
|
|
843
862
|
|
|
844
|
-
|
|
845
|
-
|
|
863
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
864
|
+
return await this.client.call('get', uri, {
|
|
865
|
+
'content-type': 'application/json',
|
|
866
|
+
}, payload);
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* Get MFA Recovery Codes
|
|
871
|
+
*
|
|
872
|
+
* Get recovery codes that can be used as backup for MFA flow by User ID.
|
|
873
|
+
* Before getting codes, they must be generated using
|
|
874
|
+
* [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
|
|
875
|
+
* method.
|
|
876
|
+
*
|
|
877
|
+
* @param {string} userId
|
|
878
|
+
* @throws {AppwriteException}
|
|
879
|
+
* @returns {Promise}
|
|
880
|
+
*/
|
|
881
|
+
async getMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes> {
|
|
882
|
+
if (typeof userId === 'undefined') {
|
|
883
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
846
884
|
}
|
|
847
885
|
|
|
886
|
+
const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
|
|
887
|
+
const payload: Payload = {};
|
|
888
|
+
|
|
848
889
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
849
|
-
return await this.client.call('
|
|
890
|
+
return await this.client.call('get', uri, {
|
|
891
|
+
'content-type': 'application/json',
|
|
892
|
+
}, payload);
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Regenerate MFA Recovery Codes
|
|
897
|
+
*
|
|
898
|
+
* Regenerate recovery codes that can be used as backup for MFA flow by User
|
|
899
|
+
* ID. Before regenerating codes, they must be first generated using
|
|
900
|
+
* [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
|
|
901
|
+
* method.
|
|
902
|
+
*
|
|
903
|
+
* @param {string} userId
|
|
904
|
+
* @throws {AppwriteException}
|
|
905
|
+
* @returns {Promise}
|
|
906
|
+
*/
|
|
907
|
+
async updateMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes> {
|
|
908
|
+
if (typeof userId === 'undefined') {
|
|
909
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
|
|
913
|
+
const payload: Payload = {};
|
|
914
|
+
|
|
915
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
916
|
+
return await this.client.call('put', uri, {
|
|
917
|
+
'content-type': 'application/json',
|
|
918
|
+
}, payload);
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* Create MFA Recovery Codes
|
|
923
|
+
*
|
|
924
|
+
* Generate recovery codes used as backup for MFA flow for User ID. Recovery
|
|
925
|
+
* codes can be used as a MFA verification type in
|
|
926
|
+
* [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
|
|
927
|
+
* method by client SDK.
|
|
928
|
+
*
|
|
929
|
+
* @param {string} userId
|
|
930
|
+
* @throws {AppwriteException}
|
|
931
|
+
* @returns {Promise}
|
|
932
|
+
*/
|
|
933
|
+
async createMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes> {
|
|
934
|
+
if (typeof userId === 'undefined') {
|
|
935
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
|
|
939
|
+
const payload: Payload = {};
|
|
940
|
+
|
|
941
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
942
|
+
return await this.client.call('patch', uri, {
|
|
850
943
|
'content-type': 'application/json',
|
|
851
944
|
}, payload);
|
|
852
945
|
}
|
|
@@ -1004,28 +1097,6 @@ export class Users extends Service {
|
|
|
1004
1097
|
}, payload);
|
|
1005
1098
|
}
|
|
1006
1099
|
|
|
1007
|
-
/**
|
|
1008
|
-
* List Providers
|
|
1009
|
-
*
|
|
1010
|
-
*
|
|
1011
|
-
* @param {string} userId
|
|
1012
|
-
* @throws {AppwriteException}
|
|
1013
|
-
* @returns {Promise}
|
|
1014
|
-
*/
|
|
1015
|
-
async listProviders(userId: string): Promise<Models.MfaProviders> {
|
|
1016
|
-
if (typeof userId === 'undefined') {
|
|
1017
|
-
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
const apiPath = '/users/{userId}/providers'.replace('{userId}', userId);
|
|
1021
|
-
const payload: Payload = {};
|
|
1022
|
-
|
|
1023
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1024
|
-
return await this.client.call('get', uri, {
|
|
1025
|
-
'content-type': 'application/json',
|
|
1026
|
-
}, payload);
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
1100
|
/**
|
|
1030
1101
|
* List user sessions
|
|
1031
1102
|
*
|
|
@@ -1164,6 +1235,7 @@ export class Users extends Service {
|
|
|
1164
1235
|
/**
|
|
1165
1236
|
* List User Targets
|
|
1166
1237
|
*
|
|
1238
|
+
* List the messaging targets that are associated with a user.
|
|
1167
1239
|
*
|
|
1168
1240
|
* @param {string} userId
|
|
1169
1241
|
* @param {string[]} queries
|
|
@@ -1191,6 +1263,7 @@ export class Users extends Service {
|
|
|
1191
1263
|
/**
|
|
1192
1264
|
* Create User Target
|
|
1193
1265
|
*
|
|
1266
|
+
* Create a messaging target.
|
|
1194
1267
|
*
|
|
1195
1268
|
* @param {string} userId
|
|
1196
1269
|
* @param {string} targetId
|
|
@@ -1250,6 +1323,7 @@ export class Users extends Service {
|
|
|
1250
1323
|
/**
|
|
1251
1324
|
* Get User Target
|
|
1252
1325
|
*
|
|
1326
|
+
* Get a user's push notification target by ID.
|
|
1253
1327
|
*
|
|
1254
1328
|
* @param {string} userId
|
|
1255
1329
|
* @param {string} targetId
|
|
@@ -1277,6 +1351,7 @@ export class Users extends Service {
|
|
|
1277
1351
|
/**
|
|
1278
1352
|
* Update User target
|
|
1279
1353
|
*
|
|
1354
|
+
* Update a messaging target.
|
|
1280
1355
|
*
|
|
1281
1356
|
* @param {string} userId
|
|
1282
1357
|
* @param {string} targetId
|
|
@@ -1319,6 +1394,7 @@ export class Users extends Service {
|
|
|
1319
1394
|
/**
|
|
1320
1395
|
* Delete user target
|
|
1321
1396
|
*
|
|
1397
|
+
* Delete a messaging target.
|
|
1322
1398
|
*
|
|
1323
1399
|
* @param {string} userId
|
|
1324
1400
|
* @param {string} targetId
|
package/src/services/vcs.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import type { UploadProgress, Payload } from '../client';
|
|
5
|
-
import { Query } from '../query';
|
|
6
5
|
|
|
7
6
|
export class Vcs extends Service {
|
|
8
7
|
|