@appwrite.io/console 0.5.0 → 0.6.0-rc.10
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/README.md +2 -2
- package/dist/cjs/sdk.js +3770 -355
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +3770 -356
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +3770 -355
- package/docs/examples/account/{update-phone-session.md → add-authenticator.md} +2 -2
- package/docs/examples/account/create-anonymous-session.md +1 -1
- package/docs/examples/account/create-email-password-session.md +18 -0
- package/docs/examples/account/{create-email-session.md → create-email-token.md} +2 -2
- package/docs/examples/account/create-j-w-t.md +1 -1
- package/docs/examples/account/{create-magic-u-r-l-session.md → create-magic-u-r-l-token.md} +2 -2
- package/docs/examples/account/create-o-auth2session.md +2 -2
- package/docs/examples/account/{create-phone-session.md → create-phone-token.md} +2 -2
- package/docs/examples/account/create-phone-verification.md +1 -1
- package/docs/examples/account/create-push-target.md +18 -0
- package/docs/examples/account/create-recovery.md +1 -1
- package/docs/examples/account/create-session.md +18 -0
- package/docs/examples/account/create-verification.md +1 -1
- package/docs/examples/account/create.md +1 -1
- package/docs/examples/account/create2f-a-challenge.md +18 -0
- package/docs/examples/account/delete-authenticator.md +18 -0
- package/docs/examples/account/delete-identity.md +1 -1
- package/docs/examples/account/delete-push-target.md +18 -0
- package/docs/examples/account/delete-session.md +1 -1
- package/docs/examples/account/delete-sessions.md +1 -1
- package/docs/examples/account/delete.md +1 -1
- package/docs/examples/account/get-prefs.md +1 -1
- package/docs/examples/account/get-session.md +1 -1
- package/docs/examples/account/get.md +1 -1
- package/docs/examples/account/list-factors.md +18 -0
- package/docs/examples/account/list-identities.md +1 -1
- package/docs/examples/account/list-logs.md +1 -1
- package/docs/examples/account/list-sessions.md +1 -1
- package/docs/examples/account/update-challenge.md +18 -0
- package/docs/examples/account/update-email.md +1 -1
- package/docs/examples/account/update-m-f-a.md +18 -0
- package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
- package/docs/examples/account/update-name.md +1 -1
- package/docs/examples/account/update-password.md +1 -1
- package/docs/examples/account/update-phone-verification.md +1 -1
- package/docs/examples/account/update-phone.md +1 -1
- package/docs/examples/account/update-prefs.md +1 -1
- package/docs/examples/account/update-push-target.md +18 -0
- package/docs/examples/account/update-recovery.md +2 -2
- package/docs/examples/account/update-session.md +1 -1
- package/docs/examples/account/update-status.md +1 -1
- package/docs/examples/account/update-verification.md +1 -1
- package/docs/examples/account/verify-authenticator.md +18 -0
- package/docs/examples/assistant/chat.md +1 -1
- package/docs/examples/avatars/get-browser.md +2 -2
- package/docs/examples/avatars/get-credit-card.md +2 -2
- package/docs/examples/avatars/get-favicon.md +1 -1
- package/docs/examples/avatars/get-flag.md +2 -2
- package/docs/examples/avatars/get-image.md +1 -1
- package/docs/examples/avatars/get-initials.md +1 -1
- package/docs/examples/avatars/get-q-r.md +1 -1
- package/docs/examples/console/variables.md +1 -1
- package/docs/examples/databases/create-boolean-attribute.md +1 -1
- package/docs/examples/databases/create-collection.md +1 -1
- package/docs/examples/databases/create-datetime-attribute.md +1 -1
- package/docs/examples/databases/create-document.md +1 -1
- package/docs/examples/databases/create-email-attribute.md +1 -1
- package/docs/examples/databases/create-enum-attribute.md +1 -1
- package/docs/examples/databases/create-float-attribute.md +1 -1
- package/docs/examples/databases/create-index.md +2 -2
- package/docs/examples/databases/create-integer-attribute.md +1 -1
- package/docs/examples/databases/create-ip-attribute.md +1 -1
- package/docs/examples/databases/create-relationship-attribute.md +2 -2
- package/docs/examples/databases/create-string-attribute.md +1 -1
- package/docs/examples/databases/create-url-attribute.md +1 -1
- package/docs/examples/databases/create.md +1 -1
- package/docs/examples/databases/delete-attribute.md +1 -1
- package/docs/examples/databases/delete-collection.md +1 -1
- package/docs/examples/databases/delete-document.md +1 -1
- package/docs/examples/databases/delete-index.md +1 -1
- package/docs/examples/databases/delete.md +1 -1
- package/docs/examples/databases/get-attribute.md +1 -1
- package/docs/examples/databases/get-collection-usage.md +1 -1
- package/docs/examples/databases/get-collection.md +1 -1
- package/docs/examples/databases/get-database-usage.md +1 -1
- package/docs/examples/databases/get-document.md +1 -1
- package/docs/examples/databases/get-index.md +1 -1
- package/docs/examples/databases/get-usage.md +1 -1
- package/docs/examples/databases/get.md +1 -1
- package/docs/examples/databases/list-attributes.md +1 -1
- package/docs/examples/databases/list-collection-logs.md +1 -1
- package/docs/examples/databases/list-collections.md +1 -1
- package/docs/examples/databases/list-document-logs.md +1 -1
- package/docs/examples/databases/list-documents.md +1 -1
- package/docs/examples/databases/list-indexes.md +1 -1
- package/docs/examples/databases/list-logs.md +1 -1
- package/docs/examples/databases/list.md +1 -1
- package/docs/examples/databases/update-boolean-attribute.md +1 -1
- package/docs/examples/databases/update-collection.md +1 -1
- package/docs/examples/databases/update-datetime-attribute.md +1 -1
- package/docs/examples/databases/update-document.md +1 -1
- package/docs/examples/databases/update-email-attribute.md +1 -1
- package/docs/examples/databases/update-enum-attribute.md +1 -1
- package/docs/examples/databases/update-float-attribute.md +1 -1
- package/docs/examples/databases/update-integer-attribute.md +1 -1
- package/docs/examples/databases/update-ip-attribute.md +1 -1
- package/docs/examples/databases/update-relationship-attribute.md +1 -1
- package/docs/examples/databases/update-string-attribute.md +1 -1
- package/docs/examples/databases/update-url-attribute.md +1 -1
- package/docs/examples/databases/update.md +1 -1
- package/docs/examples/functions/create-build.md +1 -1
- package/docs/examples/functions/create-deployment.md +1 -1
- package/docs/examples/functions/create-execution.md +1 -1
- package/docs/examples/functions/create-variable.md +1 -1
- package/docs/examples/functions/create.md +2 -2
- package/docs/examples/functions/delete-deployment.md +1 -1
- package/docs/examples/functions/delete-variable.md +1 -1
- package/docs/examples/functions/delete.md +1 -1
- package/docs/examples/functions/download-deployment.md +1 -1
- package/docs/examples/functions/get-deployment.md +1 -1
- package/docs/examples/functions/get-execution.md +1 -1
- package/docs/examples/functions/get-function-usage.md +1 -1
- package/docs/examples/functions/get-usage.md +1 -1
- package/docs/examples/functions/get-variable.md +1 -1
- package/docs/examples/functions/get.md +1 -1
- package/docs/examples/functions/list-deployments.md +1 -1
- package/docs/examples/functions/list-executions.md +1 -1
- package/docs/examples/functions/list-runtimes.md +1 -1
- package/docs/examples/functions/list-variables.md +1 -1
- package/docs/examples/functions/list.md +1 -1
- package/docs/examples/functions/update-deployment.md +1 -1
- package/docs/examples/functions/update-variable.md +1 -1
- package/docs/examples/functions/update.md +1 -1
- package/docs/examples/graphql/mutation.md +1 -1
- package/docs/examples/graphql/query.md +1 -1
- package/docs/examples/health/get-antivirus.md +1 -1
- package/docs/examples/health/get-cache.md +1 -1
- package/docs/examples/health/get-certificate.md +18 -0
- package/docs/examples/health/get-d-b.md +1 -1
- package/docs/examples/health/get-failed-jobs.md +18 -0
- package/docs/examples/health/get-pub-sub.md +1 -1
- package/docs/examples/health/get-queue-builds.md +1 -1
- package/docs/examples/health/get-queue-certificates.md +1 -1
- package/docs/examples/health/get-queue-databases.md +1 -1
- package/docs/examples/health/get-queue-deletes.md +1 -1
- package/docs/examples/health/get-queue-functions.md +1 -1
- package/docs/examples/health/get-queue-logs.md +1 -1
- package/docs/examples/health/get-queue-mails.md +1 -1
- package/docs/examples/health/get-queue-messaging.md +1 -1
- package/docs/examples/health/get-queue-migrations.md +1 -1
- package/docs/examples/health/get-queue-webhooks.md +1 -1
- package/docs/examples/health/get-queue.md +1 -1
- package/docs/examples/health/get-storage-local.md +1 -1
- package/docs/examples/health/get-time.md +1 -1
- package/docs/examples/health/get.md +1 -1
- package/docs/examples/locale/get.md +1 -1
- package/docs/examples/locale/list-codes.md +1 -1
- package/docs/examples/locale/list-continents.md +1 -1
- package/docs/examples/locale/list-countries-e-u.md +1 -1
- package/docs/examples/locale/list-countries-phones.md +1 -1
- package/docs/examples/locale/list-countries.md +1 -1
- package/docs/examples/locale/list-currencies.md +1 -1
- package/docs/examples/locale/list-languages.md +1 -1
- package/docs/examples/messaging/create-a-p-n-s-provider.md +18 -0
- package/docs/examples/messaging/create-email.md +18 -0
- package/docs/examples/messaging/create-f-c-m-provider.md +18 -0
- package/docs/examples/messaging/create-mailgun-provider.md +18 -0
- package/docs/examples/messaging/create-msg91provider.md +18 -0
- package/docs/examples/messaging/create-push.md +18 -0
- package/docs/examples/messaging/create-s-m-s.md +18 -0
- package/docs/examples/messaging/create-s-m-t-p-provider.md +18 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +18 -0
- package/docs/examples/messaging/create-subscriber.md +18 -0
- package/docs/examples/messaging/create-telesign-provider.md +18 -0
- package/docs/examples/messaging/create-textmagic-provider.md +18 -0
- package/docs/examples/messaging/create-topic.md +18 -0
- package/docs/examples/messaging/create-twilio-provider.md +18 -0
- package/docs/examples/messaging/create-vonage-provider.md +18 -0
- package/docs/examples/messaging/delete-provider.md +18 -0
- package/docs/examples/messaging/delete-subscriber.md +18 -0
- package/docs/examples/messaging/delete-topic.md +18 -0
- package/docs/examples/messaging/delete.md +18 -0
- package/docs/examples/messaging/get-message.md +18 -0
- package/docs/examples/messaging/get-provider.md +18 -0
- package/docs/examples/messaging/get-subscriber.md +18 -0
- package/docs/examples/messaging/get-topic.md +18 -0
- package/docs/examples/messaging/list-message-logs.md +18 -0
- package/docs/examples/messaging/list-messages.md +18 -0
- package/docs/examples/messaging/list-provider-logs.md +18 -0
- package/docs/examples/messaging/list-providers.md +18 -0
- package/docs/examples/messaging/list-subscriber-logs.md +18 -0
- package/docs/examples/messaging/list-subscribers.md +18 -0
- package/docs/examples/messaging/list-targets.md +18 -0
- package/docs/examples/messaging/list-topic-logs.md +18 -0
- package/docs/examples/messaging/list-topics.md +18 -0
- package/docs/examples/messaging/update-a-p-n-s-provider.md +18 -0
- package/docs/examples/messaging/update-email.md +18 -0
- package/docs/examples/messaging/update-f-c-m-provider.md +18 -0
- package/docs/examples/messaging/update-mailgun-provider.md +18 -0
- package/docs/examples/messaging/update-msg91provider.md +18 -0
- package/docs/examples/messaging/update-push.md +18 -0
- package/docs/examples/messaging/update-s-m-s.md +18 -0
- package/docs/examples/messaging/update-s-m-t-p-provider.md +18 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +18 -0
- package/docs/examples/messaging/update-telesign-provider.md +18 -0
- package/docs/examples/messaging/update-textmagic-provider.md +18 -0
- package/docs/examples/messaging/update-topic.md +18 -0
- package/docs/examples/messaging/update-twilio-provider.md +18 -0
- package/docs/examples/messaging/update-vonage-provider.md +18 -0
- package/docs/examples/migrations/create-appwrite-migration.md +1 -1
- package/docs/examples/migrations/create-firebase-migration.md +1 -1
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +1 -1
- package/docs/examples/migrations/create-n-host-migration.md +1 -1
- package/docs/examples/migrations/create-supabase-migration.md +1 -1
- package/docs/examples/migrations/delete-firebase-auth.md +1 -1
- package/docs/examples/migrations/delete.md +1 -1
- package/docs/examples/migrations/get-appwrite-report.md +1 -1
- package/docs/examples/migrations/get-firebase-report-o-auth.md +1 -1
- package/docs/examples/migrations/get-firebase-report.md +1 -1
- package/docs/examples/migrations/get-n-host-report.md +1 -1
- package/docs/examples/migrations/get-supabase-report.md +1 -1
- package/docs/examples/migrations/get.md +1 -1
- package/docs/examples/migrations/list-firebase-projects.md +1 -1
- package/docs/examples/migrations/list.md +1 -1
- package/docs/examples/migrations/retry.md +1 -1
- package/docs/examples/project/create-variable.md +1 -1
- package/docs/examples/project/delete-variable.md +1 -1
- package/docs/examples/project/get-usage.md +1 -1
- package/docs/examples/project/get-variable.md +1 -1
- package/docs/examples/project/list-variables.md +1 -1
- package/docs/examples/project/update-variable.md +1 -1
- package/docs/examples/projects/create-key.md +1 -1
- package/docs/examples/projects/create-platform.md +2 -2
- package/docs/examples/projects/create-smtp-test.md +18 -0
- package/docs/examples/projects/create-webhook.md +2 -2
- package/docs/examples/projects/create.md +1 -1
- package/docs/examples/projects/delete-email-template.md +2 -2
- package/docs/examples/projects/delete-key.md +1 -1
- package/docs/examples/projects/delete-platform.md +1 -1
- package/docs/examples/projects/delete-sms-template.md +2 -2
- package/docs/examples/projects/delete-webhook.md +1 -1
- package/docs/examples/projects/delete.md +1 -1
- package/docs/examples/projects/get-email-template.md +2 -2
- package/docs/examples/projects/get-key.md +1 -1
- package/docs/examples/projects/get-platform.md +1 -1
- package/docs/examples/projects/get-sms-template.md +2 -2
- package/docs/examples/projects/get-webhook.md +1 -1
- package/docs/examples/projects/get.md +1 -1
- package/docs/examples/projects/list-keys.md +1 -1
- package/docs/examples/projects/list-platforms.md +1 -1
- package/docs/examples/projects/list-webhooks.md +1 -1
- package/docs/examples/projects/list.md +1 -1
- package/docs/examples/projects/update-auth-duration.md +1 -1
- package/docs/examples/projects/update-auth-limit.md +1 -1
- package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
- package/docs/examples/projects/update-auth-password-history.md +1 -1
- package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
- package/docs/examples/projects/update-auth-status.md +2 -2
- package/docs/examples/projects/update-email-template.md +2 -2
- package/docs/examples/projects/update-key.md +1 -1
- package/docs/examples/projects/update-o-auth2.md +2 -2
- package/docs/examples/projects/update-personal-data-check.md +1 -1
- package/docs/examples/projects/update-platform.md +1 -1
- package/docs/examples/projects/update-service-status-all.md +1 -1
- package/docs/examples/projects/update-service-status.md +2 -2
- package/docs/examples/projects/update-sms-template.md +2 -2
- package/docs/examples/projects/{update-smtp-configuration.md → update-smtp.md} +2 -2
- package/docs/examples/projects/update-team.md +1 -1
- package/docs/examples/projects/update-webhook-signature.md +1 -1
- package/docs/examples/projects/update-webhook.md +2 -2
- package/docs/examples/projects/update.md +1 -1
- package/docs/examples/proxy/create-rule.md +2 -2
- package/docs/examples/proxy/delete-rule.md +1 -1
- package/docs/examples/proxy/get-rule.md +1 -1
- package/docs/examples/proxy/list-rules.md +1 -1
- package/docs/examples/proxy/update-rule-verification.md +1 -1
- package/docs/examples/storage/create-bucket.md +1 -1
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/storage/delete-bucket.md +1 -1
- package/docs/examples/storage/delete-file.md +1 -1
- package/docs/examples/storage/get-bucket-usage.md +1 -1
- package/docs/examples/storage/get-bucket.md +1 -1
- package/docs/examples/storage/get-file-download.md +1 -1
- package/docs/examples/storage/get-file-preview.md +1 -1
- package/docs/examples/storage/get-file-view.md +1 -1
- package/docs/examples/storage/get-file.md +1 -1
- package/docs/examples/storage/get-usage.md +1 -1
- package/docs/examples/storage/list-buckets.md +1 -1
- package/docs/examples/storage/list-files.md +1 -1
- package/docs/examples/storage/update-bucket.md +1 -1
- package/docs/examples/storage/update-file.md +1 -1
- package/docs/examples/teams/create-membership.md +1 -1
- package/docs/examples/teams/create.md +1 -1
- package/docs/examples/teams/delete-membership.md +1 -1
- package/docs/examples/teams/delete.md +1 -1
- package/docs/examples/teams/get-membership.md +1 -1
- package/docs/examples/teams/get-prefs.md +1 -1
- package/docs/examples/teams/get.md +1 -1
- package/docs/examples/teams/list-logs.md +1 -1
- package/docs/examples/teams/list-memberships.md +1 -1
- package/docs/examples/teams/list.md +1 -1
- package/docs/examples/teams/update-membership-status.md +1 -1
- package/docs/examples/teams/update-membership.md +1 -1
- package/docs/examples/teams/update-name.md +1 -1
- package/docs/examples/teams/update-prefs.md +1 -1
- package/docs/examples/users/create-argon2user.md +1 -1
- package/docs/examples/users/create-bcrypt-user.md +1 -1
- package/docs/examples/users/create-m-d5user.md +1 -1
- package/docs/examples/users/create-p-h-pass-user.md +1 -1
- package/docs/examples/users/create-s-h-a-user.md +1 -1
- package/docs/examples/users/create-scrypt-modified-user.md +1 -1
- package/docs/examples/users/create-scrypt-user.md +1 -1
- package/docs/examples/users/create-session.md +18 -0
- package/docs/examples/users/create-target.md +18 -0
- package/docs/examples/users/create-token.md +18 -0
- package/docs/examples/users/create.md +1 -1
- package/docs/examples/users/delete-authenticator.md +18 -0
- package/docs/examples/users/delete-identity.md +1 -1
- package/docs/examples/users/delete-session.md +1 -1
- package/docs/examples/users/delete-sessions.md +1 -1
- package/docs/examples/users/delete-target.md +18 -0
- package/docs/examples/users/delete.md +1 -1
- package/docs/examples/users/get-prefs.md +1 -1
- package/docs/examples/users/get-target.md +18 -0
- package/docs/examples/users/get-usage.md +1 -1
- package/docs/examples/users/get.md +1 -1
- package/docs/examples/users/list-factors.md +18 -0
- package/docs/examples/users/list-identities.md +1 -1
- package/docs/examples/users/list-logs.md +1 -1
- package/docs/examples/users/list-memberships.md +1 -1
- package/docs/examples/users/list-sessions.md +1 -1
- package/docs/examples/users/list-targets.md +18 -0
- package/docs/examples/users/list.md +1 -1
- package/docs/examples/users/update-email-verification.md +1 -1
- package/docs/examples/users/update-email.md +1 -1
- package/docs/examples/users/update-labels.md +1 -1
- package/docs/examples/users/update-mfa.md +18 -0
- package/docs/examples/users/update-name.md +1 -1
- package/docs/examples/users/update-password.md +1 -1
- package/docs/examples/users/update-phone-verification.md +1 -1
- package/docs/examples/users/update-phone.md +1 -1
- package/docs/examples/users/update-prefs.md +1 -1
- package/docs/examples/users/update-status.md +1 -1
- package/docs/examples/users/update-target.md +18 -0
- package/docs/examples/vcs/create-repository-detection.md +1 -1
- package/docs/examples/vcs/create-repository.md +1 -1
- package/docs/examples/vcs/delete-installation.md +1 -1
- package/docs/examples/vcs/get-installation.md +1 -1
- package/docs/examples/vcs/get-repository.md +1 -1
- package/docs/examples/vcs/list-installations.md +1 -1
- package/docs/examples/vcs/list-repositories.md +1 -1
- package/docs/examples/vcs/list-repository-branches.md +1 -1
- package/docs/examples/vcs/update-external-deployments.md +1 -1
- package/package.json +1 -1
- package/src/client.ts +2 -2
- package/src/enums/a-p-i-service.ts +13 -0
- package/src/enums/auth-method.ts +9 -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 +6 -0
- package/src/enums/execution-method.ts +8 -0
- package/src/enums/factor.ts +5 -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 +6 -0
- package/src/enums/message-status.ts +5 -0
- package/src/enums/messaging-provider-type.ts +5 -0
- package/src/enums/name.ts +14 -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 +3 -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 +6 -0
- package/src/enums/s-m-s-template-locale.ts +133 -0
- package/src/enums/s-m-s-template-type.ts +5 -0
- package/src/enums/s-m-t-p-encryption.ts +5 -0
- package/src/enums/s-m-t-p-secure.ts +3 -0
- package/src/enums/storage-usage-range.ts +5 -0
- package/src/enums/type.ts +3 -0
- package/src/enums/user-usage-range.ts +5 -0
- package/src/index.ts +36 -1
- package/src/models.ts +417 -7
- package/src/query.ts +61 -34
- package/src/service.ts +7 -7
- package/src/services/account.ts +468 -143
- package/src/services/assistant.ts +1 -0
- package/src/services/avatars.ts +10 -6
- package/src/services/console.ts +1 -0
- package/src/services/databases.ts +18 -13
- package/src/services/functions.ts +14 -10
- package/src/services/graphql.ts +1 -0
- package/src/services/health.ts +54 -0
- package/src/services/locale.ts +1 -0
- package/src/services/messaging.ts +2176 -0
- package/src/services/migrations.ts +3 -2
- package/src/services/project.ts +4 -2
- package/src/services/projects.ts +137 -33
- package/src/services/proxy.ts +4 -2
- package/src/services/storage.ts +16 -11
- package/src/services/teams.ts +1 -0
- package/src/services/users.ts +348 -7
- package/src/services/vcs.ts +1 -0
- package/types/enums/a-p-i-service.d.ts +13 -0
- package/types/enums/auth-method.d.ts +9 -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 +6 -0
- package/types/enums/execution-method.d.ts +8 -0
- package/types/enums/factor.d.ts +5 -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 +6 -0
- package/types/enums/message-status.d.ts +5 -0
- package/types/enums/messaging-provider-type.d.ts +5 -0
- package/types/enums/name.d.ts +14 -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 +3 -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 +6 -0
- package/types/enums/s-m-s-template-locale.d.ts +133 -0
- package/types/enums/s-m-s-template-type.d.ts +5 -0
- package/types/enums/s-m-t-p-encryption.d.ts +5 -0
- package/types/enums/s-m-t-p-secure.d.ts +3 -0
- package/types/enums/storage-usage-range.d.ts +5 -0
- package/types/enums/type.d.ts +3 -0
- package/types/enums/user-usage-range.d.ts +5 -0
- package/types/index.d.ts +35 -0
- package/types/models.d.ts +417 -7
- package/types/query.d.ts +10 -3
- package/types/services/account.d.ts +188 -79
- package/types/services/avatars.d.ts +9 -6
- package/types/services/databases.d.ts +17 -13
- package/types/services/functions.d.ts +13 -10
- package/types/services/health.d.ts +23 -0
- package/types/services/messaging.d.ts +627 -0
- package/types/services/migrations.d.ts +2 -2
- package/types/services/project.d.ts +3 -2
- package/types/services/projects.d.ts +63 -33
- package/types/services/proxy.d.ts +3 -2
- package/types/services/storage.d.ts +15 -11
- package/types/services/users.d.ts +129 -7
package/dist/cjs/sdk.js
CHANGED
|
@@ -28,17 +28,63 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
class Query {
|
|
32
|
+
constructor(method, attribute, values) {
|
|
33
|
+
this.method = method;
|
|
34
|
+
this.attribute = attribute;
|
|
35
|
+
if (values !== undefined) {
|
|
36
|
+
if (Array.isArray(values)) {
|
|
37
|
+
this.values = values;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.values = [values];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
toString() {
|
|
45
|
+
return JSON.stringify({
|
|
46
|
+
method: this.method,
|
|
47
|
+
attribute: this.attribute,
|
|
48
|
+
values: this.values,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
Query.equal = (attribute, value) => new Query("equal", attribute, value).toString();
|
|
53
|
+
Query.notEqual = (attribute, value) => new Query("notEqual", attribute, value).toString();
|
|
54
|
+
Query.lessThan = (attribute, value) => new Query("lessThan", attribute, value).toString();
|
|
55
|
+
Query.lessThanEqual = (attribute, value) => new Query("lessThanEqual", attribute, value).toString();
|
|
56
|
+
Query.greaterThan = (attribute, value) => new Query("greaterThan", attribute, value).toString();
|
|
57
|
+
Query.greaterThanEqual = (attribute, value) => new Query("greaterThanEqual", attribute, value).toString();
|
|
58
|
+
Query.isNull = (attribute) => new Query("isNull", attribute).toString();
|
|
59
|
+
Query.isNotNull = (attribute) => new Query("isNotNull", attribute).toString();
|
|
60
|
+
Query.between = (attribute, start, end) => new Query("between", attribute, [start, end]).toString();
|
|
61
|
+
Query.startsWith = (attribute, value) => new Query("startsWith", attribute, value).toString();
|
|
62
|
+
Query.endsWith = (attribute, value) => new Query("endsWith", attribute, value).toString();
|
|
63
|
+
Query.select = (attributes) => new Query("select", undefined, attributes).toString();
|
|
64
|
+
Query.search = (attribute, value) => new Query("search", attribute, value).toString();
|
|
65
|
+
Query.orderDesc = (attribute) => new Query("orderDesc", attribute).toString();
|
|
66
|
+
Query.orderAsc = (attribute) => new Query("orderAsc", attribute).toString();
|
|
67
|
+
Query.cursorAfter = (documentId) => new Query("cursorAfter", undefined, documentId).toString();
|
|
68
|
+
Query.cursorBefore = (documentId) => new Query("cursorBefore", undefined, documentId).toString();
|
|
69
|
+
Query.limit = (limit) => new Query("limit", undefined, limit).toString();
|
|
70
|
+
Query.offset = (offset) => new Query("offset", undefined, offset).toString();
|
|
71
|
+
Query.contains = (attribute, value) => new Query("contains", attribute, value).toString();
|
|
72
|
+
Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
|
|
73
|
+
Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
|
|
74
|
+
|
|
31
75
|
class Service {
|
|
32
76
|
constructor(client) {
|
|
33
77
|
this.client = client;
|
|
34
78
|
}
|
|
35
79
|
static flatten(data, prefix = '') {
|
|
36
80
|
let output = {};
|
|
37
|
-
for (const key
|
|
38
|
-
let
|
|
39
|
-
let finalKey = prefix ? `${prefix}[${key}]` : key;
|
|
81
|
+
for (const [key, value] of Object.entries(data)) {
|
|
82
|
+
let finalKey = prefix ? prefix + '[' + key + ']' : key;
|
|
40
83
|
if (Array.isArray(value)) {
|
|
41
|
-
output = Object.assign(output,
|
|
84
|
+
output = Object.assign(Object.assign({}, output), Service.flatten(value, finalKey));
|
|
85
|
+
}
|
|
86
|
+
else if (value instanceof Query) {
|
|
87
|
+
output[finalKey] = JSON.stringify(value);
|
|
42
88
|
}
|
|
43
89
|
else {
|
|
44
90
|
output[finalKey] = value;
|
|
@@ -49,36 +95,6 @@ class Service {
|
|
|
49
95
|
}
|
|
50
96
|
Service.CHUNK_SIZE = 5 * 1024 * 1024; // 5MB
|
|
51
97
|
|
|
52
|
-
class Query {
|
|
53
|
-
}
|
|
54
|
-
Query.equal = (attribute, value) => Query.addQuery(attribute, "equal", value);
|
|
55
|
-
Query.notEqual = (attribute, value) => Query.addQuery(attribute, "notEqual", value);
|
|
56
|
-
Query.lessThan = (attribute, value) => Query.addQuery(attribute, "lessThan", value);
|
|
57
|
-
Query.lessThanEqual = (attribute, value) => Query.addQuery(attribute, "lessThanEqual", value);
|
|
58
|
-
Query.greaterThan = (attribute, value) => Query.addQuery(attribute, "greaterThan", value);
|
|
59
|
-
Query.greaterThanEqual = (attribute, value) => Query.addQuery(attribute, "greaterThanEqual", value);
|
|
60
|
-
Query.isNull = (attribute) => `isNull("${attribute}")`;
|
|
61
|
-
Query.isNotNull = (attribute) => `isNotNull("${attribute}")`;
|
|
62
|
-
Query.between = (attribute, start, end) => `between("${attribute}", ${Query.parseValues(start)}, ${Query.parseValues(end)})`;
|
|
63
|
-
Query.startsWith = (attribute, value) => Query.addQuery(attribute, "startsWith", value);
|
|
64
|
-
Query.endsWith = (attribute, value) => Query.addQuery(attribute, "endsWith", value);
|
|
65
|
-
Query.select = (attributes) => `select([${attributes.map((attr) => `"${attr}"`).join(",")}])`;
|
|
66
|
-
Query.search = (attribute, value) => Query.addQuery(attribute, "search", value);
|
|
67
|
-
Query.orderDesc = (attribute) => `orderDesc("${attribute}")`;
|
|
68
|
-
Query.orderAsc = (attribute) => `orderAsc("${attribute}")`;
|
|
69
|
-
Query.cursorAfter = (documentId) => `cursorAfter("${documentId}")`;
|
|
70
|
-
Query.cursorBefore = (documentId) => `cursorBefore("${documentId}")`;
|
|
71
|
-
Query.limit = (limit) => `limit(${limit})`;
|
|
72
|
-
Query.offset = (offset) => `offset(${offset})`;
|
|
73
|
-
Query.addQuery = (attribute, method, value) => value instanceof Array
|
|
74
|
-
? `${method}("${attribute}", [${value
|
|
75
|
-
.map((v) => Query.parseValues(v))
|
|
76
|
-
.join(",")}])`
|
|
77
|
-
: `${method}("${attribute}", [${Query.parseValues(value)}])`;
|
|
78
|
-
Query.parseValues = (value) => typeof value === "string" || value instanceof String
|
|
79
|
-
? `"${value}"`
|
|
80
|
-
: `${value}`;
|
|
81
|
-
|
|
82
98
|
class AppwriteException extends Error {
|
|
83
99
|
constructor(message, code = 0, type = '', response = '') {
|
|
84
100
|
super(message);
|
|
@@ -92,7 +108,7 @@ class AppwriteException extends Error {
|
|
|
92
108
|
class Client {
|
|
93
109
|
constructor() {
|
|
94
110
|
this.config = {
|
|
95
|
-
endpoint: 'https://
|
|
111
|
+
endpoint: 'https://cloud.appwrite.io/v1',
|
|
96
112
|
endpointRealtime: '',
|
|
97
113
|
project: '',
|
|
98
114
|
key: '',
|
|
@@ -104,7 +120,7 @@ class Client {
|
|
|
104
120
|
'x-sdk-name': 'Console',
|
|
105
121
|
'x-sdk-platform': 'console',
|
|
106
122
|
'x-sdk-language': 'web',
|
|
107
|
-
'x-sdk-version': '0.
|
|
123
|
+
'x-sdk-version': '0.6.0-rc.10',
|
|
108
124
|
'X-Appwrite-Response-Format': '1.4.0',
|
|
109
125
|
};
|
|
110
126
|
this.realtime = {
|
|
@@ -570,7 +586,7 @@ class Account extends Service {
|
|
|
570
586
|
*
|
|
571
587
|
* Get the list of identities for the currently logged in user.
|
|
572
588
|
*
|
|
573
|
-
* @param {string} queries
|
|
589
|
+
* @param {string[]} queries
|
|
574
590
|
* @throws {AppwriteException}
|
|
575
591
|
* @returns {Promise}
|
|
576
592
|
*/
|
|
@@ -588,7 +604,7 @@ class Account extends Service {
|
|
|
588
604
|
});
|
|
589
605
|
}
|
|
590
606
|
/**
|
|
591
|
-
* Delete
|
|
607
|
+
* Delete identity
|
|
592
608
|
*
|
|
593
609
|
* Delete an identity by its unique ID.
|
|
594
610
|
*
|
|
@@ -654,6 +670,179 @@ class Account extends Service {
|
|
|
654
670
|
}, payload);
|
|
655
671
|
});
|
|
656
672
|
}
|
|
673
|
+
/**
|
|
674
|
+
* Update MFA
|
|
675
|
+
*
|
|
676
|
+
*
|
|
677
|
+
* @param {boolean} mfa
|
|
678
|
+
* @throws {AppwriteException}
|
|
679
|
+
* @returns {Promise}
|
|
680
|
+
*/
|
|
681
|
+
updateMFA(mfa) {
|
|
682
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
683
|
+
if (typeof mfa === 'undefined') {
|
|
684
|
+
throw new AppwriteException('Missing required parameter: "mfa"');
|
|
685
|
+
}
|
|
686
|
+
const apiPath = '/account/mfa';
|
|
687
|
+
const payload = {};
|
|
688
|
+
if (typeof mfa !== 'undefined') {
|
|
689
|
+
payload['mfa'] = mfa;
|
|
690
|
+
}
|
|
691
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
692
|
+
return yield this.client.call('patch', uri, {
|
|
693
|
+
'content-type': 'application/json',
|
|
694
|
+
}, payload);
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* Create 2FA Challenge
|
|
699
|
+
*
|
|
700
|
+
*
|
|
701
|
+
* @param {Factor} factor
|
|
702
|
+
* @throws {AppwriteException}
|
|
703
|
+
* @returns {Promise}
|
|
704
|
+
*/
|
|
705
|
+
create2FAChallenge(factor) {
|
|
706
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
707
|
+
if (typeof factor === 'undefined') {
|
|
708
|
+
throw new AppwriteException('Missing required parameter: "factor"');
|
|
709
|
+
}
|
|
710
|
+
const apiPath = '/account/mfa/challenge';
|
|
711
|
+
const payload = {};
|
|
712
|
+
if (typeof factor !== 'undefined') {
|
|
713
|
+
payload['factor'] = factor;
|
|
714
|
+
}
|
|
715
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
716
|
+
return yield this.client.call('post', uri, {
|
|
717
|
+
'content-type': 'application/json',
|
|
718
|
+
}, payload);
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Create MFA Challenge (confirmation)
|
|
723
|
+
*
|
|
724
|
+
*
|
|
725
|
+
* @param {string} challengeId
|
|
726
|
+
* @param {string} otp
|
|
727
|
+
* @throws {AppwriteException}
|
|
728
|
+
* @returns {Promise}
|
|
729
|
+
*/
|
|
730
|
+
updateChallenge(challengeId, otp) {
|
|
731
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
732
|
+
if (typeof challengeId === 'undefined') {
|
|
733
|
+
throw new AppwriteException('Missing required parameter: "challengeId"');
|
|
734
|
+
}
|
|
735
|
+
if (typeof otp === 'undefined') {
|
|
736
|
+
throw new AppwriteException('Missing required parameter: "otp"');
|
|
737
|
+
}
|
|
738
|
+
const apiPath = '/account/mfa/challenge';
|
|
739
|
+
const payload = {};
|
|
740
|
+
if (typeof challengeId !== 'undefined') {
|
|
741
|
+
payload['challengeId'] = challengeId;
|
|
742
|
+
}
|
|
743
|
+
if (typeof otp !== 'undefined') {
|
|
744
|
+
payload['otp'] = otp;
|
|
745
|
+
}
|
|
746
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
747
|
+
return yield this.client.call('put', uri, {
|
|
748
|
+
'content-type': 'application/json',
|
|
749
|
+
}, payload);
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* List Factors
|
|
754
|
+
*
|
|
755
|
+
*
|
|
756
|
+
* @throws {AppwriteException}
|
|
757
|
+
* @returns {Promise}
|
|
758
|
+
*/
|
|
759
|
+
listFactors() {
|
|
760
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
761
|
+
const apiPath = '/account/mfa/factors';
|
|
762
|
+
const payload = {};
|
|
763
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
764
|
+
return yield this.client.call('get', uri, {
|
|
765
|
+
'content-type': 'application/json',
|
|
766
|
+
}, payload);
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Add Authenticator
|
|
771
|
+
*
|
|
772
|
+
*
|
|
773
|
+
* @param {Type} type
|
|
774
|
+
* @throws {AppwriteException}
|
|
775
|
+
* @returns {Promise}
|
|
776
|
+
*/
|
|
777
|
+
addAuthenticator(type) {
|
|
778
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
779
|
+
if (typeof type === 'undefined') {
|
|
780
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
781
|
+
}
|
|
782
|
+
const apiPath = '/account/mfa/{type}'.replace('{type}', type);
|
|
783
|
+
const payload = {};
|
|
784
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
785
|
+
return yield this.client.call('post', uri, {
|
|
786
|
+
'content-type': 'application/json',
|
|
787
|
+
}, payload);
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* Verify Authenticator
|
|
792
|
+
*
|
|
793
|
+
*
|
|
794
|
+
* @param {Type} type
|
|
795
|
+
* @param {string} otp
|
|
796
|
+
* @throws {AppwriteException}
|
|
797
|
+
* @returns {Promise}
|
|
798
|
+
*/
|
|
799
|
+
verifyAuthenticator(type, otp) {
|
|
800
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
801
|
+
if (typeof type === 'undefined') {
|
|
802
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
803
|
+
}
|
|
804
|
+
if (typeof otp === 'undefined') {
|
|
805
|
+
throw new AppwriteException('Missing required parameter: "otp"');
|
|
806
|
+
}
|
|
807
|
+
const apiPath = '/account/mfa/{type}'.replace('{type}', type);
|
|
808
|
+
const payload = {};
|
|
809
|
+
if (typeof otp !== 'undefined') {
|
|
810
|
+
payload['otp'] = otp;
|
|
811
|
+
}
|
|
812
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
813
|
+
return yield this.client.call('put', uri, {
|
|
814
|
+
'content-type': 'application/json',
|
|
815
|
+
}, payload);
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* Delete Authenticator
|
|
820
|
+
*
|
|
821
|
+
*
|
|
822
|
+
* @param {Type} type
|
|
823
|
+
* @param {string} otp
|
|
824
|
+
* @throws {AppwriteException}
|
|
825
|
+
* @returns {Promise}
|
|
826
|
+
*/
|
|
827
|
+
deleteAuthenticator(type, otp) {
|
|
828
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
829
|
+
if (typeof type === 'undefined') {
|
|
830
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
831
|
+
}
|
|
832
|
+
if (typeof otp === 'undefined') {
|
|
833
|
+
throw new AppwriteException('Missing required parameter: "otp"');
|
|
834
|
+
}
|
|
835
|
+
const apiPath = '/account/mfa/{type}'.replace('{type}', type);
|
|
836
|
+
const payload = {};
|
|
837
|
+
if (typeof otp !== 'undefined') {
|
|
838
|
+
payload['otp'] = otp;
|
|
839
|
+
}
|
|
840
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
841
|
+
return yield this.client.call('delete', uri, {
|
|
842
|
+
'content-type': 'application/json',
|
|
843
|
+
}, payload);
|
|
844
|
+
});
|
|
845
|
+
}
|
|
657
846
|
/**
|
|
658
847
|
* Update name
|
|
659
848
|
*
|
|
@@ -847,11 +1036,10 @@ class Account extends Service {
|
|
|
847
1036
|
* @param {string} userId
|
|
848
1037
|
* @param {string} secret
|
|
849
1038
|
* @param {string} password
|
|
850
|
-
* @param {string} passwordAgain
|
|
851
1039
|
* @throws {AppwriteException}
|
|
852
1040
|
* @returns {Promise}
|
|
853
1041
|
*/
|
|
854
|
-
updateRecovery(userId, secret, password
|
|
1042
|
+
updateRecovery(userId, secret, password) {
|
|
855
1043
|
return __awaiter(this, void 0, void 0, function* () {
|
|
856
1044
|
if (typeof userId === 'undefined') {
|
|
857
1045
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
@@ -862,9 +1050,6 @@ class Account extends Service {
|
|
|
862
1050
|
if (typeof password === 'undefined') {
|
|
863
1051
|
throw new AppwriteException('Missing required parameter: "password"');
|
|
864
1052
|
}
|
|
865
|
-
if (typeof passwordAgain === 'undefined') {
|
|
866
|
-
throw new AppwriteException('Missing required parameter: "passwordAgain"');
|
|
867
|
-
}
|
|
868
1053
|
const apiPath = '/account/recovery';
|
|
869
1054
|
const payload = {};
|
|
870
1055
|
if (typeof userId !== 'undefined') {
|
|
@@ -876,9 +1061,6 @@ class Account extends Service {
|
|
|
876
1061
|
if (typeof password !== 'undefined') {
|
|
877
1062
|
payload['password'] = password;
|
|
878
1063
|
}
|
|
879
|
-
if (typeof passwordAgain !== 'undefined') {
|
|
880
|
-
payload['passwordAgain'] = passwordAgain;
|
|
881
|
-
}
|
|
882
1064
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
883
1065
|
return yield this.client.call('put', uri, {
|
|
884
1066
|
'content-type': 'application/json',
|
|
@@ -948,7 +1130,7 @@ class Account extends Service {
|
|
|
948
1130
|
});
|
|
949
1131
|
}
|
|
950
1132
|
/**
|
|
951
|
-
* Create email session
|
|
1133
|
+
* Create email password session
|
|
952
1134
|
*
|
|
953
1135
|
* Allow the user to login into their account by providing a valid email and
|
|
954
1136
|
* password combination. This route will create a new session for the user.
|
|
@@ -962,7 +1144,7 @@ class Account extends Service {
|
|
|
962
1144
|
* @throws {AppwriteException}
|
|
963
1145
|
* @returns {Promise}
|
|
964
1146
|
*/
|
|
965
|
-
|
|
1147
|
+
createEmailPasswordSession(email, password) {
|
|
966
1148
|
return __awaiter(this, void 0, void 0, function* () {
|
|
967
1149
|
if (typeof email === 'undefined') {
|
|
968
1150
|
throw new AppwriteException('Missing required parameter: "email"');
|
|
@@ -985,70 +1167,11 @@ class Account extends Service {
|
|
|
985
1167
|
});
|
|
986
1168
|
}
|
|
987
1169
|
/**
|
|
988
|
-
* Create
|
|
989
|
-
*
|
|
990
|
-
* Sends the user an email with a secret key for creating a session. If the
|
|
991
|
-
* provided user ID has not been registered, a new user will be created. When
|
|
992
|
-
* the user clicks the link in the email, the user is redirected back to the
|
|
993
|
-
* URL you provided with the secret key and userId values attached to the URL
|
|
994
|
-
* query string. Use the query string parameters to submit a request to the
|
|
995
|
-
* [PUT
|
|
996
|
-
* /account/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#updateMagicURLSession)
|
|
997
|
-
* endpoint to complete the login process. The link sent to the user's email
|
|
998
|
-
* address is valid for 1 hour. If you are on a mobile device you can leave
|
|
999
|
-
* the URL parameter empty, so that the login completion will be handled by
|
|
1000
|
-
* your Appwrite instance by default.
|
|
1001
|
-
*
|
|
1002
|
-
* A user is limited to 10 active sessions at a time by default. [Learn more
|
|
1003
|
-
* about session
|
|
1004
|
-
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
1005
|
-
*
|
|
1006
|
-
*
|
|
1007
|
-
* @param {string} userId
|
|
1008
|
-
* @param {string} email
|
|
1009
|
-
* @param {string} url
|
|
1010
|
-
* @throws {AppwriteException}
|
|
1011
|
-
* @returns {Promise}
|
|
1012
|
-
*/
|
|
1013
|
-
createMagicURLSession(userId, email, url) {
|
|
1014
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1015
|
-
if (typeof userId === 'undefined') {
|
|
1016
|
-
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1017
|
-
}
|
|
1018
|
-
if (typeof email === 'undefined') {
|
|
1019
|
-
throw new AppwriteException('Missing required parameter: "email"');
|
|
1020
|
-
}
|
|
1021
|
-
const apiPath = '/account/sessions/magic-url';
|
|
1022
|
-
const payload = {};
|
|
1023
|
-
if (typeof userId !== 'undefined') {
|
|
1024
|
-
payload['userId'] = userId;
|
|
1025
|
-
}
|
|
1026
|
-
if (typeof email !== 'undefined') {
|
|
1027
|
-
payload['email'] = email;
|
|
1028
|
-
}
|
|
1029
|
-
if (typeof url !== 'undefined') {
|
|
1030
|
-
payload['url'] = url;
|
|
1031
|
-
}
|
|
1032
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1033
|
-
return yield this.client.call('post', uri, {
|
|
1034
|
-
'content-type': 'application/json',
|
|
1035
|
-
}, payload);
|
|
1036
|
-
});
|
|
1037
|
-
}
|
|
1038
|
-
/**
|
|
1039
|
-
* Create magic URL session (confirmation)
|
|
1040
|
-
*
|
|
1041
|
-
* Use this endpoint to complete creating the session with the Magic URL. Both
|
|
1042
|
-
* the **userId** and **secret** arguments will be passed as query parameters
|
|
1043
|
-
* to the redirect URL you have provided when sending your request to the
|
|
1044
|
-
* [POST
|
|
1045
|
-
* /account/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#createMagicURLSession)
|
|
1046
|
-
* endpoint.
|
|
1170
|
+
* Create session (deprecated)
|
|
1047
1171
|
*
|
|
1048
|
-
*
|
|
1049
|
-
*
|
|
1050
|
-
*
|
|
1051
|
-
* adding your platforms in the console interface.
|
|
1172
|
+
* Use this endpoint to create a session from token. Provide the **userId**
|
|
1173
|
+
* and **secret** parameters from the successful response of authentication
|
|
1174
|
+
* flows initiated by token creation. For example, magic URL and phone login.
|
|
1052
1175
|
*
|
|
1053
1176
|
* @param {string} userId
|
|
1054
1177
|
* @param {string} secret
|
|
@@ -1097,14 +1220,15 @@ class Account extends Service {
|
|
|
1097
1220
|
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
1098
1221
|
*
|
|
1099
1222
|
*
|
|
1100
|
-
* @param {
|
|
1223
|
+
* @param {OAuthProvider} provider
|
|
1101
1224
|
* @param {string} success
|
|
1102
1225
|
* @param {string} failure
|
|
1226
|
+
* @param {boolean} token
|
|
1103
1227
|
* @param {string[]} scopes
|
|
1104
1228
|
* @throws {AppwriteException}
|
|
1105
1229
|
* @returns {void|string}
|
|
1106
1230
|
*/
|
|
1107
|
-
createOAuth2Session(provider, success, failure, scopes) {
|
|
1231
|
+
createOAuth2Session(provider, success, failure, token, scopes) {
|
|
1108
1232
|
if (typeof provider === 'undefined') {
|
|
1109
1233
|
throw new AppwriteException('Missing required parameter: "provider"');
|
|
1110
1234
|
}
|
|
@@ -1116,6 +1240,9 @@ class Account extends Service {
|
|
|
1116
1240
|
if (typeof failure !== 'undefined') {
|
|
1117
1241
|
payload['failure'] = failure;
|
|
1118
1242
|
}
|
|
1243
|
+
if (typeof token !== 'undefined') {
|
|
1244
|
+
payload['token'] = token;
|
|
1245
|
+
}
|
|
1119
1246
|
if (typeof scopes !== 'undefined') {
|
|
1120
1247
|
payload['scopes'] = scopes;
|
|
1121
1248
|
}
|
|
@@ -1132,61 +1259,18 @@ class Account extends Service {
|
|
|
1132
1259
|
}
|
|
1133
1260
|
}
|
|
1134
1261
|
/**
|
|
1135
|
-
* Create
|
|
1136
|
-
*
|
|
1137
|
-
* Sends the user an SMS with a secret key for creating a session. If the
|
|
1138
|
-
* provided user ID has not be registered, a new user will be created. Use the
|
|
1139
|
-
* returned user ID and secret and submit a request to the [PUT
|
|
1140
|
-
* /account/sessions/phone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneSession)
|
|
1141
|
-
* endpoint to complete the login process. The secret sent to the user's phone
|
|
1142
|
-
* is valid for 15 minutes.
|
|
1143
|
-
*
|
|
1144
|
-
* A user is limited to 10 active sessions at a time by default. [Learn more
|
|
1145
|
-
* about session
|
|
1146
|
-
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
1147
|
-
*
|
|
1148
|
-
* @param {string} userId
|
|
1149
|
-
* @param {string} phone
|
|
1150
|
-
* @throws {AppwriteException}
|
|
1151
|
-
* @returns {Promise}
|
|
1152
|
-
*/
|
|
1153
|
-
createPhoneSession(userId, phone) {
|
|
1154
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1155
|
-
if (typeof userId === 'undefined') {
|
|
1156
|
-
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1157
|
-
}
|
|
1158
|
-
if (typeof phone === 'undefined') {
|
|
1159
|
-
throw new AppwriteException('Missing required parameter: "phone"');
|
|
1160
|
-
}
|
|
1161
|
-
const apiPath = '/account/sessions/phone';
|
|
1162
|
-
const payload = {};
|
|
1163
|
-
if (typeof userId !== 'undefined') {
|
|
1164
|
-
payload['userId'] = userId;
|
|
1165
|
-
}
|
|
1166
|
-
if (typeof phone !== 'undefined') {
|
|
1167
|
-
payload['phone'] = phone;
|
|
1168
|
-
}
|
|
1169
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1170
|
-
return yield this.client.call('post', uri, {
|
|
1171
|
-
'content-type': 'application/json',
|
|
1172
|
-
}, payload);
|
|
1173
|
-
});
|
|
1174
|
-
}
|
|
1175
|
-
/**
|
|
1176
|
-
* Create phone session (confirmation)
|
|
1262
|
+
* Create session
|
|
1177
1263
|
*
|
|
1178
|
-
* Use this endpoint to
|
|
1179
|
-
* **
|
|
1180
|
-
*
|
|
1181
|
-
* endpoint and the **secret** received via SMS to successfully update and
|
|
1182
|
-
* confirm the phone session.
|
|
1264
|
+
* Use this endpoint to create a session from token. Provide the **userId**
|
|
1265
|
+
* and **secret** parameters from the successful response of authentication
|
|
1266
|
+
* flows initiated by token creation. For example, magic URL and phone login.
|
|
1183
1267
|
*
|
|
1184
1268
|
* @param {string} userId
|
|
1185
1269
|
* @param {string} secret
|
|
1186
1270
|
* @throws {AppwriteException}
|
|
1187
1271
|
* @returns {Promise}
|
|
1188
1272
|
*/
|
|
1189
|
-
|
|
1273
|
+
createSession(userId, secret) {
|
|
1190
1274
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1191
1275
|
if (typeof userId === 'undefined') {
|
|
1192
1276
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
@@ -1194,7 +1278,7 @@ class Account extends Service {
|
|
|
1194
1278
|
if (typeof secret === 'undefined') {
|
|
1195
1279
|
throw new AppwriteException('Missing required parameter: "secret"');
|
|
1196
1280
|
}
|
|
1197
|
-
const apiPath = '/account/sessions/
|
|
1281
|
+
const apiPath = '/account/sessions/token';
|
|
1198
1282
|
const payload = {};
|
|
1199
1283
|
if (typeof userId !== 'undefined') {
|
|
1200
1284
|
payload['userId'] = userId;
|
|
@@ -1203,7 +1287,7 @@ class Account extends Service {
|
|
|
1203
1287
|
payload['secret'] = secret;
|
|
1204
1288
|
}
|
|
1205
1289
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1206
|
-
return yield this.client.call('
|
|
1290
|
+
return yield this.client.call('post', uri, {
|
|
1207
1291
|
'content-type': 'application/json',
|
|
1208
1292
|
}, payload);
|
|
1209
1293
|
});
|
|
@@ -1232,11 +1316,10 @@ class Account extends Service {
|
|
|
1232
1316
|
});
|
|
1233
1317
|
}
|
|
1234
1318
|
/**
|
|
1235
|
-
* Update
|
|
1319
|
+
* Update (or renew) a session
|
|
1236
1320
|
*
|
|
1237
|
-
*
|
|
1238
|
-
*
|
|
1239
|
-
* "refresh" the access token.
|
|
1321
|
+
* Extend session's expiry to increase it's lifespan. Extending a session is
|
|
1322
|
+
* useful when session length is short such as 5 minutes.
|
|
1240
1323
|
*
|
|
1241
1324
|
* @param {string} sessionId
|
|
1242
1325
|
* @throws {AppwriteException}
|
|
@@ -1302,37 +1385,33 @@ class Account extends Service {
|
|
|
1302
1385
|
});
|
|
1303
1386
|
}
|
|
1304
1387
|
/**
|
|
1305
|
-
* Create
|
|
1306
|
-
*
|
|
1307
|
-
* Use this endpoint to send a verification message to your user email address
|
|
1308
|
-
* to confirm they are the valid owners of that address. Both the **userId**
|
|
1309
|
-
* and **secret** arguments will be passed as query parameters to the URL you
|
|
1310
|
-
* have provided to be attached to the verification email. The provided URL
|
|
1311
|
-
* should redirect the user back to your app and allow you to complete the
|
|
1312
|
-
* verification process by verifying both the **userId** and **secret**
|
|
1313
|
-
* parameters. Learn more about how to [complete the verification
|
|
1314
|
-
* process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification).
|
|
1315
|
-
* The verification link sent to the user's email address is valid for 7 days.
|
|
1388
|
+
* Create a push target
|
|
1316
1389
|
*
|
|
1317
|
-
* Please note that in order to avoid a [Redirect
|
|
1318
|
-
* Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md),
|
|
1319
|
-
* the only valid redirect URLs are the ones from domains you have set when
|
|
1320
|
-
* adding your platforms in the console interface.
|
|
1321
1390
|
*
|
|
1322
|
-
*
|
|
1323
|
-
* @param {string}
|
|
1391
|
+
* @param {string} targetId
|
|
1392
|
+
* @param {string} identifier
|
|
1393
|
+
* @param {string} providerId
|
|
1324
1394
|
* @throws {AppwriteException}
|
|
1325
1395
|
* @returns {Promise}
|
|
1326
1396
|
*/
|
|
1327
|
-
|
|
1397
|
+
createPushTarget(targetId, identifier, providerId) {
|
|
1328
1398
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1329
|
-
if (typeof
|
|
1330
|
-
throw new AppwriteException('Missing required parameter: "
|
|
1399
|
+
if (typeof targetId === 'undefined') {
|
|
1400
|
+
throw new AppwriteException('Missing required parameter: "targetId"');
|
|
1331
1401
|
}
|
|
1332
|
-
|
|
1402
|
+
if (typeof identifier === 'undefined') {
|
|
1403
|
+
throw new AppwriteException('Missing required parameter: "identifier"');
|
|
1404
|
+
}
|
|
1405
|
+
const apiPath = '/account/targets/push';
|
|
1333
1406
|
const payload = {};
|
|
1334
|
-
if (typeof
|
|
1335
|
-
payload['
|
|
1407
|
+
if (typeof targetId !== 'undefined') {
|
|
1408
|
+
payload['targetId'] = targetId;
|
|
1409
|
+
}
|
|
1410
|
+
if (typeof identifier !== 'undefined') {
|
|
1411
|
+
payload['identifier'] = identifier;
|
|
1412
|
+
}
|
|
1413
|
+
if (typeof providerId !== 'undefined') {
|
|
1414
|
+
payload['providerId'] = providerId;
|
|
1336
1415
|
}
|
|
1337
1416
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1338
1417
|
return yield this.client.call('post', uri, {
|
|
@@ -1341,7 +1420,236 @@ class Account extends Service {
|
|
|
1341
1420
|
});
|
|
1342
1421
|
}
|
|
1343
1422
|
/**
|
|
1344
|
-
*
|
|
1423
|
+
* Update a push target
|
|
1424
|
+
*
|
|
1425
|
+
*
|
|
1426
|
+
* @param {string} targetId
|
|
1427
|
+
* @param {string} identifier
|
|
1428
|
+
* @throws {AppwriteException}
|
|
1429
|
+
* @returns {Promise}
|
|
1430
|
+
*/
|
|
1431
|
+
updatePushTarget(targetId, identifier) {
|
|
1432
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1433
|
+
if (typeof targetId === 'undefined') {
|
|
1434
|
+
throw new AppwriteException('Missing required parameter: "targetId"');
|
|
1435
|
+
}
|
|
1436
|
+
if (typeof identifier === 'undefined') {
|
|
1437
|
+
throw new AppwriteException('Missing required parameter: "identifier"');
|
|
1438
|
+
}
|
|
1439
|
+
const apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);
|
|
1440
|
+
const payload = {};
|
|
1441
|
+
if (typeof identifier !== 'undefined') {
|
|
1442
|
+
payload['identifier'] = identifier;
|
|
1443
|
+
}
|
|
1444
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1445
|
+
return yield this.client.call('put', uri, {
|
|
1446
|
+
'content-type': 'application/json',
|
|
1447
|
+
}, payload);
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
* Delete a push target
|
|
1452
|
+
*
|
|
1453
|
+
*
|
|
1454
|
+
* @param {string} targetId
|
|
1455
|
+
* @throws {AppwriteException}
|
|
1456
|
+
* @returns {Promise}
|
|
1457
|
+
*/
|
|
1458
|
+
deletePushTarget(targetId) {
|
|
1459
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1460
|
+
if (typeof targetId === 'undefined') {
|
|
1461
|
+
throw new AppwriteException('Missing required parameter: "targetId"');
|
|
1462
|
+
}
|
|
1463
|
+
const apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);
|
|
1464
|
+
const payload = {};
|
|
1465
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1466
|
+
return yield this.client.call('delete', uri, {
|
|
1467
|
+
'content-type': 'application/json',
|
|
1468
|
+
}, payload);
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
/**
|
|
1472
|
+
* Create email token (OTP)
|
|
1473
|
+
*
|
|
1474
|
+
* Sends the user an email with a secret key for creating a session. If the
|
|
1475
|
+
* provided user ID has not be registered, a new user will be created. Use the
|
|
1476
|
+
* returned user ID and secret and submit a request to the [POST
|
|
1477
|
+
* /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
|
|
1478
|
+
* endpoint to complete the login process. The secret sent to the user's email
|
|
1479
|
+
* is valid for 15 minutes.
|
|
1480
|
+
*
|
|
1481
|
+
* A user is limited to 10 active sessions at a time by default. [Learn more
|
|
1482
|
+
* about session
|
|
1483
|
+
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
1484
|
+
*
|
|
1485
|
+
* @param {string} userId
|
|
1486
|
+
* @param {string} email
|
|
1487
|
+
* @param {boolean} phrase
|
|
1488
|
+
* @throws {AppwriteException}
|
|
1489
|
+
* @returns {Promise}
|
|
1490
|
+
*/
|
|
1491
|
+
createEmailToken(userId, email, phrase) {
|
|
1492
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1493
|
+
if (typeof userId === 'undefined') {
|
|
1494
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1495
|
+
}
|
|
1496
|
+
if (typeof email === 'undefined') {
|
|
1497
|
+
throw new AppwriteException('Missing required parameter: "email"');
|
|
1498
|
+
}
|
|
1499
|
+
const apiPath = '/account/tokens/email';
|
|
1500
|
+
const payload = {};
|
|
1501
|
+
if (typeof userId !== 'undefined') {
|
|
1502
|
+
payload['userId'] = userId;
|
|
1503
|
+
}
|
|
1504
|
+
if (typeof email !== 'undefined') {
|
|
1505
|
+
payload['email'] = email;
|
|
1506
|
+
}
|
|
1507
|
+
if (typeof phrase !== 'undefined') {
|
|
1508
|
+
payload['phrase'] = phrase;
|
|
1509
|
+
}
|
|
1510
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1511
|
+
return yield this.client.call('post', uri, {
|
|
1512
|
+
'content-type': 'application/json',
|
|
1513
|
+
}, payload);
|
|
1514
|
+
});
|
|
1515
|
+
}
|
|
1516
|
+
/**
|
|
1517
|
+
* Create magic URL token
|
|
1518
|
+
*
|
|
1519
|
+
* Sends the user an email with a secret key for creating a session. If the
|
|
1520
|
+
* provided user ID has not been registered, a new user will be created. When
|
|
1521
|
+
* the user clicks the link in the email, the user is redirected back to the
|
|
1522
|
+
* URL you provided with the secret key and userId values attached to the URL
|
|
1523
|
+
* query string. Use the query string parameters to submit a request to the
|
|
1524
|
+
* [POST
|
|
1525
|
+
* /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
|
|
1526
|
+
* endpoint to complete the login process. The link sent to the user's email
|
|
1527
|
+
* address is valid for 1 hour. If you are on a mobile device you can leave
|
|
1528
|
+
* the URL parameter empty, so that the login completion will be handled by
|
|
1529
|
+
* your Appwrite instance by default.
|
|
1530
|
+
*
|
|
1531
|
+
* A user is limited to 10 active sessions at a time by default. [Learn more
|
|
1532
|
+
* about session
|
|
1533
|
+
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
1534
|
+
*
|
|
1535
|
+
*
|
|
1536
|
+
* @param {string} userId
|
|
1537
|
+
* @param {string} email
|
|
1538
|
+
* @param {string} url
|
|
1539
|
+
* @param {boolean} phrase
|
|
1540
|
+
* @throws {AppwriteException}
|
|
1541
|
+
* @returns {Promise}
|
|
1542
|
+
*/
|
|
1543
|
+
createMagicURLToken(userId, email, url, phrase) {
|
|
1544
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1545
|
+
if (typeof userId === 'undefined') {
|
|
1546
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1547
|
+
}
|
|
1548
|
+
if (typeof email === 'undefined') {
|
|
1549
|
+
throw new AppwriteException('Missing required parameter: "email"');
|
|
1550
|
+
}
|
|
1551
|
+
const apiPath = '/account/tokens/magic-url';
|
|
1552
|
+
const payload = {};
|
|
1553
|
+
if (typeof userId !== 'undefined') {
|
|
1554
|
+
payload['userId'] = userId;
|
|
1555
|
+
}
|
|
1556
|
+
if (typeof email !== 'undefined') {
|
|
1557
|
+
payload['email'] = email;
|
|
1558
|
+
}
|
|
1559
|
+
if (typeof url !== 'undefined') {
|
|
1560
|
+
payload['url'] = url;
|
|
1561
|
+
}
|
|
1562
|
+
if (typeof phrase !== 'undefined') {
|
|
1563
|
+
payload['phrase'] = phrase;
|
|
1564
|
+
}
|
|
1565
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1566
|
+
return yield this.client.call('post', uri, {
|
|
1567
|
+
'content-type': 'application/json',
|
|
1568
|
+
}, payload);
|
|
1569
|
+
});
|
|
1570
|
+
}
|
|
1571
|
+
/**
|
|
1572
|
+
* Create phone token
|
|
1573
|
+
*
|
|
1574
|
+
* Sends the user an SMS with a secret key for creating a session. If the
|
|
1575
|
+
* provided user ID has not be registered, a new user will be created. Use the
|
|
1576
|
+
* returned user ID and secret and submit a request to the [POST
|
|
1577
|
+
* /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
|
|
1578
|
+
* endpoint to complete the login process. The secret sent to the user's phone
|
|
1579
|
+
* is valid for 15 minutes.
|
|
1580
|
+
*
|
|
1581
|
+
* A user is limited to 10 active sessions at a time by default. [Learn more
|
|
1582
|
+
* about session
|
|
1583
|
+
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
1584
|
+
*
|
|
1585
|
+
* @param {string} userId
|
|
1586
|
+
* @param {string} phone
|
|
1587
|
+
* @throws {AppwriteException}
|
|
1588
|
+
* @returns {Promise}
|
|
1589
|
+
*/
|
|
1590
|
+
createPhoneToken(userId, phone) {
|
|
1591
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1592
|
+
if (typeof userId === 'undefined') {
|
|
1593
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1594
|
+
}
|
|
1595
|
+
if (typeof phone === 'undefined') {
|
|
1596
|
+
throw new AppwriteException('Missing required parameter: "phone"');
|
|
1597
|
+
}
|
|
1598
|
+
const apiPath = '/account/tokens/phone';
|
|
1599
|
+
const payload = {};
|
|
1600
|
+
if (typeof userId !== 'undefined') {
|
|
1601
|
+
payload['userId'] = userId;
|
|
1602
|
+
}
|
|
1603
|
+
if (typeof phone !== 'undefined') {
|
|
1604
|
+
payload['phone'] = phone;
|
|
1605
|
+
}
|
|
1606
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1607
|
+
return yield this.client.call('post', uri, {
|
|
1608
|
+
'content-type': 'application/json',
|
|
1609
|
+
}, payload);
|
|
1610
|
+
});
|
|
1611
|
+
}
|
|
1612
|
+
/**
|
|
1613
|
+
* Create email verification
|
|
1614
|
+
*
|
|
1615
|
+
* Use this endpoint to send a verification message to your user email address
|
|
1616
|
+
* to confirm they are the valid owners of that address. Both the **userId**
|
|
1617
|
+
* and **secret** arguments will be passed as query parameters to the URL you
|
|
1618
|
+
* have provided to be attached to the verification email. The provided URL
|
|
1619
|
+
* should redirect the user back to your app and allow you to complete the
|
|
1620
|
+
* verification process by verifying both the **userId** and **secret**
|
|
1621
|
+
* parameters. Learn more about how to [complete the verification
|
|
1622
|
+
* process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification).
|
|
1623
|
+
* The verification link sent to the user's email address is valid for 7 days.
|
|
1624
|
+
*
|
|
1625
|
+
* Please note that in order to avoid a [Redirect
|
|
1626
|
+
* Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md),
|
|
1627
|
+
* the only valid redirect URLs are the ones from domains you have set when
|
|
1628
|
+
* adding your platforms in the console interface.
|
|
1629
|
+
*
|
|
1630
|
+
*
|
|
1631
|
+
* @param {string} url
|
|
1632
|
+
* @throws {AppwriteException}
|
|
1633
|
+
* @returns {Promise}
|
|
1634
|
+
*/
|
|
1635
|
+
createVerification(url) {
|
|
1636
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1637
|
+
if (typeof url === 'undefined') {
|
|
1638
|
+
throw new AppwriteException('Missing required parameter: "url"');
|
|
1639
|
+
}
|
|
1640
|
+
const apiPath = '/account/verification';
|
|
1641
|
+
const payload = {};
|
|
1642
|
+
if (typeof url !== 'undefined') {
|
|
1643
|
+
payload['url'] = url;
|
|
1644
|
+
}
|
|
1645
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1646
|
+
return yield this.client.call('post', uri, {
|
|
1647
|
+
'content-type': 'application/json',
|
|
1648
|
+
}, payload);
|
|
1649
|
+
});
|
|
1650
|
+
}
|
|
1651
|
+
/**
|
|
1652
|
+
* Create email verification (confirmation)
|
|
1345
1653
|
*
|
|
1346
1654
|
* Use this endpoint to complete the user email verification process. Use both
|
|
1347
1655
|
* the **userId** and **secret** parameters that were attached to your app URL
|
|
@@ -1455,7 +1763,7 @@ class Avatars extends Service {
|
|
|
1455
1763
|
* image at source quality. If dimensions are not specified, the default size
|
|
1456
1764
|
* of image returned is 100x100px.
|
|
1457
1765
|
*
|
|
1458
|
-
* @param {
|
|
1766
|
+
* @param {Browser} code
|
|
1459
1767
|
* @param {number} width
|
|
1460
1768
|
* @param {number} height
|
|
1461
1769
|
* @param {number} quality
|
|
@@ -1497,7 +1805,7 @@ class Avatars extends Service {
|
|
|
1497
1805
|
* of image returned is 100x100px.
|
|
1498
1806
|
*
|
|
1499
1807
|
*
|
|
1500
|
-
* @param {
|
|
1808
|
+
* @param {CreditCard} code
|
|
1501
1809
|
* @param {number} width
|
|
1502
1810
|
* @param {number} height
|
|
1503
1811
|
* @param {number} quality
|
|
@@ -1567,7 +1875,7 @@ class Avatars extends Service {
|
|
|
1567
1875
|
* of image returned is 100x100px.
|
|
1568
1876
|
*
|
|
1569
1877
|
*
|
|
1570
|
-
* @param {
|
|
1878
|
+
* @param {Flag} code
|
|
1571
1879
|
* @param {number} width
|
|
1572
1880
|
* @param {number} height
|
|
1573
1881
|
* @param {number} quality
|
|
@@ -1854,7 +2162,7 @@ class Databases extends Service {
|
|
|
1854
2162
|
* Get usage stats for the database
|
|
1855
2163
|
*
|
|
1856
2164
|
*
|
|
1857
|
-
* @param {
|
|
2165
|
+
* @param {DatabaseUsageRange} range
|
|
1858
2166
|
* @throws {AppwriteException}
|
|
1859
2167
|
* @returns {Promise}
|
|
1860
2168
|
*/
|
|
@@ -2885,11 +3193,11 @@ class Databases extends Service {
|
|
|
2885
3193
|
* @param {string} databaseId
|
|
2886
3194
|
* @param {string} collectionId
|
|
2887
3195
|
* @param {string} relatedCollectionId
|
|
2888
|
-
* @param {
|
|
3196
|
+
* @param {RelationshipType} type
|
|
2889
3197
|
* @param {boolean} twoWay
|
|
2890
3198
|
* @param {string} key
|
|
2891
3199
|
* @param {string} twoWayKey
|
|
2892
|
-
* @param {
|
|
3200
|
+
* @param {RelationMutate} onDelete
|
|
2893
3201
|
* @throws {AppwriteException}
|
|
2894
3202
|
* @returns {Promise}
|
|
2895
3203
|
*/
|
|
@@ -3202,7 +3510,7 @@ class Databases extends Service {
|
|
|
3202
3510
|
* @param {string} databaseId
|
|
3203
3511
|
* @param {string} collectionId
|
|
3204
3512
|
* @param {string} key
|
|
3205
|
-
* @param {
|
|
3513
|
+
* @param {RelationMutate} onDelete
|
|
3206
3514
|
* @throws {AppwriteException}
|
|
3207
3515
|
* @returns {Promise}
|
|
3208
3516
|
*/
|
|
@@ -3480,7 +3788,7 @@ class Databases extends Service {
|
|
|
3480
3788
|
* @param {string} databaseId
|
|
3481
3789
|
* @param {string} collectionId
|
|
3482
3790
|
* @param {string} key
|
|
3483
|
-
* @param {
|
|
3791
|
+
* @param {IndexType} type
|
|
3484
3792
|
* @param {string[]} attributes
|
|
3485
3793
|
* @param {string[]} orders
|
|
3486
3794
|
* @throws {AppwriteException}
|
|
@@ -3617,7 +3925,7 @@ class Databases extends Service {
|
|
|
3617
3925
|
*
|
|
3618
3926
|
* @param {string} databaseId
|
|
3619
3927
|
* @param {string} collectionId
|
|
3620
|
-
* @param {
|
|
3928
|
+
* @param {DatabaseUsageRange} range
|
|
3621
3929
|
* @throws {AppwriteException}
|
|
3622
3930
|
* @returns {Promise}
|
|
3623
3931
|
*/
|
|
@@ -3671,7 +3979,7 @@ class Databases extends Service {
|
|
|
3671
3979
|
*
|
|
3672
3980
|
*
|
|
3673
3981
|
* @param {string} databaseId
|
|
3674
|
-
* @param {
|
|
3982
|
+
* @param {DatabaseUsageRange} range
|
|
3675
3983
|
* @throws {AppwriteException}
|
|
3676
3984
|
* @returns {Promise}
|
|
3677
3985
|
*/
|
|
@@ -3734,7 +4042,7 @@ class Functions extends Service {
|
|
|
3734
4042
|
*
|
|
3735
4043
|
* @param {string} functionId
|
|
3736
4044
|
* @param {string} name
|
|
3737
|
-
* @param {
|
|
4045
|
+
* @param {Runtime} runtime
|
|
3738
4046
|
* @param {string[]} execute
|
|
3739
4047
|
* @param {string[]} events
|
|
3740
4048
|
* @param {string} schedule
|
|
@@ -3856,7 +4164,7 @@ class Functions extends Service {
|
|
|
3856
4164
|
* Get functions usage
|
|
3857
4165
|
*
|
|
3858
4166
|
*
|
|
3859
|
-
* @param {
|
|
4167
|
+
* @param {FunctionUsageRange} range
|
|
3860
4168
|
* @throws {AppwriteException}
|
|
3861
4169
|
* @returns {Promise}
|
|
3862
4170
|
*/
|
|
@@ -3902,7 +4210,7 @@ class Functions extends Service {
|
|
|
3902
4210
|
*
|
|
3903
4211
|
* @param {string} functionId
|
|
3904
4212
|
* @param {string} name
|
|
3905
|
-
* @param {
|
|
4213
|
+
* @param {Runtime} runtime
|
|
3906
4214
|
* @param {string[]} execute
|
|
3907
4215
|
* @param {string[]} events
|
|
3908
4216
|
* @param {string} schedule
|
|
@@ -4299,7 +4607,7 @@ class Functions extends Service {
|
|
|
4299
4607
|
* @param {string} body
|
|
4300
4608
|
* @param {boolean} async
|
|
4301
4609
|
* @param {string} xpath
|
|
4302
|
-
* @param {
|
|
4610
|
+
* @param {ExecutionMethod} method
|
|
4303
4611
|
* @param {object} headers
|
|
4304
4612
|
* @throws {AppwriteException}
|
|
4305
4613
|
* @returns {Promise}
|
|
@@ -4363,7 +4671,7 @@ class Functions extends Service {
|
|
|
4363
4671
|
*
|
|
4364
4672
|
*
|
|
4365
4673
|
* @param {string} functionId
|
|
4366
|
-
* @param {
|
|
4674
|
+
* @param {FunctionUsageRange} range
|
|
4367
4675
|
* @throws {AppwriteException}
|
|
4368
4676
|
* @returns {Promise}
|
|
4369
4677
|
*/
|
|
@@ -4650,6 +4958,28 @@ class Health extends Service {
|
|
|
4650
4958
|
}, payload);
|
|
4651
4959
|
});
|
|
4652
4960
|
}
|
|
4961
|
+
/**
|
|
4962
|
+
* Get the SSL certificate for a domain
|
|
4963
|
+
*
|
|
4964
|
+
* Get the SSL certificate for a domain
|
|
4965
|
+
*
|
|
4966
|
+
* @param {string} domain
|
|
4967
|
+
* @throws {AppwriteException}
|
|
4968
|
+
* @returns {Promise}
|
|
4969
|
+
*/
|
|
4970
|
+
getCertificate(domain) {
|
|
4971
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4972
|
+
const apiPath = '/health/certificate';
|
|
4973
|
+
const payload = {};
|
|
4974
|
+
if (typeof domain !== 'undefined') {
|
|
4975
|
+
payload['domain'] = domain;
|
|
4976
|
+
}
|
|
4977
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4978
|
+
return yield this.client.call('get', uri, {
|
|
4979
|
+
'content-type': 'application/json',
|
|
4980
|
+
}, payload);
|
|
4981
|
+
});
|
|
4982
|
+
}
|
|
4653
4983
|
/**
|
|
4654
4984
|
* Get DB
|
|
4655
4985
|
*
|
|
@@ -4802,6 +5132,33 @@ class Health extends Service {
|
|
|
4802
5132
|
}, payload);
|
|
4803
5133
|
});
|
|
4804
5134
|
}
|
|
5135
|
+
/**
|
|
5136
|
+
* Get number of failed queue jobs
|
|
5137
|
+
*
|
|
5138
|
+
* Returns the amount of failed jobs in a given queue.
|
|
5139
|
+
*
|
|
5140
|
+
*
|
|
5141
|
+
* @param {Name} name
|
|
5142
|
+
* @param {number} threshold
|
|
5143
|
+
* @throws {AppwriteException}
|
|
5144
|
+
* @returns {Promise}
|
|
5145
|
+
*/
|
|
5146
|
+
getFailedJobs(name, threshold) {
|
|
5147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5148
|
+
if (typeof name === 'undefined') {
|
|
5149
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
5150
|
+
}
|
|
5151
|
+
const apiPath = '/health/queue/failed/{name}'.replace('{name}', name);
|
|
5152
|
+
const payload = {};
|
|
5153
|
+
if (typeof threshold !== 'undefined') {
|
|
5154
|
+
payload['threshold'] = threshold;
|
|
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
|
+
}
|
|
4805
5162
|
/**
|
|
4806
5163
|
* Get functions queue
|
|
4807
5164
|
*
|
|
@@ -4824,45 +5181,1867 @@ class Health extends Service {
|
|
|
4824
5181
|
});
|
|
4825
5182
|
}
|
|
4826
5183
|
/**
|
|
4827
|
-
* Get logs queue
|
|
5184
|
+
* Get logs queue
|
|
5185
|
+
*
|
|
5186
|
+
* Get the number of logs that are waiting to be processed in the Appwrite
|
|
5187
|
+
* internal queue server.
|
|
5188
|
+
*
|
|
5189
|
+
* @param {number} threshold
|
|
5190
|
+
* @throws {AppwriteException}
|
|
5191
|
+
* @returns {Promise}
|
|
5192
|
+
*/
|
|
5193
|
+
getQueueLogs(threshold) {
|
|
5194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5195
|
+
const apiPath = '/health/queue/logs';
|
|
5196
|
+
const payload = {};
|
|
5197
|
+
if (typeof threshold !== 'undefined') {
|
|
5198
|
+
payload['threshold'] = threshold;
|
|
5199
|
+
}
|
|
5200
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5201
|
+
return yield this.client.call('get', uri, {
|
|
5202
|
+
'content-type': 'application/json',
|
|
5203
|
+
}, payload);
|
|
5204
|
+
});
|
|
5205
|
+
}
|
|
5206
|
+
/**
|
|
5207
|
+
* Get mails queue
|
|
5208
|
+
*
|
|
5209
|
+
* Get the number of mails that are waiting to be processed in the Appwrite
|
|
5210
|
+
* internal queue server.
|
|
5211
|
+
*
|
|
5212
|
+
* @param {number} threshold
|
|
5213
|
+
* @throws {AppwriteException}
|
|
5214
|
+
* @returns {Promise}
|
|
5215
|
+
*/
|
|
5216
|
+
getQueueMails(threshold) {
|
|
5217
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5218
|
+
const apiPath = '/health/queue/mails';
|
|
5219
|
+
const payload = {};
|
|
5220
|
+
if (typeof threshold !== 'undefined') {
|
|
5221
|
+
payload['threshold'] = threshold;
|
|
5222
|
+
}
|
|
5223
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5224
|
+
return yield this.client.call('get', uri, {
|
|
5225
|
+
'content-type': 'application/json',
|
|
5226
|
+
}, payload);
|
|
5227
|
+
});
|
|
5228
|
+
}
|
|
5229
|
+
/**
|
|
5230
|
+
* Get messaging queue
|
|
5231
|
+
*
|
|
5232
|
+
* Get the number of messages that are waiting to be processed in the Appwrite
|
|
5233
|
+
* internal queue server.
|
|
5234
|
+
*
|
|
5235
|
+
* @param {number} threshold
|
|
5236
|
+
* @throws {AppwriteException}
|
|
5237
|
+
* @returns {Promise}
|
|
5238
|
+
*/
|
|
5239
|
+
getQueueMessaging(threshold) {
|
|
5240
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5241
|
+
const apiPath = '/health/queue/messaging';
|
|
5242
|
+
const payload = {};
|
|
5243
|
+
if (typeof threshold !== 'undefined') {
|
|
5244
|
+
payload['threshold'] = threshold;
|
|
5245
|
+
}
|
|
5246
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5247
|
+
return yield this.client.call('get', uri, {
|
|
5248
|
+
'content-type': 'application/json',
|
|
5249
|
+
}, payload);
|
|
5250
|
+
});
|
|
5251
|
+
}
|
|
5252
|
+
/**
|
|
5253
|
+
* Get migrations queue
|
|
5254
|
+
*
|
|
5255
|
+
* Get the number of migrations that are waiting to be processed in the
|
|
5256
|
+
* Appwrite internal queue server.
|
|
5257
|
+
*
|
|
5258
|
+
* @param {number} threshold
|
|
5259
|
+
* @throws {AppwriteException}
|
|
5260
|
+
* @returns {Promise}
|
|
5261
|
+
*/
|
|
5262
|
+
getQueueMigrations(threshold) {
|
|
5263
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5264
|
+
const apiPath = '/health/queue/migrations';
|
|
5265
|
+
const payload = {};
|
|
5266
|
+
if (typeof threshold !== 'undefined') {
|
|
5267
|
+
payload['threshold'] = threshold;
|
|
5268
|
+
}
|
|
5269
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5270
|
+
return yield this.client.call('get', uri, {
|
|
5271
|
+
'content-type': 'application/json',
|
|
5272
|
+
}, payload);
|
|
5273
|
+
});
|
|
5274
|
+
}
|
|
5275
|
+
/**
|
|
5276
|
+
* Get webhooks queue
|
|
5277
|
+
*
|
|
5278
|
+
* Get the number of webhooks that are waiting to be processed in the Appwrite
|
|
5279
|
+
* internal queue server.
|
|
5280
|
+
*
|
|
5281
|
+
* @param {number} threshold
|
|
5282
|
+
* @throws {AppwriteException}
|
|
5283
|
+
* @returns {Promise}
|
|
5284
|
+
*/
|
|
5285
|
+
getQueueWebhooks(threshold) {
|
|
5286
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5287
|
+
const apiPath = '/health/queue/webhooks';
|
|
5288
|
+
const payload = {};
|
|
5289
|
+
if (typeof threshold !== 'undefined') {
|
|
5290
|
+
payload['threshold'] = threshold;
|
|
5291
|
+
}
|
|
5292
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5293
|
+
return yield this.client.call('get', uri, {
|
|
5294
|
+
'content-type': 'application/json',
|
|
5295
|
+
}, payload);
|
|
5296
|
+
});
|
|
5297
|
+
}
|
|
5298
|
+
/**
|
|
5299
|
+
* Get local storage
|
|
5300
|
+
*
|
|
5301
|
+
* Check the Appwrite local storage device is up and connection is successful.
|
|
5302
|
+
*
|
|
5303
|
+
* @throws {AppwriteException}
|
|
5304
|
+
* @returns {Promise}
|
|
5305
|
+
*/
|
|
5306
|
+
getStorageLocal() {
|
|
5307
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5308
|
+
const apiPath = '/health/storage/local';
|
|
5309
|
+
const payload = {};
|
|
5310
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5311
|
+
return yield this.client.call('get', uri, {
|
|
5312
|
+
'content-type': 'application/json',
|
|
5313
|
+
}, payload);
|
|
5314
|
+
});
|
|
5315
|
+
}
|
|
5316
|
+
/**
|
|
5317
|
+
* Get time
|
|
5318
|
+
*
|
|
5319
|
+
* Check the Appwrite server time is synced with Google remote NTP server. We
|
|
5320
|
+
* use this technology to smoothly handle leap seconds with no disruptive
|
|
5321
|
+
* events. The [Network Time
|
|
5322
|
+
* Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is
|
|
5323
|
+
* used by hundreds of millions of computers and devices to synchronize their
|
|
5324
|
+
* clocks over the Internet. If your computer sets its own clock, it likely
|
|
5325
|
+
* uses NTP.
|
|
5326
|
+
*
|
|
5327
|
+
* @throws {AppwriteException}
|
|
5328
|
+
* @returns {Promise}
|
|
5329
|
+
*/
|
|
5330
|
+
getTime() {
|
|
5331
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5332
|
+
const apiPath = '/health/time';
|
|
5333
|
+
const payload = {};
|
|
5334
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5335
|
+
return yield this.client.call('get', uri, {
|
|
5336
|
+
'content-type': 'application/json',
|
|
5337
|
+
}, payload);
|
|
5338
|
+
});
|
|
5339
|
+
}
|
|
5340
|
+
}
|
|
5341
|
+
|
|
5342
|
+
class Locale extends Service {
|
|
5343
|
+
constructor(client) {
|
|
5344
|
+
super(client);
|
|
5345
|
+
}
|
|
5346
|
+
/**
|
|
5347
|
+
* Get user locale
|
|
5348
|
+
*
|
|
5349
|
+
* Get the current user location based on IP. Returns an object with user
|
|
5350
|
+
* country code, country name, continent name, continent code, ip address and
|
|
5351
|
+
* suggested currency. You can use the locale header to get the data in a
|
|
5352
|
+
* supported language.
|
|
5353
|
+
*
|
|
5354
|
+
* ([IP Geolocation by DB-IP](https://db-ip.com))
|
|
5355
|
+
*
|
|
5356
|
+
* @throws {AppwriteException}
|
|
5357
|
+
* @returns {Promise}
|
|
5358
|
+
*/
|
|
5359
|
+
get() {
|
|
5360
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5361
|
+
const apiPath = '/locale';
|
|
5362
|
+
const payload = {};
|
|
5363
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5364
|
+
return yield this.client.call('get', uri, {
|
|
5365
|
+
'content-type': 'application/json',
|
|
5366
|
+
}, payload);
|
|
5367
|
+
});
|
|
5368
|
+
}
|
|
5369
|
+
/**
|
|
5370
|
+
* List Locale Codes
|
|
5371
|
+
*
|
|
5372
|
+
* List of all locale codes in [ISO
|
|
5373
|
+
* 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
|
|
5374
|
+
*
|
|
5375
|
+
* @throws {AppwriteException}
|
|
5376
|
+
* @returns {Promise}
|
|
5377
|
+
*/
|
|
5378
|
+
listCodes() {
|
|
5379
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5380
|
+
const apiPath = '/locale/codes';
|
|
5381
|
+
const payload = {};
|
|
5382
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5383
|
+
return yield this.client.call('get', uri, {
|
|
5384
|
+
'content-type': 'application/json',
|
|
5385
|
+
}, payload);
|
|
5386
|
+
});
|
|
5387
|
+
}
|
|
5388
|
+
/**
|
|
5389
|
+
* List continents
|
|
5390
|
+
*
|
|
5391
|
+
* List of all continents. You can use the locale header to get the data in a
|
|
5392
|
+
* supported language.
|
|
5393
|
+
*
|
|
5394
|
+
* @throws {AppwriteException}
|
|
5395
|
+
* @returns {Promise}
|
|
5396
|
+
*/
|
|
5397
|
+
listContinents() {
|
|
5398
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5399
|
+
const apiPath = '/locale/continents';
|
|
5400
|
+
const payload = {};
|
|
5401
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5402
|
+
return yield this.client.call('get', uri, {
|
|
5403
|
+
'content-type': 'application/json',
|
|
5404
|
+
}, payload);
|
|
5405
|
+
});
|
|
5406
|
+
}
|
|
5407
|
+
/**
|
|
5408
|
+
* List countries
|
|
5409
|
+
*
|
|
5410
|
+
* List of all countries. You can use the locale header to get the data in a
|
|
5411
|
+
* supported language.
|
|
5412
|
+
*
|
|
5413
|
+
* @throws {AppwriteException}
|
|
5414
|
+
* @returns {Promise}
|
|
5415
|
+
*/
|
|
5416
|
+
listCountries() {
|
|
5417
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5418
|
+
const apiPath = '/locale/countries';
|
|
5419
|
+
const payload = {};
|
|
5420
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5421
|
+
return yield this.client.call('get', uri, {
|
|
5422
|
+
'content-type': 'application/json',
|
|
5423
|
+
}, payload);
|
|
5424
|
+
});
|
|
5425
|
+
}
|
|
5426
|
+
/**
|
|
5427
|
+
* List EU countries
|
|
5428
|
+
*
|
|
5429
|
+
* List of all countries that are currently members of the EU. You can use the
|
|
5430
|
+
* locale header to get the data in a supported language.
|
|
5431
|
+
*
|
|
5432
|
+
* @throws {AppwriteException}
|
|
5433
|
+
* @returns {Promise}
|
|
5434
|
+
*/
|
|
5435
|
+
listCountriesEU() {
|
|
5436
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5437
|
+
const apiPath = '/locale/countries/eu';
|
|
5438
|
+
const payload = {};
|
|
5439
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5440
|
+
return yield this.client.call('get', uri, {
|
|
5441
|
+
'content-type': 'application/json',
|
|
5442
|
+
}, payload);
|
|
5443
|
+
});
|
|
5444
|
+
}
|
|
5445
|
+
/**
|
|
5446
|
+
* List countries phone codes
|
|
5447
|
+
*
|
|
5448
|
+
* List of all countries phone codes. You can use the locale header to get the
|
|
5449
|
+
* data in a supported language.
|
|
5450
|
+
*
|
|
5451
|
+
* @throws {AppwriteException}
|
|
5452
|
+
* @returns {Promise}
|
|
5453
|
+
*/
|
|
5454
|
+
listCountriesPhones() {
|
|
5455
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5456
|
+
const apiPath = '/locale/countries/phones';
|
|
5457
|
+
const payload = {};
|
|
5458
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5459
|
+
return yield this.client.call('get', uri, {
|
|
5460
|
+
'content-type': 'application/json',
|
|
5461
|
+
}, payload);
|
|
5462
|
+
});
|
|
5463
|
+
}
|
|
5464
|
+
/**
|
|
5465
|
+
* List currencies
|
|
5466
|
+
*
|
|
5467
|
+
* List of all currencies, including currency symbol, name, plural, and
|
|
5468
|
+
* decimal digits for all major and minor currencies. You can use the locale
|
|
5469
|
+
* header to get the data in a supported language.
|
|
5470
|
+
*
|
|
5471
|
+
* @throws {AppwriteException}
|
|
5472
|
+
* @returns {Promise}
|
|
5473
|
+
*/
|
|
5474
|
+
listCurrencies() {
|
|
5475
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5476
|
+
const apiPath = '/locale/currencies';
|
|
5477
|
+
const payload = {};
|
|
5478
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5479
|
+
return yield this.client.call('get', uri, {
|
|
5480
|
+
'content-type': 'application/json',
|
|
5481
|
+
}, payload);
|
|
5482
|
+
});
|
|
5483
|
+
}
|
|
5484
|
+
/**
|
|
5485
|
+
* List languages
|
|
5486
|
+
*
|
|
5487
|
+
* List of all languages classified by ISO 639-1 including 2-letter code, name
|
|
5488
|
+
* in English, and name in the respective language.
|
|
5489
|
+
*
|
|
5490
|
+
* @throws {AppwriteException}
|
|
5491
|
+
* @returns {Promise}
|
|
5492
|
+
*/
|
|
5493
|
+
listLanguages() {
|
|
5494
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5495
|
+
const apiPath = '/locale/languages';
|
|
5496
|
+
const payload = {};
|
|
5497
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5498
|
+
return yield this.client.call('get', uri, {
|
|
5499
|
+
'content-type': 'application/json',
|
|
5500
|
+
}, payload);
|
|
5501
|
+
});
|
|
5502
|
+
}
|
|
5503
|
+
}
|
|
5504
|
+
|
|
5505
|
+
class Messaging extends Service {
|
|
5506
|
+
constructor(client) {
|
|
5507
|
+
super(client);
|
|
5508
|
+
}
|
|
5509
|
+
/**
|
|
5510
|
+
* List messages
|
|
5511
|
+
*
|
|
5512
|
+
*
|
|
5513
|
+
* @param {string[]} queries
|
|
5514
|
+
* @param {string} search
|
|
5515
|
+
* @throws {AppwriteException}
|
|
5516
|
+
* @returns {Promise}
|
|
5517
|
+
*/
|
|
5518
|
+
listMessages(queries, search) {
|
|
5519
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5520
|
+
const apiPath = '/messaging/messages';
|
|
5521
|
+
const payload = {};
|
|
5522
|
+
if (typeof queries !== 'undefined') {
|
|
5523
|
+
payload['queries'] = queries;
|
|
5524
|
+
}
|
|
5525
|
+
if (typeof search !== 'undefined') {
|
|
5526
|
+
payload['search'] = search;
|
|
5527
|
+
}
|
|
5528
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5529
|
+
return yield this.client.call('get', uri, {
|
|
5530
|
+
'content-type': 'application/json',
|
|
5531
|
+
}, payload);
|
|
5532
|
+
});
|
|
5533
|
+
}
|
|
5534
|
+
/**
|
|
5535
|
+
* Create an email.
|
|
5536
|
+
*
|
|
5537
|
+
*
|
|
5538
|
+
* @param {string} messageId
|
|
5539
|
+
* @param {string} subject
|
|
5540
|
+
* @param {string} content
|
|
5541
|
+
* @param {string[]} topics
|
|
5542
|
+
* @param {string[]} users
|
|
5543
|
+
* @param {string[]} targets
|
|
5544
|
+
* @param {string[]} cc
|
|
5545
|
+
* @param {string[]} bcc
|
|
5546
|
+
* @param {MessageStatus} status
|
|
5547
|
+
* @param {boolean} html
|
|
5548
|
+
* @param {string} scheduledAt
|
|
5549
|
+
* @throws {AppwriteException}
|
|
5550
|
+
* @returns {Promise}
|
|
5551
|
+
*/
|
|
5552
|
+
createEmail(messageId, subject, content, topics, users, targets, cc, bcc, status, html, scheduledAt) {
|
|
5553
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5554
|
+
if (typeof messageId === 'undefined') {
|
|
5555
|
+
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
5556
|
+
}
|
|
5557
|
+
if (typeof subject === 'undefined') {
|
|
5558
|
+
throw new AppwriteException('Missing required parameter: "subject"');
|
|
5559
|
+
}
|
|
5560
|
+
if (typeof content === 'undefined') {
|
|
5561
|
+
throw new AppwriteException('Missing required parameter: "content"');
|
|
5562
|
+
}
|
|
5563
|
+
const apiPath = '/messaging/messages/email';
|
|
5564
|
+
const payload = {};
|
|
5565
|
+
if (typeof messageId !== 'undefined') {
|
|
5566
|
+
payload['messageId'] = messageId;
|
|
5567
|
+
}
|
|
5568
|
+
if (typeof subject !== 'undefined') {
|
|
5569
|
+
payload['subject'] = subject;
|
|
5570
|
+
}
|
|
5571
|
+
if (typeof content !== 'undefined') {
|
|
5572
|
+
payload['content'] = content;
|
|
5573
|
+
}
|
|
5574
|
+
if (typeof topics !== 'undefined') {
|
|
5575
|
+
payload['topics'] = topics;
|
|
5576
|
+
}
|
|
5577
|
+
if (typeof users !== 'undefined') {
|
|
5578
|
+
payload['users'] = users;
|
|
5579
|
+
}
|
|
5580
|
+
if (typeof targets !== 'undefined') {
|
|
5581
|
+
payload['targets'] = targets;
|
|
5582
|
+
}
|
|
5583
|
+
if (typeof cc !== 'undefined') {
|
|
5584
|
+
payload['cc'] = cc;
|
|
5585
|
+
}
|
|
5586
|
+
if (typeof bcc !== 'undefined') {
|
|
5587
|
+
payload['bcc'] = bcc;
|
|
5588
|
+
}
|
|
5589
|
+
if (typeof status !== 'undefined') {
|
|
5590
|
+
payload['status'] = status;
|
|
5591
|
+
}
|
|
5592
|
+
if (typeof html !== 'undefined') {
|
|
5593
|
+
payload['html'] = html;
|
|
5594
|
+
}
|
|
5595
|
+
if (typeof scheduledAt !== 'undefined') {
|
|
5596
|
+
payload['scheduledAt'] = scheduledAt;
|
|
5597
|
+
}
|
|
5598
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5599
|
+
return yield this.client.call('post', uri, {
|
|
5600
|
+
'content-type': 'application/json',
|
|
5601
|
+
}, payload);
|
|
5602
|
+
});
|
|
5603
|
+
}
|
|
5604
|
+
/**
|
|
5605
|
+
* Update an email.
|
|
5606
|
+
*
|
|
5607
|
+
*
|
|
5608
|
+
* @param {string} messageId
|
|
5609
|
+
* @param {string[]} topics
|
|
5610
|
+
* @param {string[]} users
|
|
5611
|
+
* @param {string[]} targets
|
|
5612
|
+
* @param {string} subject
|
|
5613
|
+
* @param {string} content
|
|
5614
|
+
* @param {MessageStatus} status
|
|
5615
|
+
* @param {boolean} html
|
|
5616
|
+
* @param {string[]} cc
|
|
5617
|
+
* @param {string[]} bcc
|
|
5618
|
+
* @param {string} scheduledAt
|
|
5619
|
+
* @throws {AppwriteException}
|
|
5620
|
+
* @returns {Promise}
|
|
5621
|
+
*/
|
|
5622
|
+
updateEmail(messageId, topics, users, targets, subject, content, status, html, cc, bcc, scheduledAt) {
|
|
5623
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5624
|
+
if (typeof messageId === 'undefined') {
|
|
5625
|
+
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
5626
|
+
}
|
|
5627
|
+
const apiPath = '/messaging/messages/email/{messageId}'.replace('{messageId}', messageId);
|
|
5628
|
+
const payload = {};
|
|
5629
|
+
if (typeof topics !== 'undefined') {
|
|
5630
|
+
payload['topics'] = topics;
|
|
5631
|
+
}
|
|
5632
|
+
if (typeof users !== 'undefined') {
|
|
5633
|
+
payload['users'] = users;
|
|
5634
|
+
}
|
|
5635
|
+
if (typeof targets !== 'undefined') {
|
|
5636
|
+
payload['targets'] = targets;
|
|
5637
|
+
}
|
|
5638
|
+
if (typeof subject !== 'undefined') {
|
|
5639
|
+
payload['subject'] = subject;
|
|
5640
|
+
}
|
|
5641
|
+
if (typeof content !== 'undefined') {
|
|
5642
|
+
payload['content'] = content;
|
|
5643
|
+
}
|
|
5644
|
+
if (typeof status !== 'undefined') {
|
|
5645
|
+
payload['status'] = status;
|
|
5646
|
+
}
|
|
5647
|
+
if (typeof html !== 'undefined') {
|
|
5648
|
+
payload['html'] = html;
|
|
5649
|
+
}
|
|
5650
|
+
if (typeof cc !== 'undefined') {
|
|
5651
|
+
payload['cc'] = cc;
|
|
5652
|
+
}
|
|
5653
|
+
if (typeof bcc !== 'undefined') {
|
|
5654
|
+
payload['bcc'] = bcc;
|
|
5655
|
+
}
|
|
5656
|
+
if (typeof scheduledAt !== 'undefined') {
|
|
5657
|
+
payload['scheduledAt'] = scheduledAt;
|
|
5658
|
+
}
|
|
5659
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5660
|
+
return yield this.client.call('patch', uri, {
|
|
5661
|
+
'content-type': 'application/json',
|
|
5662
|
+
}, payload);
|
|
5663
|
+
});
|
|
5664
|
+
}
|
|
5665
|
+
/**
|
|
5666
|
+
* Create a push notification.
|
|
5667
|
+
*
|
|
5668
|
+
*
|
|
5669
|
+
* @param {string} messageId
|
|
5670
|
+
* @param {string} title
|
|
5671
|
+
* @param {string} body
|
|
5672
|
+
* @param {string[]} topics
|
|
5673
|
+
* @param {string[]} users
|
|
5674
|
+
* @param {string[]} targets
|
|
5675
|
+
* @param {object} data
|
|
5676
|
+
* @param {string} action
|
|
5677
|
+
* @param {string} icon
|
|
5678
|
+
* @param {string} sound
|
|
5679
|
+
* @param {string} color
|
|
5680
|
+
* @param {string} tag
|
|
5681
|
+
* @param {string} badge
|
|
5682
|
+
* @param {MessageStatus} status
|
|
5683
|
+
* @param {string} scheduledAt
|
|
5684
|
+
* @throws {AppwriteException}
|
|
5685
|
+
* @returns {Promise}
|
|
5686
|
+
*/
|
|
5687
|
+
createPush(messageId, title, body, topics, users, targets, data, action, icon, sound, color, tag, badge, status, scheduledAt) {
|
|
5688
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5689
|
+
if (typeof messageId === 'undefined') {
|
|
5690
|
+
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
5691
|
+
}
|
|
5692
|
+
if (typeof title === 'undefined') {
|
|
5693
|
+
throw new AppwriteException('Missing required parameter: "title"');
|
|
5694
|
+
}
|
|
5695
|
+
if (typeof body === 'undefined') {
|
|
5696
|
+
throw new AppwriteException('Missing required parameter: "body"');
|
|
5697
|
+
}
|
|
5698
|
+
const apiPath = '/messaging/messages/push';
|
|
5699
|
+
const payload = {};
|
|
5700
|
+
if (typeof messageId !== 'undefined') {
|
|
5701
|
+
payload['messageId'] = messageId;
|
|
5702
|
+
}
|
|
5703
|
+
if (typeof title !== 'undefined') {
|
|
5704
|
+
payload['title'] = title;
|
|
5705
|
+
}
|
|
5706
|
+
if (typeof body !== 'undefined') {
|
|
5707
|
+
payload['body'] = body;
|
|
5708
|
+
}
|
|
5709
|
+
if (typeof topics !== 'undefined') {
|
|
5710
|
+
payload['topics'] = topics;
|
|
5711
|
+
}
|
|
5712
|
+
if (typeof users !== 'undefined') {
|
|
5713
|
+
payload['users'] = users;
|
|
5714
|
+
}
|
|
5715
|
+
if (typeof targets !== 'undefined') {
|
|
5716
|
+
payload['targets'] = targets;
|
|
5717
|
+
}
|
|
5718
|
+
if (typeof data !== 'undefined') {
|
|
5719
|
+
payload['data'] = data;
|
|
5720
|
+
}
|
|
5721
|
+
if (typeof action !== 'undefined') {
|
|
5722
|
+
payload['action'] = action;
|
|
5723
|
+
}
|
|
5724
|
+
if (typeof icon !== 'undefined') {
|
|
5725
|
+
payload['icon'] = icon;
|
|
5726
|
+
}
|
|
5727
|
+
if (typeof sound !== 'undefined') {
|
|
5728
|
+
payload['sound'] = sound;
|
|
5729
|
+
}
|
|
5730
|
+
if (typeof color !== 'undefined') {
|
|
5731
|
+
payload['color'] = color;
|
|
5732
|
+
}
|
|
5733
|
+
if (typeof tag !== 'undefined') {
|
|
5734
|
+
payload['tag'] = tag;
|
|
5735
|
+
}
|
|
5736
|
+
if (typeof badge !== 'undefined') {
|
|
5737
|
+
payload['badge'] = badge;
|
|
5738
|
+
}
|
|
5739
|
+
if (typeof status !== 'undefined') {
|
|
5740
|
+
payload['status'] = status;
|
|
5741
|
+
}
|
|
5742
|
+
if (typeof scheduledAt !== 'undefined') {
|
|
5743
|
+
payload['scheduledAt'] = scheduledAt;
|
|
5744
|
+
}
|
|
5745
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5746
|
+
return yield this.client.call('post', uri, {
|
|
5747
|
+
'content-type': 'application/json',
|
|
5748
|
+
}, payload);
|
|
5749
|
+
});
|
|
5750
|
+
}
|
|
5751
|
+
/**
|
|
5752
|
+
* Update a push notification.
|
|
5753
|
+
*
|
|
5754
|
+
*
|
|
5755
|
+
* @param {string} messageId
|
|
5756
|
+
* @param {string[]} topics
|
|
5757
|
+
* @param {string[]} users
|
|
5758
|
+
* @param {string[]} targets
|
|
5759
|
+
* @param {string} title
|
|
5760
|
+
* @param {string} body
|
|
5761
|
+
* @param {object} data
|
|
5762
|
+
* @param {string} action
|
|
5763
|
+
* @param {string} icon
|
|
5764
|
+
* @param {string} sound
|
|
5765
|
+
* @param {string} color
|
|
5766
|
+
* @param {string} tag
|
|
5767
|
+
* @param {number} badge
|
|
5768
|
+
* @param {MessageStatus} status
|
|
5769
|
+
* @param {string} scheduledAt
|
|
5770
|
+
* @throws {AppwriteException}
|
|
5771
|
+
* @returns {Promise}
|
|
5772
|
+
*/
|
|
5773
|
+
updatePush(messageId, topics, users, targets, title, body, data, action, icon, sound, color, tag, badge, status, scheduledAt) {
|
|
5774
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5775
|
+
if (typeof messageId === 'undefined') {
|
|
5776
|
+
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
5777
|
+
}
|
|
5778
|
+
const apiPath = '/messaging/messages/push/{messageId}'.replace('{messageId}', messageId);
|
|
5779
|
+
const payload = {};
|
|
5780
|
+
if (typeof topics !== 'undefined') {
|
|
5781
|
+
payload['topics'] = topics;
|
|
5782
|
+
}
|
|
5783
|
+
if (typeof users !== 'undefined') {
|
|
5784
|
+
payload['users'] = users;
|
|
5785
|
+
}
|
|
5786
|
+
if (typeof targets !== 'undefined') {
|
|
5787
|
+
payload['targets'] = targets;
|
|
5788
|
+
}
|
|
5789
|
+
if (typeof title !== 'undefined') {
|
|
5790
|
+
payload['title'] = title;
|
|
5791
|
+
}
|
|
5792
|
+
if (typeof body !== 'undefined') {
|
|
5793
|
+
payload['body'] = body;
|
|
5794
|
+
}
|
|
5795
|
+
if (typeof data !== 'undefined') {
|
|
5796
|
+
payload['data'] = data;
|
|
5797
|
+
}
|
|
5798
|
+
if (typeof action !== 'undefined') {
|
|
5799
|
+
payload['action'] = action;
|
|
5800
|
+
}
|
|
5801
|
+
if (typeof icon !== 'undefined') {
|
|
5802
|
+
payload['icon'] = icon;
|
|
5803
|
+
}
|
|
5804
|
+
if (typeof sound !== 'undefined') {
|
|
5805
|
+
payload['sound'] = sound;
|
|
5806
|
+
}
|
|
5807
|
+
if (typeof color !== 'undefined') {
|
|
5808
|
+
payload['color'] = color;
|
|
5809
|
+
}
|
|
5810
|
+
if (typeof tag !== 'undefined') {
|
|
5811
|
+
payload['tag'] = tag;
|
|
5812
|
+
}
|
|
5813
|
+
if (typeof badge !== 'undefined') {
|
|
5814
|
+
payload['badge'] = badge;
|
|
5815
|
+
}
|
|
5816
|
+
if (typeof status !== 'undefined') {
|
|
5817
|
+
payload['status'] = status;
|
|
5818
|
+
}
|
|
5819
|
+
if (typeof scheduledAt !== 'undefined') {
|
|
5820
|
+
payload['scheduledAt'] = scheduledAt;
|
|
5821
|
+
}
|
|
5822
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5823
|
+
return yield this.client.call('patch', uri, {
|
|
5824
|
+
'content-type': 'application/json',
|
|
5825
|
+
}, payload);
|
|
5826
|
+
});
|
|
5827
|
+
}
|
|
5828
|
+
/**
|
|
5829
|
+
* Create an SMS.
|
|
5830
|
+
*
|
|
5831
|
+
*
|
|
5832
|
+
* @param {string} messageId
|
|
5833
|
+
* @param {string} content
|
|
5834
|
+
* @param {string[]} topics
|
|
5835
|
+
* @param {string[]} users
|
|
5836
|
+
* @param {string[]} targets
|
|
5837
|
+
* @param {MessageStatus} status
|
|
5838
|
+
* @param {string} scheduledAt
|
|
5839
|
+
* @throws {AppwriteException}
|
|
5840
|
+
* @returns {Promise}
|
|
5841
|
+
*/
|
|
5842
|
+
createSMS(messageId, content, topics, users, targets, status, scheduledAt) {
|
|
5843
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5844
|
+
if (typeof messageId === 'undefined') {
|
|
5845
|
+
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
5846
|
+
}
|
|
5847
|
+
if (typeof content === 'undefined') {
|
|
5848
|
+
throw new AppwriteException('Missing required parameter: "content"');
|
|
5849
|
+
}
|
|
5850
|
+
const apiPath = '/messaging/messages/sms';
|
|
5851
|
+
const payload = {};
|
|
5852
|
+
if (typeof messageId !== 'undefined') {
|
|
5853
|
+
payload['messageId'] = messageId;
|
|
5854
|
+
}
|
|
5855
|
+
if (typeof content !== 'undefined') {
|
|
5856
|
+
payload['content'] = content;
|
|
5857
|
+
}
|
|
5858
|
+
if (typeof topics !== 'undefined') {
|
|
5859
|
+
payload['topics'] = topics;
|
|
5860
|
+
}
|
|
5861
|
+
if (typeof users !== 'undefined') {
|
|
5862
|
+
payload['users'] = users;
|
|
5863
|
+
}
|
|
5864
|
+
if (typeof targets !== 'undefined') {
|
|
5865
|
+
payload['targets'] = targets;
|
|
5866
|
+
}
|
|
5867
|
+
if (typeof status !== 'undefined') {
|
|
5868
|
+
payload['status'] = status;
|
|
5869
|
+
}
|
|
5870
|
+
if (typeof scheduledAt !== 'undefined') {
|
|
5871
|
+
payload['scheduledAt'] = scheduledAt;
|
|
5872
|
+
}
|
|
5873
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5874
|
+
return yield this.client.call('post', uri, {
|
|
5875
|
+
'content-type': 'application/json',
|
|
5876
|
+
}, payload);
|
|
5877
|
+
});
|
|
5878
|
+
}
|
|
5879
|
+
/**
|
|
5880
|
+
* Update an SMS.
|
|
5881
|
+
*
|
|
5882
|
+
*
|
|
5883
|
+
* @param {string} messageId
|
|
5884
|
+
* @param {string[]} topics
|
|
5885
|
+
* @param {string[]} users
|
|
5886
|
+
* @param {string[]} targets
|
|
5887
|
+
* @param {string} content
|
|
5888
|
+
* @param {MessageStatus} status
|
|
5889
|
+
* @param {string} scheduledAt
|
|
5890
|
+
* @throws {AppwriteException}
|
|
5891
|
+
* @returns {Promise}
|
|
5892
|
+
*/
|
|
5893
|
+
updateSMS(messageId, topics, users, targets, content, status, scheduledAt) {
|
|
5894
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5895
|
+
if (typeof messageId === 'undefined') {
|
|
5896
|
+
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
5897
|
+
}
|
|
5898
|
+
const apiPath = '/messaging/messages/sms/{messageId}'.replace('{messageId}', messageId);
|
|
5899
|
+
const payload = {};
|
|
5900
|
+
if (typeof topics !== 'undefined') {
|
|
5901
|
+
payload['topics'] = topics;
|
|
5902
|
+
}
|
|
5903
|
+
if (typeof users !== 'undefined') {
|
|
5904
|
+
payload['users'] = users;
|
|
5905
|
+
}
|
|
5906
|
+
if (typeof targets !== 'undefined') {
|
|
5907
|
+
payload['targets'] = targets;
|
|
5908
|
+
}
|
|
5909
|
+
if (typeof content !== 'undefined') {
|
|
5910
|
+
payload['content'] = content;
|
|
5911
|
+
}
|
|
5912
|
+
if (typeof status !== 'undefined') {
|
|
5913
|
+
payload['status'] = status;
|
|
5914
|
+
}
|
|
5915
|
+
if (typeof scheduledAt !== 'undefined') {
|
|
5916
|
+
payload['scheduledAt'] = scheduledAt;
|
|
5917
|
+
}
|
|
5918
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5919
|
+
return yield this.client.call('patch', uri, {
|
|
5920
|
+
'content-type': 'application/json',
|
|
5921
|
+
}, payload);
|
|
5922
|
+
});
|
|
5923
|
+
}
|
|
5924
|
+
/**
|
|
5925
|
+
* Get a message
|
|
5926
|
+
*
|
|
5927
|
+
*
|
|
5928
|
+
* @param {string} messageId
|
|
5929
|
+
* @throws {AppwriteException}
|
|
5930
|
+
* @returns {Promise}
|
|
5931
|
+
*/
|
|
5932
|
+
getMessage(messageId) {
|
|
5933
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5934
|
+
if (typeof messageId === 'undefined') {
|
|
5935
|
+
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
5936
|
+
}
|
|
5937
|
+
const apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
|
|
5938
|
+
const payload = {};
|
|
5939
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5940
|
+
return yield this.client.call('get', uri, {
|
|
5941
|
+
'content-type': 'application/json',
|
|
5942
|
+
}, payload);
|
|
5943
|
+
});
|
|
5944
|
+
}
|
|
5945
|
+
/**
|
|
5946
|
+
* Delete a message
|
|
5947
|
+
*
|
|
5948
|
+
*
|
|
5949
|
+
* @param {string} messageId
|
|
5950
|
+
* @throws {AppwriteException}
|
|
5951
|
+
* @returns {Promise}
|
|
5952
|
+
*/
|
|
5953
|
+
delete(messageId) {
|
|
5954
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5955
|
+
if (typeof messageId === 'undefined') {
|
|
5956
|
+
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
5957
|
+
}
|
|
5958
|
+
const apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
|
|
5959
|
+
const payload = {};
|
|
5960
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5961
|
+
return yield this.client.call('delete', uri, {
|
|
5962
|
+
'content-type': 'application/json',
|
|
5963
|
+
}, payload);
|
|
5964
|
+
});
|
|
5965
|
+
}
|
|
5966
|
+
/**
|
|
5967
|
+
* List message logs
|
|
5968
|
+
*
|
|
5969
|
+
*
|
|
5970
|
+
* @param {string} messageId
|
|
5971
|
+
* @param {string[]} queries
|
|
5972
|
+
* @throws {AppwriteException}
|
|
5973
|
+
* @returns {Promise}
|
|
5974
|
+
*/
|
|
5975
|
+
listMessageLogs(messageId, queries) {
|
|
5976
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5977
|
+
if (typeof messageId === 'undefined') {
|
|
5978
|
+
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
5979
|
+
}
|
|
5980
|
+
const apiPath = '/messaging/messages/{messageId}/logs'.replace('{messageId}', messageId);
|
|
5981
|
+
const payload = {};
|
|
5982
|
+
if (typeof queries !== 'undefined') {
|
|
5983
|
+
payload['queries'] = queries;
|
|
5984
|
+
}
|
|
5985
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5986
|
+
return yield this.client.call('get', uri, {
|
|
5987
|
+
'content-type': 'application/json',
|
|
5988
|
+
}, payload);
|
|
5989
|
+
});
|
|
5990
|
+
}
|
|
5991
|
+
/**
|
|
5992
|
+
* List message targets
|
|
5993
|
+
*
|
|
5994
|
+
* List the targets associated with a message as set via the targets
|
|
5995
|
+
* attribute.
|
|
5996
|
+
*
|
|
5997
|
+
* @param {string} messageId
|
|
5998
|
+
* @param {string[]} queries
|
|
5999
|
+
* @throws {AppwriteException}
|
|
6000
|
+
* @returns {Promise}
|
|
6001
|
+
*/
|
|
6002
|
+
listTargets(messageId, queries) {
|
|
6003
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6004
|
+
if (typeof messageId === 'undefined') {
|
|
6005
|
+
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
6006
|
+
}
|
|
6007
|
+
const apiPath = '/messaging/messages/{messageId}/targets'.replace('{messageId}', messageId);
|
|
6008
|
+
const payload = {};
|
|
6009
|
+
if (typeof queries !== 'undefined') {
|
|
6010
|
+
payload['queries'] = queries;
|
|
6011
|
+
}
|
|
6012
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6013
|
+
return yield this.client.call('get', uri, {
|
|
6014
|
+
'content-type': 'application/json',
|
|
6015
|
+
}, payload);
|
|
6016
|
+
});
|
|
6017
|
+
}
|
|
6018
|
+
/**
|
|
6019
|
+
* List providers
|
|
6020
|
+
*
|
|
6021
|
+
*
|
|
6022
|
+
* @param {string[]} queries
|
|
6023
|
+
* @param {string} search
|
|
6024
|
+
* @throws {AppwriteException}
|
|
6025
|
+
* @returns {Promise}
|
|
6026
|
+
*/
|
|
6027
|
+
listProviders(queries, search) {
|
|
6028
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6029
|
+
const apiPath = '/messaging/providers';
|
|
6030
|
+
const payload = {};
|
|
6031
|
+
if (typeof queries !== 'undefined') {
|
|
6032
|
+
payload['queries'] = queries;
|
|
6033
|
+
}
|
|
6034
|
+
if (typeof search !== 'undefined') {
|
|
6035
|
+
payload['search'] = search;
|
|
6036
|
+
}
|
|
6037
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6038
|
+
return yield this.client.call('get', uri, {
|
|
6039
|
+
'content-type': 'application/json',
|
|
6040
|
+
}, payload);
|
|
6041
|
+
});
|
|
6042
|
+
}
|
|
6043
|
+
/**
|
|
6044
|
+
* Create APNS provider
|
|
6045
|
+
*
|
|
6046
|
+
*
|
|
6047
|
+
* @param {string} providerId
|
|
6048
|
+
* @param {string} name
|
|
6049
|
+
* @param {string} authKey
|
|
6050
|
+
* @param {string} authKeyId
|
|
6051
|
+
* @param {string} teamId
|
|
6052
|
+
* @param {string} bundleId
|
|
6053
|
+
* @param {boolean} enabled
|
|
6054
|
+
* @throws {AppwriteException}
|
|
6055
|
+
* @returns {Promise}
|
|
6056
|
+
*/
|
|
6057
|
+
createAPNSProvider(providerId, name, authKey, authKeyId, teamId, bundleId, enabled) {
|
|
6058
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6059
|
+
if (typeof providerId === 'undefined') {
|
|
6060
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6061
|
+
}
|
|
6062
|
+
if (typeof name === 'undefined') {
|
|
6063
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
6064
|
+
}
|
|
6065
|
+
const apiPath = '/messaging/providers/apns';
|
|
6066
|
+
const payload = {};
|
|
6067
|
+
if (typeof providerId !== 'undefined') {
|
|
6068
|
+
payload['providerId'] = providerId;
|
|
6069
|
+
}
|
|
6070
|
+
if (typeof name !== 'undefined') {
|
|
6071
|
+
payload['name'] = name;
|
|
6072
|
+
}
|
|
6073
|
+
if (typeof authKey !== 'undefined') {
|
|
6074
|
+
payload['authKey'] = authKey;
|
|
6075
|
+
}
|
|
6076
|
+
if (typeof authKeyId !== 'undefined') {
|
|
6077
|
+
payload['authKeyId'] = authKeyId;
|
|
6078
|
+
}
|
|
6079
|
+
if (typeof teamId !== 'undefined') {
|
|
6080
|
+
payload['teamId'] = teamId;
|
|
6081
|
+
}
|
|
6082
|
+
if (typeof bundleId !== 'undefined') {
|
|
6083
|
+
payload['bundleId'] = bundleId;
|
|
6084
|
+
}
|
|
6085
|
+
if (typeof enabled !== 'undefined') {
|
|
6086
|
+
payload['enabled'] = enabled;
|
|
6087
|
+
}
|
|
6088
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6089
|
+
return yield this.client.call('post', uri, {
|
|
6090
|
+
'content-type': 'application/json',
|
|
6091
|
+
}, payload);
|
|
6092
|
+
});
|
|
6093
|
+
}
|
|
6094
|
+
/**
|
|
6095
|
+
* Update APNS provider
|
|
6096
|
+
*
|
|
6097
|
+
*
|
|
6098
|
+
* @param {string} providerId
|
|
6099
|
+
* @param {string} name
|
|
6100
|
+
* @param {boolean} enabled
|
|
6101
|
+
* @param {string} authKey
|
|
6102
|
+
* @param {string} authKeyId
|
|
6103
|
+
* @param {string} teamId
|
|
6104
|
+
* @param {string} bundleId
|
|
6105
|
+
* @throws {AppwriteException}
|
|
6106
|
+
* @returns {Promise}
|
|
6107
|
+
*/
|
|
6108
|
+
updateAPNSProvider(providerId, name, enabled, authKey, authKeyId, teamId, bundleId) {
|
|
6109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6110
|
+
if (typeof providerId === 'undefined') {
|
|
6111
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6112
|
+
}
|
|
6113
|
+
const apiPath = '/messaging/providers/apns/{providerId}'.replace('{providerId}', providerId);
|
|
6114
|
+
const payload = {};
|
|
6115
|
+
if (typeof name !== 'undefined') {
|
|
6116
|
+
payload['name'] = name;
|
|
6117
|
+
}
|
|
6118
|
+
if (typeof enabled !== 'undefined') {
|
|
6119
|
+
payload['enabled'] = enabled;
|
|
6120
|
+
}
|
|
6121
|
+
if (typeof authKey !== 'undefined') {
|
|
6122
|
+
payload['authKey'] = authKey;
|
|
6123
|
+
}
|
|
6124
|
+
if (typeof authKeyId !== 'undefined') {
|
|
6125
|
+
payload['authKeyId'] = authKeyId;
|
|
6126
|
+
}
|
|
6127
|
+
if (typeof teamId !== 'undefined') {
|
|
6128
|
+
payload['teamId'] = teamId;
|
|
6129
|
+
}
|
|
6130
|
+
if (typeof bundleId !== 'undefined') {
|
|
6131
|
+
payload['bundleId'] = bundleId;
|
|
6132
|
+
}
|
|
6133
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6134
|
+
return yield this.client.call('patch', uri, {
|
|
6135
|
+
'content-type': 'application/json',
|
|
6136
|
+
}, payload);
|
|
6137
|
+
});
|
|
6138
|
+
}
|
|
6139
|
+
/**
|
|
6140
|
+
* Create FCM provider
|
|
6141
|
+
*
|
|
6142
|
+
*
|
|
6143
|
+
* @param {string} providerId
|
|
6144
|
+
* @param {string} name
|
|
6145
|
+
* @param {object} serviceAccountJSON
|
|
6146
|
+
* @param {boolean} enabled
|
|
6147
|
+
* @throws {AppwriteException}
|
|
6148
|
+
* @returns {Promise}
|
|
6149
|
+
*/
|
|
6150
|
+
createFCMProvider(providerId, name, serviceAccountJSON, enabled) {
|
|
6151
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6152
|
+
if (typeof providerId === 'undefined') {
|
|
6153
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6154
|
+
}
|
|
6155
|
+
if (typeof name === 'undefined') {
|
|
6156
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
6157
|
+
}
|
|
6158
|
+
const apiPath = '/messaging/providers/fcm';
|
|
6159
|
+
const payload = {};
|
|
6160
|
+
if (typeof providerId !== 'undefined') {
|
|
6161
|
+
payload['providerId'] = providerId;
|
|
6162
|
+
}
|
|
6163
|
+
if (typeof name !== 'undefined') {
|
|
6164
|
+
payload['name'] = name;
|
|
6165
|
+
}
|
|
6166
|
+
if (typeof serviceAccountJSON !== 'undefined') {
|
|
6167
|
+
payload['serviceAccountJSON'] = serviceAccountJSON;
|
|
6168
|
+
}
|
|
6169
|
+
if (typeof enabled !== 'undefined') {
|
|
6170
|
+
payload['enabled'] = enabled;
|
|
6171
|
+
}
|
|
6172
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6173
|
+
return yield this.client.call('post', uri, {
|
|
6174
|
+
'content-type': 'application/json',
|
|
6175
|
+
}, payload);
|
|
6176
|
+
});
|
|
6177
|
+
}
|
|
6178
|
+
/**
|
|
6179
|
+
* Update FCM provider
|
|
6180
|
+
*
|
|
6181
|
+
*
|
|
6182
|
+
* @param {string} providerId
|
|
6183
|
+
* @param {string} name
|
|
6184
|
+
* @param {boolean} enabled
|
|
6185
|
+
* @param {object} serviceAccountJSON
|
|
6186
|
+
* @throws {AppwriteException}
|
|
6187
|
+
* @returns {Promise}
|
|
6188
|
+
*/
|
|
6189
|
+
updateFCMProvider(providerId, name, enabled, serviceAccountJSON) {
|
|
6190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6191
|
+
if (typeof providerId === 'undefined') {
|
|
6192
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6193
|
+
}
|
|
6194
|
+
const apiPath = '/messaging/providers/fcm/{providerId}'.replace('{providerId}', providerId);
|
|
6195
|
+
const payload = {};
|
|
6196
|
+
if (typeof name !== 'undefined') {
|
|
6197
|
+
payload['name'] = name;
|
|
6198
|
+
}
|
|
6199
|
+
if (typeof enabled !== 'undefined') {
|
|
6200
|
+
payload['enabled'] = enabled;
|
|
6201
|
+
}
|
|
6202
|
+
if (typeof serviceAccountJSON !== 'undefined') {
|
|
6203
|
+
payload['serviceAccountJSON'] = serviceAccountJSON;
|
|
6204
|
+
}
|
|
6205
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6206
|
+
return yield this.client.call('patch', uri, {
|
|
6207
|
+
'content-type': 'application/json',
|
|
6208
|
+
}, payload);
|
|
6209
|
+
});
|
|
6210
|
+
}
|
|
6211
|
+
/**
|
|
6212
|
+
* Create Mailgun provider
|
|
6213
|
+
*
|
|
6214
|
+
*
|
|
6215
|
+
* @param {string} providerId
|
|
6216
|
+
* @param {string} name
|
|
6217
|
+
* @param {string} apiKey
|
|
6218
|
+
* @param {string} domain
|
|
6219
|
+
* @param {boolean} isEuRegion
|
|
6220
|
+
* @param {string} fromName
|
|
6221
|
+
* @param {string} fromEmail
|
|
6222
|
+
* @param {string} replyToName
|
|
6223
|
+
* @param {string} replyToEmail
|
|
6224
|
+
* @param {boolean} enabled
|
|
6225
|
+
* @throws {AppwriteException}
|
|
6226
|
+
* @returns {Promise}
|
|
6227
|
+
*/
|
|
6228
|
+
createMailgunProvider(providerId, name, apiKey, domain, isEuRegion, fromName, fromEmail, replyToName, replyToEmail, enabled) {
|
|
6229
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6230
|
+
if (typeof providerId === 'undefined') {
|
|
6231
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6232
|
+
}
|
|
6233
|
+
if (typeof name === 'undefined') {
|
|
6234
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
6235
|
+
}
|
|
6236
|
+
const apiPath = '/messaging/providers/mailgun';
|
|
6237
|
+
const payload = {};
|
|
6238
|
+
if (typeof providerId !== 'undefined') {
|
|
6239
|
+
payload['providerId'] = providerId;
|
|
6240
|
+
}
|
|
6241
|
+
if (typeof name !== 'undefined') {
|
|
6242
|
+
payload['name'] = name;
|
|
6243
|
+
}
|
|
6244
|
+
if (typeof apiKey !== 'undefined') {
|
|
6245
|
+
payload['apiKey'] = apiKey;
|
|
6246
|
+
}
|
|
6247
|
+
if (typeof domain !== 'undefined') {
|
|
6248
|
+
payload['domain'] = domain;
|
|
6249
|
+
}
|
|
6250
|
+
if (typeof isEuRegion !== 'undefined') {
|
|
6251
|
+
payload['isEuRegion'] = isEuRegion;
|
|
6252
|
+
}
|
|
6253
|
+
if (typeof fromName !== 'undefined') {
|
|
6254
|
+
payload['fromName'] = fromName;
|
|
6255
|
+
}
|
|
6256
|
+
if (typeof fromEmail !== 'undefined') {
|
|
6257
|
+
payload['fromEmail'] = fromEmail;
|
|
6258
|
+
}
|
|
6259
|
+
if (typeof replyToName !== 'undefined') {
|
|
6260
|
+
payload['replyToName'] = replyToName;
|
|
6261
|
+
}
|
|
6262
|
+
if (typeof replyToEmail !== 'undefined') {
|
|
6263
|
+
payload['replyToEmail'] = replyToEmail;
|
|
6264
|
+
}
|
|
6265
|
+
if (typeof enabled !== 'undefined') {
|
|
6266
|
+
payload['enabled'] = enabled;
|
|
6267
|
+
}
|
|
6268
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6269
|
+
return yield this.client.call('post', uri, {
|
|
6270
|
+
'content-type': 'application/json',
|
|
6271
|
+
}, payload);
|
|
6272
|
+
});
|
|
6273
|
+
}
|
|
6274
|
+
/**
|
|
6275
|
+
* Update Mailgun provider
|
|
6276
|
+
*
|
|
6277
|
+
*
|
|
6278
|
+
* @param {string} providerId
|
|
6279
|
+
* @param {string} name
|
|
6280
|
+
* @param {string} apiKey
|
|
6281
|
+
* @param {string} domain
|
|
6282
|
+
* @param {boolean} isEuRegion
|
|
6283
|
+
* @param {boolean} enabled
|
|
6284
|
+
* @param {string} fromName
|
|
6285
|
+
* @param {string} fromEmail
|
|
6286
|
+
* @param {string} replyToName
|
|
6287
|
+
* @param {string} replyToEmail
|
|
6288
|
+
* @throws {AppwriteException}
|
|
6289
|
+
* @returns {Promise}
|
|
6290
|
+
*/
|
|
6291
|
+
updateMailgunProvider(providerId, name, apiKey, domain, isEuRegion, enabled, fromName, fromEmail, replyToName, replyToEmail) {
|
|
6292
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6293
|
+
if (typeof providerId === 'undefined') {
|
|
6294
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6295
|
+
}
|
|
6296
|
+
const apiPath = '/messaging/providers/mailgun/{providerId}'.replace('{providerId}', providerId);
|
|
6297
|
+
const payload = {};
|
|
6298
|
+
if (typeof name !== 'undefined') {
|
|
6299
|
+
payload['name'] = name;
|
|
6300
|
+
}
|
|
6301
|
+
if (typeof apiKey !== 'undefined') {
|
|
6302
|
+
payload['apiKey'] = apiKey;
|
|
6303
|
+
}
|
|
6304
|
+
if (typeof domain !== 'undefined') {
|
|
6305
|
+
payload['domain'] = domain;
|
|
6306
|
+
}
|
|
6307
|
+
if (typeof isEuRegion !== 'undefined') {
|
|
6308
|
+
payload['isEuRegion'] = isEuRegion;
|
|
6309
|
+
}
|
|
6310
|
+
if (typeof enabled !== 'undefined') {
|
|
6311
|
+
payload['enabled'] = enabled;
|
|
6312
|
+
}
|
|
6313
|
+
if (typeof fromName !== 'undefined') {
|
|
6314
|
+
payload['fromName'] = fromName;
|
|
6315
|
+
}
|
|
6316
|
+
if (typeof fromEmail !== 'undefined') {
|
|
6317
|
+
payload['fromEmail'] = fromEmail;
|
|
6318
|
+
}
|
|
6319
|
+
if (typeof replyToName !== 'undefined') {
|
|
6320
|
+
payload['replyToName'] = replyToName;
|
|
6321
|
+
}
|
|
6322
|
+
if (typeof replyToEmail !== 'undefined') {
|
|
6323
|
+
payload['replyToEmail'] = replyToEmail;
|
|
6324
|
+
}
|
|
6325
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6326
|
+
return yield this.client.call('patch', uri, {
|
|
6327
|
+
'content-type': 'application/json',
|
|
6328
|
+
}, payload);
|
|
6329
|
+
});
|
|
6330
|
+
}
|
|
6331
|
+
/**
|
|
6332
|
+
* Create Msg91 provider
|
|
6333
|
+
*
|
|
6334
|
+
*
|
|
6335
|
+
* @param {string} providerId
|
|
6336
|
+
* @param {string} name
|
|
6337
|
+
* @param {string} from
|
|
6338
|
+
* @param {string} senderId
|
|
6339
|
+
* @param {string} authKey
|
|
6340
|
+
* @param {boolean} enabled
|
|
6341
|
+
* @throws {AppwriteException}
|
|
6342
|
+
* @returns {Promise}
|
|
6343
|
+
*/
|
|
6344
|
+
createMsg91Provider(providerId, name, from, senderId, authKey, enabled) {
|
|
6345
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6346
|
+
if (typeof providerId === 'undefined') {
|
|
6347
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6348
|
+
}
|
|
6349
|
+
if (typeof name === 'undefined') {
|
|
6350
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
6351
|
+
}
|
|
6352
|
+
const apiPath = '/messaging/providers/msg91';
|
|
6353
|
+
const payload = {};
|
|
6354
|
+
if (typeof providerId !== 'undefined') {
|
|
6355
|
+
payload['providerId'] = providerId;
|
|
6356
|
+
}
|
|
6357
|
+
if (typeof name !== 'undefined') {
|
|
6358
|
+
payload['name'] = name;
|
|
6359
|
+
}
|
|
6360
|
+
if (typeof from !== 'undefined') {
|
|
6361
|
+
payload['from'] = from;
|
|
6362
|
+
}
|
|
6363
|
+
if (typeof senderId !== 'undefined') {
|
|
6364
|
+
payload['senderId'] = senderId;
|
|
6365
|
+
}
|
|
6366
|
+
if (typeof authKey !== 'undefined') {
|
|
6367
|
+
payload['authKey'] = authKey;
|
|
6368
|
+
}
|
|
6369
|
+
if (typeof enabled !== 'undefined') {
|
|
6370
|
+
payload['enabled'] = enabled;
|
|
6371
|
+
}
|
|
6372
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6373
|
+
return yield this.client.call('post', uri, {
|
|
6374
|
+
'content-type': 'application/json',
|
|
6375
|
+
}, payload);
|
|
6376
|
+
});
|
|
6377
|
+
}
|
|
6378
|
+
/**
|
|
6379
|
+
* Update Msg91 provider
|
|
6380
|
+
*
|
|
6381
|
+
*
|
|
6382
|
+
* @param {string} providerId
|
|
6383
|
+
* @param {string} name
|
|
6384
|
+
* @param {boolean} enabled
|
|
6385
|
+
* @param {string} senderId
|
|
6386
|
+
* @param {string} authKey
|
|
6387
|
+
* @param {string} from
|
|
6388
|
+
* @throws {AppwriteException}
|
|
6389
|
+
* @returns {Promise}
|
|
6390
|
+
*/
|
|
6391
|
+
updateMsg91Provider(providerId, name, enabled, senderId, authKey, from) {
|
|
6392
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6393
|
+
if (typeof providerId === 'undefined') {
|
|
6394
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6395
|
+
}
|
|
6396
|
+
const apiPath = '/messaging/providers/msg91/{providerId}'.replace('{providerId}', providerId);
|
|
6397
|
+
const payload = {};
|
|
6398
|
+
if (typeof name !== 'undefined') {
|
|
6399
|
+
payload['name'] = name;
|
|
6400
|
+
}
|
|
6401
|
+
if (typeof enabled !== 'undefined') {
|
|
6402
|
+
payload['enabled'] = enabled;
|
|
6403
|
+
}
|
|
6404
|
+
if (typeof senderId !== 'undefined') {
|
|
6405
|
+
payload['senderId'] = senderId;
|
|
6406
|
+
}
|
|
6407
|
+
if (typeof authKey !== 'undefined') {
|
|
6408
|
+
payload['authKey'] = authKey;
|
|
6409
|
+
}
|
|
6410
|
+
if (typeof from !== 'undefined') {
|
|
6411
|
+
payload['from'] = from;
|
|
6412
|
+
}
|
|
6413
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6414
|
+
return yield this.client.call('patch', uri, {
|
|
6415
|
+
'content-type': 'application/json',
|
|
6416
|
+
}, payload);
|
|
6417
|
+
});
|
|
6418
|
+
}
|
|
6419
|
+
/**
|
|
6420
|
+
* Create Sendgrid provider
|
|
6421
|
+
*
|
|
6422
|
+
*
|
|
6423
|
+
* @param {string} providerId
|
|
6424
|
+
* @param {string} name
|
|
6425
|
+
* @param {string} apiKey
|
|
6426
|
+
* @param {string} fromName
|
|
6427
|
+
* @param {string} fromEmail
|
|
6428
|
+
* @param {string} replyToName
|
|
6429
|
+
* @param {string} replyToEmail
|
|
6430
|
+
* @param {boolean} enabled
|
|
6431
|
+
* @throws {AppwriteException}
|
|
6432
|
+
* @returns {Promise}
|
|
6433
|
+
*/
|
|
6434
|
+
createSendgridProvider(providerId, name, apiKey, fromName, fromEmail, replyToName, replyToEmail, enabled) {
|
|
6435
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6436
|
+
if (typeof providerId === 'undefined') {
|
|
6437
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6438
|
+
}
|
|
6439
|
+
if (typeof name === 'undefined') {
|
|
6440
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
6441
|
+
}
|
|
6442
|
+
const apiPath = '/messaging/providers/sendgrid';
|
|
6443
|
+
const payload = {};
|
|
6444
|
+
if (typeof providerId !== 'undefined') {
|
|
6445
|
+
payload['providerId'] = providerId;
|
|
6446
|
+
}
|
|
6447
|
+
if (typeof name !== 'undefined') {
|
|
6448
|
+
payload['name'] = name;
|
|
6449
|
+
}
|
|
6450
|
+
if (typeof apiKey !== 'undefined') {
|
|
6451
|
+
payload['apiKey'] = apiKey;
|
|
6452
|
+
}
|
|
6453
|
+
if (typeof fromName !== 'undefined') {
|
|
6454
|
+
payload['fromName'] = fromName;
|
|
6455
|
+
}
|
|
6456
|
+
if (typeof fromEmail !== 'undefined') {
|
|
6457
|
+
payload['fromEmail'] = fromEmail;
|
|
6458
|
+
}
|
|
6459
|
+
if (typeof replyToName !== 'undefined') {
|
|
6460
|
+
payload['replyToName'] = replyToName;
|
|
6461
|
+
}
|
|
6462
|
+
if (typeof replyToEmail !== 'undefined') {
|
|
6463
|
+
payload['replyToEmail'] = replyToEmail;
|
|
6464
|
+
}
|
|
6465
|
+
if (typeof enabled !== 'undefined') {
|
|
6466
|
+
payload['enabled'] = enabled;
|
|
6467
|
+
}
|
|
6468
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6469
|
+
return yield this.client.call('post', uri, {
|
|
6470
|
+
'content-type': 'application/json',
|
|
6471
|
+
}, payload);
|
|
6472
|
+
});
|
|
6473
|
+
}
|
|
6474
|
+
/**
|
|
6475
|
+
* Update Sendgrid provider
|
|
6476
|
+
*
|
|
6477
|
+
*
|
|
6478
|
+
* @param {string} providerId
|
|
6479
|
+
* @param {string} name
|
|
6480
|
+
* @param {boolean} enabled
|
|
6481
|
+
* @param {string} apiKey
|
|
6482
|
+
* @param {string} fromName
|
|
6483
|
+
* @param {string} fromEmail
|
|
6484
|
+
* @param {string} replyToName
|
|
6485
|
+
* @param {string} replyToEmail
|
|
6486
|
+
* @throws {AppwriteException}
|
|
6487
|
+
* @returns {Promise}
|
|
6488
|
+
*/
|
|
6489
|
+
updateSendgridProvider(providerId, name, enabled, apiKey, fromName, fromEmail, replyToName, replyToEmail) {
|
|
6490
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6491
|
+
if (typeof providerId === 'undefined') {
|
|
6492
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6493
|
+
}
|
|
6494
|
+
const apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId);
|
|
6495
|
+
const payload = {};
|
|
6496
|
+
if (typeof name !== 'undefined') {
|
|
6497
|
+
payload['name'] = name;
|
|
6498
|
+
}
|
|
6499
|
+
if (typeof enabled !== 'undefined') {
|
|
6500
|
+
payload['enabled'] = enabled;
|
|
6501
|
+
}
|
|
6502
|
+
if (typeof apiKey !== 'undefined') {
|
|
6503
|
+
payload['apiKey'] = apiKey;
|
|
6504
|
+
}
|
|
6505
|
+
if (typeof fromName !== 'undefined') {
|
|
6506
|
+
payload['fromName'] = fromName;
|
|
6507
|
+
}
|
|
6508
|
+
if (typeof fromEmail !== 'undefined') {
|
|
6509
|
+
payload['fromEmail'] = fromEmail;
|
|
6510
|
+
}
|
|
6511
|
+
if (typeof replyToName !== 'undefined') {
|
|
6512
|
+
payload['replyToName'] = replyToName;
|
|
6513
|
+
}
|
|
6514
|
+
if (typeof replyToEmail !== 'undefined') {
|
|
6515
|
+
payload['replyToEmail'] = replyToEmail;
|
|
6516
|
+
}
|
|
6517
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6518
|
+
return yield this.client.call('patch', uri, {
|
|
6519
|
+
'content-type': 'application/json',
|
|
6520
|
+
}, payload);
|
|
6521
|
+
});
|
|
6522
|
+
}
|
|
6523
|
+
/**
|
|
6524
|
+
* Create SMTP provider
|
|
6525
|
+
*
|
|
6526
|
+
*
|
|
6527
|
+
* @param {string} providerId
|
|
6528
|
+
* @param {string} name
|
|
6529
|
+
* @param {string} host
|
|
6530
|
+
* @param {number} port
|
|
6531
|
+
* @param {string} username
|
|
6532
|
+
* @param {string} password
|
|
6533
|
+
* @param {SMTPEncryption} encryption
|
|
6534
|
+
* @param {boolean} autoTLS
|
|
6535
|
+
* @param {string} mailer
|
|
6536
|
+
* @param {string} fromName
|
|
6537
|
+
* @param {string} fromEmail
|
|
6538
|
+
* @param {string} replyToName
|
|
6539
|
+
* @param {string} replyToEmail
|
|
6540
|
+
* @param {boolean} enabled
|
|
6541
|
+
* @throws {AppwriteException}
|
|
6542
|
+
* @returns {Promise}
|
|
6543
|
+
*/
|
|
6544
|
+
createSMTPProvider(providerId, name, host, port, username, password, encryption, autoTLS, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled) {
|
|
6545
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6546
|
+
if (typeof providerId === 'undefined') {
|
|
6547
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6548
|
+
}
|
|
6549
|
+
if (typeof name === 'undefined') {
|
|
6550
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
6551
|
+
}
|
|
6552
|
+
if (typeof host === 'undefined') {
|
|
6553
|
+
throw new AppwriteException('Missing required parameter: "host"');
|
|
6554
|
+
}
|
|
6555
|
+
const apiPath = '/messaging/providers/smtp';
|
|
6556
|
+
const payload = {};
|
|
6557
|
+
if (typeof providerId !== 'undefined') {
|
|
6558
|
+
payload['providerId'] = providerId;
|
|
6559
|
+
}
|
|
6560
|
+
if (typeof name !== 'undefined') {
|
|
6561
|
+
payload['name'] = name;
|
|
6562
|
+
}
|
|
6563
|
+
if (typeof host !== 'undefined') {
|
|
6564
|
+
payload['host'] = host;
|
|
6565
|
+
}
|
|
6566
|
+
if (typeof port !== 'undefined') {
|
|
6567
|
+
payload['port'] = port;
|
|
6568
|
+
}
|
|
6569
|
+
if (typeof username !== 'undefined') {
|
|
6570
|
+
payload['username'] = username;
|
|
6571
|
+
}
|
|
6572
|
+
if (typeof password !== 'undefined') {
|
|
6573
|
+
payload['password'] = password;
|
|
6574
|
+
}
|
|
6575
|
+
if (typeof encryption !== 'undefined') {
|
|
6576
|
+
payload['encryption'] = encryption;
|
|
6577
|
+
}
|
|
6578
|
+
if (typeof autoTLS !== 'undefined') {
|
|
6579
|
+
payload['autoTLS'] = autoTLS;
|
|
6580
|
+
}
|
|
6581
|
+
if (typeof mailer !== 'undefined') {
|
|
6582
|
+
payload['mailer'] = mailer;
|
|
6583
|
+
}
|
|
6584
|
+
if (typeof fromName !== 'undefined') {
|
|
6585
|
+
payload['fromName'] = fromName;
|
|
6586
|
+
}
|
|
6587
|
+
if (typeof fromEmail !== 'undefined') {
|
|
6588
|
+
payload['fromEmail'] = fromEmail;
|
|
6589
|
+
}
|
|
6590
|
+
if (typeof replyToName !== 'undefined') {
|
|
6591
|
+
payload['replyToName'] = replyToName;
|
|
6592
|
+
}
|
|
6593
|
+
if (typeof replyToEmail !== 'undefined') {
|
|
6594
|
+
payload['replyToEmail'] = replyToEmail;
|
|
6595
|
+
}
|
|
6596
|
+
if (typeof enabled !== 'undefined') {
|
|
6597
|
+
payload['enabled'] = enabled;
|
|
6598
|
+
}
|
|
6599
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6600
|
+
return yield this.client.call('post', uri, {
|
|
6601
|
+
'content-type': 'application/json',
|
|
6602
|
+
}, payload);
|
|
6603
|
+
});
|
|
6604
|
+
}
|
|
6605
|
+
/**
|
|
6606
|
+
* Update SMTP provider
|
|
6607
|
+
*
|
|
6608
|
+
*
|
|
6609
|
+
* @param {string} providerId
|
|
6610
|
+
* @param {string} name
|
|
6611
|
+
* @param {string} host
|
|
6612
|
+
* @param {number} port
|
|
6613
|
+
* @param {string} username
|
|
6614
|
+
* @param {string} password
|
|
6615
|
+
* @param {SMTPEncryption} encryption
|
|
6616
|
+
* @param {boolean} autoTLS
|
|
6617
|
+
* @param {string} mailer
|
|
6618
|
+
* @param {string} fromName
|
|
6619
|
+
* @param {string} fromEmail
|
|
6620
|
+
* @param {string} replyToName
|
|
6621
|
+
* @param {string} replyToEmail
|
|
6622
|
+
* @param {boolean} enabled
|
|
6623
|
+
* @throws {AppwriteException}
|
|
6624
|
+
* @returns {Promise}
|
|
6625
|
+
*/
|
|
6626
|
+
updateSMTPProvider(providerId, name, host, port, username, password, encryption, autoTLS, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled) {
|
|
6627
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6628
|
+
if (typeof providerId === 'undefined') {
|
|
6629
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6630
|
+
}
|
|
6631
|
+
const apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId);
|
|
6632
|
+
const payload = {};
|
|
6633
|
+
if (typeof name !== 'undefined') {
|
|
6634
|
+
payload['name'] = name;
|
|
6635
|
+
}
|
|
6636
|
+
if (typeof host !== 'undefined') {
|
|
6637
|
+
payload['host'] = host;
|
|
6638
|
+
}
|
|
6639
|
+
if (typeof port !== 'undefined') {
|
|
6640
|
+
payload['port'] = port;
|
|
6641
|
+
}
|
|
6642
|
+
if (typeof username !== 'undefined') {
|
|
6643
|
+
payload['username'] = username;
|
|
6644
|
+
}
|
|
6645
|
+
if (typeof password !== 'undefined') {
|
|
6646
|
+
payload['password'] = password;
|
|
6647
|
+
}
|
|
6648
|
+
if (typeof encryption !== 'undefined') {
|
|
6649
|
+
payload['encryption'] = encryption;
|
|
6650
|
+
}
|
|
6651
|
+
if (typeof autoTLS !== 'undefined') {
|
|
6652
|
+
payload['autoTLS'] = autoTLS;
|
|
6653
|
+
}
|
|
6654
|
+
if (typeof mailer !== 'undefined') {
|
|
6655
|
+
payload['mailer'] = mailer;
|
|
6656
|
+
}
|
|
6657
|
+
if (typeof fromName !== 'undefined') {
|
|
6658
|
+
payload['fromName'] = fromName;
|
|
6659
|
+
}
|
|
6660
|
+
if (typeof fromEmail !== 'undefined') {
|
|
6661
|
+
payload['fromEmail'] = fromEmail;
|
|
6662
|
+
}
|
|
6663
|
+
if (typeof replyToName !== 'undefined') {
|
|
6664
|
+
payload['replyToName'] = replyToName;
|
|
6665
|
+
}
|
|
6666
|
+
if (typeof replyToEmail !== 'undefined') {
|
|
6667
|
+
payload['replyToEmail'] = replyToEmail;
|
|
6668
|
+
}
|
|
6669
|
+
if (typeof enabled !== 'undefined') {
|
|
6670
|
+
payload['enabled'] = enabled;
|
|
6671
|
+
}
|
|
6672
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6673
|
+
return yield this.client.call('patch', uri, {
|
|
6674
|
+
'content-type': 'application/json',
|
|
6675
|
+
}, payload);
|
|
6676
|
+
});
|
|
6677
|
+
}
|
|
6678
|
+
/**
|
|
6679
|
+
* Create Telesign provider
|
|
6680
|
+
*
|
|
6681
|
+
*
|
|
6682
|
+
* @param {string} providerId
|
|
6683
|
+
* @param {string} name
|
|
6684
|
+
* @param {string} from
|
|
6685
|
+
* @param {string} customerId
|
|
6686
|
+
* @param {string} apiKey
|
|
6687
|
+
* @param {boolean} enabled
|
|
6688
|
+
* @throws {AppwriteException}
|
|
6689
|
+
* @returns {Promise}
|
|
6690
|
+
*/
|
|
6691
|
+
createTelesignProvider(providerId, name, from, customerId, apiKey, enabled) {
|
|
6692
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6693
|
+
if (typeof providerId === 'undefined') {
|
|
6694
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6695
|
+
}
|
|
6696
|
+
if (typeof name === 'undefined') {
|
|
6697
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
6698
|
+
}
|
|
6699
|
+
const apiPath = '/messaging/providers/telesign';
|
|
6700
|
+
const payload = {};
|
|
6701
|
+
if (typeof providerId !== 'undefined') {
|
|
6702
|
+
payload['providerId'] = providerId;
|
|
6703
|
+
}
|
|
6704
|
+
if (typeof name !== 'undefined') {
|
|
6705
|
+
payload['name'] = name;
|
|
6706
|
+
}
|
|
6707
|
+
if (typeof from !== 'undefined') {
|
|
6708
|
+
payload['from'] = from;
|
|
6709
|
+
}
|
|
6710
|
+
if (typeof customerId !== 'undefined') {
|
|
6711
|
+
payload['customerId'] = customerId;
|
|
6712
|
+
}
|
|
6713
|
+
if (typeof apiKey !== 'undefined') {
|
|
6714
|
+
payload['apiKey'] = apiKey;
|
|
6715
|
+
}
|
|
6716
|
+
if (typeof enabled !== 'undefined') {
|
|
6717
|
+
payload['enabled'] = enabled;
|
|
6718
|
+
}
|
|
6719
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6720
|
+
return yield this.client.call('post', uri, {
|
|
6721
|
+
'content-type': 'application/json',
|
|
6722
|
+
}, payload);
|
|
6723
|
+
});
|
|
6724
|
+
}
|
|
6725
|
+
/**
|
|
6726
|
+
* Update Telesign provider
|
|
6727
|
+
*
|
|
6728
|
+
*
|
|
6729
|
+
* @param {string} providerId
|
|
6730
|
+
* @param {string} name
|
|
6731
|
+
* @param {boolean} enabled
|
|
6732
|
+
* @param {string} customerId
|
|
6733
|
+
* @param {string} apiKey
|
|
6734
|
+
* @param {string} from
|
|
6735
|
+
* @throws {AppwriteException}
|
|
6736
|
+
* @returns {Promise}
|
|
6737
|
+
*/
|
|
6738
|
+
updateTelesignProvider(providerId, name, enabled, customerId, apiKey, from) {
|
|
6739
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6740
|
+
if (typeof providerId === 'undefined') {
|
|
6741
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6742
|
+
}
|
|
6743
|
+
const apiPath = '/messaging/providers/telesign/{providerId}'.replace('{providerId}', providerId);
|
|
6744
|
+
const payload = {};
|
|
6745
|
+
if (typeof name !== 'undefined') {
|
|
6746
|
+
payload['name'] = name;
|
|
6747
|
+
}
|
|
6748
|
+
if (typeof enabled !== 'undefined') {
|
|
6749
|
+
payload['enabled'] = enabled;
|
|
6750
|
+
}
|
|
6751
|
+
if (typeof customerId !== 'undefined') {
|
|
6752
|
+
payload['customerId'] = customerId;
|
|
6753
|
+
}
|
|
6754
|
+
if (typeof apiKey !== 'undefined') {
|
|
6755
|
+
payload['apiKey'] = apiKey;
|
|
6756
|
+
}
|
|
6757
|
+
if (typeof from !== 'undefined') {
|
|
6758
|
+
payload['from'] = from;
|
|
6759
|
+
}
|
|
6760
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6761
|
+
return yield this.client.call('patch', uri, {
|
|
6762
|
+
'content-type': 'application/json',
|
|
6763
|
+
}, payload);
|
|
6764
|
+
});
|
|
6765
|
+
}
|
|
6766
|
+
/**
|
|
6767
|
+
* Create Textmagic provider
|
|
6768
|
+
*
|
|
6769
|
+
*
|
|
6770
|
+
* @param {string} providerId
|
|
6771
|
+
* @param {string} name
|
|
6772
|
+
* @param {string} from
|
|
6773
|
+
* @param {string} username
|
|
6774
|
+
* @param {string} apiKey
|
|
6775
|
+
* @param {boolean} enabled
|
|
6776
|
+
* @throws {AppwriteException}
|
|
6777
|
+
* @returns {Promise}
|
|
6778
|
+
*/
|
|
6779
|
+
createTextmagicProvider(providerId, name, from, username, apiKey, enabled) {
|
|
6780
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6781
|
+
if (typeof providerId === 'undefined') {
|
|
6782
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6783
|
+
}
|
|
6784
|
+
if (typeof name === 'undefined') {
|
|
6785
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
6786
|
+
}
|
|
6787
|
+
const apiPath = '/messaging/providers/textmagic';
|
|
6788
|
+
const payload = {};
|
|
6789
|
+
if (typeof providerId !== 'undefined') {
|
|
6790
|
+
payload['providerId'] = providerId;
|
|
6791
|
+
}
|
|
6792
|
+
if (typeof name !== 'undefined') {
|
|
6793
|
+
payload['name'] = name;
|
|
6794
|
+
}
|
|
6795
|
+
if (typeof from !== 'undefined') {
|
|
6796
|
+
payload['from'] = from;
|
|
6797
|
+
}
|
|
6798
|
+
if (typeof username !== 'undefined') {
|
|
6799
|
+
payload['username'] = username;
|
|
6800
|
+
}
|
|
6801
|
+
if (typeof apiKey !== 'undefined') {
|
|
6802
|
+
payload['apiKey'] = apiKey;
|
|
6803
|
+
}
|
|
6804
|
+
if (typeof enabled !== 'undefined') {
|
|
6805
|
+
payload['enabled'] = enabled;
|
|
6806
|
+
}
|
|
6807
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6808
|
+
return yield this.client.call('post', uri, {
|
|
6809
|
+
'content-type': 'application/json',
|
|
6810
|
+
}, payload);
|
|
6811
|
+
});
|
|
6812
|
+
}
|
|
6813
|
+
/**
|
|
6814
|
+
* Update Textmagic provider
|
|
6815
|
+
*
|
|
6816
|
+
*
|
|
6817
|
+
* @param {string} providerId
|
|
6818
|
+
* @param {string} name
|
|
6819
|
+
* @param {boolean} enabled
|
|
6820
|
+
* @param {string} username
|
|
6821
|
+
* @param {string} apiKey
|
|
6822
|
+
* @param {string} from
|
|
6823
|
+
* @throws {AppwriteException}
|
|
6824
|
+
* @returns {Promise}
|
|
6825
|
+
*/
|
|
6826
|
+
updateTextmagicProvider(providerId, name, enabled, username, apiKey, from) {
|
|
6827
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6828
|
+
if (typeof providerId === 'undefined') {
|
|
6829
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6830
|
+
}
|
|
6831
|
+
const apiPath = '/messaging/providers/textmagic/{providerId}'.replace('{providerId}', providerId);
|
|
6832
|
+
const payload = {};
|
|
6833
|
+
if (typeof name !== 'undefined') {
|
|
6834
|
+
payload['name'] = name;
|
|
6835
|
+
}
|
|
6836
|
+
if (typeof enabled !== 'undefined') {
|
|
6837
|
+
payload['enabled'] = enabled;
|
|
6838
|
+
}
|
|
6839
|
+
if (typeof username !== 'undefined') {
|
|
6840
|
+
payload['username'] = username;
|
|
6841
|
+
}
|
|
6842
|
+
if (typeof apiKey !== 'undefined') {
|
|
6843
|
+
payload['apiKey'] = apiKey;
|
|
6844
|
+
}
|
|
6845
|
+
if (typeof from !== 'undefined') {
|
|
6846
|
+
payload['from'] = from;
|
|
6847
|
+
}
|
|
6848
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6849
|
+
return yield this.client.call('patch', uri, {
|
|
6850
|
+
'content-type': 'application/json',
|
|
6851
|
+
}, payload);
|
|
6852
|
+
});
|
|
6853
|
+
}
|
|
6854
|
+
/**
|
|
6855
|
+
* Create Twilio provider
|
|
6856
|
+
*
|
|
6857
|
+
*
|
|
6858
|
+
* @param {string} providerId
|
|
6859
|
+
* @param {string} name
|
|
6860
|
+
* @param {string} from
|
|
6861
|
+
* @param {string} accountSid
|
|
6862
|
+
* @param {string} authToken
|
|
6863
|
+
* @param {boolean} enabled
|
|
6864
|
+
* @throws {AppwriteException}
|
|
6865
|
+
* @returns {Promise}
|
|
6866
|
+
*/
|
|
6867
|
+
createTwilioProvider(providerId, name, from, accountSid, authToken, enabled) {
|
|
6868
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6869
|
+
if (typeof providerId === 'undefined') {
|
|
6870
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6871
|
+
}
|
|
6872
|
+
if (typeof name === 'undefined') {
|
|
6873
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
6874
|
+
}
|
|
6875
|
+
const apiPath = '/messaging/providers/twilio';
|
|
6876
|
+
const payload = {};
|
|
6877
|
+
if (typeof providerId !== 'undefined') {
|
|
6878
|
+
payload['providerId'] = providerId;
|
|
6879
|
+
}
|
|
6880
|
+
if (typeof name !== 'undefined') {
|
|
6881
|
+
payload['name'] = name;
|
|
6882
|
+
}
|
|
6883
|
+
if (typeof from !== 'undefined') {
|
|
6884
|
+
payload['from'] = from;
|
|
6885
|
+
}
|
|
6886
|
+
if (typeof accountSid !== 'undefined') {
|
|
6887
|
+
payload['accountSid'] = accountSid;
|
|
6888
|
+
}
|
|
6889
|
+
if (typeof authToken !== 'undefined') {
|
|
6890
|
+
payload['authToken'] = authToken;
|
|
6891
|
+
}
|
|
6892
|
+
if (typeof enabled !== 'undefined') {
|
|
6893
|
+
payload['enabled'] = enabled;
|
|
6894
|
+
}
|
|
6895
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6896
|
+
return yield this.client.call('post', uri, {
|
|
6897
|
+
'content-type': 'application/json',
|
|
6898
|
+
}, payload);
|
|
6899
|
+
});
|
|
6900
|
+
}
|
|
6901
|
+
/**
|
|
6902
|
+
* Update Twilio provider
|
|
6903
|
+
*
|
|
6904
|
+
*
|
|
6905
|
+
* @param {string} providerId
|
|
6906
|
+
* @param {string} name
|
|
6907
|
+
* @param {boolean} enabled
|
|
6908
|
+
* @param {string} accountSid
|
|
6909
|
+
* @param {string} authToken
|
|
6910
|
+
* @param {string} from
|
|
6911
|
+
* @throws {AppwriteException}
|
|
6912
|
+
* @returns {Promise}
|
|
6913
|
+
*/
|
|
6914
|
+
updateTwilioProvider(providerId, name, enabled, accountSid, authToken, from) {
|
|
6915
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6916
|
+
if (typeof providerId === 'undefined') {
|
|
6917
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6918
|
+
}
|
|
6919
|
+
const apiPath = '/messaging/providers/twilio/{providerId}'.replace('{providerId}', providerId);
|
|
6920
|
+
const payload = {};
|
|
6921
|
+
if (typeof name !== 'undefined') {
|
|
6922
|
+
payload['name'] = name;
|
|
6923
|
+
}
|
|
6924
|
+
if (typeof enabled !== 'undefined') {
|
|
6925
|
+
payload['enabled'] = enabled;
|
|
6926
|
+
}
|
|
6927
|
+
if (typeof accountSid !== 'undefined') {
|
|
6928
|
+
payload['accountSid'] = accountSid;
|
|
6929
|
+
}
|
|
6930
|
+
if (typeof authToken !== 'undefined') {
|
|
6931
|
+
payload['authToken'] = authToken;
|
|
6932
|
+
}
|
|
6933
|
+
if (typeof from !== 'undefined') {
|
|
6934
|
+
payload['from'] = from;
|
|
6935
|
+
}
|
|
6936
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6937
|
+
return yield this.client.call('patch', uri, {
|
|
6938
|
+
'content-type': 'application/json',
|
|
6939
|
+
}, payload);
|
|
6940
|
+
});
|
|
6941
|
+
}
|
|
6942
|
+
/**
|
|
6943
|
+
* Create Vonage provider
|
|
6944
|
+
*
|
|
6945
|
+
*
|
|
6946
|
+
* @param {string} providerId
|
|
6947
|
+
* @param {string} name
|
|
6948
|
+
* @param {string} from
|
|
6949
|
+
* @param {string} apiKey
|
|
6950
|
+
* @param {string} apiSecret
|
|
6951
|
+
* @param {boolean} enabled
|
|
6952
|
+
* @throws {AppwriteException}
|
|
6953
|
+
* @returns {Promise}
|
|
6954
|
+
*/
|
|
6955
|
+
createVonageProvider(providerId, name, from, apiKey, apiSecret, enabled) {
|
|
6956
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6957
|
+
if (typeof providerId === 'undefined') {
|
|
6958
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
6959
|
+
}
|
|
6960
|
+
if (typeof name === 'undefined') {
|
|
6961
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
6962
|
+
}
|
|
6963
|
+
const apiPath = '/messaging/providers/vonage';
|
|
6964
|
+
const payload = {};
|
|
6965
|
+
if (typeof providerId !== 'undefined') {
|
|
6966
|
+
payload['providerId'] = providerId;
|
|
6967
|
+
}
|
|
6968
|
+
if (typeof name !== 'undefined') {
|
|
6969
|
+
payload['name'] = name;
|
|
6970
|
+
}
|
|
6971
|
+
if (typeof from !== 'undefined') {
|
|
6972
|
+
payload['from'] = from;
|
|
6973
|
+
}
|
|
6974
|
+
if (typeof apiKey !== 'undefined') {
|
|
6975
|
+
payload['apiKey'] = apiKey;
|
|
6976
|
+
}
|
|
6977
|
+
if (typeof apiSecret !== 'undefined') {
|
|
6978
|
+
payload['apiSecret'] = apiSecret;
|
|
6979
|
+
}
|
|
6980
|
+
if (typeof enabled !== 'undefined') {
|
|
6981
|
+
payload['enabled'] = enabled;
|
|
6982
|
+
}
|
|
6983
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6984
|
+
return yield this.client.call('post', uri, {
|
|
6985
|
+
'content-type': 'application/json',
|
|
6986
|
+
}, payload);
|
|
6987
|
+
});
|
|
6988
|
+
}
|
|
6989
|
+
/**
|
|
6990
|
+
* Update Vonage provider
|
|
4828
6991
|
*
|
|
4829
|
-
* Get the number of logs that are waiting to be processed in the Appwrite
|
|
4830
|
-
* internal queue server.
|
|
4831
6992
|
*
|
|
4832
|
-
* @param {
|
|
6993
|
+
* @param {string} providerId
|
|
6994
|
+
* @param {string} name
|
|
6995
|
+
* @param {boolean} enabled
|
|
6996
|
+
* @param {string} apiKey
|
|
6997
|
+
* @param {string} apiSecret
|
|
6998
|
+
* @param {string} from
|
|
4833
6999
|
* @throws {AppwriteException}
|
|
4834
7000
|
* @returns {Promise}
|
|
4835
7001
|
*/
|
|
4836
|
-
|
|
7002
|
+
updateVonageProvider(providerId, name, enabled, apiKey, apiSecret, from) {
|
|
4837
7003
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4838
|
-
|
|
7004
|
+
if (typeof providerId === 'undefined') {
|
|
7005
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
7006
|
+
}
|
|
7007
|
+
const apiPath = '/messaging/providers/vonage/{providerId}'.replace('{providerId}', providerId);
|
|
4839
7008
|
const payload = {};
|
|
4840
|
-
if (typeof
|
|
4841
|
-
payload['
|
|
7009
|
+
if (typeof name !== 'undefined') {
|
|
7010
|
+
payload['name'] = name;
|
|
7011
|
+
}
|
|
7012
|
+
if (typeof enabled !== 'undefined') {
|
|
7013
|
+
payload['enabled'] = enabled;
|
|
7014
|
+
}
|
|
7015
|
+
if (typeof apiKey !== 'undefined') {
|
|
7016
|
+
payload['apiKey'] = apiKey;
|
|
7017
|
+
}
|
|
7018
|
+
if (typeof apiSecret !== 'undefined') {
|
|
7019
|
+
payload['apiSecret'] = apiSecret;
|
|
7020
|
+
}
|
|
7021
|
+
if (typeof from !== 'undefined') {
|
|
7022
|
+
payload['from'] = from;
|
|
4842
7023
|
}
|
|
4843
7024
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4844
|
-
return yield this.client.call('
|
|
7025
|
+
return yield this.client.call('patch', uri, {
|
|
4845
7026
|
'content-type': 'application/json',
|
|
4846
7027
|
}, payload);
|
|
4847
7028
|
});
|
|
4848
7029
|
}
|
|
4849
7030
|
/**
|
|
4850
|
-
* Get
|
|
7031
|
+
* Get provider
|
|
4851
7032
|
*
|
|
4852
|
-
* Get the number of mails that are waiting to be processed in the Appwrite
|
|
4853
|
-
* internal queue server.
|
|
4854
7033
|
*
|
|
4855
|
-
* @param {
|
|
7034
|
+
* @param {string} providerId
|
|
4856
7035
|
* @throws {AppwriteException}
|
|
4857
7036
|
* @returns {Promise}
|
|
4858
7037
|
*/
|
|
4859
|
-
|
|
7038
|
+
getProvider(providerId) {
|
|
4860
7039
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
if (typeof threshold !== 'undefined') {
|
|
4864
|
-
payload['threshold'] = threshold;
|
|
7040
|
+
if (typeof providerId === 'undefined') {
|
|
7041
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
4865
7042
|
}
|
|
7043
|
+
const apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', providerId);
|
|
7044
|
+
const payload = {};
|
|
4866
7045
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4867
7046
|
return yield this.client.call('get', uri, {
|
|
4868
7047
|
'content-type': 'application/json',
|
|
@@ -4870,44 +7049,44 @@ class Health extends Service {
|
|
|
4870
7049
|
});
|
|
4871
7050
|
}
|
|
4872
7051
|
/**
|
|
4873
|
-
*
|
|
7052
|
+
* Delete provider
|
|
4874
7053
|
*
|
|
4875
|
-
* Get the number of messages that are waiting to be processed in the Appwrite
|
|
4876
|
-
* internal queue server.
|
|
4877
7054
|
*
|
|
4878
|
-
* @param {
|
|
7055
|
+
* @param {string} providerId
|
|
4879
7056
|
* @throws {AppwriteException}
|
|
4880
7057
|
* @returns {Promise}
|
|
4881
7058
|
*/
|
|
4882
|
-
|
|
7059
|
+
deleteProvider(providerId) {
|
|
4883
7060
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
if (typeof threshold !== 'undefined') {
|
|
4887
|
-
payload['threshold'] = threshold;
|
|
7061
|
+
if (typeof providerId === 'undefined') {
|
|
7062
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
4888
7063
|
}
|
|
7064
|
+
const apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', providerId);
|
|
7065
|
+
const payload = {};
|
|
4889
7066
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4890
|
-
return yield this.client.call('
|
|
7067
|
+
return yield this.client.call('delete', uri, {
|
|
4891
7068
|
'content-type': 'application/json',
|
|
4892
7069
|
}, payload);
|
|
4893
7070
|
});
|
|
4894
7071
|
}
|
|
4895
7072
|
/**
|
|
4896
|
-
*
|
|
7073
|
+
* List provider logs
|
|
4897
7074
|
*
|
|
4898
|
-
* Get the number of migrations that are waiting to be processed in the
|
|
4899
|
-
* Appwrite internal queue server.
|
|
4900
7075
|
*
|
|
4901
|
-
* @param {
|
|
7076
|
+
* @param {string} providerId
|
|
7077
|
+
* @param {string[]} queries
|
|
4902
7078
|
* @throws {AppwriteException}
|
|
4903
7079
|
* @returns {Promise}
|
|
4904
7080
|
*/
|
|
4905
|
-
|
|
7081
|
+
listProviderLogs(providerId, queries) {
|
|
4906
7082
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4907
|
-
|
|
7083
|
+
if (typeof providerId === 'undefined') {
|
|
7084
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
7085
|
+
}
|
|
7086
|
+
const apiPath = '/messaging/providers/{providerId}/logs'.replace('{providerId}', providerId);
|
|
4908
7087
|
const payload = {};
|
|
4909
|
-
if (typeof
|
|
4910
|
-
payload['
|
|
7088
|
+
if (typeof queries !== 'undefined') {
|
|
7089
|
+
payload['queries'] = queries;
|
|
4911
7090
|
}
|
|
4912
7091
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4913
7092
|
return yield this.client.call('get', uri, {
|
|
@@ -4916,21 +7095,23 @@ class Health extends Service {
|
|
|
4916
7095
|
});
|
|
4917
7096
|
}
|
|
4918
7097
|
/**
|
|
4919
|
-
*
|
|
7098
|
+
* List subscriber logs
|
|
4920
7099
|
*
|
|
4921
|
-
* Get the number of webhooks that are waiting to be processed in the Appwrite
|
|
4922
|
-
* internal queue server.
|
|
4923
7100
|
*
|
|
4924
|
-
* @param {
|
|
7101
|
+
* @param {string} subscriberId
|
|
7102
|
+
* @param {string[]} queries
|
|
4925
7103
|
* @throws {AppwriteException}
|
|
4926
7104
|
* @returns {Promise}
|
|
4927
7105
|
*/
|
|
4928
|
-
|
|
7106
|
+
listSubscriberLogs(subscriberId, queries) {
|
|
4929
7107
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4930
|
-
|
|
7108
|
+
if (typeof subscriberId === 'undefined') {
|
|
7109
|
+
throw new AppwriteException('Missing required parameter: "subscriberId"');
|
|
7110
|
+
}
|
|
7111
|
+
const apiPath = '/messaging/subscribers/{subscriberId}/logs'.replace('{subscriberId}', subscriberId);
|
|
4931
7112
|
const payload = {};
|
|
4932
|
-
if (typeof
|
|
4933
|
-
payload['
|
|
7113
|
+
if (typeof queries !== 'undefined') {
|
|
7114
|
+
payload['queries'] = queries;
|
|
4934
7115
|
}
|
|
4935
7116
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4936
7117
|
return yield this.client.call('get', uri, {
|
|
@@ -4939,17 +7120,24 @@ class Health extends Service {
|
|
|
4939
7120
|
});
|
|
4940
7121
|
}
|
|
4941
7122
|
/**
|
|
4942
|
-
*
|
|
7123
|
+
* List topics.
|
|
4943
7124
|
*
|
|
4944
|
-
* Check the Appwrite local storage device is up and connection is successful.
|
|
4945
7125
|
*
|
|
7126
|
+
* @param {string[]} queries
|
|
7127
|
+
* @param {string} search
|
|
4946
7128
|
* @throws {AppwriteException}
|
|
4947
7129
|
* @returns {Promise}
|
|
4948
7130
|
*/
|
|
4949
|
-
|
|
7131
|
+
listTopics(queries, search) {
|
|
4950
7132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4951
|
-
const apiPath = '/
|
|
7133
|
+
const apiPath = '/messaging/topics';
|
|
4952
7134
|
const payload = {};
|
|
7135
|
+
if (typeof queries !== 'undefined') {
|
|
7136
|
+
payload['queries'] = queries;
|
|
7137
|
+
}
|
|
7138
|
+
if (typeof search !== 'undefined') {
|
|
7139
|
+
payload['search'] = search;
|
|
7140
|
+
}
|
|
4953
7141
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4954
7142
|
return yield this.client.call('get', uri, {
|
|
4955
7143
|
'content-type': 'application/json',
|
|
@@ -4957,51 +7145,54 @@ class Health extends Service {
|
|
|
4957
7145
|
});
|
|
4958
7146
|
}
|
|
4959
7147
|
/**
|
|
4960
|
-
*
|
|
7148
|
+
* Create a topic.
|
|
4961
7149
|
*
|
|
4962
|
-
* Check the Appwrite server time is synced with Google remote NTP server. We
|
|
4963
|
-
* use this technology to smoothly handle leap seconds with no disruptive
|
|
4964
|
-
* events. The [Network Time
|
|
4965
|
-
* Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is
|
|
4966
|
-
* used by hundreds of millions of computers and devices to synchronize their
|
|
4967
|
-
* clocks over the Internet. If your computer sets its own clock, it likely
|
|
4968
|
-
* uses NTP.
|
|
4969
7150
|
*
|
|
7151
|
+
* @param {string} topicId
|
|
7152
|
+
* @param {string} name
|
|
7153
|
+
* @param {string[]} subscribe
|
|
4970
7154
|
* @throws {AppwriteException}
|
|
4971
7155
|
* @returns {Promise}
|
|
4972
7156
|
*/
|
|
4973
|
-
|
|
7157
|
+
createTopic(topicId, name, subscribe) {
|
|
4974
7158
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4975
|
-
|
|
7159
|
+
if (typeof topicId === 'undefined') {
|
|
7160
|
+
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
7161
|
+
}
|
|
7162
|
+
if (typeof name === 'undefined') {
|
|
7163
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
7164
|
+
}
|
|
7165
|
+
const apiPath = '/messaging/topics';
|
|
4976
7166
|
const payload = {};
|
|
7167
|
+
if (typeof topicId !== 'undefined') {
|
|
7168
|
+
payload['topicId'] = topicId;
|
|
7169
|
+
}
|
|
7170
|
+
if (typeof name !== 'undefined') {
|
|
7171
|
+
payload['name'] = name;
|
|
7172
|
+
}
|
|
7173
|
+
if (typeof subscribe !== 'undefined') {
|
|
7174
|
+
payload['subscribe'] = subscribe;
|
|
7175
|
+
}
|
|
4977
7176
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4978
|
-
return yield this.client.call('
|
|
7177
|
+
return yield this.client.call('post', uri, {
|
|
4979
7178
|
'content-type': 'application/json',
|
|
4980
7179
|
}, payload);
|
|
4981
7180
|
});
|
|
4982
7181
|
}
|
|
4983
|
-
}
|
|
4984
|
-
|
|
4985
|
-
class Locale extends Service {
|
|
4986
|
-
constructor(client) {
|
|
4987
|
-
super(client);
|
|
4988
|
-
}
|
|
4989
7182
|
/**
|
|
4990
|
-
* Get
|
|
7183
|
+
* Get a topic.
|
|
4991
7184
|
*
|
|
4992
|
-
* Get the current user location based on IP. Returns an object with user
|
|
4993
|
-
* country code, country name, continent name, continent code, ip address and
|
|
4994
|
-
* suggested currency. You can use the locale header to get the data in a
|
|
4995
|
-
* supported language.
|
|
4996
|
-
*
|
|
4997
|
-
* ([IP Geolocation by DB-IP](https://db-ip.com))
|
|
4998
7185
|
*
|
|
7186
|
+
* @param {string} topicId
|
|
4999
7187
|
* @throws {AppwriteException}
|
|
5000
7188
|
* @returns {Promise}
|
|
5001
7189
|
*/
|
|
5002
|
-
|
|
7190
|
+
getTopic(topicId) {
|
|
5003
7191
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5004
|
-
|
|
7192
|
+
if (typeof topicId === 'undefined') {
|
|
7193
|
+
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
7194
|
+
}
|
|
7195
|
+
const apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
|
|
5005
7196
|
const payload = {};
|
|
5006
7197
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5007
7198
|
return yield this.client.call('get', uri, {
|
|
@@ -5010,56 +7201,70 @@ class Locale extends Service {
|
|
|
5010
7201
|
});
|
|
5011
7202
|
}
|
|
5012
7203
|
/**
|
|
5013
|
-
*
|
|
7204
|
+
* Update a topic.
|
|
5014
7205
|
*
|
|
5015
|
-
* List of all locale codes in [ISO
|
|
5016
|
-
* 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
|
|
5017
7206
|
*
|
|
7207
|
+
* @param {string} topicId
|
|
7208
|
+
* @param {string} name
|
|
5018
7209
|
* @throws {AppwriteException}
|
|
5019
7210
|
* @returns {Promise}
|
|
5020
7211
|
*/
|
|
5021
|
-
|
|
7212
|
+
updateTopic(topicId, name) {
|
|
5022
7213
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5023
|
-
|
|
7214
|
+
if (typeof topicId === 'undefined') {
|
|
7215
|
+
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
7216
|
+
}
|
|
7217
|
+
const apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
|
|
5024
7218
|
const payload = {};
|
|
7219
|
+
if (typeof name !== 'undefined') {
|
|
7220
|
+
payload['name'] = name;
|
|
7221
|
+
}
|
|
5025
7222
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5026
|
-
return yield this.client.call('
|
|
7223
|
+
return yield this.client.call('patch', uri, {
|
|
5027
7224
|
'content-type': 'application/json',
|
|
5028
7225
|
}, payload);
|
|
5029
7226
|
});
|
|
5030
7227
|
}
|
|
5031
7228
|
/**
|
|
5032
|
-
*
|
|
7229
|
+
* Delete a topic.
|
|
5033
7230
|
*
|
|
5034
|
-
* List of all continents. You can use the locale header to get the data in a
|
|
5035
|
-
* supported language.
|
|
5036
7231
|
*
|
|
7232
|
+
* @param {string} topicId
|
|
5037
7233
|
* @throws {AppwriteException}
|
|
5038
7234
|
* @returns {Promise}
|
|
5039
7235
|
*/
|
|
5040
|
-
|
|
7236
|
+
deleteTopic(topicId) {
|
|
5041
7237
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5042
|
-
|
|
7238
|
+
if (typeof topicId === 'undefined') {
|
|
7239
|
+
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
7240
|
+
}
|
|
7241
|
+
const apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
|
|
5043
7242
|
const payload = {};
|
|
5044
7243
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5045
|
-
return yield this.client.call('
|
|
7244
|
+
return yield this.client.call('delete', uri, {
|
|
5046
7245
|
'content-type': 'application/json',
|
|
5047
7246
|
}, payload);
|
|
5048
7247
|
});
|
|
5049
7248
|
}
|
|
5050
7249
|
/**
|
|
5051
|
-
* List
|
|
7250
|
+
* List topic logs
|
|
5052
7251
|
*
|
|
5053
|
-
* List of all countries. You can use the locale header to get the data in a
|
|
5054
|
-
* supported language.
|
|
5055
7252
|
*
|
|
7253
|
+
* @param {string} topicId
|
|
7254
|
+
* @param {string[]} queries
|
|
5056
7255
|
* @throws {AppwriteException}
|
|
5057
7256
|
* @returns {Promise}
|
|
5058
7257
|
*/
|
|
5059
|
-
|
|
7258
|
+
listTopicLogs(topicId, queries) {
|
|
5060
7259
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5061
|
-
|
|
7260
|
+
if (typeof topicId === 'undefined') {
|
|
7261
|
+
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
7262
|
+
}
|
|
7263
|
+
const apiPath = '/messaging/topics/{topicId}/logs'.replace('{topicId}', topicId);
|
|
5062
7264
|
const payload = {};
|
|
7265
|
+
if (typeof queries !== 'undefined') {
|
|
7266
|
+
payload['queries'] = queries;
|
|
7267
|
+
}
|
|
5063
7268
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5064
7269
|
return yield this.client.call('get', uri, {
|
|
5065
7270
|
'content-type': 'application/json',
|
|
@@ -5067,18 +7272,28 @@ class Locale extends Service {
|
|
|
5067
7272
|
});
|
|
5068
7273
|
}
|
|
5069
7274
|
/**
|
|
5070
|
-
* List
|
|
7275
|
+
* List subscribers.
|
|
5071
7276
|
*
|
|
5072
|
-
* List of all countries that are currently members of the EU. You can use the
|
|
5073
|
-
* locale header to get the data in a supported language.
|
|
5074
7277
|
*
|
|
7278
|
+
* @param {string} topicId
|
|
7279
|
+
* @param {string[]} queries
|
|
7280
|
+
* @param {string} search
|
|
5075
7281
|
* @throws {AppwriteException}
|
|
5076
7282
|
* @returns {Promise}
|
|
5077
7283
|
*/
|
|
5078
|
-
|
|
7284
|
+
listSubscribers(topicId, queries, search) {
|
|
5079
7285
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5080
|
-
|
|
7286
|
+
if (typeof topicId === 'undefined') {
|
|
7287
|
+
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
7288
|
+
}
|
|
7289
|
+
const apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId);
|
|
5081
7290
|
const payload = {};
|
|
7291
|
+
if (typeof queries !== 'undefined') {
|
|
7292
|
+
payload['queries'] = queries;
|
|
7293
|
+
}
|
|
7294
|
+
if (typeof search !== 'undefined') {
|
|
7295
|
+
payload['search'] = search;
|
|
7296
|
+
}
|
|
5082
7297
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5083
7298
|
return yield this.client.call('get', uri, {
|
|
5084
7299
|
'content-type': 'application/json',
|
|
@@ -5086,37 +7301,58 @@ class Locale extends Service {
|
|
|
5086
7301
|
});
|
|
5087
7302
|
}
|
|
5088
7303
|
/**
|
|
5089
|
-
*
|
|
7304
|
+
* Create a subscriber.
|
|
5090
7305
|
*
|
|
5091
|
-
* List of all countries phone codes. You can use the locale header to get the
|
|
5092
|
-
* data in a supported language.
|
|
5093
7306
|
*
|
|
7307
|
+
* @param {string} topicId
|
|
7308
|
+
* @param {string} subscriberId
|
|
7309
|
+
* @param {string} targetId
|
|
5094
7310
|
* @throws {AppwriteException}
|
|
5095
7311
|
* @returns {Promise}
|
|
5096
7312
|
*/
|
|
5097
|
-
|
|
7313
|
+
createSubscriber(topicId, subscriberId, targetId) {
|
|
5098
7314
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5099
|
-
|
|
7315
|
+
if (typeof topicId === 'undefined') {
|
|
7316
|
+
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
7317
|
+
}
|
|
7318
|
+
if (typeof subscriberId === 'undefined') {
|
|
7319
|
+
throw new AppwriteException('Missing required parameter: "subscriberId"');
|
|
7320
|
+
}
|
|
7321
|
+
if (typeof targetId === 'undefined') {
|
|
7322
|
+
throw new AppwriteException('Missing required parameter: "targetId"');
|
|
7323
|
+
}
|
|
7324
|
+
const apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId);
|
|
5100
7325
|
const payload = {};
|
|
7326
|
+
if (typeof subscriberId !== 'undefined') {
|
|
7327
|
+
payload['subscriberId'] = subscriberId;
|
|
7328
|
+
}
|
|
7329
|
+
if (typeof targetId !== 'undefined') {
|
|
7330
|
+
payload['targetId'] = targetId;
|
|
7331
|
+
}
|
|
5101
7332
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5102
|
-
return yield this.client.call('
|
|
7333
|
+
return yield this.client.call('post', uri, {
|
|
5103
7334
|
'content-type': 'application/json',
|
|
5104
7335
|
}, payload);
|
|
5105
7336
|
});
|
|
5106
7337
|
}
|
|
5107
7338
|
/**
|
|
5108
|
-
*
|
|
7339
|
+
* Get a subscriber.
|
|
5109
7340
|
*
|
|
5110
|
-
* List of all currencies, including currency symbol, name, plural, and
|
|
5111
|
-
* decimal digits for all major and minor currencies. You can use the locale
|
|
5112
|
-
* header to get the data in a supported language.
|
|
5113
7341
|
*
|
|
7342
|
+
* @param {string} topicId
|
|
7343
|
+
* @param {string} subscriberId
|
|
5114
7344
|
* @throws {AppwriteException}
|
|
5115
7345
|
* @returns {Promise}
|
|
5116
7346
|
*/
|
|
5117
|
-
|
|
7347
|
+
getSubscriber(topicId, subscriberId) {
|
|
5118
7348
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5119
|
-
|
|
7349
|
+
if (typeof topicId === 'undefined') {
|
|
7350
|
+
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
7351
|
+
}
|
|
7352
|
+
if (typeof subscriberId === 'undefined') {
|
|
7353
|
+
throw new AppwriteException('Missing required parameter: "subscriberId"');
|
|
7354
|
+
}
|
|
7355
|
+
const apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', topicId).replace('{subscriberId}', subscriberId);
|
|
5120
7356
|
const payload = {};
|
|
5121
7357
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5122
7358
|
return yield this.client.call('get', uri, {
|
|
@@ -5125,20 +7361,26 @@ class Locale extends Service {
|
|
|
5125
7361
|
});
|
|
5126
7362
|
}
|
|
5127
7363
|
/**
|
|
5128
|
-
*
|
|
7364
|
+
* Delete a subscriber.
|
|
5129
7365
|
*
|
|
5130
|
-
* List of all languages classified by ISO 639-1 including 2-letter code, name
|
|
5131
|
-
* in English, and name in the respective language.
|
|
5132
7366
|
*
|
|
7367
|
+
* @param {string} topicId
|
|
7368
|
+
* @param {string} subscriberId
|
|
5133
7369
|
* @throws {AppwriteException}
|
|
5134
7370
|
* @returns {Promise}
|
|
5135
7371
|
*/
|
|
5136
|
-
|
|
7372
|
+
deleteSubscriber(topicId, subscriberId) {
|
|
5137
7373
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5138
|
-
|
|
7374
|
+
if (typeof topicId === 'undefined') {
|
|
7375
|
+
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
7376
|
+
}
|
|
7377
|
+
if (typeof subscriberId === 'undefined') {
|
|
7378
|
+
throw new AppwriteException('Missing required parameter: "subscriberId"');
|
|
7379
|
+
}
|
|
7380
|
+
const apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', topicId).replace('{subscriberId}', subscriberId);
|
|
5139
7381
|
const payload = {};
|
|
5140
7382
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5141
|
-
return yield this.client.call('
|
|
7383
|
+
return yield this.client.call('delete', uri, {
|
|
5142
7384
|
'content-type': 'application/json',
|
|
5143
7385
|
}, payload);
|
|
5144
7386
|
});
|
|
@@ -5153,7 +7395,7 @@ class Migrations extends Service {
|
|
|
5153
7395
|
* List Migrations
|
|
5154
7396
|
*
|
|
5155
7397
|
*
|
|
5156
|
-
* @param {string} queries
|
|
7398
|
+
* @param {string[]} queries
|
|
5157
7399
|
* @param {string} search
|
|
5158
7400
|
* @throws {AppwriteException}
|
|
5159
7401
|
* @returns {Promise}
|
|
@@ -5763,7 +8005,7 @@ class Project extends Service {
|
|
|
5763
8005
|
*
|
|
5764
8006
|
* @param {string} startDate
|
|
5765
8007
|
* @param {string} endDate
|
|
5766
|
-
* @param {
|
|
8008
|
+
* @param {ProjectUsageRange} period
|
|
5767
8009
|
* @throws {AppwriteException}
|
|
5768
8010
|
* @returns {Promise}
|
|
5769
8011
|
*/
|
|
@@ -5960,7 +8202,7 @@ class Projects extends Service {
|
|
|
5960
8202
|
* @param {string} projectId
|
|
5961
8203
|
* @param {string} name
|
|
5962
8204
|
* @param {string} teamId
|
|
5963
|
-
* @param {
|
|
8205
|
+
* @param {Region} region
|
|
5964
8206
|
* @param {string} description
|
|
5965
8207
|
* @param {string} logo
|
|
5966
8208
|
* @param {string} url
|
|
@@ -6310,7 +8552,7 @@ class Projects extends Service {
|
|
|
6310
8552
|
*
|
|
6311
8553
|
*
|
|
6312
8554
|
* @param {string} projectId
|
|
6313
|
-
* @param {
|
|
8555
|
+
* @param {AuthMethod} method
|
|
6314
8556
|
* @param {boolean} status
|
|
6315
8557
|
* @throws {AppwriteException}
|
|
6316
8558
|
* @returns {Promise}
|
|
@@ -6495,7 +8737,7 @@ class Projects extends Service {
|
|
|
6495
8737
|
*
|
|
6496
8738
|
*
|
|
6497
8739
|
* @param {string} projectId
|
|
6498
|
-
* @param {
|
|
8740
|
+
* @param {OAuthProvider} provider
|
|
6499
8741
|
* @param {string} appId
|
|
6500
8742
|
* @param {string} secret
|
|
6501
8743
|
* @param {boolean} enabled
|
|
@@ -6556,7 +8798,7 @@ class Projects extends Service {
|
|
|
6556
8798
|
*
|
|
6557
8799
|
*
|
|
6558
8800
|
* @param {string} projectId
|
|
6559
|
-
* @param {
|
|
8801
|
+
* @param {PlatformType} type
|
|
6560
8802
|
* @param {string} name
|
|
6561
8803
|
* @param {string} key
|
|
6562
8804
|
* @param {string} store
|
|
@@ -6697,7 +8939,7 @@ class Projects extends Service {
|
|
|
6697
8939
|
*
|
|
6698
8940
|
*
|
|
6699
8941
|
* @param {string} projectId
|
|
6700
|
-
* @param {
|
|
8942
|
+
* @param {APIService} service
|
|
6701
8943
|
* @param {boolean} status
|
|
6702
8944
|
* @throws {AppwriteException}
|
|
6703
8945
|
* @returns {Promise}
|
|
@@ -6756,7 +8998,7 @@ class Projects extends Service {
|
|
|
6756
8998
|
});
|
|
6757
8999
|
}
|
|
6758
9000
|
/**
|
|
6759
|
-
* Update SMTP
|
|
9001
|
+
* Update SMTP
|
|
6760
9002
|
*
|
|
6761
9003
|
*
|
|
6762
9004
|
* @param {string} projectId
|
|
@@ -6768,11 +9010,11 @@ class Projects extends Service {
|
|
|
6768
9010
|
* @param {number} port
|
|
6769
9011
|
* @param {string} username
|
|
6770
9012
|
* @param {string} password
|
|
6771
|
-
* @param {
|
|
9013
|
+
* @param {SMTPSecure} secure
|
|
6772
9014
|
* @throws {AppwriteException}
|
|
6773
9015
|
* @returns {Promise}
|
|
6774
9016
|
*/
|
|
6775
|
-
|
|
9017
|
+
updateSmtp(projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure) {
|
|
6776
9018
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6777
9019
|
if (typeof projectId === 'undefined') {
|
|
6778
9020
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
@@ -6815,6 +9057,75 @@ class Projects extends Service {
|
|
|
6815
9057
|
}, payload);
|
|
6816
9058
|
});
|
|
6817
9059
|
}
|
|
9060
|
+
/**
|
|
9061
|
+
* Create SMTP test
|
|
9062
|
+
*
|
|
9063
|
+
*
|
|
9064
|
+
* @param {string} projectId
|
|
9065
|
+
* @param {string[]} emails
|
|
9066
|
+
* @param {string} senderName
|
|
9067
|
+
* @param {string} senderEmail
|
|
9068
|
+
* @param {string} host
|
|
9069
|
+
* @param {string} replyTo
|
|
9070
|
+
* @param {number} port
|
|
9071
|
+
* @param {string} username
|
|
9072
|
+
* @param {string} password
|
|
9073
|
+
* @param {SMTPSecure} secure
|
|
9074
|
+
* @throws {AppwriteException}
|
|
9075
|
+
* @returns {Promise}
|
|
9076
|
+
*/
|
|
9077
|
+
createSmtpTest(projectId, emails, senderName, senderEmail, host, replyTo, port, username, password, secure) {
|
|
9078
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9079
|
+
if (typeof projectId === 'undefined') {
|
|
9080
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
9081
|
+
}
|
|
9082
|
+
if (typeof emails === 'undefined') {
|
|
9083
|
+
throw new AppwriteException('Missing required parameter: "emails"');
|
|
9084
|
+
}
|
|
9085
|
+
if (typeof senderName === 'undefined') {
|
|
9086
|
+
throw new AppwriteException('Missing required parameter: "senderName"');
|
|
9087
|
+
}
|
|
9088
|
+
if (typeof senderEmail === 'undefined') {
|
|
9089
|
+
throw new AppwriteException('Missing required parameter: "senderEmail"');
|
|
9090
|
+
}
|
|
9091
|
+
if (typeof host === 'undefined') {
|
|
9092
|
+
throw new AppwriteException('Missing required parameter: "host"');
|
|
9093
|
+
}
|
|
9094
|
+
const apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
|
|
9095
|
+
const payload = {};
|
|
9096
|
+
if (typeof emails !== 'undefined') {
|
|
9097
|
+
payload['emails'] = emails;
|
|
9098
|
+
}
|
|
9099
|
+
if (typeof senderName !== 'undefined') {
|
|
9100
|
+
payload['senderName'] = senderName;
|
|
9101
|
+
}
|
|
9102
|
+
if (typeof senderEmail !== 'undefined') {
|
|
9103
|
+
payload['senderEmail'] = senderEmail;
|
|
9104
|
+
}
|
|
9105
|
+
if (typeof replyTo !== 'undefined') {
|
|
9106
|
+
payload['replyTo'] = replyTo;
|
|
9107
|
+
}
|
|
9108
|
+
if (typeof host !== 'undefined') {
|
|
9109
|
+
payload['host'] = host;
|
|
9110
|
+
}
|
|
9111
|
+
if (typeof port !== 'undefined') {
|
|
9112
|
+
payload['port'] = port;
|
|
9113
|
+
}
|
|
9114
|
+
if (typeof username !== 'undefined') {
|
|
9115
|
+
payload['username'] = username;
|
|
9116
|
+
}
|
|
9117
|
+
if (typeof password !== 'undefined') {
|
|
9118
|
+
payload['password'] = password;
|
|
9119
|
+
}
|
|
9120
|
+
if (typeof secure !== 'undefined') {
|
|
9121
|
+
payload['secure'] = secure;
|
|
9122
|
+
}
|
|
9123
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9124
|
+
return yield this.client.call('post', uri, {
|
|
9125
|
+
'content-type': 'application/json',
|
|
9126
|
+
}, payload);
|
|
9127
|
+
});
|
|
9128
|
+
}
|
|
6818
9129
|
/**
|
|
6819
9130
|
* Update Project Team
|
|
6820
9131
|
*
|
|
@@ -6848,8 +9159,8 @@ class Projects extends Service {
|
|
|
6848
9159
|
*
|
|
6849
9160
|
*
|
|
6850
9161
|
* @param {string} projectId
|
|
6851
|
-
* @param {
|
|
6852
|
-
* @param {
|
|
9162
|
+
* @param {EmailTemplateType} type
|
|
9163
|
+
* @param {EmailTemplateLocale} locale
|
|
6853
9164
|
* @throws {AppwriteException}
|
|
6854
9165
|
* @returns {Promise}
|
|
6855
9166
|
*/
|
|
@@ -6877,8 +9188,8 @@ class Projects extends Service {
|
|
|
6877
9188
|
*
|
|
6878
9189
|
*
|
|
6879
9190
|
* @param {string} projectId
|
|
6880
|
-
* @param {
|
|
6881
|
-
* @param {
|
|
9191
|
+
* @param {EmailTemplateType} type
|
|
9192
|
+
* @param {EmailTemplateLocale} locale
|
|
6882
9193
|
* @param {string} subject
|
|
6883
9194
|
* @param {string} message
|
|
6884
9195
|
* @param {string} senderName
|
|
@@ -6932,8 +9243,8 @@ class Projects extends Service {
|
|
|
6932
9243
|
*
|
|
6933
9244
|
*
|
|
6934
9245
|
* @param {string} projectId
|
|
6935
|
-
* @param {
|
|
6936
|
-
* @param {
|
|
9246
|
+
* @param {EmailTemplateType} type
|
|
9247
|
+
* @param {EmailTemplateLocale} locale
|
|
6937
9248
|
* @throws {AppwriteException}
|
|
6938
9249
|
* @returns {Promise}
|
|
6939
9250
|
*/
|
|
@@ -6961,8 +9272,8 @@ class Projects extends Service {
|
|
|
6961
9272
|
*
|
|
6962
9273
|
*
|
|
6963
9274
|
* @param {string} projectId
|
|
6964
|
-
* @param {
|
|
6965
|
-
* @param {
|
|
9275
|
+
* @param {SMSTemplateType} type
|
|
9276
|
+
* @param {SMSTemplateLocale} locale
|
|
6966
9277
|
* @throws {AppwriteException}
|
|
6967
9278
|
* @returns {Promise}
|
|
6968
9279
|
*/
|
|
@@ -6990,8 +9301,8 @@ class Projects extends Service {
|
|
|
6990
9301
|
*
|
|
6991
9302
|
*
|
|
6992
9303
|
* @param {string} projectId
|
|
6993
|
-
* @param {
|
|
6994
|
-
* @param {
|
|
9304
|
+
* @param {SMSTemplateType} type
|
|
9305
|
+
* @param {SMSTemplateLocale} locale
|
|
6995
9306
|
* @param {string} message
|
|
6996
9307
|
* @throws {AppwriteException}
|
|
6997
9308
|
* @returns {Promise}
|
|
@@ -7026,8 +9337,8 @@ class Projects extends Service {
|
|
|
7026
9337
|
*
|
|
7027
9338
|
*
|
|
7028
9339
|
* @param {string} projectId
|
|
7029
|
-
* @param {
|
|
7030
|
-
* @param {
|
|
9340
|
+
* @param {SMSTemplateType} type
|
|
9341
|
+
* @param {SMSTemplateLocale} locale
|
|
7031
9342
|
* @throws {AppwriteException}
|
|
7032
9343
|
* @returns {Promise}
|
|
7033
9344
|
*/
|
|
@@ -7080,12 +9391,13 @@ class Projects extends Service {
|
|
|
7080
9391
|
* @param {string[]} events
|
|
7081
9392
|
* @param {string} url
|
|
7082
9393
|
* @param {boolean} security
|
|
9394
|
+
* @param {boolean} enabled
|
|
7083
9395
|
* @param {string} httpUser
|
|
7084
9396
|
* @param {string} httpPass
|
|
7085
9397
|
* @throws {AppwriteException}
|
|
7086
9398
|
* @returns {Promise}
|
|
7087
9399
|
*/
|
|
7088
|
-
createWebhook(projectId, name, events, url, security, httpUser, httpPass) {
|
|
9400
|
+
createWebhook(projectId, name, events, url, security, enabled, httpUser, httpPass) {
|
|
7089
9401
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7090
9402
|
if (typeof projectId === 'undefined') {
|
|
7091
9403
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
@@ -7107,6 +9419,9 @@ class Projects extends Service {
|
|
|
7107
9419
|
if (typeof name !== 'undefined') {
|
|
7108
9420
|
payload['name'] = name;
|
|
7109
9421
|
}
|
|
9422
|
+
if (typeof enabled !== 'undefined') {
|
|
9423
|
+
payload['enabled'] = enabled;
|
|
9424
|
+
}
|
|
7110
9425
|
if (typeof events !== 'undefined') {
|
|
7111
9426
|
payload['events'] = events;
|
|
7112
9427
|
}
|
|
@@ -7163,12 +9478,13 @@ class Projects extends Service {
|
|
|
7163
9478
|
* @param {string[]} events
|
|
7164
9479
|
* @param {string} url
|
|
7165
9480
|
* @param {boolean} security
|
|
9481
|
+
* @param {boolean} enabled
|
|
7166
9482
|
* @param {string} httpUser
|
|
7167
9483
|
* @param {string} httpPass
|
|
7168
9484
|
* @throws {AppwriteException}
|
|
7169
9485
|
* @returns {Promise}
|
|
7170
9486
|
*/
|
|
7171
|
-
updateWebhook(projectId, webhookId, name, events, url, security, httpUser, httpPass) {
|
|
9487
|
+
updateWebhook(projectId, webhookId, name, events, url, security, enabled, httpUser, httpPass) {
|
|
7172
9488
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7173
9489
|
if (typeof projectId === 'undefined') {
|
|
7174
9490
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
@@ -7193,6 +9509,9 @@ class Projects extends Service {
|
|
|
7193
9509
|
if (typeof name !== 'undefined') {
|
|
7194
9510
|
payload['name'] = name;
|
|
7195
9511
|
}
|
|
9512
|
+
if (typeof enabled !== 'undefined') {
|
|
9513
|
+
payload['enabled'] = enabled;
|
|
9514
|
+
}
|
|
7196
9515
|
if (typeof events !== 'undefined') {
|
|
7197
9516
|
payload['events'] = events;
|
|
7198
9517
|
}
|
|
@@ -7303,7 +9622,7 @@ class Proxy extends Service {
|
|
|
7303
9622
|
* Create a new proxy rule.
|
|
7304
9623
|
*
|
|
7305
9624
|
* @param {string} domain
|
|
7306
|
-
* @param {
|
|
9625
|
+
* @param {ResourceType} resourceType
|
|
7307
9626
|
* @param {string} resourceId
|
|
7308
9627
|
* @throws {AppwriteException}
|
|
7309
9628
|
* @returns {Promise}
|
|
@@ -7443,7 +9762,7 @@ class Storage extends Service {
|
|
|
7443
9762
|
* @param {boolean} enabled
|
|
7444
9763
|
* @param {number} maximumFileSize
|
|
7445
9764
|
* @param {string[]} allowedFileExtensions
|
|
7446
|
-
* @param {
|
|
9765
|
+
* @param {Compression} compression
|
|
7447
9766
|
* @param {boolean} encryption
|
|
7448
9767
|
* @param {boolean} antivirus
|
|
7449
9768
|
* @throws {AppwriteException}
|
|
@@ -7530,7 +9849,7 @@ class Storage extends Service {
|
|
|
7530
9849
|
* @param {boolean} enabled
|
|
7531
9850
|
* @param {number} maximumFileSize
|
|
7532
9851
|
* @param {string[]} allowedFileExtensions
|
|
7533
|
-
* @param {
|
|
9852
|
+
* @param {Compression} compression
|
|
7534
9853
|
* @param {boolean} encryption
|
|
7535
9854
|
* @param {boolean} antivirus
|
|
7536
9855
|
* @throws {AppwriteException}
|
|
@@ -7859,7 +10178,7 @@ class Storage extends Service {
|
|
|
7859
10178
|
* @param {string} fileId
|
|
7860
10179
|
* @param {number} width
|
|
7861
10180
|
* @param {number} height
|
|
7862
|
-
* @param {
|
|
10181
|
+
* @param {ImageGravity} gravity
|
|
7863
10182
|
* @param {number} quality
|
|
7864
10183
|
* @param {number} borderWidth
|
|
7865
10184
|
* @param {string} borderColor
|
|
@@ -7867,7 +10186,7 @@ class Storage extends Service {
|
|
|
7867
10186
|
* @param {number} opacity
|
|
7868
10187
|
* @param {number} rotation
|
|
7869
10188
|
* @param {string} background
|
|
7870
|
-
* @param {
|
|
10189
|
+
* @param {ImageFormat} output
|
|
7871
10190
|
* @throws {AppwriteException}
|
|
7872
10191
|
* @returns {URL}
|
|
7873
10192
|
*/
|
|
@@ -7952,7 +10271,7 @@ class Storage extends Service {
|
|
|
7952
10271
|
* Get usage stats for storage
|
|
7953
10272
|
*
|
|
7954
10273
|
*
|
|
7955
|
-
* @param {
|
|
10274
|
+
* @param {StorageUsageRange} range
|
|
7956
10275
|
* @throws {AppwriteException}
|
|
7957
10276
|
* @returns {Promise}
|
|
7958
10277
|
*/
|
|
@@ -7974,7 +10293,7 @@ class Storage extends Service {
|
|
|
7974
10293
|
*
|
|
7975
10294
|
*
|
|
7976
10295
|
* @param {string} bucketId
|
|
7977
|
-
* @param {
|
|
10296
|
+
* @param {StorageUsageRange} range
|
|
7978
10297
|
* @throws {AppwriteException}
|
|
7979
10298
|
* @returns {Promise}
|
|
7980
10299
|
*/
|
|
@@ -8628,7 +10947,7 @@ class Users extends Service {
|
|
|
8628
10947
|
*
|
|
8629
10948
|
* Get identities for all users.
|
|
8630
10949
|
*
|
|
8631
|
-
* @param {string} queries
|
|
10950
|
+
* @param {string[]} queries
|
|
8632
10951
|
* @param {string} search
|
|
8633
10952
|
* @throws {AppwriteException}
|
|
8634
10953
|
* @returns {Promise}
|
|
@@ -8650,7 +10969,7 @@ class Users extends Service {
|
|
|
8650
10969
|
});
|
|
8651
10970
|
}
|
|
8652
10971
|
/**
|
|
8653
|
-
* Delete
|
|
10972
|
+
* Delete identity
|
|
8654
10973
|
*
|
|
8655
10974
|
* Delete an identity by its unique ID.
|
|
8656
10975
|
*
|
|
@@ -8923,7 +11242,7 @@ class Users extends Service {
|
|
|
8923
11242
|
* @param {string} userId
|
|
8924
11243
|
* @param {string} email
|
|
8925
11244
|
* @param {string} password
|
|
8926
|
-
* @param {
|
|
11245
|
+
* @param {PasswordHash} passwordVersion
|
|
8927
11246
|
* @param {string} name
|
|
8928
11247
|
* @throws {AppwriteException}
|
|
8929
11248
|
* @returns {Promise}
|
|
@@ -8966,7 +11285,7 @@ class Users extends Service {
|
|
|
8966
11285
|
* Get usage stats for the users API
|
|
8967
11286
|
*
|
|
8968
11287
|
*
|
|
8969
|
-
* @param {
|
|
11288
|
+
* @param {UserUsageRange} range
|
|
8970
11289
|
* @throws {AppwriteException}
|
|
8971
11290
|
* @returns {Promise}
|
|
8972
11291
|
*/
|
|
@@ -9143,6 +11462,87 @@ class Users extends Service {
|
|
|
9143
11462
|
}, payload);
|
|
9144
11463
|
});
|
|
9145
11464
|
}
|
|
11465
|
+
/**
|
|
11466
|
+
* Update MFA
|
|
11467
|
+
*
|
|
11468
|
+
*
|
|
11469
|
+
* @param {string} userId
|
|
11470
|
+
* @param {boolean} mfa
|
|
11471
|
+
* @throws {AppwriteException}
|
|
11472
|
+
* @returns {Promise}
|
|
11473
|
+
*/
|
|
11474
|
+
updateMfa(userId, mfa) {
|
|
11475
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11476
|
+
if (typeof userId === 'undefined') {
|
|
11477
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11478
|
+
}
|
|
11479
|
+
if (typeof mfa === 'undefined') {
|
|
11480
|
+
throw new AppwriteException('Missing required parameter: "mfa"');
|
|
11481
|
+
}
|
|
11482
|
+
const apiPath = '/users/{userId}/mfa'.replace('{userId}', userId);
|
|
11483
|
+
const payload = {};
|
|
11484
|
+
if (typeof mfa !== 'undefined') {
|
|
11485
|
+
payload['mfa'] = mfa;
|
|
11486
|
+
}
|
|
11487
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11488
|
+
return yield this.client.call('patch', uri, {
|
|
11489
|
+
'content-type': 'application/json',
|
|
11490
|
+
}, payload);
|
|
11491
|
+
});
|
|
11492
|
+
}
|
|
11493
|
+
/**
|
|
11494
|
+
* List Factors
|
|
11495
|
+
*
|
|
11496
|
+
*
|
|
11497
|
+
* @param {string} userId
|
|
11498
|
+
* @throws {AppwriteException}
|
|
11499
|
+
* @returns {Promise}
|
|
11500
|
+
*/
|
|
11501
|
+
listFactors(userId) {
|
|
11502
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11503
|
+
if (typeof userId === 'undefined') {
|
|
11504
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11505
|
+
}
|
|
11506
|
+
const apiPath = '/users/{userId}/mfa/factors'.replace('{userId}', userId);
|
|
11507
|
+
const payload = {};
|
|
11508
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11509
|
+
return yield this.client.call('get', uri, {
|
|
11510
|
+
'content-type': 'application/json',
|
|
11511
|
+
}, payload);
|
|
11512
|
+
});
|
|
11513
|
+
}
|
|
11514
|
+
/**
|
|
11515
|
+
* Delete Authenticator
|
|
11516
|
+
*
|
|
11517
|
+
*
|
|
11518
|
+
* @param {string} userId
|
|
11519
|
+
* @param {Type} type
|
|
11520
|
+
* @param {string} otp
|
|
11521
|
+
* @throws {AppwriteException}
|
|
11522
|
+
* @returns {Promise}
|
|
11523
|
+
*/
|
|
11524
|
+
deleteAuthenticator(userId, type, otp) {
|
|
11525
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11526
|
+
if (typeof userId === 'undefined') {
|
|
11527
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11528
|
+
}
|
|
11529
|
+
if (typeof type === 'undefined') {
|
|
11530
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
11531
|
+
}
|
|
11532
|
+
if (typeof otp === 'undefined') {
|
|
11533
|
+
throw new AppwriteException('Missing required parameter: "otp"');
|
|
11534
|
+
}
|
|
11535
|
+
const apiPath = '/users/{userId}/mfa/{type}'.replace('{userId}', userId).replace('{type}', type);
|
|
11536
|
+
const payload = {};
|
|
11537
|
+
if (typeof otp !== 'undefined') {
|
|
11538
|
+
payload['otp'] = otp;
|
|
11539
|
+
}
|
|
11540
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11541
|
+
return yield this.client.call('delete', uri, {
|
|
11542
|
+
'content-type': 'application/json',
|
|
11543
|
+
}, payload);
|
|
11544
|
+
});
|
|
11545
|
+
}
|
|
9146
11546
|
/**
|
|
9147
11547
|
* Update name
|
|
9148
11548
|
*
|
|
@@ -9305,6 +11705,33 @@ class Users extends Service {
|
|
|
9305
11705
|
}, payload);
|
|
9306
11706
|
});
|
|
9307
11707
|
}
|
|
11708
|
+
/**
|
|
11709
|
+
* Create session
|
|
11710
|
+
*
|
|
11711
|
+
* Creates a session for a user. Returns an immediately usable session object.
|
|
11712
|
+
*
|
|
11713
|
+
* If you want to generate a token for a custom authentication flow, use the
|
|
11714
|
+
* [POST
|
|
11715
|
+
* /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken)
|
|
11716
|
+
* endpoint.
|
|
11717
|
+
*
|
|
11718
|
+
* @param {string} userId
|
|
11719
|
+
* @throws {AppwriteException}
|
|
11720
|
+
* @returns {Promise}
|
|
11721
|
+
*/
|
|
11722
|
+
createSession(userId) {
|
|
11723
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11724
|
+
if (typeof userId === 'undefined') {
|
|
11725
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11726
|
+
}
|
|
11727
|
+
const apiPath = '/users/{userId}/sessions'.replace('{userId}', userId);
|
|
11728
|
+
const payload = {};
|
|
11729
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11730
|
+
return yield this.client.call('post', uri, {
|
|
11731
|
+
'content-type': 'application/json',
|
|
11732
|
+
}, payload);
|
|
11733
|
+
});
|
|
11734
|
+
}
|
|
9308
11735
|
/**
|
|
9309
11736
|
* Delete user sessions
|
|
9310
11737
|
*
|
|
@@ -9383,6 +11810,202 @@ class Users extends Service {
|
|
|
9383
11810
|
}, payload);
|
|
9384
11811
|
});
|
|
9385
11812
|
}
|
|
11813
|
+
/**
|
|
11814
|
+
* List User Targets
|
|
11815
|
+
*
|
|
11816
|
+
*
|
|
11817
|
+
* @param {string} userId
|
|
11818
|
+
* @param {string[]} queries
|
|
11819
|
+
* @throws {AppwriteException}
|
|
11820
|
+
* @returns {Promise}
|
|
11821
|
+
*/
|
|
11822
|
+
listTargets(userId, queries) {
|
|
11823
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11824
|
+
if (typeof userId === 'undefined') {
|
|
11825
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11826
|
+
}
|
|
11827
|
+
const apiPath = '/users/{userId}/targets'.replace('{userId}', userId);
|
|
11828
|
+
const payload = {};
|
|
11829
|
+
if (typeof queries !== 'undefined') {
|
|
11830
|
+
payload['queries'] = queries;
|
|
11831
|
+
}
|
|
11832
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11833
|
+
return yield this.client.call('get', uri, {
|
|
11834
|
+
'content-type': 'application/json',
|
|
11835
|
+
}, payload);
|
|
11836
|
+
});
|
|
11837
|
+
}
|
|
11838
|
+
/**
|
|
11839
|
+
* Create User Target
|
|
11840
|
+
*
|
|
11841
|
+
*
|
|
11842
|
+
* @param {string} userId
|
|
11843
|
+
* @param {string} targetId
|
|
11844
|
+
* @param {MessagingProviderType} providerType
|
|
11845
|
+
* @param {string} identifier
|
|
11846
|
+
* @param {string} providerId
|
|
11847
|
+
* @param {string} name
|
|
11848
|
+
* @throws {AppwriteException}
|
|
11849
|
+
* @returns {Promise}
|
|
11850
|
+
*/
|
|
11851
|
+
createTarget(userId, targetId, providerType, identifier, providerId, name) {
|
|
11852
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11853
|
+
if (typeof userId === 'undefined') {
|
|
11854
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11855
|
+
}
|
|
11856
|
+
if (typeof targetId === 'undefined') {
|
|
11857
|
+
throw new AppwriteException('Missing required parameter: "targetId"');
|
|
11858
|
+
}
|
|
11859
|
+
if (typeof providerType === 'undefined') {
|
|
11860
|
+
throw new AppwriteException('Missing required parameter: "providerType"');
|
|
11861
|
+
}
|
|
11862
|
+
if (typeof identifier === 'undefined') {
|
|
11863
|
+
throw new AppwriteException('Missing required parameter: "identifier"');
|
|
11864
|
+
}
|
|
11865
|
+
const apiPath = '/users/{userId}/targets'.replace('{userId}', userId);
|
|
11866
|
+
const payload = {};
|
|
11867
|
+
if (typeof targetId !== 'undefined') {
|
|
11868
|
+
payload['targetId'] = targetId;
|
|
11869
|
+
}
|
|
11870
|
+
if (typeof providerType !== 'undefined') {
|
|
11871
|
+
payload['providerType'] = providerType;
|
|
11872
|
+
}
|
|
11873
|
+
if (typeof identifier !== 'undefined') {
|
|
11874
|
+
payload['identifier'] = identifier;
|
|
11875
|
+
}
|
|
11876
|
+
if (typeof providerId !== 'undefined') {
|
|
11877
|
+
payload['providerId'] = providerId;
|
|
11878
|
+
}
|
|
11879
|
+
if (typeof name !== 'undefined') {
|
|
11880
|
+
payload['name'] = name;
|
|
11881
|
+
}
|
|
11882
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11883
|
+
return yield this.client.call('post', uri, {
|
|
11884
|
+
'content-type': 'application/json',
|
|
11885
|
+
}, payload);
|
|
11886
|
+
});
|
|
11887
|
+
}
|
|
11888
|
+
/**
|
|
11889
|
+
* Get User Target
|
|
11890
|
+
*
|
|
11891
|
+
*
|
|
11892
|
+
* @param {string} userId
|
|
11893
|
+
* @param {string} targetId
|
|
11894
|
+
* @throws {AppwriteException}
|
|
11895
|
+
* @returns {Promise}
|
|
11896
|
+
*/
|
|
11897
|
+
getTarget(userId, targetId) {
|
|
11898
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11899
|
+
if (typeof userId === 'undefined') {
|
|
11900
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11901
|
+
}
|
|
11902
|
+
if (typeof targetId === 'undefined') {
|
|
11903
|
+
throw new AppwriteException('Missing required parameter: "targetId"');
|
|
11904
|
+
}
|
|
11905
|
+
const apiPath = '/users/{userId}/targets/{targetId}'.replace('{userId}', userId).replace('{targetId}', targetId);
|
|
11906
|
+
const payload = {};
|
|
11907
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11908
|
+
return yield this.client.call('get', uri, {
|
|
11909
|
+
'content-type': 'application/json',
|
|
11910
|
+
}, payload);
|
|
11911
|
+
});
|
|
11912
|
+
}
|
|
11913
|
+
/**
|
|
11914
|
+
* Update User target
|
|
11915
|
+
*
|
|
11916
|
+
*
|
|
11917
|
+
* @param {string} userId
|
|
11918
|
+
* @param {string} targetId
|
|
11919
|
+
* @param {string} identifier
|
|
11920
|
+
* @param {string} providerId
|
|
11921
|
+
* @param {string} name
|
|
11922
|
+
* @throws {AppwriteException}
|
|
11923
|
+
* @returns {Promise}
|
|
11924
|
+
*/
|
|
11925
|
+
updateTarget(userId, targetId, identifier, providerId, name) {
|
|
11926
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11927
|
+
if (typeof userId === 'undefined') {
|
|
11928
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11929
|
+
}
|
|
11930
|
+
if (typeof targetId === 'undefined') {
|
|
11931
|
+
throw new AppwriteException('Missing required parameter: "targetId"');
|
|
11932
|
+
}
|
|
11933
|
+
const apiPath = '/users/{userId}/targets/{targetId}'.replace('{userId}', userId).replace('{targetId}', targetId);
|
|
11934
|
+
const payload = {};
|
|
11935
|
+
if (typeof identifier !== 'undefined') {
|
|
11936
|
+
payload['identifier'] = identifier;
|
|
11937
|
+
}
|
|
11938
|
+
if (typeof providerId !== 'undefined') {
|
|
11939
|
+
payload['providerId'] = providerId;
|
|
11940
|
+
}
|
|
11941
|
+
if (typeof name !== 'undefined') {
|
|
11942
|
+
payload['name'] = name;
|
|
11943
|
+
}
|
|
11944
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11945
|
+
return yield this.client.call('patch', uri, {
|
|
11946
|
+
'content-type': 'application/json',
|
|
11947
|
+
}, payload);
|
|
11948
|
+
});
|
|
11949
|
+
}
|
|
11950
|
+
/**
|
|
11951
|
+
* Delete user target
|
|
11952
|
+
*
|
|
11953
|
+
*
|
|
11954
|
+
* @param {string} userId
|
|
11955
|
+
* @param {string} targetId
|
|
11956
|
+
* @throws {AppwriteException}
|
|
11957
|
+
* @returns {Promise}
|
|
11958
|
+
*/
|
|
11959
|
+
deleteTarget(userId, targetId) {
|
|
11960
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11961
|
+
if (typeof userId === 'undefined') {
|
|
11962
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11963
|
+
}
|
|
11964
|
+
if (typeof targetId === 'undefined') {
|
|
11965
|
+
throw new AppwriteException('Missing required parameter: "targetId"');
|
|
11966
|
+
}
|
|
11967
|
+
const apiPath = '/users/{userId}/targets/{targetId}'.replace('{userId}', userId).replace('{targetId}', targetId);
|
|
11968
|
+
const payload = {};
|
|
11969
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11970
|
+
return yield this.client.call('delete', uri, {
|
|
11971
|
+
'content-type': 'application/json',
|
|
11972
|
+
}, payload);
|
|
11973
|
+
});
|
|
11974
|
+
}
|
|
11975
|
+
/**
|
|
11976
|
+
* Create token
|
|
11977
|
+
*
|
|
11978
|
+
* Returns a token with a secret key for creating a session. If the provided
|
|
11979
|
+
* user ID has not be registered, a new user will be created. Use the returned
|
|
11980
|
+
* user ID and secret and submit a request to the [PUT
|
|
11981
|
+
* /account/sessions/custom](https://appwrite.io/docs/references/cloud/client-web/account#updateCustomSession)
|
|
11982
|
+
* endpoint to complete the login process.
|
|
11983
|
+
*
|
|
11984
|
+
* @param {string} userId
|
|
11985
|
+
* @param {number} length
|
|
11986
|
+
* @param {number} expire
|
|
11987
|
+
* @throws {AppwriteException}
|
|
11988
|
+
* @returns {Promise}
|
|
11989
|
+
*/
|
|
11990
|
+
createToken(userId, length, expire) {
|
|
11991
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11992
|
+
if (typeof userId === 'undefined') {
|
|
11993
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
11994
|
+
}
|
|
11995
|
+
const apiPath = '/users/{userId}/tokens'.replace('{userId}', userId);
|
|
11996
|
+
const payload = {};
|
|
11997
|
+
if (typeof length !== 'undefined') {
|
|
11998
|
+
payload['length'] = length;
|
|
11999
|
+
}
|
|
12000
|
+
if (typeof expire !== 'undefined') {
|
|
12001
|
+
payload['expire'] = expire;
|
|
12002
|
+
}
|
|
12003
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12004
|
+
return yield this.client.call('post', uri, {
|
|
12005
|
+
'content-type': 'application/json',
|
|
12006
|
+
}, payload);
|
|
12007
|
+
});
|
|
12008
|
+
}
|
|
9386
12009
|
/**
|
|
9387
12010
|
* Update email verification
|
|
9388
12011
|
*
|
|
@@ -9808,6 +12431,797 @@ class ID {
|
|
|
9808
12431
|
}
|
|
9809
12432
|
}
|
|
9810
12433
|
|
|
12434
|
+
exports.Factor = void 0;
|
|
12435
|
+
(function (Factor) {
|
|
12436
|
+
Factor["Totp"] = "totp";
|
|
12437
|
+
Factor["Phone"] = "phone";
|
|
12438
|
+
Factor["Email"] = "email";
|
|
12439
|
+
})(exports.Factor || (exports.Factor = {}));
|
|
12440
|
+
|
|
12441
|
+
exports.Type = void 0;
|
|
12442
|
+
(function (Type) {
|
|
12443
|
+
Type["Totp"] = "totp";
|
|
12444
|
+
})(exports.Type || (exports.Type = {}));
|
|
12445
|
+
|
|
12446
|
+
exports.OAuthProvider = void 0;
|
|
12447
|
+
(function (OAuthProvider) {
|
|
12448
|
+
OAuthProvider["Amazon"] = "amazon";
|
|
12449
|
+
OAuthProvider["Apple"] = "apple";
|
|
12450
|
+
OAuthProvider["Auth0"] = "auth0";
|
|
12451
|
+
OAuthProvider["Authentik"] = "authentik";
|
|
12452
|
+
OAuthProvider["Autodesk"] = "autodesk";
|
|
12453
|
+
OAuthProvider["Bitbucket"] = "bitbucket";
|
|
12454
|
+
OAuthProvider["Bitly"] = "bitly";
|
|
12455
|
+
OAuthProvider["Box"] = "box";
|
|
12456
|
+
OAuthProvider["Dailymotion"] = "dailymotion";
|
|
12457
|
+
OAuthProvider["Discord"] = "discord";
|
|
12458
|
+
OAuthProvider["Disqus"] = "disqus";
|
|
12459
|
+
OAuthProvider["Dropbox"] = "dropbox";
|
|
12460
|
+
OAuthProvider["Etsy"] = "etsy";
|
|
12461
|
+
OAuthProvider["Facebook"] = "facebook";
|
|
12462
|
+
OAuthProvider["Github"] = "github";
|
|
12463
|
+
OAuthProvider["Gitlab"] = "gitlab";
|
|
12464
|
+
OAuthProvider["Google"] = "google";
|
|
12465
|
+
OAuthProvider["Linkedin"] = "linkedin";
|
|
12466
|
+
OAuthProvider["Microsoft"] = "microsoft";
|
|
12467
|
+
OAuthProvider["Notion"] = "notion";
|
|
12468
|
+
OAuthProvider["Oidc"] = "oidc";
|
|
12469
|
+
OAuthProvider["Okta"] = "okta";
|
|
12470
|
+
OAuthProvider["Paypal"] = "paypal";
|
|
12471
|
+
OAuthProvider["PaypalSandbox"] = "paypalSandbox";
|
|
12472
|
+
OAuthProvider["Podio"] = "podio";
|
|
12473
|
+
OAuthProvider["Salesforce"] = "salesforce";
|
|
12474
|
+
OAuthProvider["Slack"] = "slack";
|
|
12475
|
+
OAuthProvider["Spotify"] = "spotify";
|
|
12476
|
+
OAuthProvider["Stripe"] = "stripe";
|
|
12477
|
+
OAuthProvider["Tradeshift"] = "tradeshift";
|
|
12478
|
+
OAuthProvider["TradeshiftBox"] = "tradeshiftBox";
|
|
12479
|
+
OAuthProvider["Twitch"] = "twitch";
|
|
12480
|
+
OAuthProvider["Wordpress"] = "wordpress";
|
|
12481
|
+
OAuthProvider["Yahoo"] = "yahoo";
|
|
12482
|
+
OAuthProvider["Yammer"] = "yammer";
|
|
12483
|
+
OAuthProvider["Yandex"] = "yandex";
|
|
12484
|
+
OAuthProvider["Zoho"] = "zoho";
|
|
12485
|
+
OAuthProvider["Zoom"] = "zoom";
|
|
12486
|
+
OAuthProvider["Mock"] = "mock";
|
|
12487
|
+
})(exports.OAuthProvider || (exports.OAuthProvider = {}));
|
|
12488
|
+
|
|
12489
|
+
exports.Browser = void 0;
|
|
12490
|
+
(function (Browser) {
|
|
12491
|
+
Browser["AvantBrowser"] = "aa";
|
|
12492
|
+
Browser["AndroidWebViewBeta"] = "an";
|
|
12493
|
+
Browser["GoogleChrome"] = "ch";
|
|
12494
|
+
Browser["GoogleChromeIOS"] = "ci";
|
|
12495
|
+
Browser["GoogleChromeMobile"] = "cm";
|
|
12496
|
+
Browser["Chromium"] = "cr";
|
|
12497
|
+
Browser["MozillaFirefox"] = "ff";
|
|
12498
|
+
Browser["Safari"] = "sf";
|
|
12499
|
+
Browser["MobileSafari"] = "mf";
|
|
12500
|
+
Browser["MicrosoftEdge"] = "ps";
|
|
12501
|
+
Browser["MicrosoftEdgeIOS"] = "oi";
|
|
12502
|
+
Browser["OperaMini"] = "om";
|
|
12503
|
+
Browser["Opera"] = "op";
|
|
12504
|
+
Browser["OperaNext"] = "on";
|
|
12505
|
+
})(exports.Browser || (exports.Browser = {}));
|
|
12506
|
+
|
|
12507
|
+
exports.CreditCard = void 0;
|
|
12508
|
+
(function (CreditCard) {
|
|
12509
|
+
CreditCard["AmericanExpress"] = "amex";
|
|
12510
|
+
CreditCard["Argencard"] = "argencard";
|
|
12511
|
+
CreditCard["Cabal"] = "cabal";
|
|
12512
|
+
CreditCard["Consosud"] = "censosud";
|
|
12513
|
+
CreditCard["DinersClub"] = "diners";
|
|
12514
|
+
CreditCard["Discover"] = "discover";
|
|
12515
|
+
CreditCard["Elo"] = "elo";
|
|
12516
|
+
CreditCard["Hipercard"] = "hipercard";
|
|
12517
|
+
CreditCard["JCB"] = "jcb";
|
|
12518
|
+
CreditCard["Mastercard"] = "mastercard";
|
|
12519
|
+
CreditCard["Naranja"] = "naranja";
|
|
12520
|
+
CreditCard["TarjetaShopping"] = "targeta-shopping";
|
|
12521
|
+
CreditCard["UnionChinaPay"] = "union-china-pay";
|
|
12522
|
+
CreditCard["Visa"] = "visa";
|
|
12523
|
+
CreditCard["MIR"] = "mir";
|
|
12524
|
+
CreditCard["Maestro"] = "maestro";
|
|
12525
|
+
})(exports.CreditCard || (exports.CreditCard = {}));
|
|
12526
|
+
|
|
12527
|
+
exports.Flag = void 0;
|
|
12528
|
+
(function (Flag) {
|
|
12529
|
+
Flag["Afghanistan"] = "af";
|
|
12530
|
+
Flag["Angola"] = "ao";
|
|
12531
|
+
Flag["Albania"] = "al";
|
|
12532
|
+
Flag["Andorra"] = "ad";
|
|
12533
|
+
Flag["UnitedArabEmirates"] = "ae";
|
|
12534
|
+
Flag["Argentina"] = "ar";
|
|
12535
|
+
Flag["Armenia"] = "am";
|
|
12536
|
+
Flag["AntiguaAndBarbuda"] = "ag";
|
|
12537
|
+
Flag["Australia"] = "au";
|
|
12538
|
+
Flag["Austria"] = "at";
|
|
12539
|
+
Flag["Azerbaijan"] = "az";
|
|
12540
|
+
Flag["Burundi"] = "bi";
|
|
12541
|
+
Flag["Belgium"] = "be";
|
|
12542
|
+
Flag["Benin"] = "bj";
|
|
12543
|
+
Flag["BurkinaFaso"] = "bf";
|
|
12544
|
+
Flag["Bangladesh"] = "bd";
|
|
12545
|
+
Flag["Bulgaria"] = "bg";
|
|
12546
|
+
Flag["Bahrain"] = "bh";
|
|
12547
|
+
Flag["Bahamas"] = "bs";
|
|
12548
|
+
Flag["BosniaAndHerzegovina"] = "ba";
|
|
12549
|
+
Flag["Belarus"] = "by";
|
|
12550
|
+
Flag["Belize"] = "bz";
|
|
12551
|
+
Flag["Bolivia"] = "bo";
|
|
12552
|
+
Flag["Brazil"] = "br";
|
|
12553
|
+
Flag["Barbados"] = "bb";
|
|
12554
|
+
Flag["BruneiDarussalam"] = "bn";
|
|
12555
|
+
Flag["Bhutan"] = "bt";
|
|
12556
|
+
Flag["Botswana"] = "bw";
|
|
12557
|
+
Flag["CentralAfricanRepublic"] = "cf";
|
|
12558
|
+
Flag["Canada"] = "ca";
|
|
12559
|
+
Flag["Switzerland"] = "ch";
|
|
12560
|
+
Flag["Chile"] = "cl";
|
|
12561
|
+
Flag["China"] = "cn";
|
|
12562
|
+
Flag["CTeDIvoire"] = "ci";
|
|
12563
|
+
Flag["Cameroon"] = "cm";
|
|
12564
|
+
Flag["DemocraticRepublicOfTheCongo"] = "cd";
|
|
12565
|
+
Flag["RepublicOfTheCongo"] = "cg";
|
|
12566
|
+
Flag["Colombia"] = "co";
|
|
12567
|
+
Flag["Comoros"] = "km";
|
|
12568
|
+
Flag["CapeVerde"] = "cv";
|
|
12569
|
+
Flag["CostaRica"] = "cr";
|
|
12570
|
+
Flag["Cuba"] = "cu";
|
|
12571
|
+
Flag["Cyprus"] = "cy";
|
|
12572
|
+
Flag["CzechRepublic"] = "cz";
|
|
12573
|
+
Flag["Germany"] = "de";
|
|
12574
|
+
Flag["Djibouti"] = "dj";
|
|
12575
|
+
Flag["Dominica"] = "dm";
|
|
12576
|
+
Flag["Denmark"] = "dk";
|
|
12577
|
+
Flag["DominicanRepublic"] = "do";
|
|
12578
|
+
Flag["Algeria"] = "dz";
|
|
12579
|
+
Flag["Ecuador"] = "ec";
|
|
12580
|
+
Flag["Egypt"] = "eg";
|
|
12581
|
+
Flag["Eritrea"] = "er";
|
|
12582
|
+
Flag["Spain"] = "es";
|
|
12583
|
+
Flag["Estonia"] = "ee";
|
|
12584
|
+
Flag["Ethiopia"] = "et";
|
|
12585
|
+
Flag["Finland"] = "fi";
|
|
12586
|
+
Flag["Fiji"] = "fj";
|
|
12587
|
+
Flag["France"] = "fr";
|
|
12588
|
+
Flag["MicronesiaFederatedStatesOf"] = "fm";
|
|
12589
|
+
Flag["Gabon"] = "ga";
|
|
12590
|
+
Flag["UnitedKingdom"] = "gb";
|
|
12591
|
+
Flag["Georgia"] = "ge";
|
|
12592
|
+
Flag["Ghana"] = "gh";
|
|
12593
|
+
Flag["Guinea"] = "gn";
|
|
12594
|
+
Flag["Gambia"] = "gm";
|
|
12595
|
+
Flag["GuineaBissau"] = "gw";
|
|
12596
|
+
Flag["EquatorialGuinea"] = "gq";
|
|
12597
|
+
Flag["Greece"] = "gr";
|
|
12598
|
+
Flag["Grenada"] = "gd";
|
|
12599
|
+
Flag["Guatemala"] = "gt";
|
|
12600
|
+
Flag["Guyana"] = "gy";
|
|
12601
|
+
Flag["Honduras"] = "hn";
|
|
12602
|
+
Flag["Croatia"] = "hr";
|
|
12603
|
+
Flag["Haiti"] = "ht";
|
|
12604
|
+
Flag["Hungary"] = "hu";
|
|
12605
|
+
Flag["Indonesia"] = "id";
|
|
12606
|
+
Flag["India"] = "in";
|
|
12607
|
+
Flag["Ireland"] = "ie";
|
|
12608
|
+
Flag["IranIslamicRepublicOf"] = "ir";
|
|
12609
|
+
Flag["Iraq"] = "iq";
|
|
12610
|
+
Flag["Iceland"] = "is";
|
|
12611
|
+
Flag["Israel"] = "il";
|
|
12612
|
+
Flag["Italy"] = "it";
|
|
12613
|
+
Flag["Jamaica"] = "jm";
|
|
12614
|
+
Flag["Jordan"] = "jo";
|
|
12615
|
+
Flag["Japan"] = "jp";
|
|
12616
|
+
Flag["Kazakhstan"] = "kz";
|
|
12617
|
+
Flag["Kenya"] = "ke";
|
|
12618
|
+
Flag["Kyrgyzstan"] = "kg";
|
|
12619
|
+
Flag["Cambodia"] = "kh";
|
|
12620
|
+
Flag["Kiribati"] = "ki";
|
|
12621
|
+
Flag["SaintKittsAndNevis"] = "kn";
|
|
12622
|
+
Flag["SouthKorea"] = "kr";
|
|
12623
|
+
Flag["Kuwait"] = "kw";
|
|
12624
|
+
Flag["LaoPeopleSDemocraticRepublic"] = "la";
|
|
12625
|
+
Flag["Lebanon"] = "lb";
|
|
12626
|
+
Flag["Liberia"] = "lr";
|
|
12627
|
+
Flag["Libya"] = "ly";
|
|
12628
|
+
Flag["SaintLucia"] = "lc";
|
|
12629
|
+
Flag["Liechtenstein"] = "li";
|
|
12630
|
+
Flag["SriLanka"] = "lk";
|
|
12631
|
+
Flag["Lesotho"] = "ls";
|
|
12632
|
+
Flag["Lithuania"] = "lt";
|
|
12633
|
+
Flag["Luxembourg"] = "lu";
|
|
12634
|
+
Flag["Latvia"] = "lv";
|
|
12635
|
+
Flag["Morocco"] = "ma";
|
|
12636
|
+
Flag["Monaco"] = "mc";
|
|
12637
|
+
Flag["Moldova"] = "md";
|
|
12638
|
+
Flag["Madagascar"] = "mg";
|
|
12639
|
+
Flag["Maldives"] = "mv";
|
|
12640
|
+
Flag["Mexico"] = "mx";
|
|
12641
|
+
Flag["MarshallIslands"] = "mh";
|
|
12642
|
+
Flag["NorthMacedonia"] = "mk";
|
|
12643
|
+
Flag["Mali"] = "ml";
|
|
12644
|
+
Flag["Malta"] = "mt";
|
|
12645
|
+
Flag["Myanmar"] = "mm";
|
|
12646
|
+
Flag["Montenegro"] = "me";
|
|
12647
|
+
Flag["Mongolia"] = "mn";
|
|
12648
|
+
Flag["Mozambique"] = "mz";
|
|
12649
|
+
Flag["Mauritania"] = "mr";
|
|
12650
|
+
Flag["Mauritius"] = "mu";
|
|
12651
|
+
Flag["Malawi"] = "mw";
|
|
12652
|
+
Flag["Malaysia"] = "my";
|
|
12653
|
+
Flag["Namibia"] = "na";
|
|
12654
|
+
Flag["Niger"] = "ne";
|
|
12655
|
+
Flag["Nigeria"] = "ng";
|
|
12656
|
+
Flag["Nicaragua"] = "ni";
|
|
12657
|
+
Flag["Netherlands"] = "nl";
|
|
12658
|
+
Flag["Norway"] = "no";
|
|
12659
|
+
Flag["Nepal"] = "np";
|
|
12660
|
+
Flag["Nauru"] = "nr";
|
|
12661
|
+
Flag["NewZealand"] = "nz";
|
|
12662
|
+
Flag["Oman"] = "om";
|
|
12663
|
+
Flag["Pakistan"] = "pk";
|
|
12664
|
+
Flag["Panama"] = "pa";
|
|
12665
|
+
Flag["Peru"] = "pe";
|
|
12666
|
+
Flag["Philippines"] = "ph";
|
|
12667
|
+
Flag["Palau"] = "pw";
|
|
12668
|
+
Flag["PapuaNewGuinea"] = "pg";
|
|
12669
|
+
Flag["Poland"] = "pl";
|
|
12670
|
+
Flag["NorthKorea"] = "kp";
|
|
12671
|
+
Flag["Portugal"] = "pt";
|
|
12672
|
+
Flag["Paraguay"] = "py";
|
|
12673
|
+
Flag["Qatar"] = "qa";
|
|
12674
|
+
Flag["Romania"] = "ro";
|
|
12675
|
+
Flag["Russia"] = "ru";
|
|
12676
|
+
Flag["Rwanda"] = "rw";
|
|
12677
|
+
Flag["SaudiArabia"] = "sa";
|
|
12678
|
+
Flag["Sudan"] = "sd";
|
|
12679
|
+
Flag["Senegal"] = "sn";
|
|
12680
|
+
Flag["Singapore"] = "sg";
|
|
12681
|
+
Flag["SolomonIslands"] = "sb";
|
|
12682
|
+
Flag["SierraLeone"] = "sl";
|
|
12683
|
+
Flag["ElSalvador"] = "sv";
|
|
12684
|
+
Flag["SanMarino"] = "sm";
|
|
12685
|
+
Flag["Somalia"] = "so";
|
|
12686
|
+
Flag["Serbia"] = "rs";
|
|
12687
|
+
Flag["SouthSudan"] = "ss";
|
|
12688
|
+
Flag["SaoTomeAndPrincipe"] = "st";
|
|
12689
|
+
Flag["Suriname"] = "sr";
|
|
12690
|
+
Flag["Slovakia"] = "sk";
|
|
12691
|
+
Flag["Slovenia"] = "si";
|
|
12692
|
+
Flag["Sweden"] = "se";
|
|
12693
|
+
Flag["Eswatini"] = "sz";
|
|
12694
|
+
Flag["Seychelles"] = "sc";
|
|
12695
|
+
Flag["Syria"] = "sy";
|
|
12696
|
+
Flag["Chad"] = "td";
|
|
12697
|
+
Flag["Togo"] = "tg";
|
|
12698
|
+
Flag["Thailand"] = "th";
|
|
12699
|
+
Flag["Tajikistan"] = "tj";
|
|
12700
|
+
Flag["Turkmenistan"] = "tm";
|
|
12701
|
+
Flag["TimorLeste"] = "tl";
|
|
12702
|
+
Flag["Tonga"] = "to";
|
|
12703
|
+
Flag["TrinidadAndTobago"] = "tt";
|
|
12704
|
+
Flag["Tunisia"] = "tn";
|
|
12705
|
+
Flag["Turkey"] = "tr";
|
|
12706
|
+
Flag["Tuvalu"] = "tv";
|
|
12707
|
+
Flag["Tanzania"] = "tz";
|
|
12708
|
+
Flag["Uganda"] = "ug";
|
|
12709
|
+
Flag["Ukraine"] = "ua";
|
|
12710
|
+
Flag["Uruguay"] = "uy";
|
|
12711
|
+
Flag["UnitedStates"] = "us";
|
|
12712
|
+
Flag["Uzbekistan"] = "uz";
|
|
12713
|
+
Flag["VaticanCity"] = "va";
|
|
12714
|
+
Flag["SaintVincentAndTheGrenadines"] = "vc";
|
|
12715
|
+
Flag["Venezuela"] = "ve";
|
|
12716
|
+
Flag["Vietnam"] = "vn";
|
|
12717
|
+
Flag["Vanuatu"] = "vu";
|
|
12718
|
+
Flag["Samoa"] = "ws";
|
|
12719
|
+
Flag["Yemen"] = "ye";
|
|
12720
|
+
Flag["SouthAfrica"] = "za";
|
|
12721
|
+
Flag["Zambia"] = "zm";
|
|
12722
|
+
Flag["Zimbabwe"] = "zw";
|
|
12723
|
+
})(exports.Flag || (exports.Flag = {}));
|
|
12724
|
+
|
|
12725
|
+
exports.DatabaseUsageRange = void 0;
|
|
12726
|
+
(function (DatabaseUsageRange) {
|
|
12727
|
+
DatabaseUsageRange["TwentyFourHours"] = "24h";
|
|
12728
|
+
DatabaseUsageRange["ThirtyDays"] = "30d";
|
|
12729
|
+
DatabaseUsageRange["NinetyDays"] = "90d";
|
|
12730
|
+
})(exports.DatabaseUsageRange || (exports.DatabaseUsageRange = {}));
|
|
12731
|
+
|
|
12732
|
+
exports.RelationshipType = void 0;
|
|
12733
|
+
(function (RelationshipType) {
|
|
12734
|
+
RelationshipType["OneToOne"] = "oneToOne";
|
|
12735
|
+
RelationshipType["ManyToOne"] = "manyToOne";
|
|
12736
|
+
RelationshipType["ManyToMany"] = "manyToMany";
|
|
12737
|
+
RelationshipType["OneToMany"] = "oneToMany";
|
|
12738
|
+
})(exports.RelationshipType || (exports.RelationshipType = {}));
|
|
12739
|
+
|
|
12740
|
+
exports.RelationMutate = void 0;
|
|
12741
|
+
(function (RelationMutate) {
|
|
12742
|
+
RelationMutate["Cascade"] = "cascade";
|
|
12743
|
+
RelationMutate["Restrict"] = "restrict";
|
|
12744
|
+
RelationMutate["SetNull"] = "setNull";
|
|
12745
|
+
})(exports.RelationMutate || (exports.RelationMutate = {}));
|
|
12746
|
+
|
|
12747
|
+
exports.IndexType = void 0;
|
|
12748
|
+
(function (IndexType) {
|
|
12749
|
+
IndexType["Key"] = "key";
|
|
12750
|
+
IndexType["Fulltext"] = "fulltext";
|
|
12751
|
+
IndexType["Unique"] = "unique";
|
|
12752
|
+
IndexType["Spatial"] = "spatial";
|
|
12753
|
+
})(exports.IndexType || (exports.IndexType = {}));
|
|
12754
|
+
|
|
12755
|
+
exports.Runtime = void 0;
|
|
12756
|
+
(function (Runtime) {
|
|
12757
|
+
Runtime["Node180"] = "node-18.0";
|
|
12758
|
+
Runtime["Php80"] = "php-8.0";
|
|
12759
|
+
Runtime["Ruby31"] = "ruby-3.1";
|
|
12760
|
+
Runtime["Python39"] = "python-3.9";
|
|
12761
|
+
})(exports.Runtime || (exports.Runtime = {}));
|
|
12762
|
+
|
|
12763
|
+
exports.FunctionUsageRange = void 0;
|
|
12764
|
+
(function (FunctionUsageRange) {
|
|
12765
|
+
FunctionUsageRange["TwentyFourHours"] = "24h";
|
|
12766
|
+
FunctionUsageRange["ThirtyDays"] = "30d";
|
|
12767
|
+
FunctionUsageRange["NinetyDays"] = "90d";
|
|
12768
|
+
})(exports.FunctionUsageRange || (exports.FunctionUsageRange = {}));
|
|
12769
|
+
|
|
12770
|
+
exports.ExecutionMethod = void 0;
|
|
12771
|
+
(function (ExecutionMethod) {
|
|
12772
|
+
ExecutionMethod["GET"] = "GET";
|
|
12773
|
+
ExecutionMethod["POST"] = "POST";
|
|
12774
|
+
ExecutionMethod["PUT"] = "PUT";
|
|
12775
|
+
ExecutionMethod["PATCH"] = "PATCH";
|
|
12776
|
+
ExecutionMethod["DELETE"] = "DELETE";
|
|
12777
|
+
ExecutionMethod["OPTIONS"] = "OPTIONS";
|
|
12778
|
+
})(exports.ExecutionMethod || (exports.ExecutionMethod = {}));
|
|
12779
|
+
|
|
12780
|
+
exports.Name = void 0;
|
|
12781
|
+
(function (Name) {
|
|
12782
|
+
Name["V1database"] = "v1-database";
|
|
12783
|
+
Name["V1deletes"] = "v1-deletes";
|
|
12784
|
+
Name["V1audits"] = "v1-audits";
|
|
12785
|
+
Name["V1mails"] = "v1-mails";
|
|
12786
|
+
Name["V1functions"] = "v1-functions";
|
|
12787
|
+
Name["V1usage"] = "v1-usage";
|
|
12788
|
+
Name["Webhooksv1"] = "webhooksv1";
|
|
12789
|
+
Name["V1certificates"] = "v1-certificates";
|
|
12790
|
+
Name["V1builds"] = "v1-builds";
|
|
12791
|
+
Name["V1messaging"] = "v1-messaging";
|
|
12792
|
+
Name["V1migrations"] = "v1-migrations";
|
|
12793
|
+
Name["Hamsterv1"] = "hamsterv1";
|
|
12794
|
+
})(exports.Name || (exports.Name = {}));
|
|
12795
|
+
|
|
12796
|
+
exports.MessageStatus = void 0;
|
|
12797
|
+
(function (MessageStatus) {
|
|
12798
|
+
MessageStatus["Draft"] = "draft";
|
|
12799
|
+
MessageStatus["Scheduled"] = "scheduled";
|
|
12800
|
+
MessageStatus["Processing"] = "processing";
|
|
12801
|
+
})(exports.MessageStatus || (exports.MessageStatus = {}));
|
|
12802
|
+
|
|
12803
|
+
exports.SMTPEncryption = void 0;
|
|
12804
|
+
(function (SMTPEncryption) {
|
|
12805
|
+
SMTPEncryption["None"] = "none";
|
|
12806
|
+
SMTPEncryption["Ssl"] = "ssl";
|
|
12807
|
+
SMTPEncryption["Tls"] = "tls";
|
|
12808
|
+
})(exports.SMTPEncryption || (exports.SMTPEncryption = {}));
|
|
12809
|
+
|
|
12810
|
+
exports.ProjectUsageRange = void 0;
|
|
12811
|
+
(function (ProjectUsageRange) {
|
|
12812
|
+
ProjectUsageRange["OneHour"] = "1h";
|
|
12813
|
+
ProjectUsageRange["OneDay"] = "1d";
|
|
12814
|
+
})(exports.ProjectUsageRange || (exports.ProjectUsageRange = {}));
|
|
12815
|
+
|
|
12816
|
+
exports.Region = void 0;
|
|
12817
|
+
(function (Region) {
|
|
12818
|
+
Region["Default"] = "default";
|
|
12819
|
+
})(exports.Region || (exports.Region = {}));
|
|
12820
|
+
|
|
12821
|
+
exports.AuthMethod = void 0;
|
|
12822
|
+
(function (AuthMethod) {
|
|
12823
|
+
AuthMethod["Emailpassword"] = "email-password";
|
|
12824
|
+
AuthMethod["Magicurl"] = "magic-url";
|
|
12825
|
+
AuthMethod["Emailotp"] = "email-otp";
|
|
12826
|
+
AuthMethod["Anonymous"] = "anonymous";
|
|
12827
|
+
AuthMethod["Invites"] = "invites";
|
|
12828
|
+
AuthMethod["Jwt"] = "jwt";
|
|
12829
|
+
AuthMethod["Phone"] = "phone";
|
|
12830
|
+
})(exports.AuthMethod || (exports.AuthMethod = {}));
|
|
12831
|
+
|
|
12832
|
+
exports.PlatformType = void 0;
|
|
12833
|
+
(function (PlatformType) {
|
|
12834
|
+
PlatformType["Web"] = "web";
|
|
12835
|
+
PlatformType["Flutterweb"] = "flutter-web";
|
|
12836
|
+
PlatformType["Flutterios"] = "flutter-ios";
|
|
12837
|
+
PlatformType["Flutterandroid"] = "flutter-android";
|
|
12838
|
+
PlatformType["Flutterlinux"] = "flutter-linux";
|
|
12839
|
+
PlatformType["Fluttermacos"] = "flutter-macos";
|
|
12840
|
+
PlatformType["Flutterwindows"] = "flutter-windows";
|
|
12841
|
+
PlatformType["Appleios"] = "apple-ios";
|
|
12842
|
+
PlatformType["Applemacos"] = "apple-macos";
|
|
12843
|
+
PlatformType["Applewatchos"] = "apple-watchos";
|
|
12844
|
+
PlatformType["Appletvos"] = "apple-tvos";
|
|
12845
|
+
PlatformType["Android"] = "android";
|
|
12846
|
+
PlatformType["Unity"] = "unity";
|
|
12847
|
+
})(exports.PlatformType || (exports.PlatformType = {}));
|
|
12848
|
+
|
|
12849
|
+
exports.APIService = void 0;
|
|
12850
|
+
(function (APIService) {
|
|
12851
|
+
APIService["Account"] = "account";
|
|
12852
|
+
APIService["Avatars"] = "avatars";
|
|
12853
|
+
APIService["Databases"] = "databases";
|
|
12854
|
+
APIService["Locale"] = "locale";
|
|
12855
|
+
APIService["Health"] = "health";
|
|
12856
|
+
APIService["Storage"] = "storage";
|
|
12857
|
+
APIService["Teams"] = "teams";
|
|
12858
|
+
APIService["Users"] = "users";
|
|
12859
|
+
APIService["Functions"] = "functions";
|
|
12860
|
+
APIService["Graphql"] = "graphql";
|
|
12861
|
+
APIService["Messaging"] = "messaging";
|
|
12862
|
+
})(exports.APIService || (exports.APIService = {}));
|
|
12863
|
+
|
|
12864
|
+
exports.SMTPSecure = void 0;
|
|
12865
|
+
(function (SMTPSecure) {
|
|
12866
|
+
SMTPSecure["Tls"] = "tls";
|
|
12867
|
+
})(exports.SMTPSecure || (exports.SMTPSecure = {}));
|
|
12868
|
+
|
|
12869
|
+
exports.EmailTemplateType = void 0;
|
|
12870
|
+
(function (EmailTemplateType) {
|
|
12871
|
+
EmailTemplateType["Verification"] = "verification";
|
|
12872
|
+
EmailTemplateType["Magicsession"] = "magicsession";
|
|
12873
|
+
EmailTemplateType["Recovery"] = "recovery";
|
|
12874
|
+
EmailTemplateType["Invitation"] = "invitation";
|
|
12875
|
+
})(exports.EmailTemplateType || (exports.EmailTemplateType = {}));
|
|
12876
|
+
|
|
12877
|
+
exports.EmailTemplateLocale = void 0;
|
|
12878
|
+
(function (EmailTemplateLocale) {
|
|
12879
|
+
EmailTemplateLocale["Af"] = "af";
|
|
12880
|
+
EmailTemplateLocale["Arae"] = "ar-ae";
|
|
12881
|
+
EmailTemplateLocale["Arbh"] = "ar-bh";
|
|
12882
|
+
EmailTemplateLocale["Ardz"] = "ar-dz";
|
|
12883
|
+
EmailTemplateLocale["Areg"] = "ar-eg";
|
|
12884
|
+
EmailTemplateLocale["Ariq"] = "ar-iq";
|
|
12885
|
+
EmailTemplateLocale["Arjo"] = "ar-jo";
|
|
12886
|
+
EmailTemplateLocale["Arkw"] = "ar-kw";
|
|
12887
|
+
EmailTemplateLocale["Arlb"] = "ar-lb";
|
|
12888
|
+
EmailTemplateLocale["Arly"] = "ar-ly";
|
|
12889
|
+
EmailTemplateLocale["Arma"] = "ar-ma";
|
|
12890
|
+
EmailTemplateLocale["Arom"] = "ar-om";
|
|
12891
|
+
EmailTemplateLocale["Arqa"] = "ar-qa";
|
|
12892
|
+
EmailTemplateLocale["Arsa"] = "ar-sa";
|
|
12893
|
+
EmailTemplateLocale["Arsy"] = "ar-sy";
|
|
12894
|
+
EmailTemplateLocale["Artn"] = "ar-tn";
|
|
12895
|
+
EmailTemplateLocale["Arye"] = "ar-ye";
|
|
12896
|
+
EmailTemplateLocale["As"] = "as";
|
|
12897
|
+
EmailTemplateLocale["Az"] = "az";
|
|
12898
|
+
EmailTemplateLocale["Be"] = "be";
|
|
12899
|
+
EmailTemplateLocale["Bg"] = "bg";
|
|
12900
|
+
EmailTemplateLocale["Bh"] = "bh";
|
|
12901
|
+
EmailTemplateLocale["Bn"] = "bn";
|
|
12902
|
+
EmailTemplateLocale["Bs"] = "bs";
|
|
12903
|
+
EmailTemplateLocale["Ca"] = "ca";
|
|
12904
|
+
EmailTemplateLocale["Cs"] = "cs";
|
|
12905
|
+
EmailTemplateLocale["Cy"] = "cy";
|
|
12906
|
+
EmailTemplateLocale["Da"] = "da";
|
|
12907
|
+
EmailTemplateLocale["De"] = "de";
|
|
12908
|
+
EmailTemplateLocale["Deat"] = "de-at";
|
|
12909
|
+
EmailTemplateLocale["Dech"] = "de-ch";
|
|
12910
|
+
EmailTemplateLocale["Deli"] = "de-li";
|
|
12911
|
+
EmailTemplateLocale["Delu"] = "de-lu";
|
|
12912
|
+
EmailTemplateLocale["El"] = "el";
|
|
12913
|
+
EmailTemplateLocale["En"] = "en";
|
|
12914
|
+
EmailTemplateLocale["Enau"] = "en-au";
|
|
12915
|
+
EmailTemplateLocale["Enbz"] = "en-bz";
|
|
12916
|
+
EmailTemplateLocale["Enca"] = "en-ca";
|
|
12917
|
+
EmailTemplateLocale["Engb"] = "en-gb";
|
|
12918
|
+
EmailTemplateLocale["Enie"] = "en-ie";
|
|
12919
|
+
EmailTemplateLocale["Enjm"] = "en-jm";
|
|
12920
|
+
EmailTemplateLocale["Ennz"] = "en-nz";
|
|
12921
|
+
EmailTemplateLocale["Entt"] = "en-tt";
|
|
12922
|
+
EmailTemplateLocale["Enus"] = "en-us";
|
|
12923
|
+
EmailTemplateLocale["Enza"] = "en-za";
|
|
12924
|
+
EmailTemplateLocale["Eo"] = "eo";
|
|
12925
|
+
EmailTemplateLocale["Es"] = "es";
|
|
12926
|
+
EmailTemplateLocale["Esar"] = "es-ar";
|
|
12927
|
+
EmailTemplateLocale["Esbo"] = "es-bo";
|
|
12928
|
+
EmailTemplateLocale["Escl"] = "es-cl";
|
|
12929
|
+
EmailTemplateLocale["Esco"] = "es-co";
|
|
12930
|
+
EmailTemplateLocale["Escr"] = "es-cr";
|
|
12931
|
+
EmailTemplateLocale["Esdo"] = "es-do";
|
|
12932
|
+
EmailTemplateLocale["Esec"] = "es-ec";
|
|
12933
|
+
EmailTemplateLocale["Esgt"] = "es-gt";
|
|
12934
|
+
EmailTemplateLocale["Eshn"] = "es-hn";
|
|
12935
|
+
EmailTemplateLocale["Esmx"] = "es-mx";
|
|
12936
|
+
EmailTemplateLocale["Esni"] = "es-ni";
|
|
12937
|
+
EmailTemplateLocale["Espa"] = "es-pa";
|
|
12938
|
+
EmailTemplateLocale["Espe"] = "es-pe";
|
|
12939
|
+
EmailTemplateLocale["Espr"] = "es-pr";
|
|
12940
|
+
EmailTemplateLocale["Espy"] = "es-py";
|
|
12941
|
+
EmailTemplateLocale["Essv"] = "es-sv";
|
|
12942
|
+
EmailTemplateLocale["Esuy"] = "es-uy";
|
|
12943
|
+
EmailTemplateLocale["Esve"] = "es-ve";
|
|
12944
|
+
EmailTemplateLocale["Et"] = "et";
|
|
12945
|
+
EmailTemplateLocale["Eu"] = "eu";
|
|
12946
|
+
EmailTemplateLocale["Fa"] = "fa";
|
|
12947
|
+
EmailTemplateLocale["Fi"] = "fi";
|
|
12948
|
+
EmailTemplateLocale["Fo"] = "fo";
|
|
12949
|
+
EmailTemplateLocale["Fr"] = "fr";
|
|
12950
|
+
EmailTemplateLocale["Frbe"] = "fr-be";
|
|
12951
|
+
EmailTemplateLocale["Frca"] = "fr-ca";
|
|
12952
|
+
EmailTemplateLocale["Frch"] = "fr-ch";
|
|
12953
|
+
EmailTemplateLocale["Frlu"] = "fr-lu";
|
|
12954
|
+
EmailTemplateLocale["Ga"] = "ga";
|
|
12955
|
+
EmailTemplateLocale["Gd"] = "gd";
|
|
12956
|
+
EmailTemplateLocale["He"] = "he";
|
|
12957
|
+
EmailTemplateLocale["Hi"] = "hi";
|
|
12958
|
+
EmailTemplateLocale["Hr"] = "hr";
|
|
12959
|
+
EmailTemplateLocale["Hu"] = "hu";
|
|
12960
|
+
EmailTemplateLocale["Id"] = "id";
|
|
12961
|
+
EmailTemplateLocale["Is"] = "is";
|
|
12962
|
+
EmailTemplateLocale["It"] = "it";
|
|
12963
|
+
EmailTemplateLocale["Itch"] = "it-ch";
|
|
12964
|
+
EmailTemplateLocale["Ja"] = "ja";
|
|
12965
|
+
EmailTemplateLocale["Ji"] = "ji";
|
|
12966
|
+
EmailTemplateLocale["Ko"] = "ko";
|
|
12967
|
+
EmailTemplateLocale["Ku"] = "ku";
|
|
12968
|
+
EmailTemplateLocale["Lt"] = "lt";
|
|
12969
|
+
EmailTemplateLocale["Lv"] = "lv";
|
|
12970
|
+
EmailTemplateLocale["Mk"] = "mk";
|
|
12971
|
+
EmailTemplateLocale["Ml"] = "ml";
|
|
12972
|
+
EmailTemplateLocale["Ms"] = "ms";
|
|
12973
|
+
EmailTemplateLocale["Mt"] = "mt";
|
|
12974
|
+
EmailTemplateLocale["Nb"] = "nb";
|
|
12975
|
+
EmailTemplateLocale["Ne"] = "ne";
|
|
12976
|
+
EmailTemplateLocale["Nl"] = "nl";
|
|
12977
|
+
EmailTemplateLocale["Nlbe"] = "nl-be";
|
|
12978
|
+
EmailTemplateLocale["Nn"] = "nn";
|
|
12979
|
+
EmailTemplateLocale["No"] = "no";
|
|
12980
|
+
EmailTemplateLocale["Pa"] = "pa";
|
|
12981
|
+
EmailTemplateLocale["Pl"] = "pl";
|
|
12982
|
+
EmailTemplateLocale["Pt"] = "pt";
|
|
12983
|
+
EmailTemplateLocale["Ptbr"] = "pt-br";
|
|
12984
|
+
EmailTemplateLocale["Rm"] = "rm";
|
|
12985
|
+
EmailTemplateLocale["Ro"] = "ro";
|
|
12986
|
+
EmailTemplateLocale["Romd"] = "ro-md";
|
|
12987
|
+
EmailTemplateLocale["Ru"] = "ru";
|
|
12988
|
+
EmailTemplateLocale["Rumd"] = "ru-md";
|
|
12989
|
+
EmailTemplateLocale["Sb"] = "sb";
|
|
12990
|
+
EmailTemplateLocale["Sk"] = "sk";
|
|
12991
|
+
EmailTemplateLocale["Sl"] = "sl";
|
|
12992
|
+
EmailTemplateLocale["Sq"] = "sq";
|
|
12993
|
+
EmailTemplateLocale["Sr"] = "sr";
|
|
12994
|
+
EmailTemplateLocale["Sv"] = "sv";
|
|
12995
|
+
EmailTemplateLocale["Svfi"] = "sv-fi";
|
|
12996
|
+
EmailTemplateLocale["Th"] = "th";
|
|
12997
|
+
EmailTemplateLocale["Tn"] = "tn";
|
|
12998
|
+
EmailTemplateLocale["Tr"] = "tr";
|
|
12999
|
+
EmailTemplateLocale["Ts"] = "ts";
|
|
13000
|
+
EmailTemplateLocale["Ua"] = "ua";
|
|
13001
|
+
EmailTemplateLocale["Ur"] = "ur";
|
|
13002
|
+
EmailTemplateLocale["Ve"] = "ve";
|
|
13003
|
+
EmailTemplateLocale["Vi"] = "vi";
|
|
13004
|
+
EmailTemplateLocale["Xh"] = "xh";
|
|
13005
|
+
EmailTemplateLocale["Zhcn"] = "zh-cn";
|
|
13006
|
+
EmailTemplateLocale["Zhhk"] = "zh-hk";
|
|
13007
|
+
EmailTemplateLocale["Zhsg"] = "zh-sg";
|
|
13008
|
+
EmailTemplateLocale["Zhtw"] = "zh-tw";
|
|
13009
|
+
EmailTemplateLocale["Zu"] = "zu";
|
|
13010
|
+
})(exports.EmailTemplateLocale || (exports.EmailTemplateLocale = {}));
|
|
13011
|
+
|
|
13012
|
+
exports.SMSTemplateType = void 0;
|
|
13013
|
+
(function (SMSTemplateType) {
|
|
13014
|
+
SMSTemplateType["Verification"] = "verification";
|
|
13015
|
+
SMSTemplateType["Login"] = "login";
|
|
13016
|
+
SMSTemplateType["Invitation"] = "invitation";
|
|
13017
|
+
})(exports.SMSTemplateType || (exports.SMSTemplateType = {}));
|
|
13018
|
+
|
|
13019
|
+
exports.SMSTemplateLocale = void 0;
|
|
13020
|
+
(function (SMSTemplateLocale) {
|
|
13021
|
+
SMSTemplateLocale["Af"] = "af";
|
|
13022
|
+
SMSTemplateLocale["Arae"] = "ar-ae";
|
|
13023
|
+
SMSTemplateLocale["Arbh"] = "ar-bh";
|
|
13024
|
+
SMSTemplateLocale["Ardz"] = "ar-dz";
|
|
13025
|
+
SMSTemplateLocale["Areg"] = "ar-eg";
|
|
13026
|
+
SMSTemplateLocale["Ariq"] = "ar-iq";
|
|
13027
|
+
SMSTemplateLocale["Arjo"] = "ar-jo";
|
|
13028
|
+
SMSTemplateLocale["Arkw"] = "ar-kw";
|
|
13029
|
+
SMSTemplateLocale["Arlb"] = "ar-lb";
|
|
13030
|
+
SMSTemplateLocale["Arly"] = "ar-ly";
|
|
13031
|
+
SMSTemplateLocale["Arma"] = "ar-ma";
|
|
13032
|
+
SMSTemplateLocale["Arom"] = "ar-om";
|
|
13033
|
+
SMSTemplateLocale["Arqa"] = "ar-qa";
|
|
13034
|
+
SMSTemplateLocale["Arsa"] = "ar-sa";
|
|
13035
|
+
SMSTemplateLocale["Arsy"] = "ar-sy";
|
|
13036
|
+
SMSTemplateLocale["Artn"] = "ar-tn";
|
|
13037
|
+
SMSTemplateLocale["Arye"] = "ar-ye";
|
|
13038
|
+
SMSTemplateLocale["As"] = "as";
|
|
13039
|
+
SMSTemplateLocale["Az"] = "az";
|
|
13040
|
+
SMSTemplateLocale["Be"] = "be";
|
|
13041
|
+
SMSTemplateLocale["Bg"] = "bg";
|
|
13042
|
+
SMSTemplateLocale["Bh"] = "bh";
|
|
13043
|
+
SMSTemplateLocale["Bn"] = "bn";
|
|
13044
|
+
SMSTemplateLocale["Bs"] = "bs";
|
|
13045
|
+
SMSTemplateLocale["Ca"] = "ca";
|
|
13046
|
+
SMSTemplateLocale["Cs"] = "cs";
|
|
13047
|
+
SMSTemplateLocale["Cy"] = "cy";
|
|
13048
|
+
SMSTemplateLocale["Da"] = "da";
|
|
13049
|
+
SMSTemplateLocale["De"] = "de";
|
|
13050
|
+
SMSTemplateLocale["Deat"] = "de-at";
|
|
13051
|
+
SMSTemplateLocale["Dech"] = "de-ch";
|
|
13052
|
+
SMSTemplateLocale["Deli"] = "de-li";
|
|
13053
|
+
SMSTemplateLocale["Delu"] = "de-lu";
|
|
13054
|
+
SMSTemplateLocale["El"] = "el";
|
|
13055
|
+
SMSTemplateLocale["En"] = "en";
|
|
13056
|
+
SMSTemplateLocale["Enau"] = "en-au";
|
|
13057
|
+
SMSTemplateLocale["Enbz"] = "en-bz";
|
|
13058
|
+
SMSTemplateLocale["Enca"] = "en-ca";
|
|
13059
|
+
SMSTemplateLocale["Engb"] = "en-gb";
|
|
13060
|
+
SMSTemplateLocale["Enie"] = "en-ie";
|
|
13061
|
+
SMSTemplateLocale["Enjm"] = "en-jm";
|
|
13062
|
+
SMSTemplateLocale["Ennz"] = "en-nz";
|
|
13063
|
+
SMSTemplateLocale["Entt"] = "en-tt";
|
|
13064
|
+
SMSTemplateLocale["Enus"] = "en-us";
|
|
13065
|
+
SMSTemplateLocale["Enza"] = "en-za";
|
|
13066
|
+
SMSTemplateLocale["Eo"] = "eo";
|
|
13067
|
+
SMSTemplateLocale["Es"] = "es";
|
|
13068
|
+
SMSTemplateLocale["Esar"] = "es-ar";
|
|
13069
|
+
SMSTemplateLocale["Esbo"] = "es-bo";
|
|
13070
|
+
SMSTemplateLocale["Escl"] = "es-cl";
|
|
13071
|
+
SMSTemplateLocale["Esco"] = "es-co";
|
|
13072
|
+
SMSTemplateLocale["Escr"] = "es-cr";
|
|
13073
|
+
SMSTemplateLocale["Esdo"] = "es-do";
|
|
13074
|
+
SMSTemplateLocale["Esec"] = "es-ec";
|
|
13075
|
+
SMSTemplateLocale["Esgt"] = "es-gt";
|
|
13076
|
+
SMSTemplateLocale["Eshn"] = "es-hn";
|
|
13077
|
+
SMSTemplateLocale["Esmx"] = "es-mx";
|
|
13078
|
+
SMSTemplateLocale["Esni"] = "es-ni";
|
|
13079
|
+
SMSTemplateLocale["Espa"] = "es-pa";
|
|
13080
|
+
SMSTemplateLocale["Espe"] = "es-pe";
|
|
13081
|
+
SMSTemplateLocale["Espr"] = "es-pr";
|
|
13082
|
+
SMSTemplateLocale["Espy"] = "es-py";
|
|
13083
|
+
SMSTemplateLocale["Essv"] = "es-sv";
|
|
13084
|
+
SMSTemplateLocale["Esuy"] = "es-uy";
|
|
13085
|
+
SMSTemplateLocale["Esve"] = "es-ve";
|
|
13086
|
+
SMSTemplateLocale["Et"] = "et";
|
|
13087
|
+
SMSTemplateLocale["Eu"] = "eu";
|
|
13088
|
+
SMSTemplateLocale["Fa"] = "fa";
|
|
13089
|
+
SMSTemplateLocale["Fi"] = "fi";
|
|
13090
|
+
SMSTemplateLocale["Fo"] = "fo";
|
|
13091
|
+
SMSTemplateLocale["Fr"] = "fr";
|
|
13092
|
+
SMSTemplateLocale["Frbe"] = "fr-be";
|
|
13093
|
+
SMSTemplateLocale["Frca"] = "fr-ca";
|
|
13094
|
+
SMSTemplateLocale["Frch"] = "fr-ch";
|
|
13095
|
+
SMSTemplateLocale["Frlu"] = "fr-lu";
|
|
13096
|
+
SMSTemplateLocale["Ga"] = "ga";
|
|
13097
|
+
SMSTemplateLocale["Gd"] = "gd";
|
|
13098
|
+
SMSTemplateLocale["He"] = "he";
|
|
13099
|
+
SMSTemplateLocale["Hi"] = "hi";
|
|
13100
|
+
SMSTemplateLocale["Hr"] = "hr";
|
|
13101
|
+
SMSTemplateLocale["Hu"] = "hu";
|
|
13102
|
+
SMSTemplateLocale["Id"] = "id";
|
|
13103
|
+
SMSTemplateLocale["Is"] = "is";
|
|
13104
|
+
SMSTemplateLocale["It"] = "it";
|
|
13105
|
+
SMSTemplateLocale["Itch"] = "it-ch";
|
|
13106
|
+
SMSTemplateLocale["Ja"] = "ja";
|
|
13107
|
+
SMSTemplateLocale["Ji"] = "ji";
|
|
13108
|
+
SMSTemplateLocale["Ko"] = "ko";
|
|
13109
|
+
SMSTemplateLocale["Ku"] = "ku";
|
|
13110
|
+
SMSTemplateLocale["Lt"] = "lt";
|
|
13111
|
+
SMSTemplateLocale["Lv"] = "lv";
|
|
13112
|
+
SMSTemplateLocale["Mk"] = "mk";
|
|
13113
|
+
SMSTemplateLocale["Ml"] = "ml";
|
|
13114
|
+
SMSTemplateLocale["Ms"] = "ms";
|
|
13115
|
+
SMSTemplateLocale["Mt"] = "mt";
|
|
13116
|
+
SMSTemplateLocale["Nb"] = "nb";
|
|
13117
|
+
SMSTemplateLocale["Ne"] = "ne";
|
|
13118
|
+
SMSTemplateLocale["Nl"] = "nl";
|
|
13119
|
+
SMSTemplateLocale["Nlbe"] = "nl-be";
|
|
13120
|
+
SMSTemplateLocale["Nn"] = "nn";
|
|
13121
|
+
SMSTemplateLocale["No"] = "no";
|
|
13122
|
+
SMSTemplateLocale["Pa"] = "pa";
|
|
13123
|
+
SMSTemplateLocale["Pl"] = "pl";
|
|
13124
|
+
SMSTemplateLocale["Pt"] = "pt";
|
|
13125
|
+
SMSTemplateLocale["Ptbr"] = "pt-br";
|
|
13126
|
+
SMSTemplateLocale["Rm"] = "rm";
|
|
13127
|
+
SMSTemplateLocale["Ro"] = "ro";
|
|
13128
|
+
SMSTemplateLocale["Romd"] = "ro-md";
|
|
13129
|
+
SMSTemplateLocale["Ru"] = "ru";
|
|
13130
|
+
SMSTemplateLocale["Rumd"] = "ru-md";
|
|
13131
|
+
SMSTemplateLocale["Sb"] = "sb";
|
|
13132
|
+
SMSTemplateLocale["Sk"] = "sk";
|
|
13133
|
+
SMSTemplateLocale["Sl"] = "sl";
|
|
13134
|
+
SMSTemplateLocale["Sq"] = "sq";
|
|
13135
|
+
SMSTemplateLocale["Sr"] = "sr";
|
|
13136
|
+
SMSTemplateLocale["Sv"] = "sv";
|
|
13137
|
+
SMSTemplateLocale["Svfi"] = "sv-fi";
|
|
13138
|
+
SMSTemplateLocale["Th"] = "th";
|
|
13139
|
+
SMSTemplateLocale["Tn"] = "tn";
|
|
13140
|
+
SMSTemplateLocale["Tr"] = "tr";
|
|
13141
|
+
SMSTemplateLocale["Ts"] = "ts";
|
|
13142
|
+
SMSTemplateLocale["Ua"] = "ua";
|
|
13143
|
+
SMSTemplateLocale["Ur"] = "ur";
|
|
13144
|
+
SMSTemplateLocale["Ve"] = "ve";
|
|
13145
|
+
SMSTemplateLocale["Vi"] = "vi";
|
|
13146
|
+
SMSTemplateLocale["Xh"] = "xh";
|
|
13147
|
+
SMSTemplateLocale["Zhcn"] = "zh-cn";
|
|
13148
|
+
SMSTemplateLocale["Zhhk"] = "zh-hk";
|
|
13149
|
+
SMSTemplateLocale["Zhsg"] = "zh-sg";
|
|
13150
|
+
SMSTemplateLocale["Zhtw"] = "zh-tw";
|
|
13151
|
+
SMSTemplateLocale["Zu"] = "zu";
|
|
13152
|
+
})(exports.SMSTemplateLocale || (exports.SMSTemplateLocale = {}));
|
|
13153
|
+
|
|
13154
|
+
exports.ResourceType = void 0;
|
|
13155
|
+
(function (ResourceType) {
|
|
13156
|
+
ResourceType["Api"] = "api";
|
|
13157
|
+
ResourceType["Function"] = "function";
|
|
13158
|
+
})(exports.ResourceType || (exports.ResourceType = {}));
|
|
13159
|
+
|
|
13160
|
+
exports.Compression = void 0;
|
|
13161
|
+
(function (Compression) {
|
|
13162
|
+
Compression["None"] = "none";
|
|
13163
|
+
Compression["Gzip"] = "gzip";
|
|
13164
|
+
Compression["Zstd"] = "zstd";
|
|
13165
|
+
})(exports.Compression || (exports.Compression = {}));
|
|
13166
|
+
|
|
13167
|
+
exports.ImageGravity = void 0;
|
|
13168
|
+
(function (ImageGravity) {
|
|
13169
|
+
ImageGravity["Center"] = "center";
|
|
13170
|
+
ImageGravity["Topleft"] = "top-left";
|
|
13171
|
+
ImageGravity["Top"] = "top";
|
|
13172
|
+
ImageGravity["Topright"] = "top-right";
|
|
13173
|
+
ImageGravity["Left"] = "left";
|
|
13174
|
+
ImageGravity["Right"] = "right";
|
|
13175
|
+
ImageGravity["Bottomleft"] = "bottom-left";
|
|
13176
|
+
ImageGravity["Bottom"] = "bottom";
|
|
13177
|
+
ImageGravity["Bottomright"] = "bottom-right";
|
|
13178
|
+
})(exports.ImageGravity || (exports.ImageGravity = {}));
|
|
13179
|
+
|
|
13180
|
+
exports.ImageFormat = void 0;
|
|
13181
|
+
(function (ImageFormat) {
|
|
13182
|
+
ImageFormat["Jpg"] = "jpg";
|
|
13183
|
+
ImageFormat["Jpeg"] = "jpeg";
|
|
13184
|
+
ImageFormat["Gif"] = "gif";
|
|
13185
|
+
ImageFormat["Png"] = "png";
|
|
13186
|
+
ImageFormat["Webp"] = "webp";
|
|
13187
|
+
})(exports.ImageFormat || (exports.ImageFormat = {}));
|
|
13188
|
+
|
|
13189
|
+
exports.StorageUsageRange = void 0;
|
|
13190
|
+
(function (StorageUsageRange) {
|
|
13191
|
+
StorageUsageRange["TwentyFourHours"] = "24h";
|
|
13192
|
+
StorageUsageRange["ThirtyDays"] = "30d";
|
|
13193
|
+
StorageUsageRange["NinetyDays"] = "90d";
|
|
13194
|
+
})(exports.StorageUsageRange || (exports.StorageUsageRange = {}));
|
|
13195
|
+
|
|
13196
|
+
exports.PasswordHash = void 0;
|
|
13197
|
+
(function (PasswordHash) {
|
|
13198
|
+
PasswordHash["Sha1"] = "sha1";
|
|
13199
|
+
PasswordHash["Sha224"] = "sha224";
|
|
13200
|
+
PasswordHash["Sha256"] = "sha256";
|
|
13201
|
+
PasswordHash["Sha384"] = "sha384";
|
|
13202
|
+
PasswordHash["Sha512224"] = "sha512/224";
|
|
13203
|
+
PasswordHash["Sha512256"] = "sha512/256";
|
|
13204
|
+
PasswordHash["Sha512"] = "sha512";
|
|
13205
|
+
PasswordHash["Sha3224"] = "sha3-224";
|
|
13206
|
+
PasswordHash["Sha3256"] = "sha3-256";
|
|
13207
|
+
PasswordHash["Sha3384"] = "sha3-384";
|
|
13208
|
+
PasswordHash["Sha3512"] = "sha3-512";
|
|
13209
|
+
})(exports.PasswordHash || (exports.PasswordHash = {}));
|
|
13210
|
+
|
|
13211
|
+
exports.UserUsageRange = void 0;
|
|
13212
|
+
(function (UserUsageRange) {
|
|
13213
|
+
UserUsageRange["TwentyFourHours"] = "24h";
|
|
13214
|
+
UserUsageRange["ThirtyDays"] = "30d";
|
|
13215
|
+
UserUsageRange["NinetyDays"] = "90d";
|
|
13216
|
+
})(exports.UserUsageRange || (exports.UserUsageRange = {}));
|
|
13217
|
+
|
|
13218
|
+
exports.MessagingProviderType = void 0;
|
|
13219
|
+
(function (MessagingProviderType) {
|
|
13220
|
+
MessagingProviderType["Email"] = "email";
|
|
13221
|
+
MessagingProviderType["Sms"] = "sms";
|
|
13222
|
+
MessagingProviderType["Push"] = "push";
|
|
13223
|
+
})(exports.MessagingProviderType || (exports.MessagingProviderType = {}));
|
|
13224
|
+
|
|
9811
13225
|
exports.Account = Account;
|
|
9812
13226
|
exports.AppwriteException = AppwriteException;
|
|
9813
13227
|
exports.Assistant = Assistant;
|
|
@@ -9820,6 +13234,7 @@ exports.Graphql = Graphql;
|
|
|
9820
13234
|
exports.Health = Health;
|
|
9821
13235
|
exports.ID = ID;
|
|
9822
13236
|
exports.Locale = Locale;
|
|
13237
|
+
exports.Messaging = Messaging;
|
|
9823
13238
|
exports.Migrations = Migrations;
|
|
9824
13239
|
exports.Permission = Permission;
|
|
9825
13240
|
exports.Project = Project;
|