@appwrite.io/console 0.6.0-rc.8 → 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 +6 -6
- package/dist/cjs/sdk.js +1839 -338
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1840 -339
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +1839 -338
- package/docs/examples/account/create-anonymous-session.md +5 -12
- package/docs/examples/account/create-email-password-session.md +8 -12
- package/docs/examples/account/create-email-token.md +9 -12
- package/docs/examples/account/create-j-w-t.md +5 -12
- package/docs/examples/account/create-magic-u-r-l-token.md +10 -12
- 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 +8 -12
- package/docs/examples/account/create-phone-verification.md +5 -12
- package/docs/examples/account/create-push-target.md +9 -12
- package/docs/examples/account/create-recovery.md +8 -12
- package/docs/examples/account/create-session.md +8 -12
- package/docs/examples/account/create-verification.md +7 -12
- package/docs/examples/account/create.md +10 -12
- package/docs/examples/account/delete-identity.md +7 -12
- package/docs/examples/account/delete-mfa-authenticator.md +14 -0
- package/docs/examples/account/delete-push-target.md +13 -0
- package/docs/examples/account/delete-session.md +7 -12
- package/docs/examples/account/delete-sessions.md +5 -12
- package/docs/examples/account/delete.md +5 -12
- package/docs/examples/account/get-mfa-recovery-codes.md +11 -0
- package/docs/examples/account/get-prefs.md +5 -12
- package/docs/examples/account/get-session.md +7 -12
- package/docs/examples/account/get.md +5 -12
- package/docs/examples/account/list-identities.md +7 -12
- package/docs/examples/account/list-logs.md +7 -12
- package/docs/examples/account/list-mfa-factors.md +11 -0
- package/docs/examples/account/list-sessions.md +5 -12
- package/docs/examples/account/update-email.md +8 -12
- package/docs/examples/account/update-m-f-a.md +7 -12
- package/docs/examples/account/update-magic-u-r-l-session.md +8 -12
- 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 +7 -12
- package/docs/examples/account/update-password.md +8 -12
- package/docs/examples/account/update-phone-session.md +14 -0
- package/docs/examples/account/update-phone-verification.md +8 -12
- package/docs/examples/account/update-phone.md +8 -12
- package/docs/examples/account/update-prefs.md +7 -12
- package/docs/examples/account/update-push-target.md +8 -12
- package/docs/examples/account/update-recovery.md +9 -12
- package/docs/examples/account/update-session.md +7 -12
- package/docs/examples/account/update-status.md +5 -12
- package/docs/examples/account/update-verification.md +8 -12
- package/docs/examples/assistant/chat.md +7 -12
- 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 +7 -8
- package/docs/examples/avatars/get-flag.md +11 -9
- package/docs/examples/avatars/get-image.md +9 -8
- package/docs/examples/avatars/get-initials.md +10 -8
- package/docs/examples/avatars/get-q-r.md +10 -8
- package/docs/examples/console/variables.md +5 -12
- package/docs/examples/databases/create-boolean-attribute.md +12 -12
- package/docs/examples/databases/create-collection.md +12 -12
- package/docs/examples/databases/create-datetime-attribute.md +12 -12
- package/docs/examples/databases/create-document.md +11 -12
- package/docs/examples/databases/create-email-attribute.md +12 -12
- package/docs/examples/databases/create-enum-attribute.md +13 -12
- package/docs/examples/databases/create-float-attribute.md +14 -12
- package/docs/examples/databases/create-index.md +13 -13
- package/docs/examples/databases/create-integer-attribute.md +14 -12
- package/docs/examples/databases/create-ip-attribute.md +12 -12
- package/docs/examples/databases/create-relationship-attribute.md +15 -13
- package/docs/examples/databases/create-string-attribute.md +14 -12
- package/docs/examples/databases/create-url-attribute.md +12 -12
- package/docs/examples/databases/create.md +9 -12
- package/docs/examples/databases/delete-attribute.md +9 -12
- package/docs/examples/databases/delete-collection.md +8 -12
- package/docs/examples/databases/delete-document.md +9 -12
- package/docs/examples/databases/delete-index.md +9 -12
- package/docs/examples/databases/delete.md +7 -12
- package/docs/examples/databases/get-attribute.md +9 -12
- package/docs/examples/databases/get-collection-usage.md +10 -13
- package/docs/examples/databases/get-collection.md +8 -12
- package/docs/examples/databases/get-database-usage.md +9 -13
- package/docs/examples/databases/get-document.md +10 -12
- package/docs/examples/databases/get-index.md +9 -12
- package/docs/examples/databases/get-usage.md +8 -13
- package/docs/examples/databases/get.md +7 -12
- package/docs/examples/databases/list-attributes.md +9 -12
- package/docs/examples/databases/list-collection-logs.md +9 -12
- package/docs/examples/databases/list-collections.md +9 -12
- package/docs/examples/databases/list-document-logs.md +10 -12
- package/docs/examples/databases/list-documents.md +9 -12
- package/docs/examples/databases/list-indexes.md +9 -12
- package/docs/examples/databases/list-logs.md +8 -12
- package/docs/examples/databases/list.md +8 -12
- package/docs/examples/databases/update-boolean-attribute.md +11 -12
- package/docs/examples/databases/update-collection.md +12 -12
- package/docs/examples/databases/update-datetime-attribute.md +11 -12
- package/docs/examples/databases/update-document.md +11 -12
- package/docs/examples/databases/update-email-attribute.md +11 -12
- package/docs/examples/databases/update-enum-attribute.md +12 -12
- package/docs/examples/databases/update-float-attribute.md +13 -12
- package/docs/examples/databases/update-integer-attribute.md +13 -12
- package/docs/examples/databases/update-ip-attribute.md +11 -12
- package/docs/examples/databases/update-relationship-attribute.md +11 -13
- package/docs/examples/databases/update-string-attribute.md +11 -12
- package/docs/examples/databases/update-url-attribute.md +11 -12
- package/docs/examples/databases/update.md +9 -12
- package/docs/examples/functions/create-build.md +9 -12
- package/docs/examples/functions/create-deployment.md +11 -12
- package/docs/examples/functions/create-execution.md +13 -13
- package/docs/examples/functions/create-variable.md +9 -12
- package/docs/examples/functions/create.md +27 -13
- package/docs/examples/functions/delete-deployment.md +8 -12
- package/docs/examples/functions/delete-variable.md +8 -12
- package/docs/examples/functions/delete.md +7 -12
- package/docs/examples/functions/download-deployment.md +8 -8
- package/docs/examples/functions/get-deployment.md +8 -12
- package/docs/examples/functions/get-execution.md +8 -12
- 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 +8 -12
- package/docs/examples/functions/get.md +7 -12
- package/docs/examples/functions/list-deployments.md +9 -12
- package/docs/examples/functions/list-executions.md +9 -12
- package/docs/examples/functions/list-runtimes.md +5 -12
- package/docs/examples/functions/list-variables.md +7 -12
- package/docs/examples/functions/list.md +8 -12
- package/docs/examples/functions/update-deployment.md +8 -12
- package/docs/examples/functions/update-variable.md +10 -12
- package/docs/examples/functions/update.md +23 -13
- package/docs/examples/graphql/mutation.md +7 -12
- package/docs/examples/graphql/query.md +7 -12
- package/docs/examples/health/get-antivirus.md +5 -12
- package/docs/examples/health/get-cache.md +5 -12
- package/docs/examples/health/get-certificate.md +13 -0
- package/docs/examples/health/get-d-b.md +5 -12
- package/docs/examples/health/get-failed-jobs.md +14 -0
- package/docs/examples/health/get-pub-sub.md +5 -12
- package/docs/examples/health/get-queue-builds.md +7 -12
- package/docs/examples/health/get-queue-certificates.md +7 -12
- package/docs/examples/health/get-queue-databases.md +8 -12
- package/docs/examples/health/get-queue-deletes.md +7 -12
- package/docs/examples/health/get-queue-functions.md +7 -12
- package/docs/examples/health/get-queue-logs.md +7 -12
- package/docs/examples/health/get-queue-mails.md +7 -12
- package/docs/examples/health/get-queue-messaging.md +7 -12
- package/docs/examples/health/get-queue-migrations.md +7 -12
- 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 +7 -12
- package/docs/examples/health/get-queue.md +5 -12
- package/docs/examples/health/get-storage-local.md +5 -12
- package/docs/examples/health/get-storage.md +11 -0
- package/docs/examples/health/get-time.md +5 -12
- package/docs/examples/health/get.md +5 -12
- package/docs/examples/locale/get.md +5 -12
- package/docs/examples/locale/list-codes.md +5 -12
- package/docs/examples/locale/list-continents.md +5 -12
- package/docs/examples/locale/list-countries-e-u.md +5 -12
- package/docs/examples/locale/list-countries-phones.md +5 -12
- package/docs/examples/locale/list-countries.md +5 -12
- package/docs/examples/locale/list-currencies.md +5 -12
- package/docs/examples/locale/list-languages.md +5 -12
- package/docs/examples/messaging/create-apns-provider.md +20 -0
- package/docs/examples/messaging/create-email.md +18 -12
- package/docs/examples/messaging/create-fcm-provider.md +16 -0
- package/docs/examples/messaging/create-mailgun-provider.md +16 -12
- package/docs/examples/messaging/create-msg91provider.md +12 -12
- package/docs/examples/messaging/create-push.md +22 -12
- package/docs/examples/messaging/create-sendgrid-provider.md +14 -12
- 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 +9 -12
- package/docs/examples/messaging/create-telesign-provider.md +12 -12
- package/docs/examples/messaging/create-textmagic-provider.md +12 -12
- package/docs/examples/messaging/create-topic.md +9 -12
- package/docs/examples/messaging/create-twilio-provider.md +12 -12
- package/docs/examples/messaging/create-vonage-provider.md +12 -12
- package/docs/examples/messaging/delete-provider.md +7 -12
- package/docs/examples/messaging/delete-subscriber.md +8 -12
- package/docs/examples/messaging/delete-topic.md +7 -12
- package/docs/examples/messaging/delete.md +13 -0
- package/docs/examples/messaging/get-message.md +7 -12
- package/docs/examples/messaging/get-provider.md +7 -12
- package/docs/examples/messaging/get-subscriber.md +8 -12
- package/docs/examples/messaging/get-topic.md +7 -12
- package/docs/examples/messaging/list-message-logs.md +8 -12
- package/docs/examples/messaging/list-messages.md +8 -12
- package/docs/examples/messaging/list-provider-logs.md +8 -12
- package/docs/examples/messaging/list-providers.md +8 -12
- package/docs/examples/messaging/list-subscriber-logs.md +8 -12
- package/docs/examples/messaging/list-subscribers.md +9 -12
- package/docs/examples/messaging/list-targets.md +8 -12
- package/docs/examples/messaging/list-topic-logs.md +8 -12
- package/docs/examples/messaging/list-topics.md +8 -12
- package/docs/examples/messaging/update-apns-provider.md +20 -0
- package/docs/examples/messaging/update-email.md +17 -12
- package/docs/examples/messaging/update-fcm-provider.md +16 -0
- package/docs/examples/messaging/update-mailgun-provider.md +16 -12
- package/docs/examples/messaging/update-msg91provider.md +12 -12
- package/docs/examples/messaging/update-push.md +28 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +14 -12
- 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 +12 -12
- package/docs/examples/messaging/update-textmagic-provider.md +12 -12
- package/docs/examples/messaging/update-topic.md +9 -12
- package/docs/examples/messaging/update-twilio-provider.md +12 -12
- package/docs/examples/messaging/update-vonage-provider.md +12 -12
- package/docs/examples/migrations/create-appwrite-migration.md +10 -12
- package/docs/examples/migrations/create-firebase-migration.md +8 -12
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +8 -12
- package/docs/examples/migrations/create-n-host-migration.md +14 -12
- package/docs/examples/migrations/create-supabase-migration.md +13 -12
- package/docs/examples/migrations/delete-firebase-auth.md +5 -12
- package/docs/examples/migrations/delete.md +7 -12
- package/docs/examples/migrations/get-appwrite-report.md +10 -12
- package/docs/examples/migrations/get-firebase-report-o-auth.md +8 -12
- package/docs/examples/migrations/get-firebase-report.md +8 -12
- package/docs/examples/migrations/get-n-host-report.md +14 -12
- package/docs/examples/migrations/get-supabase-report.md +13 -12
- package/docs/examples/migrations/get.md +7 -12
- package/docs/examples/migrations/list-firebase-projects.md +5 -12
- package/docs/examples/migrations/list.md +8 -12
- package/docs/examples/migrations/retry.md +7 -12
- package/docs/examples/project/create-variable.md +8 -12
- package/docs/examples/project/delete-variable.md +7 -12
- package/docs/examples/project/get-usage.md +10 -13
- package/docs/examples/project/get-variable.md +7 -12
- package/docs/examples/project/list-variables.md +5 -12
- package/docs/examples/project/update-variable.md +9 -12
- package/docs/examples/projects/create-key.md +10 -12
- 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 +14 -12
- 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 +8 -12
- package/docs/examples/projects/delete-platform.md +8 -12
- package/docs/examples/projects/delete-sms-template.md +10 -13
- package/docs/examples/projects/delete-webhook.md +8 -12
- package/docs/examples/projects/delete.md +7 -12
- package/docs/examples/projects/get-email-template.md +10 -13
- package/docs/examples/projects/get-key.md +8 -12
- package/docs/examples/projects/get-platform.md +8 -12
- package/docs/examples/projects/get-sms-template.md +10 -13
- package/docs/examples/projects/get-webhook.md +8 -12
- package/docs/examples/projects/get.md +7 -12
- package/docs/examples/projects/list-keys.md +7 -12
- package/docs/examples/projects/list-platforms.md +7 -12
- package/docs/examples/projects/list-webhooks.md +7 -12
- package/docs/examples/projects/list.md +8 -12
- 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 +8 -12
- package/docs/examples/projects/update-auth-limit.md +8 -12
- package/docs/examples/projects/update-auth-password-dictionary.md +8 -12
- package/docs/examples/projects/update-auth-password-history.md +8 -12
- package/docs/examples/projects/update-auth-sessions-limit.md +8 -12
- 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 +11 -12
- package/docs/examples/projects/update-o-auth2.md +12 -13
- package/docs/examples/projects/update-personal-data-check.md +8 -12
- package/docs/examples/projects/update-platform.md +12 -12
- package/docs/examples/projects/update-service-status-all.md +8 -12
- 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 +8 -12
- package/docs/examples/projects/update-webhook-signature.md +8 -12
- package/docs/examples/projects/update-webhook.md +15 -12
- package/docs/examples/projects/update.md +17 -12
- package/docs/examples/proxy/create-rule.md +10 -13
- package/docs/examples/proxy/delete-rule.md +7 -12
- package/docs/examples/proxy/get-rule.md +7 -12
- package/docs/examples/proxy/list-rules.md +8 -12
- package/docs/examples/proxy/update-rule-verification.md +7 -12
- package/docs/examples/storage/create-bucket.md +17 -13
- package/docs/examples/storage/create-file.md +10 -12
- package/docs/examples/storage/delete-bucket.md +7 -12
- package/docs/examples/storage/delete-file.md +8 -12
- package/docs/examples/storage/get-bucket-usage.md +9 -13
- package/docs/examples/storage/get-bucket.md +7 -12
- package/docs/examples/storage/get-file-download.md +8 -8
- package/docs/examples/storage/get-file-preview.md +20 -9
- package/docs/examples/storage/get-file-view.md +8 -8
- package/docs/examples/storage/get-file.md +8 -12
- package/docs/examples/storage/get-usage.md +8 -13
- package/docs/examples/storage/list-buckets.md +8 -12
- package/docs/examples/storage/list-files.md +9 -12
- package/docs/examples/storage/update-bucket.md +17 -13
- package/docs/examples/storage/update-file.md +10 -12
- package/docs/examples/teams/create-membership.md +13 -12
- package/docs/examples/teams/create.md +9 -12
- package/docs/examples/teams/delete-membership.md +8 -12
- package/docs/examples/teams/delete.md +7 -12
- package/docs/examples/teams/get-membership.md +8 -12
- package/docs/examples/teams/get-prefs.md +7 -12
- package/docs/examples/teams/get.md +7 -12
- package/docs/examples/teams/list-logs.md +8 -12
- package/docs/examples/teams/list-memberships.md +9 -12
- package/docs/examples/teams/list.md +8 -12
- package/docs/examples/teams/update-membership-status.md +10 -12
- package/docs/examples/teams/update-membership.md +9 -12
- package/docs/examples/teams/update-name.md +8 -12
- package/docs/examples/teams/update-prefs.md +8 -12
- package/docs/examples/users/create-argon2user.md +10 -12
- package/docs/examples/users/create-bcrypt-user.md +10 -12
- package/docs/examples/users/create-m-d5user.md +10 -12
- package/docs/examples/users/create-mfa-recovery-codes.md +13 -0
- package/docs/examples/users/create-p-h-pass-user.md +10 -12
- package/docs/examples/users/create-s-h-a-user.md +12 -13
- package/docs/examples/users/create-scrypt-modified-user.md +13 -12
- package/docs/examples/users/create-scrypt-user.md +15 -12
- package/docs/examples/users/create-session.md +7 -12
- package/docs/examples/users/create-target.md +13 -13
- package/docs/examples/users/create-token.md +9 -12
- package/docs/examples/users/create.md +11 -12
- package/docs/examples/users/delete-identity.md +7 -12
- package/docs/examples/users/delete-mfa-authenticator.md +14 -0
- package/docs/examples/users/delete-session.md +8 -12
- package/docs/examples/users/delete-sessions.md +7 -12
- package/docs/examples/users/delete-target.md +8 -12
- package/docs/examples/users/delete.md +7 -12
- package/docs/examples/users/get-mfa-recovery-codes.md +13 -0
- package/docs/examples/users/get-prefs.md +7 -12
- package/docs/examples/users/get-target.md +8 -12
- package/docs/examples/users/get-usage.md +8 -13
- package/docs/examples/users/get.md +7 -12
- package/docs/examples/users/list-identities.md +8 -12
- package/docs/examples/users/list-logs.md +8 -12
- package/docs/examples/users/list-memberships.md +7 -12
- package/docs/examples/users/list-mfa-factors.md +13 -0
- package/docs/examples/users/list-sessions.md +7 -12
- package/docs/examples/users/list-targets.md +8 -12
- package/docs/examples/users/list.md +8 -12
- package/docs/examples/users/update-email-verification.md +8 -12
- package/docs/examples/users/update-email.md +8 -12
- package/docs/examples/users/update-labels.md +8 -12
- package/docs/examples/users/update-mfa-recovery-codes.md +13 -0
- package/docs/examples/users/update-mfa.md +8 -12
- package/docs/examples/users/update-name.md +8 -12
- package/docs/examples/users/update-password.md +8 -12
- package/docs/examples/users/update-phone-verification.md +8 -12
- package/docs/examples/users/update-phone.md +8 -12
- package/docs/examples/users/update-prefs.md +8 -12
- package/docs/examples/users/update-status.md +8 -12
- package/docs/examples/users/update-target.md +11 -12
- package/docs/examples/vcs/create-repository-detection.md +9 -12
- package/docs/examples/vcs/create-repository.md +9 -12
- package/docs/examples/vcs/delete-installation.md +7 -12
- package/docs/examples/vcs/get-installation.md +7 -12
- package/docs/examples/vcs/get-repository.md +8 -12
- package/docs/examples/vcs/list-installations.md +8 -12
- package/docs/examples/vcs/list-repositories.md +8 -12
- package/docs/examples/vcs/list-repository-branches.md +8 -12
- package/docs/examples/vcs/update-external-deployments.md +9 -12
- package/package.json +1 -1
- package/src/client.ts +3 -3
- package/src/enums/api-service.ts +13 -0
- package/src/enums/api.ts +5 -0
- package/src/enums/auth-method.ts +9 -0
- package/src/enums/authentication-factor.ts +6 -0
- package/src/enums/authenticator-type.ts +3 -0
- package/src/enums/browser.ts +16 -0
- package/src/enums/compression.ts +5 -0
- package/src/enums/credit-card.ts +18 -0
- package/src/enums/database-usage-range.ts +5 -0
- package/src/enums/email-template-locale.ts +133 -0
- package/src/enums/email-template-type.ts +7 -0
- package/src/enums/execution-method.ts +8 -0
- package/src/enums/flag.ts +196 -0
- package/src/enums/function-usage-range.ts +5 -0
- package/src/enums/image-format.ts +7 -0
- package/src/enums/image-gravity.ts +11 -0
- package/src/enums/index-type.ts +5 -0
- package/src/enums/messaging-provider-type.ts +5 -0
- package/src/enums/name.ts +15 -0
- package/src/enums/o-auth-provider.ts +41 -0
- package/src/enums/password-hash.ts +13 -0
- package/src/enums/platform-type.ts +15 -0
- package/src/enums/project-usage-range.ts +4 -0
- package/src/enums/region.ts +4 -0
- package/src/enums/relation-mutate.ts +5 -0
- package/src/enums/relationship-type.ts +6 -0
- package/src/enums/resource-type.ts +4 -0
- package/src/enums/runtime.ts +46 -0
- package/src/enums/s-m-t-p-secure.ts +3 -0
- package/src/enums/sms-template-locale.ts +133 -0
- package/src/enums/sms-template-type.ts +6 -0
- package/src/enums/smtp-encryption.ts +5 -0
- package/src/enums/storage-usage-range.ts +5 -0
- package/src/enums/user-usage-range.ts +5 -0
- package/src/index.ts +35 -1
- package/src/models.ts +61 -23
- package/src/query.ts +61 -34
- package/src/service.ts +4 -7
- package/src/services/account.ts +274 -75
- package/src/services/avatars.ts +9 -6
- package/src/services/databases.ts +37 -16
- package/src/services/functions.ts +13 -10
- package/src/services/health.ts +121 -0
- package/src/services/messaging.ts +374 -117
- package/src/services/migrations.ts +2 -2
- package/src/services/project.ts +4 -3
- package/src/services/projects.ts +110 -59
- package/src/services/proxy.ts +3 -2
- package/src/services/storage.ts +17 -13
- package/src/services/users.ts +125 -44
- package/types/enums/api-service.d.ts +13 -0
- package/types/enums/api.d.ts +5 -0
- package/types/enums/auth-method.d.ts +9 -0
- package/types/enums/authentication-factor.d.ts +6 -0
- package/types/enums/authenticator-type.d.ts +3 -0
- package/types/enums/browser.d.ts +16 -0
- package/types/enums/compression.d.ts +5 -0
- package/types/enums/credit-card.d.ts +18 -0
- package/types/enums/database-usage-range.d.ts +5 -0
- package/types/enums/email-template-locale.d.ts +133 -0
- package/types/enums/email-template-type.d.ts +7 -0
- package/types/enums/execution-method.d.ts +8 -0
- package/types/enums/flag.d.ts +196 -0
- package/types/enums/function-usage-range.d.ts +5 -0
- package/types/enums/image-format.d.ts +7 -0
- package/types/enums/image-gravity.d.ts +11 -0
- package/types/enums/index-type.d.ts +5 -0
- package/types/enums/messaging-provider-type.d.ts +5 -0
- package/types/enums/name.d.ts +15 -0
- package/types/enums/o-auth-provider.d.ts +41 -0
- package/types/enums/password-hash.d.ts +13 -0
- package/types/enums/platform-type.d.ts +15 -0
- package/types/enums/project-usage-range.d.ts +4 -0
- package/types/enums/region.d.ts +4 -0
- package/types/enums/relation-mutate.d.ts +5 -0
- package/types/enums/relationship-type.d.ts +6 -0
- package/types/enums/resource-type.d.ts +4 -0
- package/types/enums/runtime.d.ts +46 -0
- package/types/enums/s-m-t-p-secure.d.ts +3 -0
- package/types/enums/sms-template-locale.d.ts +133 -0
- package/types/enums/sms-template-type.d.ts +6 -0
- package/types/enums/smtp-encryption.d.ts +5 -0
- package/types/enums/storage-usage-range.d.ts +5 -0
- package/types/enums/user-usage-range.d.ts +5 -0
- package/types/index.d.ts +34 -0
- package/types/models.d.ts +61 -23
- package/types/query.d.ts +10 -3
- package/types/services/account.d.ts +138 -33
- package/types/services/avatars.d.ts +9 -6
- package/types/services/databases.d.ts +37 -16
- package/types/services/functions.d.ts +13 -10
- package/types/services/health.d.ts +56 -0
- package/types/services/messaging.d.ts +170 -64
- package/types/services/migrations.d.ts +2 -2
- package/types/services/project.d.ts +4 -3
- package/types/services/projects.d.ts +64 -42
- package/types/services/proxy.d.ts +3 -2
- package/types/services/storage.d.ts +17 -13
- package/types/services/users.d.ts +73 -23
- 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-providers.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/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-push-notification.md +0 -18
- package/docs/examples/messaging/update-s-m-s.md +0 -18
- package/docs/examples/projects/update-auth-mfa-factors.md +0 -18
- package/docs/examples/users/delete-authenticator.md +0 -18
- package/docs/examples/users/list-providers.md +0 -18
package/dist/cjs/sdk.js
CHANGED
|
@@ -34,11 +34,10 @@ class Service {
|
|
|
34
34
|
}
|
|
35
35
|
static flatten(data, prefix = '') {
|
|
36
36
|
let output = {};
|
|
37
|
-
for (const key
|
|
38
|
-
let
|
|
39
|
-
let finalKey = prefix ? `${prefix}[${key}]` : key;
|
|
37
|
+
for (const [key, value] of Object.entries(data)) {
|
|
38
|
+
let finalKey = prefix ? prefix + '[' + key + ']' : key;
|
|
40
39
|
if (Array.isArray(value)) {
|
|
41
|
-
output = Object.assign(output,
|
|
40
|
+
output = Object.assign(Object.assign({}, output), Service.flatten(value, finalKey));
|
|
42
41
|
}
|
|
43
42
|
else {
|
|
44
43
|
output[finalKey] = value;
|
|
@@ -50,34 +49,48 @@ class Service {
|
|
|
50
49
|
Service.CHUNK_SIZE = 5 * 1024 * 1024; // 5MB
|
|
51
50
|
|
|
52
51
|
class Query {
|
|
52
|
+
constructor(method, attribute, values) {
|
|
53
|
+
this.method = method;
|
|
54
|
+
this.attribute = attribute;
|
|
55
|
+
if (values !== undefined) {
|
|
56
|
+
if (Array.isArray(values)) {
|
|
57
|
+
this.values = values;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.values = [values];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
toString() {
|
|
65
|
+
return JSON.stringify({
|
|
66
|
+
method: this.method,
|
|
67
|
+
attribute: this.attribute,
|
|
68
|
+
values: this.values,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
53
71
|
}
|
|
54
|
-
Query.equal = (attribute, value) => Query
|
|
55
|
-
Query.notEqual = (attribute, value) => Query
|
|
56
|
-
Query.lessThan = (attribute, value) => Query
|
|
57
|
-
Query.lessThanEqual = (attribute, value) => Query
|
|
58
|
-
Query.greaterThan = (attribute, value) => Query
|
|
59
|
-
Query.greaterThanEqual = (attribute, value) => Query
|
|
60
|
-
Query.isNull = (attribute) =>
|
|
61
|
-
Query.isNotNull = (attribute) =>
|
|
62
|
-
Query.between = (attribute, start, end) =>
|
|
63
|
-
Query.startsWith = (attribute, value) => Query
|
|
64
|
-
Query.endsWith = (attribute, value) => Query
|
|
65
|
-
Query.select = (attributes) =>
|
|
66
|
-
Query.search = (attribute, value) => Query
|
|
67
|
-
Query.orderDesc = (attribute) =>
|
|
68
|
-
Query.orderAsc = (attribute) =>
|
|
69
|
-
Query.cursorAfter = (documentId) =>
|
|
70
|
-
Query.cursorBefore = (documentId) =>
|
|
71
|
-
Query.limit = (limit) =>
|
|
72
|
-
Query.offset = (offset) =>
|
|
73
|
-
Query.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
.join(",")}])`
|
|
77
|
-
: `${method}("${attribute}", [${Query.parseValues(value)}])`;
|
|
78
|
-
Query.parseValues = (value) => typeof value === "string" || value instanceof String
|
|
79
|
-
? `"${value}"`
|
|
80
|
-
: `${value}`;
|
|
72
|
+
Query.equal = (attribute, value) => new Query("equal", attribute, value).toString();
|
|
73
|
+
Query.notEqual = (attribute, value) => new Query("notEqual", attribute, value).toString();
|
|
74
|
+
Query.lessThan = (attribute, value) => new Query("lessThan", attribute, value).toString();
|
|
75
|
+
Query.lessThanEqual = (attribute, value) => new Query("lessThanEqual", attribute, value).toString();
|
|
76
|
+
Query.greaterThan = (attribute, value) => new Query("greaterThan", attribute, value).toString();
|
|
77
|
+
Query.greaterThanEqual = (attribute, value) => new Query("greaterThanEqual", attribute, value).toString();
|
|
78
|
+
Query.isNull = (attribute) => new Query("isNull", attribute).toString();
|
|
79
|
+
Query.isNotNull = (attribute) => new Query("isNotNull", attribute).toString();
|
|
80
|
+
Query.between = (attribute, start, end) => new Query("between", attribute, [start, end]).toString();
|
|
81
|
+
Query.startsWith = (attribute, value) => new Query("startsWith", attribute, value).toString();
|
|
82
|
+
Query.endsWith = (attribute, value) => new Query("endsWith", attribute, value).toString();
|
|
83
|
+
Query.select = (attributes) => new Query("select", undefined, attributes).toString();
|
|
84
|
+
Query.search = (attribute, value) => new Query("search", attribute, value).toString();
|
|
85
|
+
Query.orderDesc = (attribute) => new Query("orderDesc", attribute).toString();
|
|
86
|
+
Query.orderAsc = (attribute) => new Query("orderAsc", attribute).toString();
|
|
87
|
+
Query.cursorAfter = (documentId) => new Query("cursorAfter", undefined, documentId).toString();
|
|
88
|
+
Query.cursorBefore = (documentId) => new Query("cursorBefore", undefined, documentId).toString();
|
|
89
|
+
Query.limit = (limit) => new Query("limit", undefined, limit).toString();
|
|
90
|
+
Query.offset = (offset) => new Query("offset", undefined, offset).toString();
|
|
91
|
+
Query.contains = (attribute, value) => new Query("contains", attribute, value).toString();
|
|
92
|
+
Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
|
|
93
|
+
Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
|
|
81
94
|
|
|
82
95
|
class AppwriteException extends Error {
|
|
83
96
|
constructor(message, code = 0, type = '', response = '') {
|
|
@@ -92,7 +105,7 @@ class AppwriteException extends Error {
|
|
|
92
105
|
class Client {
|
|
93
106
|
constructor() {
|
|
94
107
|
this.config = {
|
|
95
|
-
endpoint: 'https://
|
|
108
|
+
endpoint: 'https://cloud.appwrite.io/v1',
|
|
96
109
|
endpointRealtime: '',
|
|
97
110
|
project: '',
|
|
98
111
|
key: '',
|
|
@@ -104,8 +117,8 @@ class Client {
|
|
|
104
117
|
'x-sdk-name': 'Console',
|
|
105
118
|
'x-sdk-platform': 'console',
|
|
106
119
|
'x-sdk-language': 'web',
|
|
107
|
-
'x-sdk-version': '0.6.0
|
|
108
|
-
'X-Appwrite-Response-Format': '1.
|
|
120
|
+
'x-sdk-version': '0.6.0',
|
|
121
|
+
'X-Appwrite-Response-Format': '1.5.0',
|
|
109
122
|
};
|
|
110
123
|
this.realtime = {
|
|
111
124
|
socket: undefined,
|
|
@@ -570,7 +583,7 @@ class Account extends Service {
|
|
|
570
583
|
*
|
|
571
584
|
* Get the list of identities for the currently logged in user.
|
|
572
585
|
*
|
|
573
|
-
* @param {string} queries
|
|
586
|
+
* @param {string[]} queries
|
|
574
587
|
* @throws {AppwriteException}
|
|
575
588
|
* @returns {Promise}
|
|
576
589
|
*/
|
|
@@ -657,6 +670,7 @@ class Account extends Service {
|
|
|
657
670
|
/**
|
|
658
671
|
* Update MFA
|
|
659
672
|
*
|
|
673
|
+
* Enable or disable MFA on an account.
|
|
660
674
|
*
|
|
661
675
|
* @param {boolean} mfa
|
|
662
676
|
* @throws {AppwriteException}
|
|
@@ -679,23 +693,24 @@ class Account extends Service {
|
|
|
679
693
|
});
|
|
680
694
|
}
|
|
681
695
|
/**
|
|
682
|
-
*
|
|
696
|
+
* Add Authenticator
|
|
683
697
|
*
|
|
698
|
+
* Add an authenticator app to be used as an MFA factor. Verify the
|
|
699
|
+
* authenticator using the [verify
|
|
700
|
+
* authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
|
|
701
|
+
* method.
|
|
684
702
|
*
|
|
685
|
-
* @param {
|
|
703
|
+
* @param {AuthenticatorType} type
|
|
686
704
|
* @throws {AppwriteException}
|
|
687
705
|
* @returns {Promise}
|
|
688
706
|
*/
|
|
689
|
-
|
|
707
|
+
createMfaAuthenticator(type) {
|
|
690
708
|
return __awaiter(this, void 0, void 0, function* () {
|
|
691
|
-
if (typeof
|
|
692
|
-
throw new AppwriteException('Missing required parameter: "
|
|
709
|
+
if (typeof type === 'undefined') {
|
|
710
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
693
711
|
}
|
|
694
|
-
const apiPath = '/account/mfa/
|
|
712
|
+
const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
|
|
695
713
|
const payload = {};
|
|
696
|
-
if (typeof provider !== 'undefined') {
|
|
697
|
-
payload['provider'] = provider;
|
|
698
|
-
}
|
|
699
714
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
700
715
|
return yield this.client.call('post', uri, {
|
|
701
716
|
'content-type': 'application/json',
|
|
@@ -703,27 +718,27 @@ class Account extends Service {
|
|
|
703
718
|
});
|
|
704
719
|
}
|
|
705
720
|
/**
|
|
706
|
-
*
|
|
721
|
+
* Verify Authenticator
|
|
707
722
|
*
|
|
723
|
+
* Verify an authenticator app after adding it using the [add
|
|
724
|
+
* authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
|
|
725
|
+
* method.
|
|
708
726
|
*
|
|
709
|
-
* @param {
|
|
727
|
+
* @param {AuthenticatorType} type
|
|
710
728
|
* @param {string} otp
|
|
711
729
|
* @throws {AppwriteException}
|
|
712
730
|
* @returns {Promise}
|
|
713
731
|
*/
|
|
714
|
-
|
|
732
|
+
updateMfaAuthenticator(type, otp) {
|
|
715
733
|
return __awaiter(this, void 0, void 0, function* () {
|
|
716
|
-
if (typeof
|
|
717
|
-
throw new AppwriteException('Missing required parameter: "
|
|
734
|
+
if (typeof type === 'undefined') {
|
|
735
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
718
736
|
}
|
|
719
737
|
if (typeof otp === 'undefined') {
|
|
720
738
|
throw new AppwriteException('Missing required parameter: "otp"');
|
|
721
739
|
}
|
|
722
|
-
const apiPath = '/account/mfa/
|
|
740
|
+
const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
|
|
723
741
|
const payload = {};
|
|
724
|
-
if (typeof challengeId !== 'undefined') {
|
|
725
|
-
payload['challengeId'] = challengeId;
|
|
726
|
-
}
|
|
727
742
|
if (typeof otp !== 'undefined') {
|
|
728
743
|
payload['otp'] = otp;
|
|
729
744
|
}
|
|
@@ -734,38 +749,55 @@ class Account extends Service {
|
|
|
734
749
|
});
|
|
735
750
|
}
|
|
736
751
|
/**
|
|
737
|
-
*
|
|
752
|
+
* Delete Authenticator
|
|
738
753
|
*
|
|
739
|
-
*
|
|
754
|
+
* Delete an authenticator for a user by ID.
|
|
740
755
|
*
|
|
756
|
+
* @param {AuthenticatorType} type
|
|
757
|
+
* @param {string} otp
|
|
741
758
|
* @throws {AppwriteException}
|
|
742
759
|
* @returns {Promise}
|
|
743
760
|
*/
|
|
744
|
-
|
|
761
|
+
deleteMfaAuthenticator(type, otp) {
|
|
745
762
|
return __awaiter(this, void 0, void 0, function* () {
|
|
746
|
-
|
|
763
|
+
if (typeof type === 'undefined') {
|
|
764
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
765
|
+
}
|
|
766
|
+
if (typeof otp === 'undefined') {
|
|
767
|
+
throw new AppwriteException('Missing required parameter: "otp"');
|
|
768
|
+
}
|
|
769
|
+
const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
|
|
747
770
|
const payload = {};
|
|
771
|
+
if (typeof otp !== 'undefined') {
|
|
772
|
+
payload['otp'] = otp;
|
|
773
|
+
}
|
|
748
774
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
749
|
-
return yield this.client.call('
|
|
775
|
+
return yield this.client.call('delete', uri, {
|
|
750
776
|
'content-type': 'application/json',
|
|
751
777
|
}, payload);
|
|
752
778
|
});
|
|
753
779
|
}
|
|
754
780
|
/**
|
|
755
|
-
*
|
|
781
|
+
* Create 2FA Challenge
|
|
756
782
|
*
|
|
783
|
+
* Begin the process of MFA verification after sign-in. Finish the flow with
|
|
784
|
+
* [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge)
|
|
785
|
+
* method.
|
|
757
786
|
*
|
|
758
|
-
* @param {
|
|
787
|
+
* @param {AuthenticationFactor} factor
|
|
759
788
|
* @throws {AppwriteException}
|
|
760
789
|
* @returns {Promise}
|
|
761
790
|
*/
|
|
762
|
-
|
|
791
|
+
createMfaChallenge(factor) {
|
|
763
792
|
return __awaiter(this, void 0, void 0, function* () {
|
|
764
|
-
if (typeof
|
|
765
|
-
throw new AppwriteException('Missing required parameter: "
|
|
793
|
+
if (typeof factor === 'undefined') {
|
|
794
|
+
throw new AppwriteException('Missing required parameter: "factor"');
|
|
766
795
|
}
|
|
767
|
-
const apiPath = '/account/mfa/
|
|
796
|
+
const apiPath = '/account/mfa/challenge';
|
|
768
797
|
const payload = {};
|
|
798
|
+
if (typeof factor !== 'undefined') {
|
|
799
|
+
payload['factor'] = factor;
|
|
800
|
+
}
|
|
769
801
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
770
802
|
return yield this.client.call('post', uri, {
|
|
771
803
|
'content-type': 'application/json',
|
|
@@ -773,24 +805,32 @@ class Account extends Service {
|
|
|
773
805
|
});
|
|
774
806
|
}
|
|
775
807
|
/**
|
|
776
|
-
*
|
|
808
|
+
* Create MFA Challenge (confirmation)
|
|
777
809
|
*
|
|
810
|
+
* Complete the MFA challenge by providing the one-time password. Finish the
|
|
811
|
+
* process of MFA verification by providing the one-time password. To begin
|
|
812
|
+
* the flow, use
|
|
813
|
+
* [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
|
|
814
|
+
* method.
|
|
778
815
|
*
|
|
779
|
-
* @param {string}
|
|
816
|
+
* @param {string} challengeId
|
|
780
817
|
* @param {string} otp
|
|
781
818
|
* @throws {AppwriteException}
|
|
782
819
|
* @returns {Promise}
|
|
783
820
|
*/
|
|
784
|
-
|
|
821
|
+
updateMfaChallenge(challengeId, otp) {
|
|
785
822
|
return __awaiter(this, void 0, void 0, function* () {
|
|
786
|
-
if (typeof
|
|
787
|
-
throw new AppwriteException('Missing required parameter: "
|
|
823
|
+
if (typeof challengeId === 'undefined') {
|
|
824
|
+
throw new AppwriteException('Missing required parameter: "challengeId"');
|
|
788
825
|
}
|
|
789
826
|
if (typeof otp === 'undefined') {
|
|
790
827
|
throw new AppwriteException('Missing required parameter: "otp"');
|
|
791
828
|
}
|
|
792
|
-
const apiPath = '/account/mfa/
|
|
829
|
+
const apiPath = '/account/mfa/challenge';
|
|
793
830
|
const payload = {};
|
|
831
|
+
if (typeof challengeId !== 'undefined') {
|
|
832
|
+
payload['challengeId'] = challengeId;
|
|
833
|
+
}
|
|
794
834
|
if (typeof otp !== 'undefined') {
|
|
795
835
|
payload['otp'] = otp;
|
|
796
836
|
}
|
|
@@ -801,29 +841,83 @@ class Account extends Service {
|
|
|
801
841
|
});
|
|
802
842
|
}
|
|
803
843
|
/**
|
|
804
|
-
*
|
|
844
|
+
* List Factors
|
|
805
845
|
*
|
|
846
|
+
* List the factors available on the account to be used as a MFA challange.
|
|
806
847
|
*
|
|
807
|
-
* @param {string} provider
|
|
808
|
-
* @param {string} otp
|
|
809
848
|
* @throws {AppwriteException}
|
|
810
849
|
* @returns {Promise}
|
|
811
850
|
*/
|
|
812
|
-
|
|
851
|
+
listMfaFactors() {
|
|
813
852
|
return __awaiter(this, void 0, void 0, function* () {
|
|
814
|
-
|
|
815
|
-
throw new AppwriteException('Missing required parameter: "provider"');
|
|
816
|
-
}
|
|
817
|
-
if (typeof otp === 'undefined') {
|
|
818
|
-
throw new AppwriteException('Missing required parameter: "otp"');
|
|
819
|
-
}
|
|
820
|
-
const apiPath = '/account/mfa/{provider}'.replace('{provider}', provider);
|
|
853
|
+
const apiPath = '/account/mfa/factors';
|
|
821
854
|
const payload = {};
|
|
822
|
-
if (typeof otp !== 'undefined') {
|
|
823
|
-
payload['otp'] = otp;
|
|
824
|
-
}
|
|
825
855
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
826
|
-
return yield this.client.call('
|
|
856
|
+
return yield this.client.call('get', uri, {
|
|
857
|
+
'content-type': 'application/json',
|
|
858
|
+
}, payload);
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Get MFA Recovery Codes
|
|
863
|
+
*
|
|
864
|
+
* Get recovery codes that can be used as backup for MFA flow. Before getting
|
|
865
|
+
* codes, they must be generated using
|
|
866
|
+
* [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
|
|
867
|
+
* method. An OTP challenge is required to read recovery codes.
|
|
868
|
+
*
|
|
869
|
+
* @throws {AppwriteException}
|
|
870
|
+
* @returns {Promise}
|
|
871
|
+
*/
|
|
872
|
+
getMfaRecoveryCodes() {
|
|
873
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
874
|
+
const apiPath = '/account/mfa/recovery-codes';
|
|
875
|
+
const payload = {};
|
|
876
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
877
|
+
return yield this.client.call('get', uri, {
|
|
878
|
+
'content-type': 'application/json',
|
|
879
|
+
}, payload);
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* Create MFA Recovery Codes
|
|
884
|
+
*
|
|
885
|
+
* Generate recovery codes as backup for MFA flow. It's recommended to
|
|
886
|
+
* generate and show then immediately after user successfully adds their
|
|
887
|
+
* authehticator. Recovery codes can be used as a MFA verification type in
|
|
888
|
+
* [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
|
|
889
|
+
* method.
|
|
890
|
+
*
|
|
891
|
+
* @throws {AppwriteException}
|
|
892
|
+
* @returns {Promise}
|
|
893
|
+
*/
|
|
894
|
+
createMfaRecoveryCodes() {
|
|
895
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
896
|
+
const apiPath = '/account/mfa/recovery-codes';
|
|
897
|
+
const payload = {};
|
|
898
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
899
|
+
return yield this.client.call('post', uri, {
|
|
900
|
+
'content-type': 'application/json',
|
|
901
|
+
}, payload);
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
/**
|
|
905
|
+
* Regenerate MFA Recovery Codes
|
|
906
|
+
*
|
|
907
|
+
* Regenerate recovery codes that can be used as backup for MFA flow. Before
|
|
908
|
+
* regenerating codes, they must be first generated using
|
|
909
|
+
* [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
|
|
910
|
+
* method. An OTP challenge is required to regenreate recovery codes.
|
|
911
|
+
*
|
|
912
|
+
* @throws {AppwriteException}
|
|
913
|
+
* @returns {Promise}
|
|
914
|
+
*/
|
|
915
|
+
updateMfaRecoveryCodes() {
|
|
916
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
917
|
+
const apiPath = '/account/mfa/recovery-codes';
|
|
918
|
+
const payload = {};
|
|
919
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
920
|
+
return yield this.client.call('patch', uri, {
|
|
827
921
|
'content-type': 'application/json',
|
|
828
922
|
}, payload);
|
|
829
923
|
});
|
|
@@ -1152,7 +1246,7 @@ class Account extends Service {
|
|
|
1152
1246
|
});
|
|
1153
1247
|
}
|
|
1154
1248
|
/**
|
|
1155
|
-
*
|
|
1249
|
+
* Update magic URL session
|
|
1156
1250
|
*
|
|
1157
1251
|
* Use this endpoint to create a session from token. Provide the **userId**
|
|
1158
1252
|
* and **secret** parameters from the successful response of authentication
|
|
@@ -1205,15 +1299,14 @@ class Account extends Service {
|
|
|
1205
1299
|
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
1206
1300
|
*
|
|
1207
1301
|
*
|
|
1208
|
-
* @param {
|
|
1302
|
+
* @param {OAuthProvider} provider
|
|
1209
1303
|
* @param {string} success
|
|
1210
1304
|
* @param {string} failure
|
|
1211
|
-
* @param {boolean} token
|
|
1212
1305
|
* @param {string[]} scopes
|
|
1213
1306
|
* @throws {AppwriteException}
|
|
1214
1307
|
* @returns {void|string}
|
|
1215
1308
|
*/
|
|
1216
|
-
createOAuth2Session(provider, success, failure,
|
|
1309
|
+
createOAuth2Session(provider, success, failure, scopes) {
|
|
1217
1310
|
if (typeof provider === 'undefined') {
|
|
1218
1311
|
throw new AppwriteException('Missing required parameter: "provider"');
|
|
1219
1312
|
}
|
|
@@ -1225,9 +1318,6 @@ class Account extends Service {
|
|
|
1225
1318
|
if (typeof failure !== 'undefined') {
|
|
1226
1319
|
payload['failure'] = failure;
|
|
1227
1320
|
}
|
|
1228
|
-
if (typeof token !== 'undefined') {
|
|
1229
|
-
payload['token'] = token;
|
|
1230
|
-
}
|
|
1231
1321
|
if (typeof scopes !== 'undefined') {
|
|
1232
1322
|
payload['scopes'] = scopes;
|
|
1233
1323
|
}
|
|
@@ -1243,6 +1333,40 @@ class Account extends Service {
|
|
|
1243
1333
|
return uri;
|
|
1244
1334
|
}
|
|
1245
1335
|
}
|
|
1336
|
+
/**
|
|
1337
|
+
* Update phone session
|
|
1338
|
+
*
|
|
1339
|
+
* Use this endpoint to create a session from token. Provide the **userId**
|
|
1340
|
+
* and **secret** parameters from the successful response of authentication
|
|
1341
|
+
* flows initiated by token creation. For example, magic URL and phone login.
|
|
1342
|
+
*
|
|
1343
|
+
* @param {string} userId
|
|
1344
|
+
* @param {string} secret
|
|
1345
|
+
* @throws {AppwriteException}
|
|
1346
|
+
* @returns {Promise}
|
|
1347
|
+
*/
|
|
1348
|
+
updatePhoneSession(userId, secret) {
|
|
1349
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1350
|
+
if (typeof userId === 'undefined') {
|
|
1351
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1352
|
+
}
|
|
1353
|
+
if (typeof secret === 'undefined') {
|
|
1354
|
+
throw new AppwriteException('Missing required parameter: "secret"');
|
|
1355
|
+
}
|
|
1356
|
+
const apiPath = '/account/sessions/phone';
|
|
1357
|
+
const payload = {};
|
|
1358
|
+
if (typeof userId !== 'undefined') {
|
|
1359
|
+
payload['userId'] = userId;
|
|
1360
|
+
}
|
|
1361
|
+
if (typeof secret !== 'undefined') {
|
|
1362
|
+
payload['secret'] = secret;
|
|
1363
|
+
}
|
|
1364
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1365
|
+
return yield this.client.call('put', uri, {
|
|
1366
|
+
'content-type': 'application/json',
|
|
1367
|
+
}, payload);
|
|
1368
|
+
});
|
|
1369
|
+
}
|
|
1246
1370
|
/**
|
|
1247
1371
|
* Create session
|
|
1248
1372
|
*
|
|
@@ -1301,10 +1425,11 @@ class Account extends Service {
|
|
|
1301
1425
|
});
|
|
1302
1426
|
}
|
|
1303
1427
|
/**
|
|
1304
|
-
* Update
|
|
1428
|
+
* Update session
|
|
1305
1429
|
*
|
|
1306
|
-
*
|
|
1307
|
-
* useful when session
|
|
1430
|
+
* Use this endpoint to extend a session's length. Extending a session is
|
|
1431
|
+
* useful when session expiry is short. If the session was created using an
|
|
1432
|
+
* OAuth provider, this endpoint refreshes the access token from the provider.
|
|
1308
1433
|
*
|
|
1309
1434
|
* @param {string} sessionId
|
|
1310
1435
|
* @throws {AppwriteException}
|
|
@@ -1370,7 +1495,7 @@ class Account extends Service {
|
|
|
1370
1495
|
});
|
|
1371
1496
|
}
|
|
1372
1497
|
/**
|
|
1373
|
-
* Create
|
|
1498
|
+
* Create push target
|
|
1374
1499
|
*
|
|
1375
1500
|
*
|
|
1376
1501
|
* @param {string} targetId
|
|
@@ -1405,7 +1530,7 @@ class Account extends Service {
|
|
|
1405
1530
|
});
|
|
1406
1531
|
}
|
|
1407
1532
|
/**
|
|
1408
|
-
* Update
|
|
1533
|
+
* Update push target
|
|
1409
1534
|
*
|
|
1410
1535
|
*
|
|
1411
1536
|
* @param {string} targetId
|
|
@@ -1432,6 +1557,27 @@ class Account extends Service {
|
|
|
1432
1557
|
}, payload);
|
|
1433
1558
|
});
|
|
1434
1559
|
}
|
|
1560
|
+
/**
|
|
1561
|
+
* Delete push target
|
|
1562
|
+
*
|
|
1563
|
+
*
|
|
1564
|
+
* @param {string} targetId
|
|
1565
|
+
* @throws {AppwriteException}
|
|
1566
|
+
* @returns {Promise}
|
|
1567
|
+
*/
|
|
1568
|
+
deletePushTarget(targetId) {
|
|
1569
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1570
|
+
if (typeof targetId === 'undefined') {
|
|
1571
|
+
throw new AppwriteException('Missing required parameter: "targetId"');
|
|
1572
|
+
}
|
|
1573
|
+
const apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);
|
|
1574
|
+
const payload = {};
|
|
1575
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1576
|
+
return yield this.client.call('delete', uri, {
|
|
1577
|
+
'content-type': 'application/json',
|
|
1578
|
+
}, payload);
|
|
1579
|
+
});
|
|
1580
|
+
}
|
|
1435
1581
|
/**
|
|
1436
1582
|
* Create email token (OTP)
|
|
1437
1583
|
*
|
|
@@ -1448,11 +1594,11 @@ class Account extends Service {
|
|
|
1448
1594
|
*
|
|
1449
1595
|
* @param {string} userId
|
|
1450
1596
|
* @param {string} email
|
|
1451
|
-
* @param {boolean}
|
|
1597
|
+
* @param {boolean} phrase
|
|
1452
1598
|
* @throws {AppwriteException}
|
|
1453
1599
|
* @returns {Promise}
|
|
1454
1600
|
*/
|
|
1455
|
-
createEmailToken(userId, email,
|
|
1601
|
+
createEmailToken(userId, email, phrase) {
|
|
1456
1602
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1457
1603
|
if (typeof userId === 'undefined') {
|
|
1458
1604
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
@@ -1468,8 +1614,8 @@ class Account extends Service {
|
|
|
1468
1614
|
if (typeof email !== 'undefined') {
|
|
1469
1615
|
payload['email'] = email;
|
|
1470
1616
|
}
|
|
1471
|
-
if (typeof
|
|
1472
|
-
payload['
|
|
1617
|
+
if (typeof phrase !== 'undefined') {
|
|
1618
|
+
payload['phrase'] = phrase;
|
|
1473
1619
|
}
|
|
1474
1620
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1475
1621
|
return yield this.client.call('post', uri, {
|
|
@@ -1500,11 +1646,11 @@ class Account extends Service {
|
|
|
1500
1646
|
* @param {string} userId
|
|
1501
1647
|
* @param {string} email
|
|
1502
1648
|
* @param {string} url
|
|
1503
|
-
* @param {boolean}
|
|
1649
|
+
* @param {boolean} phrase
|
|
1504
1650
|
* @throws {AppwriteException}
|
|
1505
1651
|
* @returns {Promise}
|
|
1506
1652
|
*/
|
|
1507
|
-
createMagicURLToken(userId, email, url,
|
|
1653
|
+
createMagicURLToken(userId, email, url, phrase) {
|
|
1508
1654
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1509
1655
|
if (typeof userId === 'undefined') {
|
|
1510
1656
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
@@ -1523,8 +1669,8 @@ class Account extends Service {
|
|
|
1523
1669
|
if (typeof url !== 'undefined') {
|
|
1524
1670
|
payload['url'] = url;
|
|
1525
1671
|
}
|
|
1526
|
-
if (typeof
|
|
1527
|
-
payload['
|
|
1672
|
+
if (typeof phrase !== 'undefined') {
|
|
1673
|
+
payload['phrase'] = phrase;
|
|
1528
1674
|
}
|
|
1529
1675
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1530
1676
|
return yield this.client.call('post', uri, {
|
|
@@ -1532,6 +1678,58 @@ class Account extends Service {
|
|
|
1532
1678
|
}, payload);
|
|
1533
1679
|
});
|
|
1534
1680
|
}
|
|
1681
|
+
/**
|
|
1682
|
+
* Create OAuth2 token
|
|
1683
|
+
*
|
|
1684
|
+
* Allow the user to login to their account using the OAuth2 provider of their
|
|
1685
|
+
* choice. Each OAuth2 provider should be enabled from the Appwrite console
|
|
1686
|
+
* first. Use the success and failure arguments to provide a redirect URL's
|
|
1687
|
+
* back to your app when login is completed.
|
|
1688
|
+
*
|
|
1689
|
+
* If authentication succeeds, `userId` and `secret` of a token will be
|
|
1690
|
+
* appended to the success URL as query parameters. These can be used to
|
|
1691
|
+
* create a new session using the [Create
|
|
1692
|
+
* session](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
|
|
1693
|
+
* endpoint.
|
|
1694
|
+
*
|
|
1695
|
+
* A user is limited to 10 active sessions at a time by default. [Learn more
|
|
1696
|
+
* about session
|
|
1697
|
+
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
1698
|
+
*
|
|
1699
|
+
* @param {OAuthProvider} provider
|
|
1700
|
+
* @param {string} success
|
|
1701
|
+
* @param {string} failure
|
|
1702
|
+
* @param {string[]} scopes
|
|
1703
|
+
* @throws {AppwriteException}
|
|
1704
|
+
* @returns {void|string}
|
|
1705
|
+
*/
|
|
1706
|
+
createOAuth2Token(provider, success, failure, scopes) {
|
|
1707
|
+
if (typeof provider === 'undefined') {
|
|
1708
|
+
throw new AppwriteException('Missing required parameter: "provider"');
|
|
1709
|
+
}
|
|
1710
|
+
const apiPath = '/account/tokens/oauth2/{provider}'.replace('{provider}', provider);
|
|
1711
|
+
const payload = {};
|
|
1712
|
+
if (typeof success !== 'undefined') {
|
|
1713
|
+
payload['success'] = success;
|
|
1714
|
+
}
|
|
1715
|
+
if (typeof failure !== 'undefined') {
|
|
1716
|
+
payload['failure'] = failure;
|
|
1717
|
+
}
|
|
1718
|
+
if (typeof scopes !== 'undefined') {
|
|
1719
|
+
payload['scopes'] = scopes;
|
|
1720
|
+
}
|
|
1721
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1722
|
+
payload['project'] = this.client.config.project;
|
|
1723
|
+
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
1724
|
+
uri.searchParams.append(key, value);
|
|
1725
|
+
}
|
|
1726
|
+
if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.location)) {
|
|
1727
|
+
window.location.href = uri.toString();
|
|
1728
|
+
}
|
|
1729
|
+
else {
|
|
1730
|
+
return uri;
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1535
1733
|
/**
|
|
1536
1734
|
* Create phone token
|
|
1537
1735
|
*
|
|
@@ -1727,7 +1925,7 @@ class Avatars extends Service {
|
|
|
1727
1925
|
* image at source quality. If dimensions are not specified, the default size
|
|
1728
1926
|
* of image returned is 100x100px.
|
|
1729
1927
|
*
|
|
1730
|
-
* @param {
|
|
1928
|
+
* @param {Browser} code
|
|
1731
1929
|
* @param {number} width
|
|
1732
1930
|
* @param {number} height
|
|
1733
1931
|
* @param {number} quality
|
|
@@ -1769,7 +1967,7 @@ class Avatars extends Service {
|
|
|
1769
1967
|
* of image returned is 100x100px.
|
|
1770
1968
|
*
|
|
1771
1969
|
*
|
|
1772
|
-
* @param {
|
|
1970
|
+
* @param {CreditCard} code
|
|
1773
1971
|
* @param {number} width
|
|
1774
1972
|
* @param {number} height
|
|
1775
1973
|
* @param {number} quality
|
|
@@ -1839,7 +2037,7 @@ class Avatars extends Service {
|
|
|
1839
2037
|
* of image returned is 100x100px.
|
|
1840
2038
|
*
|
|
1841
2039
|
*
|
|
1842
|
-
* @param {
|
|
2040
|
+
* @param {Flag} code
|
|
1843
2041
|
* @param {number} width
|
|
1844
2042
|
* @param {number} height
|
|
1845
2043
|
* @param {number} quality
|
|
@@ -2123,10 +2321,10 @@ class Databases extends Service {
|
|
|
2123
2321
|
});
|
|
2124
2322
|
}
|
|
2125
2323
|
/**
|
|
2126
|
-
* Get usage stats
|
|
2324
|
+
* Get databases usage stats
|
|
2127
2325
|
*
|
|
2128
2326
|
*
|
|
2129
|
-
* @param {
|
|
2327
|
+
* @param {DatabaseUsageRange} range
|
|
2130
2328
|
* @throws {AppwriteException}
|
|
2131
2329
|
* @returns {Promise}
|
|
2132
2330
|
*/
|
|
@@ -2406,6 +2604,7 @@ class Databases extends Service {
|
|
|
2406
2604
|
/**
|
|
2407
2605
|
* List attributes
|
|
2408
2606
|
*
|
|
2607
|
+
* List attributes in the collection.
|
|
2409
2608
|
*
|
|
2410
2609
|
* @param {string} databaseId
|
|
2411
2610
|
* @param {string} collectionId
|
|
@@ -2484,6 +2683,8 @@ class Databases extends Service {
|
|
|
2484
2683
|
/**
|
|
2485
2684
|
* Update boolean attribute
|
|
2486
2685
|
*
|
|
2686
|
+
* Update a boolean attribute. Changing the `default` value will not update
|
|
2687
|
+
* already existing documents.
|
|
2487
2688
|
*
|
|
2488
2689
|
* @param {string} databaseId
|
|
2489
2690
|
* @param {string} collectionId
|
|
@@ -2527,6 +2728,7 @@ class Databases extends Service {
|
|
|
2527
2728
|
/**
|
|
2528
2729
|
* Create datetime attribute
|
|
2529
2730
|
*
|
|
2731
|
+
* Create a date time attribute according to the ISO 8601 standard.
|
|
2530
2732
|
*
|
|
2531
2733
|
* @param {string} databaseId
|
|
2532
2734
|
* @param {string} collectionId
|
|
@@ -2574,6 +2776,8 @@ class Databases extends Service {
|
|
|
2574
2776
|
/**
|
|
2575
2777
|
* Update dateTime attribute
|
|
2576
2778
|
*
|
|
2779
|
+
* Update a date time attribute. Changing the `default` value will not update
|
|
2780
|
+
* already existing documents.
|
|
2577
2781
|
*
|
|
2578
2782
|
* @param {string} databaseId
|
|
2579
2783
|
* @param {string} collectionId
|
|
@@ -2712,6 +2916,9 @@ class Databases extends Service {
|
|
|
2712
2916
|
/**
|
|
2713
2917
|
* Create enum attribute
|
|
2714
2918
|
*
|
|
2919
|
+
* Create an enumeration attribute. The `elements` param acts as a white-list
|
|
2920
|
+
* of accepted values for this attribute.
|
|
2921
|
+
*
|
|
2715
2922
|
*
|
|
2716
2923
|
* @param {string} databaseId
|
|
2717
2924
|
* @param {string} collectionId
|
|
@@ -3157,11 +3364,11 @@ class Databases extends Service {
|
|
|
3157
3364
|
* @param {string} databaseId
|
|
3158
3365
|
* @param {string} collectionId
|
|
3159
3366
|
* @param {string} relatedCollectionId
|
|
3160
|
-
* @param {
|
|
3367
|
+
* @param {RelationshipType} type
|
|
3161
3368
|
* @param {boolean} twoWay
|
|
3162
3369
|
* @param {string} key
|
|
3163
3370
|
* @param {string} twoWayKey
|
|
3164
|
-
* @param {
|
|
3371
|
+
* @param {RelationMutate} onDelete
|
|
3165
3372
|
* @throws {AppwriteException}
|
|
3166
3373
|
* @returns {Promise}
|
|
3167
3374
|
*/
|
|
@@ -3409,6 +3616,7 @@ class Databases extends Service {
|
|
|
3409
3616
|
/**
|
|
3410
3617
|
* Get attribute
|
|
3411
3618
|
*
|
|
3619
|
+
* Get attribute by ID.
|
|
3412
3620
|
*
|
|
3413
3621
|
* @param {string} databaseId
|
|
3414
3622
|
* @param {string} collectionId
|
|
@@ -3438,6 +3646,7 @@ class Databases extends Service {
|
|
|
3438
3646
|
/**
|
|
3439
3647
|
* Delete attribute
|
|
3440
3648
|
*
|
|
3649
|
+
* Deletes an attribute.
|
|
3441
3650
|
*
|
|
3442
3651
|
* @param {string} databaseId
|
|
3443
3652
|
* @param {string} collectionId
|
|
@@ -3474,7 +3683,7 @@ class Databases extends Service {
|
|
|
3474
3683
|
* @param {string} databaseId
|
|
3475
3684
|
* @param {string} collectionId
|
|
3476
3685
|
* @param {string} key
|
|
3477
|
-
* @param {
|
|
3686
|
+
* @param {RelationMutate} onDelete
|
|
3478
3687
|
* @throws {AppwriteException}
|
|
3479
3688
|
* @returns {Promise}
|
|
3480
3689
|
*/
|
|
@@ -3719,6 +3928,7 @@ class Databases extends Service {
|
|
|
3719
3928
|
/**
|
|
3720
3929
|
* List indexes
|
|
3721
3930
|
*
|
|
3931
|
+
* List indexes in the collection.
|
|
3722
3932
|
*
|
|
3723
3933
|
* @param {string} databaseId
|
|
3724
3934
|
* @param {string} collectionId
|
|
@@ -3748,11 +3958,14 @@ class Databases extends Service {
|
|
|
3748
3958
|
/**
|
|
3749
3959
|
* Create index
|
|
3750
3960
|
*
|
|
3961
|
+
* Creates an index on the attributes listed. Your index should include all
|
|
3962
|
+
* the attributes you will query in a single request.
|
|
3963
|
+
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
3751
3964
|
*
|
|
3752
3965
|
* @param {string} databaseId
|
|
3753
3966
|
* @param {string} collectionId
|
|
3754
3967
|
* @param {string} key
|
|
3755
|
-
* @param {
|
|
3968
|
+
* @param {IndexType} type
|
|
3756
3969
|
* @param {string[]} attributes
|
|
3757
3970
|
* @param {string[]} orders
|
|
3758
3971
|
* @throws {AppwriteException}
|
|
@@ -3798,6 +4011,7 @@ class Databases extends Service {
|
|
|
3798
4011
|
/**
|
|
3799
4012
|
* Get index
|
|
3800
4013
|
*
|
|
4014
|
+
* Get index by ID.
|
|
3801
4015
|
*
|
|
3802
4016
|
* @param {string} databaseId
|
|
3803
4017
|
* @param {string} collectionId
|
|
@@ -3827,6 +4041,7 @@ class Databases extends Service {
|
|
|
3827
4041
|
/**
|
|
3828
4042
|
* Delete index
|
|
3829
4043
|
*
|
|
4044
|
+
* Delete an index.
|
|
3830
4045
|
*
|
|
3831
4046
|
* @param {string} databaseId
|
|
3832
4047
|
* @param {string} collectionId
|
|
@@ -3884,12 +4099,12 @@ class Databases extends Service {
|
|
|
3884
4099
|
});
|
|
3885
4100
|
}
|
|
3886
4101
|
/**
|
|
3887
|
-
* Get usage stats
|
|
4102
|
+
* Get collection usage stats
|
|
3888
4103
|
*
|
|
3889
4104
|
*
|
|
3890
4105
|
* @param {string} databaseId
|
|
3891
4106
|
* @param {string} collectionId
|
|
3892
|
-
* @param {
|
|
4107
|
+
* @param {DatabaseUsageRange} range
|
|
3893
4108
|
* @throws {AppwriteException}
|
|
3894
4109
|
* @returns {Promise}
|
|
3895
4110
|
*/
|
|
@@ -3939,11 +4154,11 @@ class Databases extends Service {
|
|
|
3939
4154
|
});
|
|
3940
4155
|
}
|
|
3941
4156
|
/**
|
|
3942
|
-
* Get usage stats
|
|
4157
|
+
* Get database usage stats
|
|
3943
4158
|
*
|
|
3944
4159
|
*
|
|
3945
4160
|
* @param {string} databaseId
|
|
3946
|
-
* @param {
|
|
4161
|
+
* @param {DatabaseUsageRange} range
|
|
3947
4162
|
* @throws {AppwriteException}
|
|
3948
4163
|
* @returns {Promise}
|
|
3949
4164
|
*/
|
|
@@ -4006,7 +4221,7 @@ class Functions extends Service {
|
|
|
4006
4221
|
*
|
|
4007
4222
|
* @param {string} functionId
|
|
4008
4223
|
* @param {string} name
|
|
4009
|
-
* @param {
|
|
4224
|
+
* @param {Runtime} runtime
|
|
4010
4225
|
* @param {string[]} execute
|
|
4011
4226
|
* @param {string[]} events
|
|
4012
4227
|
* @param {string} schedule
|
|
@@ -4128,7 +4343,7 @@ class Functions extends Service {
|
|
|
4128
4343
|
* Get functions usage
|
|
4129
4344
|
*
|
|
4130
4345
|
*
|
|
4131
|
-
* @param {
|
|
4346
|
+
* @param {FunctionUsageRange} range
|
|
4132
4347
|
* @throws {AppwriteException}
|
|
4133
4348
|
* @returns {Promise}
|
|
4134
4349
|
*/
|
|
@@ -4174,7 +4389,7 @@ class Functions extends Service {
|
|
|
4174
4389
|
*
|
|
4175
4390
|
* @param {string} functionId
|
|
4176
4391
|
* @param {string} name
|
|
4177
|
-
* @param {
|
|
4392
|
+
* @param {Runtime} runtime
|
|
4178
4393
|
* @param {string[]} execute
|
|
4179
4394
|
* @param {string[]} events
|
|
4180
4395
|
* @param {string} schedule
|
|
@@ -4571,7 +4786,7 @@ class Functions extends Service {
|
|
|
4571
4786
|
* @param {string} body
|
|
4572
4787
|
* @param {boolean} async
|
|
4573
4788
|
* @param {string} xpath
|
|
4574
|
-
* @param {
|
|
4789
|
+
* @param {ExecutionMethod} method
|
|
4575
4790
|
* @param {object} headers
|
|
4576
4791
|
* @throws {AppwriteException}
|
|
4577
4792
|
* @returns {Promise}
|
|
@@ -4635,7 +4850,7 @@ class Functions extends Service {
|
|
|
4635
4850
|
*
|
|
4636
4851
|
*
|
|
4637
4852
|
* @param {string} functionId
|
|
4638
|
-
* @param {
|
|
4853
|
+
* @param {FunctionUsageRange} range
|
|
4639
4854
|
* @throws {AppwriteException}
|
|
4640
4855
|
* @returns {Promise}
|
|
4641
4856
|
*/
|
|
@@ -4922,6 +5137,28 @@ class Health extends Service {
|
|
|
4922
5137
|
}, payload);
|
|
4923
5138
|
});
|
|
4924
5139
|
}
|
|
5140
|
+
/**
|
|
5141
|
+
* Get the SSL certificate for a domain
|
|
5142
|
+
*
|
|
5143
|
+
* Get the SSL certificate for a domain
|
|
5144
|
+
*
|
|
5145
|
+
* @param {string} domain
|
|
5146
|
+
* @throws {AppwriteException}
|
|
5147
|
+
* @returns {Promise}
|
|
5148
|
+
*/
|
|
5149
|
+
getCertificate(domain) {
|
|
5150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5151
|
+
const apiPath = '/health/certificate';
|
|
5152
|
+
const payload = {};
|
|
5153
|
+
if (typeof domain !== 'undefined') {
|
|
5154
|
+
payload['domain'] = domain;
|
|
5155
|
+
}
|
|
5156
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5157
|
+
return yield this.client.call('get', uri, {
|
|
5158
|
+
'content-type': 'application/json',
|
|
5159
|
+
}, payload);
|
|
5160
|
+
});
|
|
5161
|
+
}
|
|
4925
5162
|
/**
|
|
4926
5163
|
* Get DB
|
|
4927
5164
|
*
|
|
@@ -5074,9 +5311,38 @@ class Health extends Service {
|
|
|
5074
5311
|
}, payload);
|
|
5075
5312
|
});
|
|
5076
5313
|
}
|
|
5314
|
+
/**
|
|
5315
|
+
* Get number of failed queue jobs
|
|
5316
|
+
*
|
|
5317
|
+
* Returns the amount of failed jobs in a given queue.
|
|
5318
|
+
*
|
|
5319
|
+
*
|
|
5320
|
+
* @param {Name} name
|
|
5321
|
+
* @param {number} threshold
|
|
5322
|
+
* @throws {AppwriteException}
|
|
5323
|
+
* @returns {Promise}
|
|
5324
|
+
*/
|
|
5325
|
+
getFailedJobs(name, threshold) {
|
|
5326
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5327
|
+
if (typeof name === 'undefined') {
|
|
5328
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
5329
|
+
}
|
|
5330
|
+
const apiPath = '/health/queue/failed/{name}'.replace('{name}', name);
|
|
5331
|
+
const payload = {};
|
|
5332
|
+
if (typeof threshold !== 'undefined') {
|
|
5333
|
+
payload['threshold'] = threshold;
|
|
5334
|
+
}
|
|
5335
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5336
|
+
return yield this.client.call('get', uri, {
|
|
5337
|
+
'content-type': 'application/json',
|
|
5338
|
+
}, payload);
|
|
5339
|
+
});
|
|
5340
|
+
}
|
|
5077
5341
|
/**
|
|
5078
5342
|
* Get functions queue
|
|
5079
5343
|
*
|
|
5344
|
+
* Get the number of function executions that are waiting to be processed in
|
|
5345
|
+
* the Appwrite internal queue server.
|
|
5080
5346
|
*
|
|
5081
5347
|
* @param {number} threshold
|
|
5082
5348
|
* @throws {AppwriteException}
|
|
@@ -5188,18 +5454,18 @@ class Health extends Service {
|
|
|
5188
5454
|
});
|
|
5189
5455
|
}
|
|
5190
5456
|
/**
|
|
5191
|
-
* Get
|
|
5457
|
+
* Get usage queue
|
|
5192
5458
|
*
|
|
5193
|
-
* Get the number of
|
|
5459
|
+
* Get the number of metrics that are waiting to be processed in the Appwrite
|
|
5194
5460
|
* internal queue server.
|
|
5195
5461
|
*
|
|
5196
5462
|
* @param {number} threshold
|
|
5197
5463
|
* @throws {AppwriteException}
|
|
5198
5464
|
* @returns {Promise}
|
|
5199
5465
|
*/
|
|
5200
|
-
|
|
5466
|
+
getQueueUsage(threshold) {
|
|
5201
5467
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5202
|
-
const apiPath = '/health/queue/
|
|
5468
|
+
const apiPath = '/health/queue/usage';
|
|
5203
5469
|
const payload = {};
|
|
5204
5470
|
if (typeof threshold !== 'undefined') {
|
|
5205
5471
|
payload['threshold'] = threshold;
|
|
@@ -5211,7 +5477,71 @@ class Health extends Service {
|
|
|
5211
5477
|
});
|
|
5212
5478
|
}
|
|
5213
5479
|
/**
|
|
5214
|
-
* Get
|
|
5480
|
+
* Get usage dump queue
|
|
5481
|
+
*
|
|
5482
|
+
* Get the number of projects containing metrics that are waiting to be
|
|
5483
|
+
* processed in the Appwrite internal queue server.
|
|
5484
|
+
*
|
|
5485
|
+
* @param {number} threshold
|
|
5486
|
+
* @throws {AppwriteException}
|
|
5487
|
+
* @returns {Promise}
|
|
5488
|
+
*/
|
|
5489
|
+
getQueueUsageDump(threshold) {
|
|
5490
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5491
|
+
const apiPath = '/health/queue/usage-dump';
|
|
5492
|
+
const payload = {};
|
|
5493
|
+
if (typeof threshold !== 'undefined') {
|
|
5494
|
+
payload['threshold'] = threshold;
|
|
5495
|
+
}
|
|
5496
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5497
|
+
return yield this.client.call('get', uri, {
|
|
5498
|
+
'content-type': 'application/json',
|
|
5499
|
+
}, payload);
|
|
5500
|
+
});
|
|
5501
|
+
}
|
|
5502
|
+
/**
|
|
5503
|
+
* Get webhooks queue
|
|
5504
|
+
*
|
|
5505
|
+
* Get the number of webhooks that are waiting to be processed in the Appwrite
|
|
5506
|
+
* internal queue server.
|
|
5507
|
+
*
|
|
5508
|
+
* @param {number} threshold
|
|
5509
|
+
* @throws {AppwriteException}
|
|
5510
|
+
* @returns {Promise}
|
|
5511
|
+
*/
|
|
5512
|
+
getQueueWebhooks(threshold) {
|
|
5513
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5514
|
+
const apiPath = '/health/queue/webhooks';
|
|
5515
|
+
const payload = {};
|
|
5516
|
+
if (typeof threshold !== 'undefined') {
|
|
5517
|
+
payload['threshold'] = threshold;
|
|
5518
|
+
}
|
|
5519
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5520
|
+
return yield this.client.call('get', uri, {
|
|
5521
|
+
'content-type': 'application/json',
|
|
5522
|
+
}, payload);
|
|
5523
|
+
});
|
|
5524
|
+
}
|
|
5525
|
+
/**
|
|
5526
|
+
* Get storage
|
|
5527
|
+
*
|
|
5528
|
+
* Check the Appwrite storage device is up and connection is successful.
|
|
5529
|
+
*
|
|
5530
|
+
* @throws {AppwriteException}
|
|
5531
|
+
* @returns {Promise}
|
|
5532
|
+
*/
|
|
5533
|
+
getStorage() {
|
|
5534
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5535
|
+
const apiPath = '/health/storage';
|
|
5536
|
+
const payload = {};
|
|
5537
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5538
|
+
return yield this.client.call('get', uri, {
|
|
5539
|
+
'content-type': 'application/json',
|
|
5540
|
+
}, payload);
|
|
5541
|
+
});
|
|
5542
|
+
}
|
|
5543
|
+
/**
|
|
5544
|
+
* Get local storage
|
|
5215
5545
|
*
|
|
5216
5546
|
* Check the Appwrite local storage device is up and connection is successful.
|
|
5217
5547
|
*
|
|
@@ -5424,8 +5754,9 @@ class Messaging extends Service {
|
|
|
5424
5754
|
/**
|
|
5425
5755
|
* List messages
|
|
5426
5756
|
*
|
|
5757
|
+
* Get a list of all messages from the current Appwrite project.
|
|
5427
5758
|
*
|
|
5428
|
-
* @param {string} queries
|
|
5759
|
+
* @param {string[]} queries
|
|
5429
5760
|
* @param {string} search
|
|
5430
5761
|
* @throws {AppwriteException}
|
|
5431
5762
|
* @returns {Promise}
|
|
@@ -5447,8 +5778,9 @@ class Messaging extends Service {
|
|
|
5447
5778
|
});
|
|
5448
5779
|
}
|
|
5449
5780
|
/**
|
|
5450
|
-
* Create
|
|
5781
|
+
* Create email
|
|
5451
5782
|
*
|
|
5783
|
+
* Create a new email message.
|
|
5452
5784
|
*
|
|
5453
5785
|
* @param {string} messageId
|
|
5454
5786
|
* @param {string} subject
|
|
@@ -5458,14 +5790,14 @@ class Messaging extends Service {
|
|
|
5458
5790
|
* @param {string[]} targets
|
|
5459
5791
|
* @param {string[]} cc
|
|
5460
5792
|
* @param {string[]} bcc
|
|
5461
|
-
* @param {string}
|
|
5462
|
-
* @param {
|
|
5793
|
+
* @param {string[]} attachments
|
|
5794
|
+
* @param {boolean} draft
|
|
5463
5795
|
* @param {boolean} html
|
|
5464
5796
|
* @param {string} scheduledAt
|
|
5465
5797
|
* @throws {AppwriteException}
|
|
5466
5798
|
* @returns {Promise}
|
|
5467
5799
|
*/
|
|
5468
|
-
createEmail(messageId, subject, content, topics, users, targets, cc, bcc,
|
|
5800
|
+
createEmail(messageId, subject, content, topics, users, targets, cc, bcc, attachments, draft, html, scheduledAt) {
|
|
5469
5801
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5470
5802
|
if (typeof messageId === 'undefined') {
|
|
5471
5803
|
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
@@ -5502,11 +5834,11 @@ class Messaging extends Service {
|
|
|
5502
5834
|
if (typeof bcc !== 'undefined') {
|
|
5503
5835
|
payload['bcc'] = bcc;
|
|
5504
5836
|
}
|
|
5505
|
-
if (typeof
|
|
5506
|
-
payload['
|
|
5837
|
+
if (typeof attachments !== 'undefined') {
|
|
5838
|
+
payload['attachments'] = attachments;
|
|
5507
5839
|
}
|
|
5508
|
-
if (typeof
|
|
5509
|
-
payload['
|
|
5840
|
+
if (typeof draft !== 'undefined') {
|
|
5841
|
+
payload['draft'] = draft;
|
|
5510
5842
|
}
|
|
5511
5843
|
if (typeof html !== 'undefined') {
|
|
5512
5844
|
payload['html'] = html;
|
|
@@ -5521,7 +5853,9 @@ class Messaging extends Service {
|
|
|
5521
5853
|
});
|
|
5522
5854
|
}
|
|
5523
5855
|
/**
|
|
5524
|
-
* Update
|
|
5856
|
+
* Update email
|
|
5857
|
+
*
|
|
5858
|
+
* Update an email message by its unique ID.
|
|
5525
5859
|
*
|
|
5526
5860
|
*
|
|
5527
5861
|
* @param {string} messageId
|
|
@@ -5529,9 +5863,8 @@ class Messaging extends Service {
|
|
|
5529
5863
|
* @param {string[]} users
|
|
5530
5864
|
* @param {string[]} targets
|
|
5531
5865
|
* @param {string} subject
|
|
5532
|
-
* @param {string} description
|
|
5533
5866
|
* @param {string} content
|
|
5534
|
-
* @param {
|
|
5867
|
+
* @param {boolean} draft
|
|
5535
5868
|
* @param {boolean} html
|
|
5536
5869
|
* @param {string[]} cc
|
|
5537
5870
|
* @param {string[]} bcc
|
|
@@ -5539,7 +5872,7 @@ class Messaging extends Service {
|
|
|
5539
5872
|
* @throws {AppwriteException}
|
|
5540
5873
|
* @returns {Promise}
|
|
5541
5874
|
*/
|
|
5542
|
-
updateEmail(messageId, topics, users, targets, subject,
|
|
5875
|
+
updateEmail(messageId, topics, users, targets, subject, content, draft, html, cc, bcc, scheduledAt) {
|
|
5543
5876
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5544
5877
|
if (typeof messageId === 'undefined') {
|
|
5545
5878
|
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
@@ -5558,14 +5891,11 @@ class Messaging extends Service {
|
|
|
5558
5891
|
if (typeof subject !== 'undefined') {
|
|
5559
5892
|
payload['subject'] = subject;
|
|
5560
5893
|
}
|
|
5561
|
-
if (typeof description !== 'undefined') {
|
|
5562
|
-
payload['description'] = description;
|
|
5563
|
-
}
|
|
5564
5894
|
if (typeof content !== 'undefined') {
|
|
5565
5895
|
payload['content'] = content;
|
|
5566
5896
|
}
|
|
5567
|
-
if (typeof
|
|
5568
|
-
payload['
|
|
5897
|
+
if (typeof draft !== 'undefined') {
|
|
5898
|
+
payload['draft'] = draft;
|
|
5569
5899
|
}
|
|
5570
5900
|
if (typeof html !== 'undefined') {
|
|
5571
5901
|
payload['html'] = html;
|
|
@@ -5586,8 +5916,9 @@ class Messaging extends Service {
|
|
|
5586
5916
|
});
|
|
5587
5917
|
}
|
|
5588
5918
|
/**
|
|
5589
|
-
* Create
|
|
5919
|
+
* Create push notification
|
|
5590
5920
|
*
|
|
5921
|
+
* Create a new push notification.
|
|
5591
5922
|
*
|
|
5592
5923
|
* @param {string} messageId
|
|
5593
5924
|
* @param {string} title
|
|
@@ -5595,20 +5926,20 @@ class Messaging extends Service {
|
|
|
5595
5926
|
* @param {string[]} topics
|
|
5596
5927
|
* @param {string[]} users
|
|
5597
5928
|
* @param {string[]} targets
|
|
5598
|
-
* @param {string} description
|
|
5599
5929
|
* @param {object} data
|
|
5600
5930
|
* @param {string} action
|
|
5931
|
+
* @param {string} image
|
|
5601
5932
|
* @param {string} icon
|
|
5602
5933
|
* @param {string} sound
|
|
5603
5934
|
* @param {string} color
|
|
5604
5935
|
* @param {string} tag
|
|
5605
5936
|
* @param {string} badge
|
|
5606
|
-
* @param {
|
|
5937
|
+
* @param {boolean} draft
|
|
5607
5938
|
* @param {string} scheduledAt
|
|
5608
5939
|
* @throws {AppwriteException}
|
|
5609
5940
|
* @returns {Promise}
|
|
5610
5941
|
*/
|
|
5611
|
-
createPush(messageId, title, body, topics, users, targets,
|
|
5942
|
+
createPush(messageId, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
|
|
5612
5943
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5613
5944
|
if (typeof messageId === 'undefined') {
|
|
5614
5945
|
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
@@ -5639,15 +5970,15 @@ class Messaging extends Service {
|
|
|
5639
5970
|
if (typeof targets !== 'undefined') {
|
|
5640
5971
|
payload['targets'] = targets;
|
|
5641
5972
|
}
|
|
5642
|
-
if (typeof description !== 'undefined') {
|
|
5643
|
-
payload['description'] = description;
|
|
5644
|
-
}
|
|
5645
5973
|
if (typeof data !== 'undefined') {
|
|
5646
5974
|
payload['data'] = data;
|
|
5647
5975
|
}
|
|
5648
5976
|
if (typeof action !== 'undefined') {
|
|
5649
5977
|
payload['action'] = action;
|
|
5650
5978
|
}
|
|
5979
|
+
if (typeof image !== 'undefined') {
|
|
5980
|
+
payload['image'] = image;
|
|
5981
|
+
}
|
|
5651
5982
|
if (typeof icon !== 'undefined') {
|
|
5652
5983
|
payload['icon'] = icon;
|
|
5653
5984
|
}
|
|
@@ -5663,8 +5994,8 @@ class Messaging extends Service {
|
|
|
5663
5994
|
if (typeof badge !== 'undefined') {
|
|
5664
5995
|
payload['badge'] = badge;
|
|
5665
5996
|
}
|
|
5666
|
-
if (typeof
|
|
5667
|
-
payload['
|
|
5997
|
+
if (typeof draft !== 'undefined') {
|
|
5998
|
+
payload['draft'] = draft;
|
|
5668
5999
|
}
|
|
5669
6000
|
if (typeof scheduledAt !== 'undefined') {
|
|
5670
6001
|
payload['scheduledAt'] = scheduledAt;
|
|
@@ -5676,29 +6007,31 @@ class Messaging extends Service {
|
|
|
5676
6007
|
});
|
|
5677
6008
|
}
|
|
5678
6009
|
/**
|
|
5679
|
-
* Update
|
|
6010
|
+
* Update push notification
|
|
6011
|
+
*
|
|
6012
|
+
* Update a push notification by its unique ID.
|
|
5680
6013
|
*
|
|
5681
6014
|
*
|
|
5682
6015
|
* @param {string} messageId
|
|
5683
6016
|
* @param {string[]} topics
|
|
5684
6017
|
* @param {string[]} users
|
|
5685
6018
|
* @param {string[]} targets
|
|
5686
|
-
* @param {string} description
|
|
5687
6019
|
* @param {string} title
|
|
5688
6020
|
* @param {string} body
|
|
5689
6021
|
* @param {object} data
|
|
5690
6022
|
* @param {string} action
|
|
6023
|
+
* @param {string} image
|
|
5691
6024
|
* @param {string} icon
|
|
5692
6025
|
* @param {string} sound
|
|
5693
6026
|
* @param {string} color
|
|
5694
6027
|
* @param {string} tag
|
|
5695
6028
|
* @param {number} badge
|
|
5696
|
-
* @param {
|
|
6029
|
+
* @param {boolean} draft
|
|
5697
6030
|
* @param {string} scheduledAt
|
|
5698
6031
|
* @throws {AppwriteException}
|
|
5699
6032
|
* @returns {Promise}
|
|
5700
6033
|
*/
|
|
5701
|
-
|
|
6034
|
+
updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
|
|
5702
6035
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5703
6036
|
if (typeof messageId === 'undefined') {
|
|
5704
6037
|
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
@@ -5714,9 +6047,6 @@ class Messaging extends Service {
|
|
|
5714
6047
|
if (typeof targets !== 'undefined') {
|
|
5715
6048
|
payload['targets'] = targets;
|
|
5716
6049
|
}
|
|
5717
|
-
if (typeof description !== 'undefined') {
|
|
5718
|
-
payload['description'] = description;
|
|
5719
|
-
}
|
|
5720
6050
|
if (typeof title !== 'undefined') {
|
|
5721
6051
|
payload['title'] = title;
|
|
5722
6052
|
}
|
|
@@ -5729,6 +6059,9 @@ class Messaging extends Service {
|
|
|
5729
6059
|
if (typeof action !== 'undefined') {
|
|
5730
6060
|
payload['action'] = action;
|
|
5731
6061
|
}
|
|
6062
|
+
if (typeof image !== 'undefined') {
|
|
6063
|
+
payload['image'] = image;
|
|
6064
|
+
}
|
|
5732
6065
|
if (typeof icon !== 'undefined') {
|
|
5733
6066
|
payload['icon'] = icon;
|
|
5734
6067
|
}
|
|
@@ -5744,8 +6077,8 @@ class Messaging extends Service {
|
|
|
5744
6077
|
if (typeof badge !== 'undefined') {
|
|
5745
6078
|
payload['badge'] = badge;
|
|
5746
6079
|
}
|
|
5747
|
-
if (typeof
|
|
5748
|
-
payload['
|
|
6080
|
+
if (typeof draft !== 'undefined') {
|
|
6081
|
+
payload['draft'] = draft;
|
|
5749
6082
|
}
|
|
5750
6083
|
if (typeof scheduledAt !== 'undefined') {
|
|
5751
6084
|
payload['scheduledAt'] = scheduledAt;
|
|
@@ -5757,21 +6090,21 @@ class Messaging extends Service {
|
|
|
5757
6090
|
});
|
|
5758
6091
|
}
|
|
5759
6092
|
/**
|
|
5760
|
-
* Create
|
|
6093
|
+
* Create SMS
|
|
5761
6094
|
*
|
|
6095
|
+
* Create a new SMS message.
|
|
5762
6096
|
*
|
|
5763
6097
|
* @param {string} messageId
|
|
5764
6098
|
* @param {string} content
|
|
5765
6099
|
* @param {string[]} topics
|
|
5766
6100
|
* @param {string[]} users
|
|
5767
6101
|
* @param {string[]} targets
|
|
5768
|
-
* @param {
|
|
5769
|
-
* @param {string} status
|
|
6102
|
+
* @param {boolean} draft
|
|
5770
6103
|
* @param {string} scheduledAt
|
|
5771
6104
|
* @throws {AppwriteException}
|
|
5772
6105
|
* @returns {Promise}
|
|
5773
6106
|
*/
|
|
5774
|
-
|
|
6107
|
+
createSms(messageId, content, topics, users, targets, draft, scheduledAt) {
|
|
5775
6108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5776
6109
|
if (typeof messageId === 'undefined') {
|
|
5777
6110
|
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
@@ -5796,11 +6129,8 @@ class Messaging extends Service {
|
|
|
5796
6129
|
if (typeof targets !== 'undefined') {
|
|
5797
6130
|
payload['targets'] = targets;
|
|
5798
6131
|
}
|
|
5799
|
-
if (typeof
|
|
5800
|
-
payload['
|
|
5801
|
-
}
|
|
5802
|
-
if (typeof status !== 'undefined') {
|
|
5803
|
-
payload['status'] = status;
|
|
6132
|
+
if (typeof draft !== 'undefined') {
|
|
6133
|
+
payload['draft'] = draft;
|
|
5804
6134
|
}
|
|
5805
6135
|
if (typeof scheduledAt !== 'undefined') {
|
|
5806
6136
|
payload['scheduledAt'] = scheduledAt;
|
|
@@ -5812,21 +6142,22 @@ class Messaging extends Service {
|
|
|
5812
6142
|
});
|
|
5813
6143
|
}
|
|
5814
6144
|
/**
|
|
5815
|
-
* Update
|
|
6145
|
+
* Update SMS
|
|
6146
|
+
*
|
|
6147
|
+
* Update an email message by its unique ID.
|
|
5816
6148
|
*
|
|
5817
6149
|
*
|
|
5818
6150
|
* @param {string} messageId
|
|
5819
6151
|
* @param {string[]} topics
|
|
5820
6152
|
* @param {string[]} users
|
|
5821
6153
|
* @param {string[]} targets
|
|
5822
|
-
* @param {string} description
|
|
5823
6154
|
* @param {string} content
|
|
5824
|
-
* @param {
|
|
6155
|
+
* @param {boolean} draft
|
|
5825
6156
|
* @param {string} scheduledAt
|
|
5826
6157
|
* @throws {AppwriteException}
|
|
5827
6158
|
* @returns {Promise}
|
|
5828
6159
|
*/
|
|
5829
|
-
|
|
6160
|
+
updateSms(messageId, topics, users, targets, content, draft, scheduledAt) {
|
|
5830
6161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5831
6162
|
if (typeof messageId === 'undefined') {
|
|
5832
6163
|
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
@@ -5842,14 +6173,11 @@ class Messaging extends Service {
|
|
|
5842
6173
|
if (typeof targets !== 'undefined') {
|
|
5843
6174
|
payload['targets'] = targets;
|
|
5844
6175
|
}
|
|
5845
|
-
if (typeof description !== 'undefined') {
|
|
5846
|
-
payload['description'] = description;
|
|
5847
|
-
}
|
|
5848
6176
|
if (typeof content !== 'undefined') {
|
|
5849
6177
|
payload['content'] = content;
|
|
5850
6178
|
}
|
|
5851
|
-
if (typeof
|
|
5852
|
-
payload['
|
|
6179
|
+
if (typeof draft !== 'undefined') {
|
|
6180
|
+
payload['draft'] = draft;
|
|
5853
6181
|
}
|
|
5854
6182
|
if (typeof scheduledAt !== 'undefined') {
|
|
5855
6183
|
payload['scheduledAt'] = scheduledAt;
|
|
@@ -5861,7 +6189,9 @@ class Messaging extends Service {
|
|
|
5861
6189
|
});
|
|
5862
6190
|
}
|
|
5863
6191
|
/**
|
|
5864
|
-
* Get
|
|
6192
|
+
* Get message
|
|
6193
|
+
*
|
|
6194
|
+
* Get a message by its unique ID.
|
|
5865
6195
|
*
|
|
5866
6196
|
*
|
|
5867
6197
|
* @param {string} messageId
|
|
@@ -5881,9 +6211,33 @@ class Messaging extends Service {
|
|
|
5881
6211
|
}, payload);
|
|
5882
6212
|
});
|
|
5883
6213
|
}
|
|
6214
|
+
/**
|
|
6215
|
+
* Delete message
|
|
6216
|
+
*
|
|
6217
|
+
* Delete a message. If the message is not a draft or scheduled, but has been
|
|
6218
|
+
* sent, this will not recall the message.
|
|
6219
|
+
*
|
|
6220
|
+
* @param {string} messageId
|
|
6221
|
+
* @throws {AppwriteException}
|
|
6222
|
+
* @returns {Promise}
|
|
6223
|
+
*/
|
|
6224
|
+
delete(messageId) {
|
|
6225
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6226
|
+
if (typeof messageId === 'undefined') {
|
|
6227
|
+
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
6228
|
+
}
|
|
6229
|
+
const apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
|
|
6230
|
+
const payload = {};
|
|
6231
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6232
|
+
return yield this.client.call('delete', uri, {
|
|
6233
|
+
'content-type': 'application/json',
|
|
6234
|
+
}, payload);
|
|
6235
|
+
});
|
|
6236
|
+
}
|
|
5884
6237
|
/**
|
|
5885
6238
|
* List message logs
|
|
5886
6239
|
*
|
|
6240
|
+
* Get the message activity logs listed by its unique ID.
|
|
5887
6241
|
*
|
|
5888
6242
|
* @param {string} messageId
|
|
5889
6243
|
* @param {string[]} queries
|
|
@@ -5909,11 +6263,10 @@ class Messaging extends Service {
|
|
|
5909
6263
|
/**
|
|
5910
6264
|
* List message targets
|
|
5911
6265
|
*
|
|
5912
|
-
*
|
|
5913
|
-
* attribute.
|
|
6266
|
+
* Get a list of the targets associated with a message.
|
|
5914
6267
|
*
|
|
5915
6268
|
* @param {string} messageId
|
|
5916
|
-
* @param {string} queries
|
|
6269
|
+
* @param {string[]} queries
|
|
5917
6270
|
* @throws {AppwriteException}
|
|
5918
6271
|
* @returns {Promise}
|
|
5919
6272
|
*/
|
|
@@ -5936,8 +6289,9 @@ class Messaging extends Service {
|
|
|
5936
6289
|
/**
|
|
5937
6290
|
* List providers
|
|
5938
6291
|
*
|
|
6292
|
+
* Get a list of all providers from the current Appwrite project.
|
|
5939
6293
|
*
|
|
5940
|
-
* @param {string} queries
|
|
6294
|
+
* @param {string[]} queries
|
|
5941
6295
|
* @param {string} search
|
|
5942
6296
|
* @throws {AppwriteException}
|
|
5943
6297
|
* @returns {Promise}
|
|
@@ -5961,6 +6315,7 @@ class Messaging extends Service {
|
|
|
5961
6315
|
/**
|
|
5962
6316
|
* Create APNS provider
|
|
5963
6317
|
*
|
|
6318
|
+
* Create a new Apple Push Notification service provider.
|
|
5964
6319
|
*
|
|
5965
6320
|
* @param {string} providerId
|
|
5966
6321
|
* @param {string} name
|
|
@@ -5968,11 +6323,12 @@ class Messaging extends Service {
|
|
|
5968
6323
|
* @param {string} authKeyId
|
|
5969
6324
|
* @param {string} teamId
|
|
5970
6325
|
* @param {string} bundleId
|
|
6326
|
+
* @param {boolean} sandbox
|
|
5971
6327
|
* @param {boolean} enabled
|
|
5972
6328
|
* @throws {AppwriteException}
|
|
5973
6329
|
* @returns {Promise}
|
|
5974
6330
|
*/
|
|
5975
|
-
|
|
6331
|
+
createApnsProvider(providerId, name, authKey, authKeyId, teamId, bundleId, sandbox, enabled) {
|
|
5976
6332
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5977
6333
|
if (typeof providerId === 'undefined') {
|
|
5978
6334
|
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
@@ -6000,6 +6356,9 @@ class Messaging extends Service {
|
|
|
6000
6356
|
if (typeof bundleId !== 'undefined') {
|
|
6001
6357
|
payload['bundleId'] = bundleId;
|
|
6002
6358
|
}
|
|
6359
|
+
if (typeof sandbox !== 'undefined') {
|
|
6360
|
+
payload['sandbox'] = sandbox;
|
|
6361
|
+
}
|
|
6003
6362
|
if (typeof enabled !== 'undefined') {
|
|
6004
6363
|
payload['enabled'] = enabled;
|
|
6005
6364
|
}
|
|
@@ -6012,6 +6371,7 @@ class Messaging extends Service {
|
|
|
6012
6371
|
/**
|
|
6013
6372
|
* Update APNS provider
|
|
6014
6373
|
*
|
|
6374
|
+
* Update a Apple Push Notification service provider by its unique ID.
|
|
6015
6375
|
*
|
|
6016
6376
|
* @param {string} providerId
|
|
6017
6377
|
* @param {string} name
|
|
@@ -6020,10 +6380,11 @@ class Messaging extends Service {
|
|
|
6020
6380
|
* @param {string} authKeyId
|
|
6021
6381
|
* @param {string} teamId
|
|
6022
6382
|
* @param {string} bundleId
|
|
6383
|
+
* @param {boolean} sandbox
|
|
6023
6384
|
* @throws {AppwriteException}
|
|
6024
6385
|
* @returns {Promise}
|
|
6025
6386
|
*/
|
|
6026
|
-
|
|
6387
|
+
updateApnsProvider(providerId, name, enabled, authKey, authKeyId, teamId, bundleId, sandbox) {
|
|
6027
6388
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6028
6389
|
if (typeof providerId === 'undefined') {
|
|
6029
6390
|
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
@@ -6048,6 +6409,9 @@ class Messaging extends Service {
|
|
|
6048
6409
|
if (typeof bundleId !== 'undefined') {
|
|
6049
6410
|
payload['bundleId'] = bundleId;
|
|
6050
6411
|
}
|
|
6412
|
+
if (typeof sandbox !== 'undefined') {
|
|
6413
|
+
payload['sandbox'] = sandbox;
|
|
6414
|
+
}
|
|
6051
6415
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6052
6416
|
return yield this.client.call('patch', uri, {
|
|
6053
6417
|
'content-type': 'application/json',
|
|
@@ -6057,6 +6421,7 @@ class Messaging extends Service {
|
|
|
6057
6421
|
/**
|
|
6058
6422
|
* Create FCM provider
|
|
6059
6423
|
*
|
|
6424
|
+
* Create a new Firebase Cloud Messaging provider.
|
|
6060
6425
|
*
|
|
6061
6426
|
* @param {string} providerId
|
|
6062
6427
|
* @param {string} name
|
|
@@ -6065,7 +6430,7 @@ class Messaging extends Service {
|
|
|
6065
6430
|
* @throws {AppwriteException}
|
|
6066
6431
|
* @returns {Promise}
|
|
6067
6432
|
*/
|
|
6068
|
-
|
|
6433
|
+
createFcmProvider(providerId, name, serviceAccountJSON, enabled) {
|
|
6069
6434
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6070
6435
|
if (typeof providerId === 'undefined') {
|
|
6071
6436
|
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
@@ -6096,6 +6461,7 @@ class Messaging extends Service {
|
|
|
6096
6461
|
/**
|
|
6097
6462
|
* Update FCM provider
|
|
6098
6463
|
*
|
|
6464
|
+
* Update a Firebase Cloud Messaging provider by its unique ID.
|
|
6099
6465
|
*
|
|
6100
6466
|
* @param {string} providerId
|
|
6101
6467
|
* @param {string} name
|
|
@@ -6104,7 +6470,7 @@ class Messaging extends Service {
|
|
|
6104
6470
|
* @throws {AppwriteException}
|
|
6105
6471
|
* @returns {Promise}
|
|
6106
6472
|
*/
|
|
6107
|
-
|
|
6473
|
+
updateFcmProvider(providerId, name, enabled, serviceAccountJSON) {
|
|
6108
6474
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6109
6475
|
if (typeof providerId === 'undefined') {
|
|
6110
6476
|
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
@@ -6129,21 +6495,22 @@ class Messaging extends Service {
|
|
|
6129
6495
|
/**
|
|
6130
6496
|
* Create Mailgun provider
|
|
6131
6497
|
*
|
|
6498
|
+
* Create a new Mailgun provider.
|
|
6132
6499
|
*
|
|
6133
6500
|
* @param {string} providerId
|
|
6134
6501
|
* @param {string} name
|
|
6135
6502
|
* @param {string} apiKey
|
|
6136
6503
|
* @param {string} domain
|
|
6137
6504
|
* @param {boolean} isEuRegion
|
|
6138
|
-
* @param {boolean} enabled
|
|
6139
6505
|
* @param {string} fromName
|
|
6140
6506
|
* @param {string} fromEmail
|
|
6141
6507
|
* @param {string} replyToName
|
|
6142
6508
|
* @param {string} replyToEmail
|
|
6509
|
+
* @param {boolean} enabled
|
|
6143
6510
|
* @throws {AppwriteException}
|
|
6144
6511
|
* @returns {Promise}
|
|
6145
6512
|
*/
|
|
6146
|
-
createMailgunProvider(providerId, name, apiKey, domain, isEuRegion,
|
|
6513
|
+
createMailgunProvider(providerId, name, apiKey, domain, isEuRegion, fromName, fromEmail, replyToName, replyToEmail, enabled) {
|
|
6147
6514
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6148
6515
|
if (typeof providerId === 'undefined') {
|
|
6149
6516
|
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
@@ -6168,9 +6535,6 @@ class Messaging extends Service {
|
|
|
6168
6535
|
if (typeof isEuRegion !== 'undefined') {
|
|
6169
6536
|
payload['isEuRegion'] = isEuRegion;
|
|
6170
6537
|
}
|
|
6171
|
-
if (typeof enabled !== 'undefined') {
|
|
6172
|
-
payload['enabled'] = enabled;
|
|
6173
|
-
}
|
|
6174
6538
|
if (typeof fromName !== 'undefined') {
|
|
6175
6539
|
payload['fromName'] = fromName;
|
|
6176
6540
|
}
|
|
@@ -6183,6 +6547,9 @@ class Messaging extends Service {
|
|
|
6183
6547
|
if (typeof replyToEmail !== 'undefined') {
|
|
6184
6548
|
payload['replyToEmail'] = replyToEmail;
|
|
6185
6549
|
}
|
|
6550
|
+
if (typeof enabled !== 'undefined') {
|
|
6551
|
+
payload['enabled'] = enabled;
|
|
6552
|
+
}
|
|
6186
6553
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6187
6554
|
return yield this.client.call('post', uri, {
|
|
6188
6555
|
'content-type': 'application/json',
|
|
@@ -6192,6 +6559,7 @@ class Messaging extends Service {
|
|
|
6192
6559
|
/**
|
|
6193
6560
|
* Update Mailgun provider
|
|
6194
6561
|
*
|
|
6562
|
+
* Update a Mailgun provider by its unique ID.
|
|
6195
6563
|
*
|
|
6196
6564
|
* @param {string} providerId
|
|
6197
6565
|
* @param {string} name
|
|
@@ -6249,6 +6617,7 @@ class Messaging extends Service {
|
|
|
6249
6617
|
/**
|
|
6250
6618
|
* Create Msg91 provider
|
|
6251
6619
|
*
|
|
6620
|
+
* Create a new MSG91 provider.
|
|
6252
6621
|
*
|
|
6253
6622
|
* @param {string} providerId
|
|
6254
6623
|
* @param {string} name
|
|
@@ -6296,6 +6665,7 @@ class Messaging extends Service {
|
|
|
6296
6665
|
/**
|
|
6297
6666
|
* Update Msg91 provider
|
|
6298
6667
|
*
|
|
6668
|
+
* Update a MSG91 provider by its unique ID.
|
|
6299
6669
|
*
|
|
6300
6670
|
* @param {string} providerId
|
|
6301
6671
|
* @param {string} name
|
|
@@ -6337,19 +6707,20 @@ class Messaging extends Service {
|
|
|
6337
6707
|
/**
|
|
6338
6708
|
* Create Sendgrid provider
|
|
6339
6709
|
*
|
|
6710
|
+
* Create a new Sendgrid provider.
|
|
6340
6711
|
*
|
|
6341
6712
|
* @param {string} providerId
|
|
6342
6713
|
* @param {string} name
|
|
6343
6714
|
* @param {string} apiKey
|
|
6344
|
-
* @param {boolean} enabled
|
|
6345
6715
|
* @param {string} fromName
|
|
6346
6716
|
* @param {string} fromEmail
|
|
6347
6717
|
* @param {string} replyToName
|
|
6348
6718
|
* @param {string} replyToEmail
|
|
6719
|
+
* @param {boolean} enabled
|
|
6349
6720
|
* @throws {AppwriteException}
|
|
6350
6721
|
* @returns {Promise}
|
|
6351
6722
|
*/
|
|
6352
|
-
createSendgridProvider(providerId, name, apiKey,
|
|
6723
|
+
createSendgridProvider(providerId, name, apiKey, fromName, fromEmail, replyToName, replyToEmail, enabled) {
|
|
6353
6724
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6354
6725
|
if (typeof providerId === 'undefined') {
|
|
6355
6726
|
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
@@ -6368,9 +6739,6 @@ class Messaging extends Service {
|
|
|
6368
6739
|
if (typeof apiKey !== 'undefined') {
|
|
6369
6740
|
payload['apiKey'] = apiKey;
|
|
6370
6741
|
}
|
|
6371
|
-
if (typeof enabled !== 'undefined') {
|
|
6372
|
-
payload['enabled'] = enabled;
|
|
6373
|
-
}
|
|
6374
6742
|
if (typeof fromName !== 'undefined') {
|
|
6375
6743
|
payload['fromName'] = fromName;
|
|
6376
6744
|
}
|
|
@@ -6383,6 +6751,9 @@ class Messaging extends Service {
|
|
|
6383
6751
|
if (typeof replyToEmail !== 'undefined') {
|
|
6384
6752
|
payload['replyToEmail'] = replyToEmail;
|
|
6385
6753
|
}
|
|
6754
|
+
if (typeof enabled !== 'undefined') {
|
|
6755
|
+
payload['enabled'] = enabled;
|
|
6756
|
+
}
|
|
6386
6757
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6387
6758
|
return yield this.client.call('post', uri, {
|
|
6388
6759
|
'content-type': 'application/json',
|
|
@@ -6392,6 +6763,7 @@ class Messaging extends Service {
|
|
|
6392
6763
|
/**
|
|
6393
6764
|
* Update Sendgrid provider
|
|
6394
6765
|
*
|
|
6766
|
+
* Update a Sendgrid provider by its unique ID.
|
|
6395
6767
|
*
|
|
6396
6768
|
* @param {string} providerId
|
|
6397
6769
|
* @param {string} name
|
|
@@ -6409,16 +6781,170 @@ class Messaging extends Service {
|
|
|
6409
6781
|
if (typeof providerId === 'undefined') {
|
|
6410
6782
|
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6411
6783
|
}
|
|
6412
|
-
const apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId);
|
|
6413
|
-
const payload = {};
|
|
6414
|
-
if (typeof name !== 'undefined') {
|
|
6415
|
-
payload['name'] = name;
|
|
6784
|
+
const apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId);
|
|
6785
|
+
const payload = {};
|
|
6786
|
+
if (typeof name !== 'undefined') {
|
|
6787
|
+
payload['name'] = name;
|
|
6788
|
+
}
|
|
6789
|
+
if (typeof enabled !== 'undefined') {
|
|
6790
|
+
payload['enabled'] = enabled;
|
|
6791
|
+
}
|
|
6792
|
+
if (typeof apiKey !== 'undefined') {
|
|
6793
|
+
payload['apiKey'] = apiKey;
|
|
6794
|
+
}
|
|
6795
|
+
if (typeof fromName !== 'undefined') {
|
|
6796
|
+
payload['fromName'] = fromName;
|
|
6797
|
+
}
|
|
6798
|
+
if (typeof fromEmail !== 'undefined') {
|
|
6799
|
+
payload['fromEmail'] = fromEmail;
|
|
6800
|
+
}
|
|
6801
|
+
if (typeof replyToName !== 'undefined') {
|
|
6802
|
+
payload['replyToName'] = replyToName;
|
|
6803
|
+
}
|
|
6804
|
+
if (typeof replyToEmail !== 'undefined') {
|
|
6805
|
+
payload['replyToEmail'] = replyToEmail;
|
|
6806
|
+
}
|
|
6807
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6808
|
+
return yield this.client.call('patch', uri, {
|
|
6809
|
+
'content-type': 'application/json',
|
|
6810
|
+
}, payload);
|
|
6811
|
+
});
|
|
6812
|
+
}
|
|
6813
|
+
/**
|
|
6814
|
+
* Create SMTP provider
|
|
6815
|
+
*
|
|
6816
|
+
* Create a new SMTP provider.
|
|
6817
|
+
*
|
|
6818
|
+
* @param {string} providerId
|
|
6819
|
+
* @param {string} name
|
|
6820
|
+
* @param {string} host
|
|
6821
|
+
* @param {number} port
|
|
6822
|
+
* @param {string} username
|
|
6823
|
+
* @param {string} password
|
|
6824
|
+
* @param {SmtpEncryption} encryption
|
|
6825
|
+
* @param {boolean} autoTLS
|
|
6826
|
+
* @param {string} mailer
|
|
6827
|
+
* @param {string} fromName
|
|
6828
|
+
* @param {string} fromEmail
|
|
6829
|
+
* @param {string} replyToName
|
|
6830
|
+
* @param {string} replyToEmail
|
|
6831
|
+
* @param {boolean} enabled
|
|
6832
|
+
* @throws {AppwriteException}
|
|
6833
|
+
* @returns {Promise}
|
|
6834
|
+
*/
|
|
6835
|
+
createSmtpProvider(providerId, name, host, port, username, password, encryption, autoTLS, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled) {
|
|
6836
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6837
|
+
if (typeof providerId === 'undefined') {
|
|
6838
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6839
|
+
}
|
|
6840
|
+
if (typeof name === 'undefined') {
|
|
6841
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
6842
|
+
}
|
|
6843
|
+
if (typeof host === 'undefined') {
|
|
6844
|
+
throw new AppwriteException('Missing required parameter: "host"');
|
|
6845
|
+
}
|
|
6846
|
+
const apiPath = '/messaging/providers/smtp';
|
|
6847
|
+
const payload = {};
|
|
6848
|
+
if (typeof providerId !== 'undefined') {
|
|
6849
|
+
payload['providerId'] = providerId;
|
|
6850
|
+
}
|
|
6851
|
+
if (typeof name !== 'undefined') {
|
|
6852
|
+
payload['name'] = name;
|
|
6853
|
+
}
|
|
6854
|
+
if (typeof host !== 'undefined') {
|
|
6855
|
+
payload['host'] = host;
|
|
6856
|
+
}
|
|
6857
|
+
if (typeof port !== 'undefined') {
|
|
6858
|
+
payload['port'] = port;
|
|
6859
|
+
}
|
|
6860
|
+
if (typeof username !== 'undefined') {
|
|
6861
|
+
payload['username'] = username;
|
|
6862
|
+
}
|
|
6863
|
+
if (typeof password !== 'undefined') {
|
|
6864
|
+
payload['password'] = password;
|
|
6865
|
+
}
|
|
6866
|
+
if (typeof encryption !== 'undefined') {
|
|
6867
|
+
payload['encryption'] = encryption;
|
|
6868
|
+
}
|
|
6869
|
+
if (typeof autoTLS !== 'undefined') {
|
|
6870
|
+
payload['autoTLS'] = autoTLS;
|
|
6871
|
+
}
|
|
6872
|
+
if (typeof mailer !== 'undefined') {
|
|
6873
|
+
payload['mailer'] = mailer;
|
|
6874
|
+
}
|
|
6875
|
+
if (typeof fromName !== 'undefined') {
|
|
6876
|
+
payload['fromName'] = fromName;
|
|
6877
|
+
}
|
|
6878
|
+
if (typeof fromEmail !== 'undefined') {
|
|
6879
|
+
payload['fromEmail'] = fromEmail;
|
|
6880
|
+
}
|
|
6881
|
+
if (typeof replyToName !== 'undefined') {
|
|
6882
|
+
payload['replyToName'] = replyToName;
|
|
6883
|
+
}
|
|
6884
|
+
if (typeof replyToEmail !== 'undefined') {
|
|
6885
|
+
payload['replyToEmail'] = replyToEmail;
|
|
6886
|
+
}
|
|
6887
|
+
if (typeof enabled !== 'undefined') {
|
|
6888
|
+
payload['enabled'] = enabled;
|
|
6889
|
+
}
|
|
6890
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6891
|
+
return yield this.client.call('post', uri, {
|
|
6892
|
+
'content-type': 'application/json',
|
|
6893
|
+
}, payload);
|
|
6894
|
+
});
|
|
6895
|
+
}
|
|
6896
|
+
/**
|
|
6897
|
+
* Update SMTP provider
|
|
6898
|
+
*
|
|
6899
|
+
* Update a SMTP provider by its unique ID.
|
|
6900
|
+
*
|
|
6901
|
+
* @param {string} providerId
|
|
6902
|
+
* @param {string} name
|
|
6903
|
+
* @param {string} host
|
|
6904
|
+
* @param {number} port
|
|
6905
|
+
* @param {string} username
|
|
6906
|
+
* @param {string} password
|
|
6907
|
+
* @param {SmtpEncryption} encryption
|
|
6908
|
+
* @param {boolean} autoTLS
|
|
6909
|
+
* @param {string} mailer
|
|
6910
|
+
* @param {string} fromName
|
|
6911
|
+
* @param {string} fromEmail
|
|
6912
|
+
* @param {string} replyToName
|
|
6913
|
+
* @param {string} replyToEmail
|
|
6914
|
+
* @param {boolean} enabled
|
|
6915
|
+
* @throws {AppwriteException}
|
|
6916
|
+
* @returns {Promise}
|
|
6917
|
+
*/
|
|
6918
|
+
updateSmtpProvider(providerId, name, host, port, username, password, encryption, autoTLS, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled) {
|
|
6919
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6920
|
+
if (typeof providerId === 'undefined') {
|
|
6921
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6922
|
+
}
|
|
6923
|
+
const apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId);
|
|
6924
|
+
const payload = {};
|
|
6925
|
+
if (typeof name !== 'undefined') {
|
|
6926
|
+
payload['name'] = name;
|
|
6927
|
+
}
|
|
6928
|
+
if (typeof host !== 'undefined') {
|
|
6929
|
+
payload['host'] = host;
|
|
6930
|
+
}
|
|
6931
|
+
if (typeof port !== 'undefined') {
|
|
6932
|
+
payload['port'] = port;
|
|
6933
|
+
}
|
|
6934
|
+
if (typeof username !== 'undefined') {
|
|
6935
|
+
payload['username'] = username;
|
|
6416
6936
|
}
|
|
6417
|
-
if (typeof
|
|
6418
|
-
payload['
|
|
6937
|
+
if (typeof password !== 'undefined') {
|
|
6938
|
+
payload['password'] = password;
|
|
6419
6939
|
}
|
|
6420
|
-
if (typeof
|
|
6421
|
-
payload['
|
|
6940
|
+
if (typeof encryption !== 'undefined') {
|
|
6941
|
+
payload['encryption'] = encryption;
|
|
6942
|
+
}
|
|
6943
|
+
if (typeof autoTLS !== 'undefined') {
|
|
6944
|
+
payload['autoTLS'] = autoTLS;
|
|
6945
|
+
}
|
|
6946
|
+
if (typeof mailer !== 'undefined') {
|
|
6947
|
+
payload['mailer'] = mailer;
|
|
6422
6948
|
}
|
|
6423
6949
|
if (typeof fromName !== 'undefined') {
|
|
6424
6950
|
payload['fromName'] = fromName;
|
|
@@ -6432,6 +6958,9 @@ class Messaging extends Service {
|
|
|
6432
6958
|
if (typeof replyToEmail !== 'undefined') {
|
|
6433
6959
|
payload['replyToEmail'] = replyToEmail;
|
|
6434
6960
|
}
|
|
6961
|
+
if (typeof enabled !== 'undefined') {
|
|
6962
|
+
payload['enabled'] = enabled;
|
|
6963
|
+
}
|
|
6435
6964
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6436
6965
|
return yield this.client.call('patch', uri, {
|
|
6437
6966
|
'content-type': 'application/json',
|
|
@@ -6441,17 +6970,18 @@ class Messaging extends Service {
|
|
|
6441
6970
|
/**
|
|
6442
6971
|
* Create Telesign provider
|
|
6443
6972
|
*
|
|
6973
|
+
* Create a new Telesign provider.
|
|
6444
6974
|
*
|
|
6445
6975
|
* @param {string} providerId
|
|
6446
6976
|
* @param {string} name
|
|
6447
6977
|
* @param {string} from
|
|
6448
|
-
* @param {string}
|
|
6449
|
-
* @param {string}
|
|
6978
|
+
* @param {string} customerId
|
|
6979
|
+
* @param {string} apiKey
|
|
6450
6980
|
* @param {boolean} enabled
|
|
6451
6981
|
* @throws {AppwriteException}
|
|
6452
6982
|
* @returns {Promise}
|
|
6453
6983
|
*/
|
|
6454
|
-
createTelesignProvider(providerId, name, from,
|
|
6984
|
+
createTelesignProvider(providerId, name, from, customerId, apiKey, enabled) {
|
|
6455
6985
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6456
6986
|
if (typeof providerId === 'undefined') {
|
|
6457
6987
|
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
@@ -6470,11 +7000,11 @@ class Messaging extends Service {
|
|
|
6470
7000
|
if (typeof from !== 'undefined') {
|
|
6471
7001
|
payload['from'] = from;
|
|
6472
7002
|
}
|
|
6473
|
-
if (typeof
|
|
6474
|
-
payload['
|
|
7003
|
+
if (typeof customerId !== 'undefined') {
|
|
7004
|
+
payload['customerId'] = customerId;
|
|
6475
7005
|
}
|
|
6476
|
-
if (typeof
|
|
6477
|
-
payload['
|
|
7006
|
+
if (typeof apiKey !== 'undefined') {
|
|
7007
|
+
payload['apiKey'] = apiKey;
|
|
6478
7008
|
}
|
|
6479
7009
|
if (typeof enabled !== 'undefined') {
|
|
6480
7010
|
payload['enabled'] = enabled;
|
|
@@ -6488,17 +7018,18 @@ class Messaging extends Service {
|
|
|
6488
7018
|
/**
|
|
6489
7019
|
* Update Telesign provider
|
|
6490
7020
|
*
|
|
7021
|
+
* Update a Telesign provider by its unique ID.
|
|
6491
7022
|
*
|
|
6492
7023
|
* @param {string} providerId
|
|
6493
7024
|
* @param {string} name
|
|
6494
7025
|
* @param {boolean} enabled
|
|
6495
|
-
* @param {string}
|
|
6496
|
-
* @param {string}
|
|
7026
|
+
* @param {string} customerId
|
|
7027
|
+
* @param {string} apiKey
|
|
6497
7028
|
* @param {string} from
|
|
6498
7029
|
* @throws {AppwriteException}
|
|
6499
7030
|
* @returns {Promise}
|
|
6500
7031
|
*/
|
|
6501
|
-
updateTelesignProvider(providerId, name, enabled,
|
|
7032
|
+
updateTelesignProvider(providerId, name, enabled, customerId, apiKey, from) {
|
|
6502
7033
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6503
7034
|
if (typeof providerId === 'undefined') {
|
|
6504
7035
|
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
@@ -6511,11 +7042,11 @@ class Messaging extends Service {
|
|
|
6511
7042
|
if (typeof enabled !== 'undefined') {
|
|
6512
7043
|
payload['enabled'] = enabled;
|
|
6513
7044
|
}
|
|
6514
|
-
if (typeof
|
|
6515
|
-
payload['
|
|
7045
|
+
if (typeof customerId !== 'undefined') {
|
|
7046
|
+
payload['customerId'] = customerId;
|
|
6516
7047
|
}
|
|
6517
|
-
if (typeof
|
|
6518
|
-
payload['
|
|
7048
|
+
if (typeof apiKey !== 'undefined') {
|
|
7049
|
+
payload['apiKey'] = apiKey;
|
|
6519
7050
|
}
|
|
6520
7051
|
if (typeof from !== 'undefined') {
|
|
6521
7052
|
payload['from'] = from;
|
|
@@ -6529,6 +7060,7 @@ class Messaging extends Service {
|
|
|
6529
7060
|
/**
|
|
6530
7061
|
* Create Textmagic provider
|
|
6531
7062
|
*
|
|
7063
|
+
* Create a new Textmagic provider.
|
|
6532
7064
|
*
|
|
6533
7065
|
* @param {string} providerId
|
|
6534
7066
|
* @param {string} name
|
|
@@ -6576,6 +7108,7 @@ class Messaging extends Service {
|
|
|
6576
7108
|
/**
|
|
6577
7109
|
* Update Textmagic provider
|
|
6578
7110
|
*
|
|
7111
|
+
* Update a Textmagic provider by its unique ID.
|
|
6579
7112
|
*
|
|
6580
7113
|
* @param {string} providerId
|
|
6581
7114
|
* @param {string} name
|
|
@@ -6617,6 +7150,7 @@ class Messaging extends Service {
|
|
|
6617
7150
|
/**
|
|
6618
7151
|
* Create Twilio provider
|
|
6619
7152
|
*
|
|
7153
|
+
* Create a new Twilio provider.
|
|
6620
7154
|
*
|
|
6621
7155
|
* @param {string} providerId
|
|
6622
7156
|
* @param {string} name
|
|
@@ -6664,6 +7198,7 @@ class Messaging extends Service {
|
|
|
6664
7198
|
/**
|
|
6665
7199
|
* Update Twilio provider
|
|
6666
7200
|
*
|
|
7201
|
+
* Update a Twilio provider by its unique ID.
|
|
6667
7202
|
*
|
|
6668
7203
|
* @param {string} providerId
|
|
6669
7204
|
* @param {string} name
|
|
@@ -6705,6 +7240,7 @@ class Messaging extends Service {
|
|
|
6705
7240
|
/**
|
|
6706
7241
|
* Create Vonage provider
|
|
6707
7242
|
*
|
|
7243
|
+
* Create a new Vonage provider.
|
|
6708
7244
|
*
|
|
6709
7245
|
* @param {string} providerId
|
|
6710
7246
|
* @param {string} name
|
|
@@ -6752,6 +7288,7 @@ class Messaging extends Service {
|
|
|
6752
7288
|
/**
|
|
6753
7289
|
* Update Vonage provider
|
|
6754
7290
|
*
|
|
7291
|
+
* Update a Vonage provider by its unique ID.
|
|
6755
7292
|
*
|
|
6756
7293
|
* @param {string} providerId
|
|
6757
7294
|
* @param {string} name
|
|
@@ -6793,6 +7330,8 @@ class Messaging extends Service {
|
|
|
6793
7330
|
/**
|
|
6794
7331
|
* Get provider
|
|
6795
7332
|
*
|
|
7333
|
+
* Get a provider by its unique ID.
|
|
7334
|
+
*
|
|
6796
7335
|
*
|
|
6797
7336
|
* @param {string} providerId
|
|
6798
7337
|
* @throws {AppwriteException}
|
|
@@ -6814,6 +7353,7 @@ class Messaging extends Service {
|
|
|
6814
7353
|
/**
|
|
6815
7354
|
* Delete provider
|
|
6816
7355
|
*
|
|
7356
|
+
* Delete a provider by its unique ID.
|
|
6817
7357
|
*
|
|
6818
7358
|
* @param {string} providerId
|
|
6819
7359
|
* @throws {AppwriteException}
|
|
@@ -6835,6 +7375,7 @@ class Messaging extends Service {
|
|
|
6835
7375
|
/**
|
|
6836
7376
|
* List provider logs
|
|
6837
7377
|
*
|
|
7378
|
+
* Get the provider activity logs listed by its unique ID.
|
|
6838
7379
|
*
|
|
6839
7380
|
* @param {string} providerId
|
|
6840
7381
|
* @param {string[]} queries
|
|
@@ -6860,6 +7401,7 @@ class Messaging extends Service {
|
|
|
6860
7401
|
/**
|
|
6861
7402
|
* List subscriber logs
|
|
6862
7403
|
*
|
|
7404
|
+
* Get the subscriber activity logs listed by its unique ID.
|
|
6863
7405
|
*
|
|
6864
7406
|
* @param {string} subscriberId
|
|
6865
7407
|
* @param {string[]} queries
|
|
@@ -6883,10 +7425,11 @@ class Messaging extends Service {
|
|
|
6883
7425
|
});
|
|
6884
7426
|
}
|
|
6885
7427
|
/**
|
|
6886
|
-
* List topics
|
|
7428
|
+
* List topics
|
|
6887
7429
|
*
|
|
7430
|
+
* Get a list of all topics from the current Appwrite project.
|
|
6888
7431
|
*
|
|
6889
|
-
* @param {string} queries
|
|
7432
|
+
* @param {string[]} queries
|
|
6890
7433
|
* @param {string} search
|
|
6891
7434
|
* @throws {AppwriteException}
|
|
6892
7435
|
* @returns {Promise}
|
|
@@ -6908,16 +7451,17 @@ class Messaging extends Service {
|
|
|
6908
7451
|
});
|
|
6909
7452
|
}
|
|
6910
7453
|
/**
|
|
6911
|
-
* Create
|
|
7454
|
+
* Create topic
|
|
6912
7455
|
*
|
|
7456
|
+
* Create a new topic.
|
|
6913
7457
|
*
|
|
6914
7458
|
* @param {string} topicId
|
|
6915
7459
|
* @param {string} name
|
|
6916
|
-
* @param {string}
|
|
7460
|
+
* @param {string[]} subscribe
|
|
6917
7461
|
* @throws {AppwriteException}
|
|
6918
7462
|
* @returns {Promise}
|
|
6919
7463
|
*/
|
|
6920
|
-
createTopic(topicId, name,
|
|
7464
|
+
createTopic(topicId, name, subscribe) {
|
|
6921
7465
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6922
7466
|
if (typeof topicId === 'undefined') {
|
|
6923
7467
|
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
@@ -6933,8 +7477,8 @@ class Messaging extends Service {
|
|
|
6933
7477
|
if (typeof name !== 'undefined') {
|
|
6934
7478
|
payload['name'] = name;
|
|
6935
7479
|
}
|
|
6936
|
-
if (typeof
|
|
6937
|
-
payload['
|
|
7480
|
+
if (typeof subscribe !== 'undefined') {
|
|
7481
|
+
payload['subscribe'] = subscribe;
|
|
6938
7482
|
}
|
|
6939
7483
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6940
7484
|
return yield this.client.call('post', uri, {
|
|
@@ -6943,7 +7487,9 @@ class Messaging extends Service {
|
|
|
6943
7487
|
});
|
|
6944
7488
|
}
|
|
6945
7489
|
/**
|
|
6946
|
-
* Get
|
|
7490
|
+
* Get topic
|
|
7491
|
+
*
|
|
7492
|
+
* Get a topic by its unique ID.
|
|
6947
7493
|
*
|
|
6948
7494
|
*
|
|
6949
7495
|
* @param {string} topicId
|
|
@@ -6964,16 +7510,18 @@ class Messaging extends Service {
|
|
|
6964
7510
|
});
|
|
6965
7511
|
}
|
|
6966
7512
|
/**
|
|
6967
|
-
* Update
|
|
7513
|
+
* Update topic
|
|
7514
|
+
*
|
|
7515
|
+
* Update a topic by its unique ID.
|
|
6968
7516
|
*
|
|
6969
7517
|
*
|
|
6970
7518
|
* @param {string} topicId
|
|
6971
7519
|
* @param {string} name
|
|
6972
|
-
* @param {string}
|
|
7520
|
+
* @param {string[]} subscribe
|
|
6973
7521
|
* @throws {AppwriteException}
|
|
6974
7522
|
* @returns {Promise}
|
|
6975
7523
|
*/
|
|
6976
|
-
updateTopic(topicId, name,
|
|
7524
|
+
updateTopic(topicId, name, subscribe) {
|
|
6977
7525
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6978
7526
|
if (typeof topicId === 'undefined') {
|
|
6979
7527
|
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
@@ -6983,8 +7531,8 @@ class Messaging extends Service {
|
|
|
6983
7531
|
if (typeof name !== 'undefined') {
|
|
6984
7532
|
payload['name'] = name;
|
|
6985
7533
|
}
|
|
6986
|
-
if (typeof
|
|
6987
|
-
payload['
|
|
7534
|
+
if (typeof subscribe !== 'undefined') {
|
|
7535
|
+
payload['subscribe'] = subscribe;
|
|
6988
7536
|
}
|
|
6989
7537
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6990
7538
|
return yield this.client.call('patch', uri, {
|
|
@@ -6993,8 +7541,9 @@ class Messaging extends Service {
|
|
|
6993
7541
|
});
|
|
6994
7542
|
}
|
|
6995
7543
|
/**
|
|
6996
|
-
* Delete
|
|
7544
|
+
* Delete topic
|
|
6997
7545
|
*
|
|
7546
|
+
* Delete a topic by its unique ID.
|
|
6998
7547
|
*
|
|
6999
7548
|
* @param {string} topicId
|
|
7000
7549
|
* @throws {AppwriteException}
|
|
@@ -7016,6 +7565,7 @@ class Messaging extends Service {
|
|
|
7016
7565
|
/**
|
|
7017
7566
|
* List topic logs
|
|
7018
7567
|
*
|
|
7568
|
+
* Get the topic activity logs listed by its unique ID.
|
|
7019
7569
|
*
|
|
7020
7570
|
* @param {string} topicId
|
|
7021
7571
|
* @param {string[]} queries
|
|
@@ -7039,11 +7589,12 @@ class Messaging extends Service {
|
|
|
7039
7589
|
});
|
|
7040
7590
|
}
|
|
7041
7591
|
/**
|
|
7042
|
-
* List subscribers
|
|
7592
|
+
* List subscribers
|
|
7043
7593
|
*
|
|
7594
|
+
* Get a list of all subscribers from the current Appwrite project.
|
|
7044
7595
|
*
|
|
7045
7596
|
* @param {string} topicId
|
|
7046
|
-
* @param {string} queries
|
|
7597
|
+
* @param {string[]} queries
|
|
7047
7598
|
* @param {string} search
|
|
7048
7599
|
* @throws {AppwriteException}
|
|
7049
7600
|
* @returns {Promise}
|
|
@@ -7068,8 +7619,9 @@ class Messaging extends Service {
|
|
|
7068
7619
|
});
|
|
7069
7620
|
}
|
|
7070
7621
|
/**
|
|
7071
|
-
* Create
|
|
7622
|
+
* Create subscriber
|
|
7072
7623
|
*
|
|
7624
|
+
* Create a new subscriber.
|
|
7073
7625
|
*
|
|
7074
7626
|
* @param {string} topicId
|
|
7075
7627
|
* @param {string} subscriberId
|
|
@@ -7103,7 +7655,9 @@ class Messaging extends Service {
|
|
|
7103
7655
|
});
|
|
7104
7656
|
}
|
|
7105
7657
|
/**
|
|
7106
|
-
* Get
|
|
7658
|
+
* Get subscriber
|
|
7659
|
+
*
|
|
7660
|
+
* Get a subscriber by its unique ID.
|
|
7107
7661
|
*
|
|
7108
7662
|
*
|
|
7109
7663
|
* @param {string} topicId
|
|
@@ -7128,8 +7682,9 @@ class Messaging extends Service {
|
|
|
7128
7682
|
});
|
|
7129
7683
|
}
|
|
7130
7684
|
/**
|
|
7131
|
-
* Delete
|
|
7685
|
+
* Delete subscriber
|
|
7132
7686
|
*
|
|
7687
|
+
* Delete a subscriber by its unique ID.
|
|
7133
7688
|
*
|
|
7134
7689
|
* @param {string} topicId
|
|
7135
7690
|
* @param {string} subscriberId
|
|
@@ -7162,7 +7717,7 @@ class Migrations extends Service {
|
|
|
7162
7717
|
* List Migrations
|
|
7163
7718
|
*
|
|
7164
7719
|
*
|
|
7165
|
-
* @param {string} queries
|
|
7720
|
+
* @param {string[]} queries
|
|
7166
7721
|
* @param {string} search
|
|
7167
7722
|
* @throws {AppwriteException}
|
|
7168
7723
|
* @returns {Promise}
|
|
@@ -7767,12 +8322,12 @@ class Project extends Service {
|
|
|
7767
8322
|
super(client);
|
|
7768
8323
|
}
|
|
7769
8324
|
/**
|
|
7770
|
-
* Get usage stats
|
|
8325
|
+
* Get project usage stats
|
|
7771
8326
|
*
|
|
7772
8327
|
*
|
|
7773
8328
|
* @param {string} startDate
|
|
7774
8329
|
* @param {string} endDate
|
|
7775
|
-
* @param {
|
|
8330
|
+
* @param {ProjectUsageRange} period
|
|
7776
8331
|
* @throws {AppwriteException}
|
|
7777
8332
|
* @returns {Promise}
|
|
7778
8333
|
*/
|
|
@@ -7969,7 +8524,7 @@ class Projects extends Service {
|
|
|
7969
8524
|
* @param {string} projectId
|
|
7970
8525
|
* @param {string} name
|
|
7971
8526
|
* @param {string} teamId
|
|
7972
|
-
* @param {
|
|
8527
|
+
* @param {Region} region
|
|
7973
8528
|
* @param {string} description
|
|
7974
8529
|
* @param {string} logo
|
|
7975
8530
|
* @param {string} url
|
|
@@ -8147,26 +8702,33 @@ class Projects extends Service {
|
|
|
8147
8702
|
});
|
|
8148
8703
|
}
|
|
8149
8704
|
/**
|
|
8150
|
-
* Update
|
|
8705
|
+
* Update API status
|
|
8151
8706
|
*
|
|
8152
8707
|
*
|
|
8153
8708
|
* @param {string} projectId
|
|
8154
|
-
* @param {
|
|
8709
|
+
* @param {Api} api
|
|
8710
|
+
* @param {boolean} status
|
|
8155
8711
|
* @throws {AppwriteException}
|
|
8156
8712
|
* @returns {Promise}
|
|
8157
8713
|
*/
|
|
8158
|
-
|
|
8714
|
+
updateApiStatus(projectId, api, status) {
|
|
8159
8715
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8160
8716
|
if (typeof projectId === 'undefined') {
|
|
8161
8717
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
8162
8718
|
}
|
|
8163
|
-
if (typeof
|
|
8164
|
-
throw new AppwriteException('Missing required parameter: "
|
|
8719
|
+
if (typeof api === 'undefined') {
|
|
8720
|
+
throw new AppwriteException('Missing required parameter: "api"');
|
|
8165
8721
|
}
|
|
8166
|
-
|
|
8722
|
+
if (typeof status === 'undefined') {
|
|
8723
|
+
throw new AppwriteException('Missing required parameter: "status"');
|
|
8724
|
+
}
|
|
8725
|
+
const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
|
|
8167
8726
|
const payload = {};
|
|
8168
|
-
if (typeof
|
|
8169
|
-
payload['
|
|
8727
|
+
if (typeof api !== 'undefined') {
|
|
8728
|
+
payload['api'] = api;
|
|
8729
|
+
}
|
|
8730
|
+
if (typeof status !== 'undefined') {
|
|
8731
|
+
payload['status'] = status;
|
|
8170
8732
|
}
|
|
8171
8733
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
8172
8734
|
return yield this.client.call('patch', uri, {
|
|
@@ -8175,26 +8737,26 @@ class Projects extends Service {
|
|
|
8175
8737
|
});
|
|
8176
8738
|
}
|
|
8177
8739
|
/**
|
|
8178
|
-
* Update
|
|
8740
|
+
* Update all API status
|
|
8179
8741
|
*
|
|
8180
8742
|
*
|
|
8181
8743
|
* @param {string} projectId
|
|
8182
|
-
* @param {
|
|
8744
|
+
* @param {boolean} status
|
|
8183
8745
|
* @throws {AppwriteException}
|
|
8184
8746
|
* @returns {Promise}
|
|
8185
8747
|
*/
|
|
8186
|
-
|
|
8748
|
+
updateApiStatusAll(projectId, status) {
|
|
8187
8749
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8188
8750
|
if (typeof projectId === 'undefined') {
|
|
8189
8751
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
8190
8752
|
}
|
|
8191
|
-
if (typeof
|
|
8192
|
-
throw new AppwriteException('Missing required parameter: "
|
|
8753
|
+
if (typeof status === 'undefined') {
|
|
8754
|
+
throw new AppwriteException('Missing required parameter: "status"');
|
|
8193
8755
|
}
|
|
8194
|
-
const apiPath = '/projects/{projectId}/
|
|
8756
|
+
const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
|
|
8195
8757
|
const payload = {};
|
|
8196
|
-
if (typeof
|
|
8197
|
-
payload['
|
|
8758
|
+
if (typeof status !== 'undefined') {
|
|
8759
|
+
payload['status'] = status;
|
|
8198
8760
|
}
|
|
8199
8761
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
8200
8762
|
return yield this.client.call('patch', uri, {
|
|
@@ -8203,7 +8765,35 @@ class Projects extends Service {
|
|
|
8203
8765
|
});
|
|
8204
8766
|
}
|
|
8205
8767
|
/**
|
|
8206
|
-
* Update project
|
|
8768
|
+
* Update project authentication duration
|
|
8769
|
+
*
|
|
8770
|
+
*
|
|
8771
|
+
* @param {string} projectId
|
|
8772
|
+
* @param {number} duration
|
|
8773
|
+
* @throws {AppwriteException}
|
|
8774
|
+
* @returns {Promise}
|
|
8775
|
+
*/
|
|
8776
|
+
updateAuthDuration(projectId, duration) {
|
|
8777
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
8778
|
+
if (typeof projectId === 'undefined') {
|
|
8779
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
8780
|
+
}
|
|
8781
|
+
if (typeof duration === 'undefined') {
|
|
8782
|
+
throw new AppwriteException('Missing required parameter: "duration"');
|
|
8783
|
+
}
|
|
8784
|
+
const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
|
|
8785
|
+
const payload = {};
|
|
8786
|
+
if (typeof duration !== 'undefined') {
|
|
8787
|
+
payload['duration'] = duration;
|
|
8788
|
+
}
|
|
8789
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
8790
|
+
return yield this.client.call('patch', uri, {
|
|
8791
|
+
'content-type': 'application/json',
|
|
8792
|
+
}, payload);
|
|
8793
|
+
});
|
|
8794
|
+
}
|
|
8795
|
+
/**
|
|
8796
|
+
* Update project users limit
|
|
8207
8797
|
*
|
|
8208
8798
|
*
|
|
8209
8799
|
* @param {string} projectId
|
|
@@ -8211,7 +8801,7 @@ class Projects extends Service {
|
|
|
8211
8801
|
* @throws {AppwriteException}
|
|
8212
8802
|
* @returns {Promise}
|
|
8213
8803
|
*/
|
|
8214
|
-
|
|
8804
|
+
updateAuthLimit(projectId, limit) {
|
|
8215
8805
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8216
8806
|
if (typeof projectId === 'undefined') {
|
|
8217
8807
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
@@ -8219,7 +8809,7 @@ class Projects extends Service {
|
|
|
8219
8809
|
if (typeof limit === 'undefined') {
|
|
8220
8810
|
throw new AppwriteException('Missing required parameter: "limit"');
|
|
8221
8811
|
}
|
|
8222
|
-
const apiPath = '/projects/{projectId}/auth/
|
|
8812
|
+
const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
|
|
8223
8813
|
const payload = {};
|
|
8224
8814
|
if (typeof limit !== 'undefined') {
|
|
8225
8815
|
payload['limit'] = limit;
|
|
@@ -8231,26 +8821,26 @@ class Projects extends Service {
|
|
|
8231
8821
|
});
|
|
8232
8822
|
}
|
|
8233
8823
|
/**
|
|
8234
|
-
* Update
|
|
8824
|
+
* Update project user sessions limit
|
|
8235
8825
|
*
|
|
8236
8826
|
*
|
|
8237
8827
|
* @param {string} projectId
|
|
8238
|
-
* @param {number}
|
|
8828
|
+
* @param {number} limit
|
|
8239
8829
|
* @throws {AppwriteException}
|
|
8240
8830
|
* @returns {Promise}
|
|
8241
8831
|
*/
|
|
8242
|
-
|
|
8832
|
+
updateAuthSessionsLimit(projectId, limit) {
|
|
8243
8833
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8244
8834
|
if (typeof projectId === 'undefined') {
|
|
8245
8835
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
8246
8836
|
}
|
|
8247
|
-
if (typeof
|
|
8248
|
-
throw new AppwriteException('Missing required parameter: "
|
|
8837
|
+
if (typeof limit === 'undefined') {
|
|
8838
|
+
throw new AppwriteException('Missing required parameter: "limit"');
|
|
8249
8839
|
}
|
|
8250
|
-
const apiPath = '/projects/{projectId}/auth/
|
|
8840
|
+
const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
|
|
8251
8841
|
const payload = {};
|
|
8252
|
-
if (typeof
|
|
8253
|
-
payload['
|
|
8842
|
+
if (typeof limit !== 'undefined') {
|
|
8843
|
+
payload['limit'] = limit;
|
|
8254
8844
|
}
|
|
8255
8845
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
8256
8846
|
return yield this.client.call('patch', uri, {
|
|
@@ -8347,7 +8937,7 @@ class Projects extends Service {
|
|
|
8347
8937
|
*
|
|
8348
8938
|
*
|
|
8349
8939
|
* @param {string} projectId
|
|
8350
|
-
* @param {
|
|
8940
|
+
* @param {AuthMethod} method
|
|
8351
8941
|
* @param {boolean} status
|
|
8352
8942
|
* @throws {AppwriteException}
|
|
8353
8943
|
* @returns {Promise}
|
|
@@ -8532,7 +9122,7 @@ class Projects extends Service {
|
|
|
8532
9122
|
*
|
|
8533
9123
|
*
|
|
8534
9124
|
* @param {string} projectId
|
|
8535
|
-
* @param {
|
|
9125
|
+
* @param {OAuthProvider} provider
|
|
8536
9126
|
* @param {string} appId
|
|
8537
9127
|
* @param {string} secret
|
|
8538
9128
|
* @param {boolean} enabled
|
|
@@ -8593,7 +9183,7 @@ class Projects extends Service {
|
|
|
8593
9183
|
*
|
|
8594
9184
|
*
|
|
8595
9185
|
* @param {string} projectId
|
|
8596
|
-
* @param {
|
|
9186
|
+
* @param {PlatformType} type
|
|
8597
9187
|
* @param {string} name
|
|
8598
9188
|
* @param {string} key
|
|
8599
9189
|
* @param {string} store
|
|
@@ -8734,7 +9324,7 @@ class Projects extends Service {
|
|
|
8734
9324
|
*
|
|
8735
9325
|
*
|
|
8736
9326
|
* @param {string} projectId
|
|
8737
|
-
* @param {
|
|
9327
|
+
* @param {ApiService} service
|
|
8738
9328
|
* @param {boolean} status
|
|
8739
9329
|
* @throws {AppwriteException}
|
|
8740
9330
|
* @returns {Promise}
|
|
@@ -8805,7 +9395,7 @@ class Projects extends Service {
|
|
|
8805
9395
|
* @param {number} port
|
|
8806
9396
|
* @param {string} username
|
|
8807
9397
|
* @param {string} password
|
|
8808
|
-
* @param {
|
|
9398
|
+
* @param {SMTPSecure} secure
|
|
8809
9399
|
* @throws {AppwriteException}
|
|
8810
9400
|
* @returns {Promise}
|
|
8811
9401
|
*/
|
|
@@ -8865,7 +9455,7 @@ class Projects extends Service {
|
|
|
8865
9455
|
* @param {number} port
|
|
8866
9456
|
* @param {string} username
|
|
8867
9457
|
* @param {string} password
|
|
8868
|
-
* @param {
|
|
9458
|
+
* @param {SMTPSecure} secure
|
|
8869
9459
|
* @throws {AppwriteException}
|
|
8870
9460
|
* @returns {Promise}
|
|
8871
9461
|
*/
|
|
@@ -8954,8 +9544,8 @@ class Projects extends Service {
|
|
|
8954
9544
|
*
|
|
8955
9545
|
*
|
|
8956
9546
|
* @param {string} projectId
|
|
8957
|
-
* @param {
|
|
8958
|
-
* @param {
|
|
9547
|
+
* @param {EmailTemplateType} type
|
|
9548
|
+
* @param {EmailTemplateLocale} locale
|
|
8959
9549
|
* @throws {AppwriteException}
|
|
8960
9550
|
* @returns {Promise}
|
|
8961
9551
|
*/
|
|
@@ -8983,8 +9573,8 @@ class Projects extends Service {
|
|
|
8983
9573
|
*
|
|
8984
9574
|
*
|
|
8985
9575
|
* @param {string} projectId
|
|
8986
|
-
* @param {
|
|
8987
|
-
* @param {
|
|
9576
|
+
* @param {EmailTemplateType} type
|
|
9577
|
+
* @param {EmailTemplateLocale} locale
|
|
8988
9578
|
* @param {string} subject
|
|
8989
9579
|
* @param {string} message
|
|
8990
9580
|
* @param {string} senderName
|
|
@@ -9038,8 +9628,8 @@ class Projects extends Service {
|
|
|
9038
9628
|
*
|
|
9039
9629
|
*
|
|
9040
9630
|
* @param {string} projectId
|
|
9041
|
-
* @param {
|
|
9042
|
-
* @param {
|
|
9631
|
+
* @param {EmailTemplateType} type
|
|
9632
|
+
* @param {EmailTemplateLocale} locale
|
|
9043
9633
|
* @throws {AppwriteException}
|
|
9044
9634
|
* @returns {Promise}
|
|
9045
9635
|
*/
|
|
@@ -9067,8 +9657,8 @@ class Projects extends Service {
|
|
|
9067
9657
|
*
|
|
9068
9658
|
*
|
|
9069
9659
|
* @param {string} projectId
|
|
9070
|
-
* @param {
|
|
9071
|
-
* @param {
|
|
9660
|
+
* @param {SmsTemplateType} type
|
|
9661
|
+
* @param {SmsTemplateLocale} locale
|
|
9072
9662
|
* @throws {AppwriteException}
|
|
9073
9663
|
* @returns {Promise}
|
|
9074
9664
|
*/
|
|
@@ -9096,8 +9686,8 @@ class Projects extends Service {
|
|
|
9096
9686
|
*
|
|
9097
9687
|
*
|
|
9098
9688
|
* @param {string} projectId
|
|
9099
|
-
* @param {
|
|
9100
|
-
* @param {
|
|
9689
|
+
* @param {SmsTemplateType} type
|
|
9690
|
+
* @param {SmsTemplateLocale} locale
|
|
9101
9691
|
* @param {string} message
|
|
9102
9692
|
* @throws {AppwriteException}
|
|
9103
9693
|
* @returns {Promise}
|
|
@@ -9132,8 +9722,8 @@ class Projects extends Service {
|
|
|
9132
9722
|
*
|
|
9133
9723
|
*
|
|
9134
9724
|
* @param {string} projectId
|
|
9135
|
-
* @param {
|
|
9136
|
-
* @param {
|
|
9725
|
+
* @param {SmsTemplateType} type
|
|
9726
|
+
* @param {SmsTemplateLocale} locale
|
|
9137
9727
|
* @throws {AppwriteException}
|
|
9138
9728
|
* @returns {Promise}
|
|
9139
9729
|
*/
|
|
@@ -9417,7 +10007,7 @@ class Proxy extends Service {
|
|
|
9417
10007
|
* Create a new proxy rule.
|
|
9418
10008
|
*
|
|
9419
10009
|
* @param {string} domain
|
|
9420
|
-
* @param {
|
|
10010
|
+
* @param {ResourceType} resourceType
|
|
9421
10011
|
* @param {string} resourceId
|
|
9422
10012
|
* @throws {AppwriteException}
|
|
9423
10013
|
* @returns {Promise}
|
|
@@ -9557,7 +10147,7 @@ class Storage extends Service {
|
|
|
9557
10147
|
* @param {boolean} enabled
|
|
9558
10148
|
* @param {number} maximumFileSize
|
|
9559
10149
|
* @param {string[]} allowedFileExtensions
|
|
9560
|
-
* @param {
|
|
10150
|
+
* @param {Compression} compression
|
|
9561
10151
|
* @param {boolean} encryption
|
|
9562
10152
|
* @param {boolean} antivirus
|
|
9563
10153
|
* @throws {AppwriteException}
|
|
@@ -9644,7 +10234,7 @@ class Storage extends Service {
|
|
|
9644
10234
|
* @param {boolean} enabled
|
|
9645
10235
|
* @param {number} maximumFileSize
|
|
9646
10236
|
* @param {string[]} allowedFileExtensions
|
|
9647
|
-
* @param {
|
|
10237
|
+
* @param {Compression} compression
|
|
9648
10238
|
* @param {boolean} encryption
|
|
9649
10239
|
* @param {boolean} antivirus
|
|
9650
10240
|
* @throws {AppwriteException}
|
|
@@ -9973,7 +10563,7 @@ class Storage extends Service {
|
|
|
9973
10563
|
* @param {string} fileId
|
|
9974
10564
|
* @param {number} width
|
|
9975
10565
|
* @param {number} height
|
|
9976
|
-
* @param {
|
|
10566
|
+
* @param {ImageGravity} gravity
|
|
9977
10567
|
* @param {number} quality
|
|
9978
10568
|
* @param {number} borderWidth
|
|
9979
10569
|
* @param {string} borderColor
|
|
@@ -9981,7 +10571,7 @@ class Storage extends Service {
|
|
|
9981
10571
|
* @param {number} opacity
|
|
9982
10572
|
* @param {number} rotation
|
|
9983
10573
|
* @param {string} background
|
|
9984
|
-
* @param {
|
|
10574
|
+
* @param {ImageFormat} output
|
|
9985
10575
|
* @throws {AppwriteException}
|
|
9986
10576
|
* @returns {URL}
|
|
9987
10577
|
*/
|
|
@@ -10063,10 +10653,10 @@ class Storage extends Service {
|
|
|
10063
10653
|
return uri;
|
|
10064
10654
|
}
|
|
10065
10655
|
/**
|
|
10066
|
-
* Get usage stats
|
|
10656
|
+
* Get storage usage stats
|
|
10067
10657
|
*
|
|
10068
10658
|
*
|
|
10069
|
-
* @param {
|
|
10659
|
+
* @param {StorageUsageRange} range
|
|
10070
10660
|
* @throws {AppwriteException}
|
|
10071
10661
|
* @returns {Promise}
|
|
10072
10662
|
*/
|
|
@@ -10084,11 +10674,11 @@ class Storage extends Service {
|
|
|
10084
10674
|
});
|
|
10085
10675
|
}
|
|
10086
10676
|
/**
|
|
10087
|
-
* Get usage stats
|
|
10677
|
+
* Get bucket usage stats
|
|
10088
10678
|
*
|
|
10089
10679
|
*
|
|
10090
10680
|
* @param {string} bucketId
|
|
10091
|
-
* @param {
|
|
10681
|
+
* @param {StorageUsageRange} range
|
|
10092
10682
|
* @throws {AppwriteException}
|
|
10093
10683
|
* @returns {Promise}
|
|
10094
10684
|
*/
|
|
@@ -10742,7 +11332,7 @@ class Users extends Service {
|
|
|
10742
11332
|
*
|
|
10743
11333
|
* Get identities for all users.
|
|
10744
11334
|
*
|
|
10745
|
-
* @param {string} queries
|
|
11335
|
+
* @param {string[]} queries
|
|
10746
11336
|
* @param {string} search
|
|
10747
11337
|
* @throws {AppwriteException}
|
|
10748
11338
|
* @returns {Promise}
|
|
@@ -11037,7 +11627,7 @@ class Users extends Service {
|
|
|
11037
11627
|
* @param {string} userId
|
|
11038
11628
|
* @param {string} email
|
|
11039
11629
|
* @param {string} password
|
|
11040
|
-
* @param {
|
|
11630
|
+
* @param {PasswordHash} passwordVersion
|
|
11041
11631
|
* @param {string} name
|
|
11042
11632
|
* @throws {AppwriteException}
|
|
11043
11633
|
* @returns {Promise}
|
|
@@ -11077,10 +11667,10 @@ class Users extends Service {
|
|
|
11077
11667
|
});
|
|
11078
11668
|
}
|
|
11079
11669
|
/**
|
|
11080
|
-
* Get usage stats
|
|
11670
|
+
* Get users usage stats
|
|
11081
11671
|
*
|
|
11082
11672
|
*
|
|
11083
|
-
* @param {
|
|
11673
|
+
* @param {UserUsageRange} range
|
|
11084
11674
|
* @throws {AppwriteException}
|
|
11085
11675
|
* @returns {Promise}
|
|
11086
11676
|
*/
|
|
@@ -11260,6 +11850,7 @@ class Users extends Service {
|
|
|
11260
11850
|
/**
|
|
11261
11851
|
* Update MFA
|
|
11262
11852
|
*
|
|
11853
|
+
* Enable or disable MFA on a user account.
|
|
11263
11854
|
*
|
|
11264
11855
|
* @param {string} userId
|
|
11265
11856
|
* @param {boolean} mfa
|
|
@@ -11288,31 +11879,122 @@ class Users extends Service {
|
|
|
11288
11879
|
/**
|
|
11289
11880
|
* Delete Authenticator
|
|
11290
11881
|
*
|
|
11882
|
+
* Delete an authenticator app.
|
|
11291
11883
|
*
|
|
11292
11884
|
* @param {string} userId
|
|
11293
|
-
* @param {
|
|
11294
|
-
* @param {string} otp
|
|
11885
|
+
* @param {AuthenticatorType} type
|
|
11295
11886
|
* @throws {AppwriteException}
|
|
11296
11887
|
* @returns {Promise}
|
|
11297
11888
|
*/
|
|
11298
|
-
|
|
11889
|
+
deleteMfaAuthenticator(userId, type) {
|
|
11299
11890
|
return __awaiter(this, void 0, void 0, function* () {
|
|
11300
11891
|
if (typeof userId === 'undefined') {
|
|
11301
11892
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11302
11893
|
}
|
|
11303
|
-
if (typeof
|
|
11304
|
-
throw new AppwriteException('Missing required parameter: "
|
|
11894
|
+
if (typeof type === 'undefined') {
|
|
11895
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
11305
11896
|
}
|
|
11306
|
-
|
|
11307
|
-
|
|
11897
|
+
const apiPath = '/users/{userId}/mfa/authenticators/{type}'.replace('{userId}', userId).replace('{type}', type);
|
|
11898
|
+
const payload = {};
|
|
11899
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11900
|
+
return yield this.client.call('delete', uri, {
|
|
11901
|
+
'content-type': 'application/json',
|
|
11902
|
+
}, payload);
|
|
11903
|
+
});
|
|
11904
|
+
}
|
|
11905
|
+
/**
|
|
11906
|
+
* List Factors
|
|
11907
|
+
*
|
|
11908
|
+
* List the factors available on the account to be used as a MFA challange.
|
|
11909
|
+
*
|
|
11910
|
+
* @param {string} userId
|
|
11911
|
+
* @throws {AppwriteException}
|
|
11912
|
+
* @returns {Promise}
|
|
11913
|
+
*/
|
|
11914
|
+
listMfaFactors(userId) {
|
|
11915
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11916
|
+
if (typeof userId === 'undefined') {
|
|
11917
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11308
11918
|
}
|
|
11309
|
-
const apiPath = '/users/{userId}/mfa/
|
|
11919
|
+
const apiPath = '/users/{userId}/mfa/factors'.replace('{userId}', userId);
|
|
11310
11920
|
const payload = {};
|
|
11311
|
-
|
|
11312
|
-
|
|
11921
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11922
|
+
return yield this.client.call('get', uri, {
|
|
11923
|
+
'content-type': 'application/json',
|
|
11924
|
+
}, payload);
|
|
11925
|
+
});
|
|
11926
|
+
}
|
|
11927
|
+
/**
|
|
11928
|
+
* Get MFA Recovery Codes
|
|
11929
|
+
*
|
|
11930
|
+
* Get recovery codes that can be used as backup for MFA flow by User ID.
|
|
11931
|
+
* Before getting codes, they must be generated using
|
|
11932
|
+
* [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
|
|
11933
|
+
* method.
|
|
11934
|
+
*
|
|
11935
|
+
* @param {string} userId
|
|
11936
|
+
* @throws {AppwriteException}
|
|
11937
|
+
* @returns {Promise}
|
|
11938
|
+
*/
|
|
11939
|
+
getMfaRecoveryCodes(userId) {
|
|
11940
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11941
|
+
if (typeof userId === 'undefined') {
|
|
11942
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11313
11943
|
}
|
|
11944
|
+
const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
|
|
11945
|
+
const payload = {};
|
|
11314
11946
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11315
|
-
return yield this.client.call('
|
|
11947
|
+
return yield this.client.call('get', uri, {
|
|
11948
|
+
'content-type': 'application/json',
|
|
11949
|
+
}, payload);
|
|
11950
|
+
});
|
|
11951
|
+
}
|
|
11952
|
+
/**
|
|
11953
|
+
* Regenerate MFA Recovery Codes
|
|
11954
|
+
*
|
|
11955
|
+
* Regenerate recovery codes that can be used as backup for MFA flow by User
|
|
11956
|
+
* ID. Before regenerating codes, they must be first generated using
|
|
11957
|
+
* [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
|
|
11958
|
+
* method.
|
|
11959
|
+
*
|
|
11960
|
+
* @param {string} userId
|
|
11961
|
+
* @throws {AppwriteException}
|
|
11962
|
+
* @returns {Promise}
|
|
11963
|
+
*/
|
|
11964
|
+
updateMfaRecoveryCodes(userId) {
|
|
11965
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11966
|
+
if (typeof userId === 'undefined') {
|
|
11967
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11968
|
+
}
|
|
11969
|
+
const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
|
|
11970
|
+
const payload = {};
|
|
11971
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11972
|
+
return yield this.client.call('put', uri, {
|
|
11973
|
+
'content-type': 'application/json',
|
|
11974
|
+
}, payload);
|
|
11975
|
+
});
|
|
11976
|
+
}
|
|
11977
|
+
/**
|
|
11978
|
+
* Create MFA Recovery Codes
|
|
11979
|
+
*
|
|
11980
|
+
* Generate recovery codes used as backup for MFA flow for User ID. Recovery
|
|
11981
|
+
* codes can be used as a MFA verification type in
|
|
11982
|
+
* [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
|
|
11983
|
+
* method by client SDK.
|
|
11984
|
+
*
|
|
11985
|
+
* @param {string} userId
|
|
11986
|
+
* @throws {AppwriteException}
|
|
11987
|
+
* @returns {Promise}
|
|
11988
|
+
*/
|
|
11989
|
+
createMfaRecoveryCodes(userId) {
|
|
11990
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11991
|
+
if (typeof userId === 'undefined') {
|
|
11992
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11993
|
+
}
|
|
11994
|
+
const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
|
|
11995
|
+
const payload = {};
|
|
11996
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11997
|
+
return yield this.client.call('patch', uri, {
|
|
11316
11998
|
'content-type': 'application/json',
|
|
11317
11999
|
}, payload);
|
|
11318
12000
|
});
|
|
@@ -11457,27 +12139,6 @@ class Users extends Service {
|
|
|
11457
12139
|
}, payload);
|
|
11458
12140
|
});
|
|
11459
12141
|
}
|
|
11460
|
-
/**
|
|
11461
|
-
* List Providers
|
|
11462
|
-
*
|
|
11463
|
-
*
|
|
11464
|
-
* @param {string} userId
|
|
11465
|
-
* @throws {AppwriteException}
|
|
11466
|
-
* @returns {Promise}
|
|
11467
|
-
*/
|
|
11468
|
-
listProviders(userId) {
|
|
11469
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11470
|
-
if (typeof userId === 'undefined') {
|
|
11471
|
-
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11472
|
-
}
|
|
11473
|
-
const apiPath = '/users/{userId}/providers'.replace('{userId}', userId);
|
|
11474
|
-
const payload = {};
|
|
11475
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11476
|
-
return yield this.client.call('get', uri, {
|
|
11477
|
-
'content-type': 'application/json',
|
|
11478
|
-
}, payload);
|
|
11479
|
-
});
|
|
11480
|
-
}
|
|
11481
12142
|
/**
|
|
11482
12143
|
* List user sessions
|
|
11483
12144
|
*
|
|
@@ -11608,9 +12269,10 @@ class Users extends Service {
|
|
|
11608
12269
|
/**
|
|
11609
12270
|
* List User Targets
|
|
11610
12271
|
*
|
|
12272
|
+
* List the messaging targets that are associated with a user.
|
|
11611
12273
|
*
|
|
11612
12274
|
* @param {string} userId
|
|
11613
|
-
* @param {string} queries
|
|
12275
|
+
* @param {string[]} queries
|
|
11614
12276
|
* @throws {AppwriteException}
|
|
11615
12277
|
* @returns {Promise}
|
|
11616
12278
|
*/
|
|
@@ -11633,10 +12295,11 @@ class Users extends Service {
|
|
|
11633
12295
|
/**
|
|
11634
12296
|
* Create User Target
|
|
11635
12297
|
*
|
|
12298
|
+
* Create a messaging target.
|
|
11636
12299
|
*
|
|
11637
12300
|
* @param {string} userId
|
|
11638
12301
|
* @param {string} targetId
|
|
11639
|
-
* @param {
|
|
12302
|
+
* @param {MessagingProviderType} providerType
|
|
11640
12303
|
* @param {string} identifier
|
|
11641
12304
|
* @param {string} providerId
|
|
11642
12305
|
* @param {string} name
|
|
@@ -11683,6 +12346,7 @@ class Users extends Service {
|
|
|
11683
12346
|
/**
|
|
11684
12347
|
* Get User Target
|
|
11685
12348
|
*
|
|
12349
|
+
* Get a user's push notification target by ID.
|
|
11686
12350
|
*
|
|
11687
12351
|
* @param {string} userId
|
|
11688
12352
|
* @param {string} targetId
|
|
@@ -11708,6 +12372,7 @@ class Users extends Service {
|
|
|
11708
12372
|
/**
|
|
11709
12373
|
* Update User target
|
|
11710
12374
|
*
|
|
12375
|
+
* Update a messaging target.
|
|
11711
12376
|
*
|
|
11712
12377
|
* @param {string} userId
|
|
11713
12378
|
* @param {string} targetId
|
|
@@ -11745,6 +12410,7 @@ class Users extends Service {
|
|
|
11745
12410
|
/**
|
|
11746
12411
|
* Delete user target
|
|
11747
12412
|
*
|
|
12413
|
+
* Delete a messaging target.
|
|
11748
12414
|
*
|
|
11749
12415
|
* @param {string} userId
|
|
11750
12416
|
* @param {string} targetId
|
|
@@ -12226,6 +12892,841 @@ class ID {
|
|
|
12226
12892
|
}
|
|
12227
12893
|
}
|
|
12228
12894
|
|
|
12895
|
+
exports.AuthenticatorType = void 0;
|
|
12896
|
+
(function (AuthenticatorType) {
|
|
12897
|
+
AuthenticatorType["Totp"] = "totp";
|
|
12898
|
+
})(exports.AuthenticatorType || (exports.AuthenticatorType = {}));
|
|
12899
|
+
|
|
12900
|
+
exports.AuthenticationFactor = void 0;
|
|
12901
|
+
(function (AuthenticationFactor) {
|
|
12902
|
+
AuthenticationFactor["Email"] = "email";
|
|
12903
|
+
AuthenticationFactor["Phone"] = "phone";
|
|
12904
|
+
AuthenticationFactor["Totp"] = "totp";
|
|
12905
|
+
AuthenticationFactor["Recoverycode"] = "recoverycode";
|
|
12906
|
+
})(exports.AuthenticationFactor || (exports.AuthenticationFactor = {}));
|
|
12907
|
+
|
|
12908
|
+
exports.OAuthProvider = void 0;
|
|
12909
|
+
(function (OAuthProvider) {
|
|
12910
|
+
OAuthProvider["Amazon"] = "amazon";
|
|
12911
|
+
OAuthProvider["Apple"] = "apple";
|
|
12912
|
+
OAuthProvider["Auth0"] = "auth0";
|
|
12913
|
+
OAuthProvider["Authentik"] = "authentik";
|
|
12914
|
+
OAuthProvider["Autodesk"] = "autodesk";
|
|
12915
|
+
OAuthProvider["Bitbucket"] = "bitbucket";
|
|
12916
|
+
OAuthProvider["Bitly"] = "bitly";
|
|
12917
|
+
OAuthProvider["Box"] = "box";
|
|
12918
|
+
OAuthProvider["Dailymotion"] = "dailymotion";
|
|
12919
|
+
OAuthProvider["Discord"] = "discord";
|
|
12920
|
+
OAuthProvider["Disqus"] = "disqus";
|
|
12921
|
+
OAuthProvider["Dropbox"] = "dropbox";
|
|
12922
|
+
OAuthProvider["Etsy"] = "etsy";
|
|
12923
|
+
OAuthProvider["Facebook"] = "facebook";
|
|
12924
|
+
OAuthProvider["Github"] = "github";
|
|
12925
|
+
OAuthProvider["Gitlab"] = "gitlab";
|
|
12926
|
+
OAuthProvider["Google"] = "google";
|
|
12927
|
+
OAuthProvider["Linkedin"] = "linkedin";
|
|
12928
|
+
OAuthProvider["Microsoft"] = "microsoft";
|
|
12929
|
+
OAuthProvider["Notion"] = "notion";
|
|
12930
|
+
OAuthProvider["Oidc"] = "oidc";
|
|
12931
|
+
OAuthProvider["Okta"] = "okta";
|
|
12932
|
+
OAuthProvider["Paypal"] = "paypal";
|
|
12933
|
+
OAuthProvider["PaypalSandbox"] = "paypalSandbox";
|
|
12934
|
+
OAuthProvider["Podio"] = "podio";
|
|
12935
|
+
OAuthProvider["Salesforce"] = "salesforce";
|
|
12936
|
+
OAuthProvider["Slack"] = "slack";
|
|
12937
|
+
OAuthProvider["Spotify"] = "spotify";
|
|
12938
|
+
OAuthProvider["Stripe"] = "stripe";
|
|
12939
|
+
OAuthProvider["Tradeshift"] = "tradeshift";
|
|
12940
|
+
OAuthProvider["TradeshiftBox"] = "tradeshiftBox";
|
|
12941
|
+
OAuthProvider["Twitch"] = "twitch";
|
|
12942
|
+
OAuthProvider["Wordpress"] = "wordpress";
|
|
12943
|
+
OAuthProvider["Yahoo"] = "yahoo";
|
|
12944
|
+
OAuthProvider["Yammer"] = "yammer";
|
|
12945
|
+
OAuthProvider["Yandex"] = "yandex";
|
|
12946
|
+
OAuthProvider["Zoho"] = "zoho";
|
|
12947
|
+
OAuthProvider["Zoom"] = "zoom";
|
|
12948
|
+
OAuthProvider["Mock"] = "mock";
|
|
12949
|
+
})(exports.OAuthProvider || (exports.OAuthProvider = {}));
|
|
12950
|
+
|
|
12951
|
+
exports.Browser = void 0;
|
|
12952
|
+
(function (Browser) {
|
|
12953
|
+
Browser["AvantBrowser"] = "aa";
|
|
12954
|
+
Browser["AndroidWebViewBeta"] = "an";
|
|
12955
|
+
Browser["GoogleChrome"] = "ch";
|
|
12956
|
+
Browser["GoogleChromeIOS"] = "ci";
|
|
12957
|
+
Browser["GoogleChromeMobile"] = "cm";
|
|
12958
|
+
Browser["Chromium"] = "cr";
|
|
12959
|
+
Browser["MozillaFirefox"] = "ff";
|
|
12960
|
+
Browser["Safari"] = "sf";
|
|
12961
|
+
Browser["MobileSafari"] = "mf";
|
|
12962
|
+
Browser["MicrosoftEdge"] = "ps";
|
|
12963
|
+
Browser["MicrosoftEdgeIOS"] = "oi";
|
|
12964
|
+
Browser["OperaMini"] = "om";
|
|
12965
|
+
Browser["Opera"] = "op";
|
|
12966
|
+
Browser["OperaNext"] = "on";
|
|
12967
|
+
})(exports.Browser || (exports.Browser = {}));
|
|
12968
|
+
|
|
12969
|
+
exports.CreditCard = void 0;
|
|
12970
|
+
(function (CreditCard) {
|
|
12971
|
+
CreditCard["AmericanExpress"] = "amex";
|
|
12972
|
+
CreditCard["Argencard"] = "argencard";
|
|
12973
|
+
CreditCard["Cabal"] = "cabal";
|
|
12974
|
+
CreditCard["Consosud"] = "censosud";
|
|
12975
|
+
CreditCard["DinersClub"] = "diners";
|
|
12976
|
+
CreditCard["Discover"] = "discover";
|
|
12977
|
+
CreditCard["Elo"] = "elo";
|
|
12978
|
+
CreditCard["Hipercard"] = "hipercard";
|
|
12979
|
+
CreditCard["JCB"] = "jcb";
|
|
12980
|
+
CreditCard["Mastercard"] = "mastercard";
|
|
12981
|
+
CreditCard["Naranja"] = "naranja";
|
|
12982
|
+
CreditCard["TarjetaShopping"] = "targeta-shopping";
|
|
12983
|
+
CreditCard["UnionChinaPay"] = "union-china-pay";
|
|
12984
|
+
CreditCard["Visa"] = "visa";
|
|
12985
|
+
CreditCard["MIR"] = "mir";
|
|
12986
|
+
CreditCard["Maestro"] = "maestro";
|
|
12987
|
+
})(exports.CreditCard || (exports.CreditCard = {}));
|
|
12988
|
+
|
|
12989
|
+
exports.Flag = void 0;
|
|
12990
|
+
(function (Flag) {
|
|
12991
|
+
Flag["Afghanistan"] = "af";
|
|
12992
|
+
Flag["Angola"] = "ao";
|
|
12993
|
+
Flag["Albania"] = "al";
|
|
12994
|
+
Flag["Andorra"] = "ad";
|
|
12995
|
+
Flag["UnitedArabEmirates"] = "ae";
|
|
12996
|
+
Flag["Argentina"] = "ar";
|
|
12997
|
+
Flag["Armenia"] = "am";
|
|
12998
|
+
Flag["AntiguaAndBarbuda"] = "ag";
|
|
12999
|
+
Flag["Australia"] = "au";
|
|
13000
|
+
Flag["Austria"] = "at";
|
|
13001
|
+
Flag["Azerbaijan"] = "az";
|
|
13002
|
+
Flag["Burundi"] = "bi";
|
|
13003
|
+
Flag["Belgium"] = "be";
|
|
13004
|
+
Flag["Benin"] = "bj";
|
|
13005
|
+
Flag["BurkinaFaso"] = "bf";
|
|
13006
|
+
Flag["Bangladesh"] = "bd";
|
|
13007
|
+
Flag["Bulgaria"] = "bg";
|
|
13008
|
+
Flag["Bahrain"] = "bh";
|
|
13009
|
+
Flag["Bahamas"] = "bs";
|
|
13010
|
+
Flag["BosniaAndHerzegovina"] = "ba";
|
|
13011
|
+
Flag["Belarus"] = "by";
|
|
13012
|
+
Flag["Belize"] = "bz";
|
|
13013
|
+
Flag["Bolivia"] = "bo";
|
|
13014
|
+
Flag["Brazil"] = "br";
|
|
13015
|
+
Flag["Barbados"] = "bb";
|
|
13016
|
+
Flag["BruneiDarussalam"] = "bn";
|
|
13017
|
+
Flag["Bhutan"] = "bt";
|
|
13018
|
+
Flag["Botswana"] = "bw";
|
|
13019
|
+
Flag["CentralAfricanRepublic"] = "cf";
|
|
13020
|
+
Flag["Canada"] = "ca";
|
|
13021
|
+
Flag["Switzerland"] = "ch";
|
|
13022
|
+
Flag["Chile"] = "cl";
|
|
13023
|
+
Flag["China"] = "cn";
|
|
13024
|
+
Flag["CTeDIvoire"] = "ci";
|
|
13025
|
+
Flag["Cameroon"] = "cm";
|
|
13026
|
+
Flag["DemocraticRepublicOfTheCongo"] = "cd";
|
|
13027
|
+
Flag["RepublicOfTheCongo"] = "cg";
|
|
13028
|
+
Flag["Colombia"] = "co";
|
|
13029
|
+
Flag["Comoros"] = "km";
|
|
13030
|
+
Flag["CapeVerde"] = "cv";
|
|
13031
|
+
Flag["CostaRica"] = "cr";
|
|
13032
|
+
Flag["Cuba"] = "cu";
|
|
13033
|
+
Flag["Cyprus"] = "cy";
|
|
13034
|
+
Flag["CzechRepublic"] = "cz";
|
|
13035
|
+
Flag["Germany"] = "de";
|
|
13036
|
+
Flag["Djibouti"] = "dj";
|
|
13037
|
+
Flag["Dominica"] = "dm";
|
|
13038
|
+
Flag["Denmark"] = "dk";
|
|
13039
|
+
Flag["DominicanRepublic"] = "do";
|
|
13040
|
+
Flag["Algeria"] = "dz";
|
|
13041
|
+
Flag["Ecuador"] = "ec";
|
|
13042
|
+
Flag["Egypt"] = "eg";
|
|
13043
|
+
Flag["Eritrea"] = "er";
|
|
13044
|
+
Flag["Spain"] = "es";
|
|
13045
|
+
Flag["Estonia"] = "ee";
|
|
13046
|
+
Flag["Ethiopia"] = "et";
|
|
13047
|
+
Flag["Finland"] = "fi";
|
|
13048
|
+
Flag["Fiji"] = "fj";
|
|
13049
|
+
Flag["France"] = "fr";
|
|
13050
|
+
Flag["MicronesiaFederatedStatesOf"] = "fm";
|
|
13051
|
+
Flag["Gabon"] = "ga";
|
|
13052
|
+
Flag["UnitedKingdom"] = "gb";
|
|
13053
|
+
Flag["Georgia"] = "ge";
|
|
13054
|
+
Flag["Ghana"] = "gh";
|
|
13055
|
+
Flag["Guinea"] = "gn";
|
|
13056
|
+
Flag["Gambia"] = "gm";
|
|
13057
|
+
Flag["GuineaBissau"] = "gw";
|
|
13058
|
+
Flag["EquatorialGuinea"] = "gq";
|
|
13059
|
+
Flag["Greece"] = "gr";
|
|
13060
|
+
Flag["Grenada"] = "gd";
|
|
13061
|
+
Flag["Guatemala"] = "gt";
|
|
13062
|
+
Flag["Guyana"] = "gy";
|
|
13063
|
+
Flag["Honduras"] = "hn";
|
|
13064
|
+
Flag["Croatia"] = "hr";
|
|
13065
|
+
Flag["Haiti"] = "ht";
|
|
13066
|
+
Flag["Hungary"] = "hu";
|
|
13067
|
+
Flag["Indonesia"] = "id";
|
|
13068
|
+
Flag["India"] = "in";
|
|
13069
|
+
Flag["Ireland"] = "ie";
|
|
13070
|
+
Flag["IranIslamicRepublicOf"] = "ir";
|
|
13071
|
+
Flag["Iraq"] = "iq";
|
|
13072
|
+
Flag["Iceland"] = "is";
|
|
13073
|
+
Flag["Israel"] = "il";
|
|
13074
|
+
Flag["Italy"] = "it";
|
|
13075
|
+
Flag["Jamaica"] = "jm";
|
|
13076
|
+
Flag["Jordan"] = "jo";
|
|
13077
|
+
Flag["Japan"] = "jp";
|
|
13078
|
+
Flag["Kazakhstan"] = "kz";
|
|
13079
|
+
Flag["Kenya"] = "ke";
|
|
13080
|
+
Flag["Kyrgyzstan"] = "kg";
|
|
13081
|
+
Flag["Cambodia"] = "kh";
|
|
13082
|
+
Flag["Kiribati"] = "ki";
|
|
13083
|
+
Flag["SaintKittsAndNevis"] = "kn";
|
|
13084
|
+
Flag["SouthKorea"] = "kr";
|
|
13085
|
+
Flag["Kuwait"] = "kw";
|
|
13086
|
+
Flag["LaoPeopleSDemocraticRepublic"] = "la";
|
|
13087
|
+
Flag["Lebanon"] = "lb";
|
|
13088
|
+
Flag["Liberia"] = "lr";
|
|
13089
|
+
Flag["Libya"] = "ly";
|
|
13090
|
+
Flag["SaintLucia"] = "lc";
|
|
13091
|
+
Flag["Liechtenstein"] = "li";
|
|
13092
|
+
Flag["SriLanka"] = "lk";
|
|
13093
|
+
Flag["Lesotho"] = "ls";
|
|
13094
|
+
Flag["Lithuania"] = "lt";
|
|
13095
|
+
Flag["Luxembourg"] = "lu";
|
|
13096
|
+
Flag["Latvia"] = "lv";
|
|
13097
|
+
Flag["Morocco"] = "ma";
|
|
13098
|
+
Flag["Monaco"] = "mc";
|
|
13099
|
+
Flag["Moldova"] = "md";
|
|
13100
|
+
Flag["Madagascar"] = "mg";
|
|
13101
|
+
Flag["Maldives"] = "mv";
|
|
13102
|
+
Flag["Mexico"] = "mx";
|
|
13103
|
+
Flag["MarshallIslands"] = "mh";
|
|
13104
|
+
Flag["NorthMacedonia"] = "mk";
|
|
13105
|
+
Flag["Mali"] = "ml";
|
|
13106
|
+
Flag["Malta"] = "mt";
|
|
13107
|
+
Flag["Myanmar"] = "mm";
|
|
13108
|
+
Flag["Montenegro"] = "me";
|
|
13109
|
+
Flag["Mongolia"] = "mn";
|
|
13110
|
+
Flag["Mozambique"] = "mz";
|
|
13111
|
+
Flag["Mauritania"] = "mr";
|
|
13112
|
+
Flag["Mauritius"] = "mu";
|
|
13113
|
+
Flag["Malawi"] = "mw";
|
|
13114
|
+
Flag["Malaysia"] = "my";
|
|
13115
|
+
Flag["Namibia"] = "na";
|
|
13116
|
+
Flag["Niger"] = "ne";
|
|
13117
|
+
Flag["Nigeria"] = "ng";
|
|
13118
|
+
Flag["Nicaragua"] = "ni";
|
|
13119
|
+
Flag["Netherlands"] = "nl";
|
|
13120
|
+
Flag["Norway"] = "no";
|
|
13121
|
+
Flag["Nepal"] = "np";
|
|
13122
|
+
Flag["Nauru"] = "nr";
|
|
13123
|
+
Flag["NewZealand"] = "nz";
|
|
13124
|
+
Flag["Oman"] = "om";
|
|
13125
|
+
Flag["Pakistan"] = "pk";
|
|
13126
|
+
Flag["Panama"] = "pa";
|
|
13127
|
+
Flag["Peru"] = "pe";
|
|
13128
|
+
Flag["Philippines"] = "ph";
|
|
13129
|
+
Flag["Palau"] = "pw";
|
|
13130
|
+
Flag["PapuaNewGuinea"] = "pg";
|
|
13131
|
+
Flag["Poland"] = "pl";
|
|
13132
|
+
Flag["NorthKorea"] = "kp";
|
|
13133
|
+
Flag["Portugal"] = "pt";
|
|
13134
|
+
Flag["Paraguay"] = "py";
|
|
13135
|
+
Flag["Qatar"] = "qa";
|
|
13136
|
+
Flag["Romania"] = "ro";
|
|
13137
|
+
Flag["Russia"] = "ru";
|
|
13138
|
+
Flag["Rwanda"] = "rw";
|
|
13139
|
+
Flag["SaudiArabia"] = "sa";
|
|
13140
|
+
Flag["Sudan"] = "sd";
|
|
13141
|
+
Flag["Senegal"] = "sn";
|
|
13142
|
+
Flag["Singapore"] = "sg";
|
|
13143
|
+
Flag["SolomonIslands"] = "sb";
|
|
13144
|
+
Flag["SierraLeone"] = "sl";
|
|
13145
|
+
Flag["ElSalvador"] = "sv";
|
|
13146
|
+
Flag["SanMarino"] = "sm";
|
|
13147
|
+
Flag["Somalia"] = "so";
|
|
13148
|
+
Flag["Serbia"] = "rs";
|
|
13149
|
+
Flag["SouthSudan"] = "ss";
|
|
13150
|
+
Flag["SaoTomeAndPrincipe"] = "st";
|
|
13151
|
+
Flag["Suriname"] = "sr";
|
|
13152
|
+
Flag["Slovakia"] = "sk";
|
|
13153
|
+
Flag["Slovenia"] = "si";
|
|
13154
|
+
Flag["Sweden"] = "se";
|
|
13155
|
+
Flag["Eswatini"] = "sz";
|
|
13156
|
+
Flag["Seychelles"] = "sc";
|
|
13157
|
+
Flag["Syria"] = "sy";
|
|
13158
|
+
Flag["Chad"] = "td";
|
|
13159
|
+
Flag["Togo"] = "tg";
|
|
13160
|
+
Flag["Thailand"] = "th";
|
|
13161
|
+
Flag["Tajikistan"] = "tj";
|
|
13162
|
+
Flag["Turkmenistan"] = "tm";
|
|
13163
|
+
Flag["TimorLeste"] = "tl";
|
|
13164
|
+
Flag["Tonga"] = "to";
|
|
13165
|
+
Flag["TrinidadAndTobago"] = "tt";
|
|
13166
|
+
Flag["Tunisia"] = "tn";
|
|
13167
|
+
Flag["Turkey"] = "tr";
|
|
13168
|
+
Flag["Tuvalu"] = "tv";
|
|
13169
|
+
Flag["Tanzania"] = "tz";
|
|
13170
|
+
Flag["Uganda"] = "ug";
|
|
13171
|
+
Flag["Ukraine"] = "ua";
|
|
13172
|
+
Flag["Uruguay"] = "uy";
|
|
13173
|
+
Flag["UnitedStates"] = "us";
|
|
13174
|
+
Flag["Uzbekistan"] = "uz";
|
|
13175
|
+
Flag["VaticanCity"] = "va";
|
|
13176
|
+
Flag["SaintVincentAndTheGrenadines"] = "vc";
|
|
13177
|
+
Flag["Venezuela"] = "ve";
|
|
13178
|
+
Flag["Vietnam"] = "vn";
|
|
13179
|
+
Flag["Vanuatu"] = "vu";
|
|
13180
|
+
Flag["Samoa"] = "ws";
|
|
13181
|
+
Flag["Yemen"] = "ye";
|
|
13182
|
+
Flag["SouthAfrica"] = "za";
|
|
13183
|
+
Flag["Zambia"] = "zm";
|
|
13184
|
+
Flag["Zimbabwe"] = "zw";
|
|
13185
|
+
})(exports.Flag || (exports.Flag = {}));
|
|
13186
|
+
|
|
13187
|
+
exports.DatabaseUsageRange = void 0;
|
|
13188
|
+
(function (DatabaseUsageRange) {
|
|
13189
|
+
DatabaseUsageRange["TwentyFourHours"] = "24h";
|
|
13190
|
+
DatabaseUsageRange["ThirtyDays"] = "30d";
|
|
13191
|
+
DatabaseUsageRange["NinetyDays"] = "90d";
|
|
13192
|
+
})(exports.DatabaseUsageRange || (exports.DatabaseUsageRange = {}));
|
|
13193
|
+
|
|
13194
|
+
exports.RelationshipType = void 0;
|
|
13195
|
+
(function (RelationshipType) {
|
|
13196
|
+
RelationshipType["OneToOne"] = "oneToOne";
|
|
13197
|
+
RelationshipType["ManyToOne"] = "manyToOne";
|
|
13198
|
+
RelationshipType["ManyToMany"] = "manyToMany";
|
|
13199
|
+
RelationshipType["OneToMany"] = "oneToMany";
|
|
13200
|
+
})(exports.RelationshipType || (exports.RelationshipType = {}));
|
|
13201
|
+
|
|
13202
|
+
exports.RelationMutate = void 0;
|
|
13203
|
+
(function (RelationMutate) {
|
|
13204
|
+
RelationMutate["Cascade"] = "cascade";
|
|
13205
|
+
RelationMutate["Restrict"] = "restrict";
|
|
13206
|
+
RelationMutate["SetNull"] = "setNull";
|
|
13207
|
+
})(exports.RelationMutate || (exports.RelationMutate = {}));
|
|
13208
|
+
|
|
13209
|
+
exports.IndexType = void 0;
|
|
13210
|
+
(function (IndexType) {
|
|
13211
|
+
IndexType["Key"] = "key";
|
|
13212
|
+
IndexType["Fulltext"] = "fulltext";
|
|
13213
|
+
IndexType["Unique"] = "unique";
|
|
13214
|
+
})(exports.IndexType || (exports.IndexType = {}));
|
|
13215
|
+
|
|
13216
|
+
exports.Runtime = void 0;
|
|
13217
|
+
(function (Runtime) {
|
|
13218
|
+
Runtime["Node145"] = "node-14.5";
|
|
13219
|
+
Runtime["Node160"] = "node-16.0";
|
|
13220
|
+
Runtime["Node180"] = "node-18.0";
|
|
13221
|
+
Runtime["Node190"] = "node-19.0";
|
|
13222
|
+
Runtime["Node200"] = "node-20.0";
|
|
13223
|
+
Runtime["Node210"] = "node-21.0";
|
|
13224
|
+
Runtime["Php80"] = "php-8.0";
|
|
13225
|
+
Runtime["Php81"] = "php-8.1";
|
|
13226
|
+
Runtime["Php82"] = "php-8.2";
|
|
13227
|
+
Runtime["Php83"] = "php-8.3";
|
|
13228
|
+
Runtime["Ruby30"] = "ruby-3.0";
|
|
13229
|
+
Runtime["Ruby31"] = "ruby-3.1";
|
|
13230
|
+
Runtime["Ruby32"] = "ruby-3.2";
|
|
13231
|
+
Runtime["Ruby33"] = "ruby-3.3";
|
|
13232
|
+
Runtime["Python38"] = "python-3.8";
|
|
13233
|
+
Runtime["Python39"] = "python-3.9";
|
|
13234
|
+
Runtime["Python310"] = "python-3.10";
|
|
13235
|
+
Runtime["Python311"] = "python-3.11";
|
|
13236
|
+
Runtime["Python312"] = "python-3.12";
|
|
13237
|
+
Runtime["Deno140"] = "deno-1.40";
|
|
13238
|
+
Runtime["Dart215"] = "dart-2.15";
|
|
13239
|
+
Runtime["Dart216"] = "dart-2.16";
|
|
13240
|
+
Runtime["Dart217"] = "dart-2.17";
|
|
13241
|
+
Runtime["Dart218"] = "dart-2.18";
|
|
13242
|
+
Runtime["Dart30"] = "dart-3.0";
|
|
13243
|
+
Runtime["Dart31"] = "dart-3.1";
|
|
13244
|
+
Runtime["Dart33"] = "dart-3.3";
|
|
13245
|
+
Runtime["Dotnet31"] = "dotnet-3.1";
|
|
13246
|
+
Runtime["Dotnet60"] = "dotnet-6.0";
|
|
13247
|
+
Runtime["Dotnet70"] = "dotnet-7.0";
|
|
13248
|
+
Runtime["Java80"] = "java-8.0";
|
|
13249
|
+
Runtime["Java110"] = "java-11.0";
|
|
13250
|
+
Runtime["Java170"] = "java-17.0";
|
|
13251
|
+
Runtime["Java180"] = "java-18.0";
|
|
13252
|
+
Runtime["Java210"] = "java-21.0";
|
|
13253
|
+
Runtime["Swift55"] = "swift-5.5";
|
|
13254
|
+
Runtime["Swift58"] = "swift-5.8";
|
|
13255
|
+
Runtime["Swift59"] = "swift-5.9";
|
|
13256
|
+
Runtime["Kotlin16"] = "kotlin-1.6";
|
|
13257
|
+
Runtime["Kotlin18"] = "kotlin-1.8";
|
|
13258
|
+
Runtime["Kotlin19"] = "kotlin-1.9";
|
|
13259
|
+
Runtime["Cpp17"] = "cpp-17";
|
|
13260
|
+
Runtime["Cpp20"] = "cpp-20";
|
|
13261
|
+
Runtime["Bun10"] = "bun-1.0";
|
|
13262
|
+
})(exports.Runtime || (exports.Runtime = {}));
|
|
13263
|
+
|
|
13264
|
+
exports.FunctionUsageRange = void 0;
|
|
13265
|
+
(function (FunctionUsageRange) {
|
|
13266
|
+
FunctionUsageRange["TwentyFourHours"] = "24h";
|
|
13267
|
+
FunctionUsageRange["ThirtyDays"] = "30d";
|
|
13268
|
+
FunctionUsageRange["NinetyDays"] = "90d";
|
|
13269
|
+
})(exports.FunctionUsageRange || (exports.FunctionUsageRange = {}));
|
|
13270
|
+
|
|
13271
|
+
exports.ExecutionMethod = void 0;
|
|
13272
|
+
(function (ExecutionMethod) {
|
|
13273
|
+
ExecutionMethod["GET"] = "GET";
|
|
13274
|
+
ExecutionMethod["POST"] = "POST";
|
|
13275
|
+
ExecutionMethod["PUT"] = "PUT";
|
|
13276
|
+
ExecutionMethod["PATCH"] = "PATCH";
|
|
13277
|
+
ExecutionMethod["DELETE"] = "DELETE";
|
|
13278
|
+
ExecutionMethod["OPTIONS"] = "OPTIONS";
|
|
13279
|
+
})(exports.ExecutionMethod || (exports.ExecutionMethod = {}));
|
|
13280
|
+
|
|
13281
|
+
exports.Name = void 0;
|
|
13282
|
+
(function (Name) {
|
|
13283
|
+
Name["V1database"] = "v1-database";
|
|
13284
|
+
Name["V1deletes"] = "v1-deletes";
|
|
13285
|
+
Name["V1audits"] = "v1-audits";
|
|
13286
|
+
Name["V1mails"] = "v1-mails";
|
|
13287
|
+
Name["V1functions"] = "v1-functions";
|
|
13288
|
+
Name["V1usage"] = "v1-usage";
|
|
13289
|
+
Name["V1usagedump"] = "v1-usage-dump";
|
|
13290
|
+
Name["Webhooksv1"] = "webhooksv1";
|
|
13291
|
+
Name["V1certificates"] = "v1-certificates";
|
|
13292
|
+
Name["V1builds"] = "v1-builds";
|
|
13293
|
+
Name["V1messaging"] = "v1-messaging";
|
|
13294
|
+
Name["V1migrations"] = "v1-migrations";
|
|
13295
|
+
Name["Hamsterv1"] = "hamsterv1";
|
|
13296
|
+
})(exports.Name || (exports.Name = {}));
|
|
13297
|
+
|
|
13298
|
+
exports.SmtpEncryption = void 0;
|
|
13299
|
+
(function (SmtpEncryption) {
|
|
13300
|
+
SmtpEncryption["None"] = "none";
|
|
13301
|
+
SmtpEncryption["Ssl"] = "ssl";
|
|
13302
|
+
SmtpEncryption["Tls"] = "tls";
|
|
13303
|
+
})(exports.SmtpEncryption || (exports.SmtpEncryption = {}));
|
|
13304
|
+
|
|
13305
|
+
exports.ProjectUsageRange = void 0;
|
|
13306
|
+
(function (ProjectUsageRange) {
|
|
13307
|
+
ProjectUsageRange["OneHour"] = "1h";
|
|
13308
|
+
ProjectUsageRange["OneDay"] = "1d";
|
|
13309
|
+
})(exports.ProjectUsageRange || (exports.ProjectUsageRange = {}));
|
|
13310
|
+
|
|
13311
|
+
exports.Region = void 0;
|
|
13312
|
+
(function (Region) {
|
|
13313
|
+
Region["Default"] = "default";
|
|
13314
|
+
Region["Fra"] = "fra";
|
|
13315
|
+
})(exports.Region || (exports.Region = {}));
|
|
13316
|
+
|
|
13317
|
+
exports.Api = void 0;
|
|
13318
|
+
(function (Api) {
|
|
13319
|
+
Api["Rest"] = "rest";
|
|
13320
|
+
Api["Graphql"] = "graphql";
|
|
13321
|
+
Api["Realtime"] = "realtime";
|
|
13322
|
+
})(exports.Api || (exports.Api = {}));
|
|
13323
|
+
|
|
13324
|
+
exports.AuthMethod = void 0;
|
|
13325
|
+
(function (AuthMethod) {
|
|
13326
|
+
AuthMethod["Emailpassword"] = "email-password";
|
|
13327
|
+
AuthMethod["Magicurl"] = "magic-url";
|
|
13328
|
+
AuthMethod["Emailotp"] = "email-otp";
|
|
13329
|
+
AuthMethod["Anonymous"] = "anonymous";
|
|
13330
|
+
AuthMethod["Invites"] = "invites";
|
|
13331
|
+
AuthMethod["Jwt"] = "jwt";
|
|
13332
|
+
AuthMethod["Phone"] = "phone";
|
|
13333
|
+
})(exports.AuthMethod || (exports.AuthMethod = {}));
|
|
13334
|
+
|
|
13335
|
+
exports.PlatformType = void 0;
|
|
13336
|
+
(function (PlatformType) {
|
|
13337
|
+
PlatformType["Web"] = "web";
|
|
13338
|
+
PlatformType["Flutterweb"] = "flutter-web";
|
|
13339
|
+
PlatformType["Flutterios"] = "flutter-ios";
|
|
13340
|
+
PlatformType["Flutterandroid"] = "flutter-android";
|
|
13341
|
+
PlatformType["Flutterlinux"] = "flutter-linux";
|
|
13342
|
+
PlatformType["Fluttermacos"] = "flutter-macos";
|
|
13343
|
+
PlatformType["Flutterwindows"] = "flutter-windows";
|
|
13344
|
+
PlatformType["Appleios"] = "apple-ios";
|
|
13345
|
+
PlatformType["Applemacos"] = "apple-macos";
|
|
13346
|
+
PlatformType["Applewatchos"] = "apple-watchos";
|
|
13347
|
+
PlatformType["Appletvos"] = "apple-tvos";
|
|
13348
|
+
PlatformType["Android"] = "android";
|
|
13349
|
+
PlatformType["Unity"] = "unity";
|
|
13350
|
+
})(exports.PlatformType || (exports.PlatformType = {}));
|
|
13351
|
+
|
|
13352
|
+
exports.ApiService = void 0;
|
|
13353
|
+
(function (ApiService) {
|
|
13354
|
+
ApiService["Account"] = "account";
|
|
13355
|
+
ApiService["Avatars"] = "avatars";
|
|
13356
|
+
ApiService["Databases"] = "databases";
|
|
13357
|
+
ApiService["Locale"] = "locale";
|
|
13358
|
+
ApiService["Health"] = "health";
|
|
13359
|
+
ApiService["Storage"] = "storage";
|
|
13360
|
+
ApiService["Teams"] = "teams";
|
|
13361
|
+
ApiService["Users"] = "users";
|
|
13362
|
+
ApiService["Functions"] = "functions";
|
|
13363
|
+
ApiService["Graphql"] = "graphql";
|
|
13364
|
+
ApiService["Messaging"] = "messaging";
|
|
13365
|
+
})(exports.ApiService || (exports.ApiService = {}));
|
|
13366
|
+
|
|
13367
|
+
exports.SMTPSecure = void 0;
|
|
13368
|
+
(function (SMTPSecure) {
|
|
13369
|
+
SMTPSecure["Tls"] = "tls";
|
|
13370
|
+
})(exports.SMTPSecure || (exports.SMTPSecure = {}));
|
|
13371
|
+
|
|
13372
|
+
exports.EmailTemplateType = void 0;
|
|
13373
|
+
(function (EmailTemplateType) {
|
|
13374
|
+
EmailTemplateType["Verification"] = "verification";
|
|
13375
|
+
EmailTemplateType["Magicsession"] = "magicsession";
|
|
13376
|
+
EmailTemplateType["Recovery"] = "recovery";
|
|
13377
|
+
EmailTemplateType["Invitation"] = "invitation";
|
|
13378
|
+
EmailTemplateType["Mfachallenge"] = "mfachallenge";
|
|
13379
|
+
})(exports.EmailTemplateType || (exports.EmailTemplateType = {}));
|
|
13380
|
+
|
|
13381
|
+
exports.EmailTemplateLocale = void 0;
|
|
13382
|
+
(function (EmailTemplateLocale) {
|
|
13383
|
+
EmailTemplateLocale["Af"] = "af";
|
|
13384
|
+
EmailTemplateLocale["Arae"] = "ar-ae";
|
|
13385
|
+
EmailTemplateLocale["Arbh"] = "ar-bh";
|
|
13386
|
+
EmailTemplateLocale["Ardz"] = "ar-dz";
|
|
13387
|
+
EmailTemplateLocale["Areg"] = "ar-eg";
|
|
13388
|
+
EmailTemplateLocale["Ariq"] = "ar-iq";
|
|
13389
|
+
EmailTemplateLocale["Arjo"] = "ar-jo";
|
|
13390
|
+
EmailTemplateLocale["Arkw"] = "ar-kw";
|
|
13391
|
+
EmailTemplateLocale["Arlb"] = "ar-lb";
|
|
13392
|
+
EmailTemplateLocale["Arly"] = "ar-ly";
|
|
13393
|
+
EmailTemplateLocale["Arma"] = "ar-ma";
|
|
13394
|
+
EmailTemplateLocale["Arom"] = "ar-om";
|
|
13395
|
+
EmailTemplateLocale["Arqa"] = "ar-qa";
|
|
13396
|
+
EmailTemplateLocale["Arsa"] = "ar-sa";
|
|
13397
|
+
EmailTemplateLocale["Arsy"] = "ar-sy";
|
|
13398
|
+
EmailTemplateLocale["Artn"] = "ar-tn";
|
|
13399
|
+
EmailTemplateLocale["Arye"] = "ar-ye";
|
|
13400
|
+
EmailTemplateLocale["As"] = "as";
|
|
13401
|
+
EmailTemplateLocale["Az"] = "az";
|
|
13402
|
+
EmailTemplateLocale["Be"] = "be";
|
|
13403
|
+
EmailTemplateLocale["Bg"] = "bg";
|
|
13404
|
+
EmailTemplateLocale["Bh"] = "bh";
|
|
13405
|
+
EmailTemplateLocale["Bn"] = "bn";
|
|
13406
|
+
EmailTemplateLocale["Bs"] = "bs";
|
|
13407
|
+
EmailTemplateLocale["Ca"] = "ca";
|
|
13408
|
+
EmailTemplateLocale["Cs"] = "cs";
|
|
13409
|
+
EmailTemplateLocale["Cy"] = "cy";
|
|
13410
|
+
EmailTemplateLocale["Da"] = "da";
|
|
13411
|
+
EmailTemplateLocale["De"] = "de";
|
|
13412
|
+
EmailTemplateLocale["Deat"] = "de-at";
|
|
13413
|
+
EmailTemplateLocale["Dech"] = "de-ch";
|
|
13414
|
+
EmailTemplateLocale["Deli"] = "de-li";
|
|
13415
|
+
EmailTemplateLocale["Delu"] = "de-lu";
|
|
13416
|
+
EmailTemplateLocale["El"] = "el";
|
|
13417
|
+
EmailTemplateLocale["En"] = "en";
|
|
13418
|
+
EmailTemplateLocale["Enau"] = "en-au";
|
|
13419
|
+
EmailTemplateLocale["Enbz"] = "en-bz";
|
|
13420
|
+
EmailTemplateLocale["Enca"] = "en-ca";
|
|
13421
|
+
EmailTemplateLocale["Engb"] = "en-gb";
|
|
13422
|
+
EmailTemplateLocale["Enie"] = "en-ie";
|
|
13423
|
+
EmailTemplateLocale["Enjm"] = "en-jm";
|
|
13424
|
+
EmailTemplateLocale["Ennz"] = "en-nz";
|
|
13425
|
+
EmailTemplateLocale["Entt"] = "en-tt";
|
|
13426
|
+
EmailTemplateLocale["Enus"] = "en-us";
|
|
13427
|
+
EmailTemplateLocale["Enza"] = "en-za";
|
|
13428
|
+
EmailTemplateLocale["Eo"] = "eo";
|
|
13429
|
+
EmailTemplateLocale["Es"] = "es";
|
|
13430
|
+
EmailTemplateLocale["Esar"] = "es-ar";
|
|
13431
|
+
EmailTemplateLocale["Esbo"] = "es-bo";
|
|
13432
|
+
EmailTemplateLocale["Escl"] = "es-cl";
|
|
13433
|
+
EmailTemplateLocale["Esco"] = "es-co";
|
|
13434
|
+
EmailTemplateLocale["Escr"] = "es-cr";
|
|
13435
|
+
EmailTemplateLocale["Esdo"] = "es-do";
|
|
13436
|
+
EmailTemplateLocale["Esec"] = "es-ec";
|
|
13437
|
+
EmailTemplateLocale["Esgt"] = "es-gt";
|
|
13438
|
+
EmailTemplateLocale["Eshn"] = "es-hn";
|
|
13439
|
+
EmailTemplateLocale["Esmx"] = "es-mx";
|
|
13440
|
+
EmailTemplateLocale["Esni"] = "es-ni";
|
|
13441
|
+
EmailTemplateLocale["Espa"] = "es-pa";
|
|
13442
|
+
EmailTemplateLocale["Espe"] = "es-pe";
|
|
13443
|
+
EmailTemplateLocale["Espr"] = "es-pr";
|
|
13444
|
+
EmailTemplateLocale["Espy"] = "es-py";
|
|
13445
|
+
EmailTemplateLocale["Essv"] = "es-sv";
|
|
13446
|
+
EmailTemplateLocale["Esuy"] = "es-uy";
|
|
13447
|
+
EmailTemplateLocale["Esve"] = "es-ve";
|
|
13448
|
+
EmailTemplateLocale["Et"] = "et";
|
|
13449
|
+
EmailTemplateLocale["Eu"] = "eu";
|
|
13450
|
+
EmailTemplateLocale["Fa"] = "fa";
|
|
13451
|
+
EmailTemplateLocale["Fi"] = "fi";
|
|
13452
|
+
EmailTemplateLocale["Fo"] = "fo";
|
|
13453
|
+
EmailTemplateLocale["Fr"] = "fr";
|
|
13454
|
+
EmailTemplateLocale["Frbe"] = "fr-be";
|
|
13455
|
+
EmailTemplateLocale["Frca"] = "fr-ca";
|
|
13456
|
+
EmailTemplateLocale["Frch"] = "fr-ch";
|
|
13457
|
+
EmailTemplateLocale["Frlu"] = "fr-lu";
|
|
13458
|
+
EmailTemplateLocale["Ga"] = "ga";
|
|
13459
|
+
EmailTemplateLocale["Gd"] = "gd";
|
|
13460
|
+
EmailTemplateLocale["He"] = "he";
|
|
13461
|
+
EmailTemplateLocale["Hi"] = "hi";
|
|
13462
|
+
EmailTemplateLocale["Hr"] = "hr";
|
|
13463
|
+
EmailTemplateLocale["Hu"] = "hu";
|
|
13464
|
+
EmailTemplateLocale["Id"] = "id";
|
|
13465
|
+
EmailTemplateLocale["Is"] = "is";
|
|
13466
|
+
EmailTemplateLocale["It"] = "it";
|
|
13467
|
+
EmailTemplateLocale["Itch"] = "it-ch";
|
|
13468
|
+
EmailTemplateLocale["Ja"] = "ja";
|
|
13469
|
+
EmailTemplateLocale["Ji"] = "ji";
|
|
13470
|
+
EmailTemplateLocale["Ko"] = "ko";
|
|
13471
|
+
EmailTemplateLocale["Ku"] = "ku";
|
|
13472
|
+
EmailTemplateLocale["Lt"] = "lt";
|
|
13473
|
+
EmailTemplateLocale["Lv"] = "lv";
|
|
13474
|
+
EmailTemplateLocale["Mk"] = "mk";
|
|
13475
|
+
EmailTemplateLocale["Ml"] = "ml";
|
|
13476
|
+
EmailTemplateLocale["Ms"] = "ms";
|
|
13477
|
+
EmailTemplateLocale["Mt"] = "mt";
|
|
13478
|
+
EmailTemplateLocale["Nb"] = "nb";
|
|
13479
|
+
EmailTemplateLocale["Ne"] = "ne";
|
|
13480
|
+
EmailTemplateLocale["Nl"] = "nl";
|
|
13481
|
+
EmailTemplateLocale["Nlbe"] = "nl-be";
|
|
13482
|
+
EmailTemplateLocale["Nn"] = "nn";
|
|
13483
|
+
EmailTemplateLocale["No"] = "no";
|
|
13484
|
+
EmailTemplateLocale["Pa"] = "pa";
|
|
13485
|
+
EmailTemplateLocale["Pl"] = "pl";
|
|
13486
|
+
EmailTemplateLocale["Pt"] = "pt";
|
|
13487
|
+
EmailTemplateLocale["Ptbr"] = "pt-br";
|
|
13488
|
+
EmailTemplateLocale["Rm"] = "rm";
|
|
13489
|
+
EmailTemplateLocale["Ro"] = "ro";
|
|
13490
|
+
EmailTemplateLocale["Romd"] = "ro-md";
|
|
13491
|
+
EmailTemplateLocale["Ru"] = "ru";
|
|
13492
|
+
EmailTemplateLocale["Rumd"] = "ru-md";
|
|
13493
|
+
EmailTemplateLocale["Sb"] = "sb";
|
|
13494
|
+
EmailTemplateLocale["Sk"] = "sk";
|
|
13495
|
+
EmailTemplateLocale["Sl"] = "sl";
|
|
13496
|
+
EmailTemplateLocale["Sq"] = "sq";
|
|
13497
|
+
EmailTemplateLocale["Sr"] = "sr";
|
|
13498
|
+
EmailTemplateLocale["Sv"] = "sv";
|
|
13499
|
+
EmailTemplateLocale["Svfi"] = "sv-fi";
|
|
13500
|
+
EmailTemplateLocale["Th"] = "th";
|
|
13501
|
+
EmailTemplateLocale["Tn"] = "tn";
|
|
13502
|
+
EmailTemplateLocale["Tr"] = "tr";
|
|
13503
|
+
EmailTemplateLocale["Ts"] = "ts";
|
|
13504
|
+
EmailTemplateLocale["Ua"] = "ua";
|
|
13505
|
+
EmailTemplateLocale["Ur"] = "ur";
|
|
13506
|
+
EmailTemplateLocale["Ve"] = "ve";
|
|
13507
|
+
EmailTemplateLocale["Vi"] = "vi";
|
|
13508
|
+
EmailTemplateLocale["Xh"] = "xh";
|
|
13509
|
+
EmailTemplateLocale["Zhcn"] = "zh-cn";
|
|
13510
|
+
EmailTemplateLocale["Zhhk"] = "zh-hk";
|
|
13511
|
+
EmailTemplateLocale["Zhsg"] = "zh-sg";
|
|
13512
|
+
EmailTemplateLocale["Zhtw"] = "zh-tw";
|
|
13513
|
+
EmailTemplateLocale["Zu"] = "zu";
|
|
13514
|
+
})(exports.EmailTemplateLocale || (exports.EmailTemplateLocale = {}));
|
|
13515
|
+
|
|
13516
|
+
exports.SmsTemplateType = void 0;
|
|
13517
|
+
(function (SmsTemplateType) {
|
|
13518
|
+
SmsTemplateType["Verification"] = "verification";
|
|
13519
|
+
SmsTemplateType["Login"] = "login";
|
|
13520
|
+
SmsTemplateType["Invitation"] = "invitation";
|
|
13521
|
+
SmsTemplateType["Mfachallenge"] = "mfachallenge";
|
|
13522
|
+
})(exports.SmsTemplateType || (exports.SmsTemplateType = {}));
|
|
13523
|
+
|
|
13524
|
+
exports.SmsTemplateLocale = void 0;
|
|
13525
|
+
(function (SmsTemplateLocale) {
|
|
13526
|
+
SmsTemplateLocale["Af"] = "af";
|
|
13527
|
+
SmsTemplateLocale["Arae"] = "ar-ae";
|
|
13528
|
+
SmsTemplateLocale["Arbh"] = "ar-bh";
|
|
13529
|
+
SmsTemplateLocale["Ardz"] = "ar-dz";
|
|
13530
|
+
SmsTemplateLocale["Areg"] = "ar-eg";
|
|
13531
|
+
SmsTemplateLocale["Ariq"] = "ar-iq";
|
|
13532
|
+
SmsTemplateLocale["Arjo"] = "ar-jo";
|
|
13533
|
+
SmsTemplateLocale["Arkw"] = "ar-kw";
|
|
13534
|
+
SmsTemplateLocale["Arlb"] = "ar-lb";
|
|
13535
|
+
SmsTemplateLocale["Arly"] = "ar-ly";
|
|
13536
|
+
SmsTemplateLocale["Arma"] = "ar-ma";
|
|
13537
|
+
SmsTemplateLocale["Arom"] = "ar-om";
|
|
13538
|
+
SmsTemplateLocale["Arqa"] = "ar-qa";
|
|
13539
|
+
SmsTemplateLocale["Arsa"] = "ar-sa";
|
|
13540
|
+
SmsTemplateLocale["Arsy"] = "ar-sy";
|
|
13541
|
+
SmsTemplateLocale["Artn"] = "ar-tn";
|
|
13542
|
+
SmsTemplateLocale["Arye"] = "ar-ye";
|
|
13543
|
+
SmsTemplateLocale["As"] = "as";
|
|
13544
|
+
SmsTemplateLocale["Az"] = "az";
|
|
13545
|
+
SmsTemplateLocale["Be"] = "be";
|
|
13546
|
+
SmsTemplateLocale["Bg"] = "bg";
|
|
13547
|
+
SmsTemplateLocale["Bh"] = "bh";
|
|
13548
|
+
SmsTemplateLocale["Bn"] = "bn";
|
|
13549
|
+
SmsTemplateLocale["Bs"] = "bs";
|
|
13550
|
+
SmsTemplateLocale["Ca"] = "ca";
|
|
13551
|
+
SmsTemplateLocale["Cs"] = "cs";
|
|
13552
|
+
SmsTemplateLocale["Cy"] = "cy";
|
|
13553
|
+
SmsTemplateLocale["Da"] = "da";
|
|
13554
|
+
SmsTemplateLocale["De"] = "de";
|
|
13555
|
+
SmsTemplateLocale["Deat"] = "de-at";
|
|
13556
|
+
SmsTemplateLocale["Dech"] = "de-ch";
|
|
13557
|
+
SmsTemplateLocale["Deli"] = "de-li";
|
|
13558
|
+
SmsTemplateLocale["Delu"] = "de-lu";
|
|
13559
|
+
SmsTemplateLocale["El"] = "el";
|
|
13560
|
+
SmsTemplateLocale["En"] = "en";
|
|
13561
|
+
SmsTemplateLocale["Enau"] = "en-au";
|
|
13562
|
+
SmsTemplateLocale["Enbz"] = "en-bz";
|
|
13563
|
+
SmsTemplateLocale["Enca"] = "en-ca";
|
|
13564
|
+
SmsTemplateLocale["Engb"] = "en-gb";
|
|
13565
|
+
SmsTemplateLocale["Enie"] = "en-ie";
|
|
13566
|
+
SmsTemplateLocale["Enjm"] = "en-jm";
|
|
13567
|
+
SmsTemplateLocale["Ennz"] = "en-nz";
|
|
13568
|
+
SmsTemplateLocale["Entt"] = "en-tt";
|
|
13569
|
+
SmsTemplateLocale["Enus"] = "en-us";
|
|
13570
|
+
SmsTemplateLocale["Enza"] = "en-za";
|
|
13571
|
+
SmsTemplateLocale["Eo"] = "eo";
|
|
13572
|
+
SmsTemplateLocale["Es"] = "es";
|
|
13573
|
+
SmsTemplateLocale["Esar"] = "es-ar";
|
|
13574
|
+
SmsTemplateLocale["Esbo"] = "es-bo";
|
|
13575
|
+
SmsTemplateLocale["Escl"] = "es-cl";
|
|
13576
|
+
SmsTemplateLocale["Esco"] = "es-co";
|
|
13577
|
+
SmsTemplateLocale["Escr"] = "es-cr";
|
|
13578
|
+
SmsTemplateLocale["Esdo"] = "es-do";
|
|
13579
|
+
SmsTemplateLocale["Esec"] = "es-ec";
|
|
13580
|
+
SmsTemplateLocale["Esgt"] = "es-gt";
|
|
13581
|
+
SmsTemplateLocale["Eshn"] = "es-hn";
|
|
13582
|
+
SmsTemplateLocale["Esmx"] = "es-mx";
|
|
13583
|
+
SmsTemplateLocale["Esni"] = "es-ni";
|
|
13584
|
+
SmsTemplateLocale["Espa"] = "es-pa";
|
|
13585
|
+
SmsTemplateLocale["Espe"] = "es-pe";
|
|
13586
|
+
SmsTemplateLocale["Espr"] = "es-pr";
|
|
13587
|
+
SmsTemplateLocale["Espy"] = "es-py";
|
|
13588
|
+
SmsTemplateLocale["Essv"] = "es-sv";
|
|
13589
|
+
SmsTemplateLocale["Esuy"] = "es-uy";
|
|
13590
|
+
SmsTemplateLocale["Esve"] = "es-ve";
|
|
13591
|
+
SmsTemplateLocale["Et"] = "et";
|
|
13592
|
+
SmsTemplateLocale["Eu"] = "eu";
|
|
13593
|
+
SmsTemplateLocale["Fa"] = "fa";
|
|
13594
|
+
SmsTemplateLocale["Fi"] = "fi";
|
|
13595
|
+
SmsTemplateLocale["Fo"] = "fo";
|
|
13596
|
+
SmsTemplateLocale["Fr"] = "fr";
|
|
13597
|
+
SmsTemplateLocale["Frbe"] = "fr-be";
|
|
13598
|
+
SmsTemplateLocale["Frca"] = "fr-ca";
|
|
13599
|
+
SmsTemplateLocale["Frch"] = "fr-ch";
|
|
13600
|
+
SmsTemplateLocale["Frlu"] = "fr-lu";
|
|
13601
|
+
SmsTemplateLocale["Ga"] = "ga";
|
|
13602
|
+
SmsTemplateLocale["Gd"] = "gd";
|
|
13603
|
+
SmsTemplateLocale["He"] = "he";
|
|
13604
|
+
SmsTemplateLocale["Hi"] = "hi";
|
|
13605
|
+
SmsTemplateLocale["Hr"] = "hr";
|
|
13606
|
+
SmsTemplateLocale["Hu"] = "hu";
|
|
13607
|
+
SmsTemplateLocale["Id"] = "id";
|
|
13608
|
+
SmsTemplateLocale["Is"] = "is";
|
|
13609
|
+
SmsTemplateLocale["It"] = "it";
|
|
13610
|
+
SmsTemplateLocale["Itch"] = "it-ch";
|
|
13611
|
+
SmsTemplateLocale["Ja"] = "ja";
|
|
13612
|
+
SmsTemplateLocale["Ji"] = "ji";
|
|
13613
|
+
SmsTemplateLocale["Ko"] = "ko";
|
|
13614
|
+
SmsTemplateLocale["Ku"] = "ku";
|
|
13615
|
+
SmsTemplateLocale["Lt"] = "lt";
|
|
13616
|
+
SmsTemplateLocale["Lv"] = "lv";
|
|
13617
|
+
SmsTemplateLocale["Mk"] = "mk";
|
|
13618
|
+
SmsTemplateLocale["Ml"] = "ml";
|
|
13619
|
+
SmsTemplateLocale["Ms"] = "ms";
|
|
13620
|
+
SmsTemplateLocale["Mt"] = "mt";
|
|
13621
|
+
SmsTemplateLocale["Nb"] = "nb";
|
|
13622
|
+
SmsTemplateLocale["Ne"] = "ne";
|
|
13623
|
+
SmsTemplateLocale["Nl"] = "nl";
|
|
13624
|
+
SmsTemplateLocale["Nlbe"] = "nl-be";
|
|
13625
|
+
SmsTemplateLocale["Nn"] = "nn";
|
|
13626
|
+
SmsTemplateLocale["No"] = "no";
|
|
13627
|
+
SmsTemplateLocale["Pa"] = "pa";
|
|
13628
|
+
SmsTemplateLocale["Pl"] = "pl";
|
|
13629
|
+
SmsTemplateLocale["Pt"] = "pt";
|
|
13630
|
+
SmsTemplateLocale["Ptbr"] = "pt-br";
|
|
13631
|
+
SmsTemplateLocale["Rm"] = "rm";
|
|
13632
|
+
SmsTemplateLocale["Ro"] = "ro";
|
|
13633
|
+
SmsTemplateLocale["Romd"] = "ro-md";
|
|
13634
|
+
SmsTemplateLocale["Ru"] = "ru";
|
|
13635
|
+
SmsTemplateLocale["Rumd"] = "ru-md";
|
|
13636
|
+
SmsTemplateLocale["Sb"] = "sb";
|
|
13637
|
+
SmsTemplateLocale["Sk"] = "sk";
|
|
13638
|
+
SmsTemplateLocale["Sl"] = "sl";
|
|
13639
|
+
SmsTemplateLocale["Sq"] = "sq";
|
|
13640
|
+
SmsTemplateLocale["Sr"] = "sr";
|
|
13641
|
+
SmsTemplateLocale["Sv"] = "sv";
|
|
13642
|
+
SmsTemplateLocale["Svfi"] = "sv-fi";
|
|
13643
|
+
SmsTemplateLocale["Th"] = "th";
|
|
13644
|
+
SmsTemplateLocale["Tn"] = "tn";
|
|
13645
|
+
SmsTemplateLocale["Tr"] = "tr";
|
|
13646
|
+
SmsTemplateLocale["Ts"] = "ts";
|
|
13647
|
+
SmsTemplateLocale["Ua"] = "ua";
|
|
13648
|
+
SmsTemplateLocale["Ur"] = "ur";
|
|
13649
|
+
SmsTemplateLocale["Ve"] = "ve";
|
|
13650
|
+
SmsTemplateLocale["Vi"] = "vi";
|
|
13651
|
+
SmsTemplateLocale["Xh"] = "xh";
|
|
13652
|
+
SmsTemplateLocale["Zhcn"] = "zh-cn";
|
|
13653
|
+
SmsTemplateLocale["Zhhk"] = "zh-hk";
|
|
13654
|
+
SmsTemplateLocale["Zhsg"] = "zh-sg";
|
|
13655
|
+
SmsTemplateLocale["Zhtw"] = "zh-tw";
|
|
13656
|
+
SmsTemplateLocale["Zu"] = "zu";
|
|
13657
|
+
})(exports.SmsTemplateLocale || (exports.SmsTemplateLocale = {}));
|
|
13658
|
+
|
|
13659
|
+
exports.ResourceType = void 0;
|
|
13660
|
+
(function (ResourceType) {
|
|
13661
|
+
ResourceType["Api"] = "api";
|
|
13662
|
+
ResourceType["Function"] = "function";
|
|
13663
|
+
})(exports.ResourceType || (exports.ResourceType = {}));
|
|
13664
|
+
|
|
13665
|
+
exports.Compression = void 0;
|
|
13666
|
+
(function (Compression) {
|
|
13667
|
+
Compression["None"] = "none";
|
|
13668
|
+
Compression["Gzip"] = "gzip";
|
|
13669
|
+
Compression["Zstd"] = "zstd";
|
|
13670
|
+
})(exports.Compression || (exports.Compression = {}));
|
|
13671
|
+
|
|
13672
|
+
exports.ImageGravity = void 0;
|
|
13673
|
+
(function (ImageGravity) {
|
|
13674
|
+
ImageGravity["Center"] = "center";
|
|
13675
|
+
ImageGravity["Topleft"] = "top-left";
|
|
13676
|
+
ImageGravity["Top"] = "top";
|
|
13677
|
+
ImageGravity["Topright"] = "top-right";
|
|
13678
|
+
ImageGravity["Left"] = "left";
|
|
13679
|
+
ImageGravity["Right"] = "right";
|
|
13680
|
+
ImageGravity["Bottomleft"] = "bottom-left";
|
|
13681
|
+
ImageGravity["Bottom"] = "bottom";
|
|
13682
|
+
ImageGravity["Bottomright"] = "bottom-right";
|
|
13683
|
+
})(exports.ImageGravity || (exports.ImageGravity = {}));
|
|
13684
|
+
|
|
13685
|
+
exports.ImageFormat = void 0;
|
|
13686
|
+
(function (ImageFormat) {
|
|
13687
|
+
ImageFormat["Jpg"] = "jpg";
|
|
13688
|
+
ImageFormat["Jpeg"] = "jpeg";
|
|
13689
|
+
ImageFormat["Gif"] = "gif";
|
|
13690
|
+
ImageFormat["Png"] = "png";
|
|
13691
|
+
ImageFormat["Webp"] = "webp";
|
|
13692
|
+
})(exports.ImageFormat || (exports.ImageFormat = {}));
|
|
13693
|
+
|
|
13694
|
+
exports.StorageUsageRange = void 0;
|
|
13695
|
+
(function (StorageUsageRange) {
|
|
13696
|
+
StorageUsageRange["TwentyFourHours"] = "24h";
|
|
13697
|
+
StorageUsageRange["ThirtyDays"] = "30d";
|
|
13698
|
+
StorageUsageRange["NinetyDays"] = "90d";
|
|
13699
|
+
})(exports.StorageUsageRange || (exports.StorageUsageRange = {}));
|
|
13700
|
+
|
|
13701
|
+
exports.PasswordHash = void 0;
|
|
13702
|
+
(function (PasswordHash) {
|
|
13703
|
+
PasswordHash["Sha1"] = "sha1";
|
|
13704
|
+
PasswordHash["Sha224"] = "sha224";
|
|
13705
|
+
PasswordHash["Sha256"] = "sha256";
|
|
13706
|
+
PasswordHash["Sha384"] = "sha384";
|
|
13707
|
+
PasswordHash["Sha512224"] = "sha512/224";
|
|
13708
|
+
PasswordHash["Sha512256"] = "sha512/256";
|
|
13709
|
+
PasswordHash["Sha512"] = "sha512";
|
|
13710
|
+
PasswordHash["Sha3224"] = "sha3-224";
|
|
13711
|
+
PasswordHash["Sha3256"] = "sha3-256";
|
|
13712
|
+
PasswordHash["Sha3384"] = "sha3-384";
|
|
13713
|
+
PasswordHash["Sha3512"] = "sha3-512";
|
|
13714
|
+
})(exports.PasswordHash || (exports.PasswordHash = {}));
|
|
13715
|
+
|
|
13716
|
+
exports.UserUsageRange = void 0;
|
|
13717
|
+
(function (UserUsageRange) {
|
|
13718
|
+
UserUsageRange["TwentyFourHours"] = "24h";
|
|
13719
|
+
UserUsageRange["ThirtyDays"] = "30d";
|
|
13720
|
+
UserUsageRange["NinetyDays"] = "90d";
|
|
13721
|
+
})(exports.UserUsageRange || (exports.UserUsageRange = {}));
|
|
13722
|
+
|
|
13723
|
+
exports.MessagingProviderType = void 0;
|
|
13724
|
+
(function (MessagingProviderType) {
|
|
13725
|
+
MessagingProviderType["Email"] = "email";
|
|
13726
|
+
MessagingProviderType["Sms"] = "sms";
|
|
13727
|
+
MessagingProviderType["Push"] = "push";
|
|
13728
|
+
})(exports.MessagingProviderType || (exports.MessagingProviderType = {}));
|
|
13729
|
+
|
|
12229
13730
|
exports.Account = Account;
|
|
12230
13731
|
exports.AppwriteException = AppwriteException;
|
|
12231
13732
|
exports.Assistant = Assistant;
|