@appwrite.io/console 0.6.0-rc.9 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.travis.yml +32 -0
- package/README.md +5 -5
- package/dist/cjs/sdk.js +1140 -418
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1141 -419
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +1140 -418
- package/docs/examples/account/create-anonymous-session.md +6 -13
- package/docs/examples/account/create-email-password-session.md +9 -13
- package/docs/examples/account/create-email-token.md +10 -13
- package/docs/examples/account/create-j-w-t.md +6 -13
- package/docs/examples/account/create-magic-u-r-l-token.md +11 -13
- package/docs/examples/account/create-mfa-authenticator.md +13 -0
- package/docs/examples/account/create-mfa-challenge.md +13 -0
- package/docs/examples/account/create-mfa-recovery-codes.md +11 -0
- package/docs/examples/account/create-o-auth2session.md +10 -9
- package/docs/examples/account/create-o-auth2token.md +15 -0
- package/docs/examples/account/create-phone-token.md +9 -13
- package/docs/examples/account/create-phone-verification.md +6 -13
- package/docs/examples/account/create-push-target.md +10 -13
- package/docs/examples/account/create-recovery.md +9 -13
- package/docs/examples/account/create-session.md +9 -13
- package/docs/examples/account/create-verification.md +8 -13
- package/docs/examples/account/create.md +11 -13
- package/docs/examples/account/delete-identity.md +8 -13
- package/docs/examples/account/delete-mfa-authenticator.md +14 -0
- package/docs/examples/account/delete-push-target.md +8 -13
- package/docs/examples/account/delete-session.md +8 -13
- package/docs/examples/account/delete-sessions.md +6 -13
- package/docs/examples/account/delete.md +6 -13
- package/docs/examples/account/get-mfa-recovery-codes.md +11 -0
- package/docs/examples/account/get-prefs.md +6 -13
- package/docs/examples/account/get-session.md +8 -13
- package/docs/examples/account/get.md +6 -13
- package/docs/examples/account/list-identities.md +8 -13
- package/docs/examples/account/list-logs.md +8 -13
- package/docs/examples/account/list-mfa-factors.md +11 -0
- package/docs/examples/account/list-sessions.md +6 -13
- package/docs/examples/account/update-email.md +9 -13
- package/docs/examples/account/update-m-f-a.md +8 -13
- package/docs/examples/account/update-magic-u-r-l-session.md +9 -13
- package/docs/examples/account/update-mfa-authenticator.md +14 -0
- package/docs/examples/account/update-mfa-challenge.md +14 -0
- package/docs/examples/account/update-mfa-recovery-codes.md +11 -0
- package/docs/examples/account/update-name.md +8 -13
- package/docs/examples/account/update-password.md +9 -13
- package/docs/examples/account/update-phone-session.md +14 -0
- package/docs/examples/account/update-phone-verification.md +9 -13
- package/docs/examples/account/update-phone.md +9 -13
- package/docs/examples/account/update-prefs.md +8 -13
- package/docs/examples/account/update-push-target.md +9 -13
- package/docs/examples/account/update-recovery.md +10 -13
- package/docs/examples/account/update-session.md +8 -13
- package/docs/examples/account/update-status.md +6 -13
- package/docs/examples/account/update-verification.md +9 -13
- package/docs/examples/assistant/chat.md +8 -13
- package/docs/examples/avatars/get-browser.md +11 -9
- package/docs/examples/avatars/get-credit-card.md +11 -9
- package/docs/examples/avatars/get-favicon.md +8 -9
- package/docs/examples/avatars/get-flag.md +11 -9
- package/docs/examples/avatars/get-image.md +10 -9
- package/docs/examples/avatars/get-initials.md +11 -9
- package/docs/examples/avatars/get-q-r.md +11 -9
- package/docs/examples/console/variables.md +6 -13
- package/docs/examples/databases/create-boolean-attribute.md +13 -13
- package/docs/examples/databases/create-collection.md +13 -13
- package/docs/examples/databases/create-datetime-attribute.md +13 -13
- package/docs/examples/databases/create-document.md +12 -13
- package/docs/examples/databases/create-email-attribute.md +13 -13
- package/docs/examples/databases/create-enum-attribute.md +14 -13
- package/docs/examples/databases/create-float-attribute.md +15 -13
- package/docs/examples/databases/create-index.md +13 -13
- package/docs/examples/databases/create-integer-attribute.md +15 -13
- package/docs/examples/databases/create-ip-attribute.md +13 -13
- package/docs/examples/databases/create-relationship-attribute.md +15 -13
- package/docs/examples/databases/create-string-attribute.md +15 -13
- package/docs/examples/databases/create-url-attribute.md +13 -13
- package/docs/examples/databases/create.md +10 -13
- package/docs/examples/databases/delete-attribute.md +10 -13
- package/docs/examples/databases/delete-collection.md +9 -13
- package/docs/examples/databases/delete-document.md +10 -13
- package/docs/examples/databases/delete-index.md +10 -13
- package/docs/examples/databases/delete.md +8 -13
- package/docs/examples/databases/get-attribute.md +10 -13
- package/docs/examples/databases/get-collection-usage.md +10 -13
- package/docs/examples/databases/get-collection.md +9 -13
- package/docs/examples/databases/get-database-usage.md +9 -13
- package/docs/examples/databases/get-document.md +11 -13
- package/docs/examples/databases/get-index.md +10 -13
- package/docs/examples/databases/get-usage.md +8 -13
- package/docs/examples/databases/get.md +8 -13
- package/docs/examples/databases/list-attributes.md +10 -13
- package/docs/examples/databases/list-collection-logs.md +10 -13
- package/docs/examples/databases/list-collections.md +10 -13
- package/docs/examples/databases/list-document-logs.md +11 -13
- package/docs/examples/databases/list-documents.md +10 -13
- package/docs/examples/databases/list-indexes.md +10 -13
- package/docs/examples/databases/list-logs.md +9 -13
- package/docs/examples/databases/list.md +9 -13
- package/docs/examples/databases/update-boolean-attribute.md +12 -13
- package/docs/examples/databases/update-collection.md +13 -13
- package/docs/examples/databases/update-datetime-attribute.md +12 -13
- package/docs/examples/databases/update-document.md +12 -13
- package/docs/examples/databases/update-email-attribute.md +12 -13
- package/docs/examples/databases/update-enum-attribute.md +13 -13
- package/docs/examples/databases/update-float-attribute.md +14 -13
- package/docs/examples/databases/update-integer-attribute.md +14 -13
- package/docs/examples/databases/update-ip-attribute.md +12 -13
- package/docs/examples/databases/update-relationship-attribute.md +11 -13
- package/docs/examples/databases/update-string-attribute.md +12 -13
- package/docs/examples/databases/update-url-attribute.md +12 -13
- package/docs/examples/databases/update.md +10 -13
- package/docs/examples/functions/create-build.md +10 -13
- package/docs/examples/functions/create-deployment.md +12 -13
- package/docs/examples/functions/create-execution.md +13 -13
- package/docs/examples/functions/create-variable.md +10 -13
- package/docs/examples/functions/create.md +27 -13
- package/docs/examples/functions/delete-deployment.md +9 -13
- package/docs/examples/functions/delete-variable.md +9 -13
- package/docs/examples/functions/delete.md +8 -13
- package/docs/examples/functions/download-deployment.md +9 -9
- package/docs/examples/functions/get-deployment.md +9 -13
- package/docs/examples/functions/get-execution.md +9 -13
- package/docs/examples/functions/get-function-usage.md +9 -13
- package/docs/examples/functions/get-usage.md +8 -13
- package/docs/examples/functions/get-variable.md +9 -13
- package/docs/examples/functions/get.md +8 -13
- package/docs/examples/functions/list-deployments.md +10 -13
- package/docs/examples/functions/list-executions.md +10 -13
- package/docs/examples/functions/list-runtimes.md +6 -13
- package/docs/examples/functions/list-variables.md +8 -13
- package/docs/examples/functions/list.md +9 -13
- package/docs/examples/functions/update-deployment.md +9 -13
- package/docs/examples/functions/update-variable.md +11 -13
- package/docs/examples/functions/update.md +23 -13
- package/docs/examples/graphql/mutation.md +8 -13
- package/docs/examples/graphql/query.md +8 -13
- package/docs/examples/health/get-antivirus.md +6 -13
- package/docs/examples/health/get-cache.md +6 -13
- package/docs/examples/health/get-certificate.md +13 -0
- package/docs/examples/health/get-d-b.md +6 -13
- package/docs/examples/health/get-failed-jobs.md +14 -0
- package/docs/examples/health/get-pub-sub.md +6 -13
- package/docs/examples/health/get-queue-builds.md +8 -13
- package/docs/examples/health/get-queue-certificates.md +8 -13
- package/docs/examples/health/get-queue-databases.md +9 -13
- package/docs/examples/health/get-queue-deletes.md +8 -13
- package/docs/examples/health/get-queue-functions.md +8 -13
- package/docs/examples/health/get-queue-logs.md +8 -13
- package/docs/examples/health/get-queue-mails.md +8 -13
- package/docs/examples/health/get-queue-messaging.md +8 -13
- package/docs/examples/health/get-queue-migrations.md +8 -13
- package/docs/examples/health/get-queue-usage-dump.md +13 -0
- package/docs/examples/health/get-queue-usage.md +13 -0
- package/docs/examples/health/get-queue-webhooks.md +8 -13
- package/docs/examples/health/get-queue.md +6 -13
- package/docs/examples/health/get-storage-local.md +6 -13
- package/docs/examples/health/get-storage.md +11 -0
- package/docs/examples/health/get-time.md +6 -13
- package/docs/examples/health/get.md +6 -13
- package/docs/examples/locale/get.md +6 -13
- package/docs/examples/locale/list-codes.md +6 -13
- package/docs/examples/locale/list-continents.md +6 -13
- package/docs/examples/locale/list-countries-e-u.md +6 -13
- package/docs/examples/locale/list-countries-phones.md +6 -13
- package/docs/examples/locale/list-countries.md +6 -13
- package/docs/examples/locale/list-currencies.md +6 -13
- package/docs/examples/locale/list-languages.md +6 -13
- package/docs/examples/messaging/create-apns-provider.md +20 -0
- package/docs/examples/messaging/create-email.md +19 -13
- package/docs/examples/messaging/create-fcm-provider.md +16 -0
- package/docs/examples/messaging/create-mailgun-provider.md +17 -13
- package/docs/examples/messaging/create-msg91provider.md +13 -13
- package/docs/examples/messaging/create-push.md +23 -13
- package/docs/examples/messaging/create-sendgrid-provider.md +15 -13
- package/docs/examples/messaging/create-sms.md +19 -0
- package/docs/examples/messaging/create-smtp-provider.md +26 -0
- package/docs/examples/messaging/create-subscriber.md +10 -13
- package/docs/examples/messaging/create-telesign-provider.md +13 -13
- package/docs/examples/messaging/create-textmagic-provider.md +13 -13
- package/docs/examples/messaging/create-topic.md +10 -13
- package/docs/examples/messaging/create-twilio-provider.md +13 -13
- package/docs/examples/messaging/create-vonage-provider.md +13 -13
- package/docs/examples/messaging/delete-provider.md +8 -13
- package/docs/examples/messaging/delete-subscriber.md +9 -13
- package/docs/examples/messaging/delete-topic.md +8 -13
- package/docs/examples/messaging/delete.md +8 -13
- package/docs/examples/messaging/get-message.md +8 -13
- package/docs/examples/messaging/get-provider.md +8 -13
- package/docs/examples/messaging/get-subscriber.md +9 -13
- package/docs/examples/messaging/get-topic.md +8 -13
- package/docs/examples/messaging/list-message-logs.md +9 -13
- package/docs/examples/messaging/list-messages.md +9 -13
- package/docs/examples/messaging/list-provider-logs.md +9 -13
- package/docs/examples/messaging/list-providers.md +9 -13
- package/docs/examples/messaging/list-subscriber-logs.md +9 -13
- package/docs/examples/messaging/list-subscribers.md +10 -13
- package/docs/examples/messaging/list-targets.md +9 -13
- package/docs/examples/messaging/list-topic-logs.md +9 -13
- package/docs/examples/messaging/list-topics.md +9 -13
- package/docs/examples/messaging/update-apns-provider.md +20 -0
- package/docs/examples/messaging/update-email.md +18 -13
- package/docs/examples/messaging/update-fcm-provider.md +16 -0
- package/docs/examples/messaging/update-mailgun-provider.md +17 -13
- package/docs/examples/messaging/update-msg91provider.md +13 -13
- package/docs/examples/messaging/update-push.md +23 -13
- package/docs/examples/messaging/update-sendgrid-provider.md +15 -13
- package/docs/examples/messaging/update-sms.md +19 -0
- package/docs/examples/messaging/update-smtp-provider.md +26 -0
- package/docs/examples/messaging/update-telesign-provider.md +13 -13
- package/docs/examples/messaging/update-textmagic-provider.md +13 -13
- package/docs/examples/messaging/update-topic.md +10 -13
- package/docs/examples/messaging/update-twilio-provider.md +13 -13
- package/docs/examples/messaging/update-vonage-provider.md +13 -13
- package/docs/examples/migrations/create-appwrite-migration.md +11 -13
- package/docs/examples/migrations/create-firebase-migration.md +9 -13
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +9 -13
- package/docs/examples/migrations/create-n-host-migration.md +15 -13
- package/docs/examples/migrations/create-supabase-migration.md +14 -13
- package/docs/examples/migrations/delete-firebase-auth.md +6 -13
- package/docs/examples/migrations/delete.md +8 -13
- package/docs/examples/migrations/get-appwrite-report.md +11 -13
- package/docs/examples/migrations/get-firebase-report-o-auth.md +9 -13
- package/docs/examples/migrations/get-firebase-report.md +9 -13
- package/docs/examples/migrations/get-n-host-report.md +15 -13
- package/docs/examples/migrations/get-supabase-report.md +14 -13
- package/docs/examples/migrations/get.md +8 -13
- package/docs/examples/migrations/list-firebase-projects.md +6 -13
- package/docs/examples/migrations/list.md +9 -13
- package/docs/examples/migrations/retry.md +8 -13
- package/docs/examples/project/create-variable.md +9 -13
- package/docs/examples/project/delete-variable.md +8 -13
- package/docs/examples/project/get-usage.md +10 -13
- package/docs/examples/project/get-variable.md +8 -13
- package/docs/examples/project/list-variables.md +6 -13
- package/docs/examples/project/update-variable.md +10 -13
- package/docs/examples/projects/create-key.md +11 -13
- package/docs/examples/projects/create-platform.md +13 -13
- package/docs/examples/projects/create-smtp-test.md +17 -13
- package/docs/examples/projects/create-webhook.md +15 -13
- package/docs/examples/projects/create.md +20 -13
- package/docs/examples/projects/delete-email-template.md +10 -13
- package/docs/examples/projects/delete-key.md +9 -13
- package/docs/examples/projects/delete-platform.md +9 -13
- package/docs/examples/projects/delete-sms-template.md +10 -13
- package/docs/examples/projects/delete-webhook.md +9 -13
- package/docs/examples/projects/delete.md +8 -13
- package/docs/examples/projects/get-email-template.md +10 -13
- package/docs/examples/projects/get-key.md +9 -13
- package/docs/examples/projects/get-platform.md +9 -13
- package/docs/examples/projects/get-sms-template.md +10 -13
- package/docs/examples/projects/get-webhook.md +9 -13
- package/docs/examples/projects/get.md +8 -13
- package/docs/examples/projects/list-keys.md +8 -13
- package/docs/examples/projects/list-platforms.md +8 -13
- package/docs/examples/projects/list-webhooks.md +8 -13
- package/docs/examples/projects/list.md +9 -13
- package/docs/examples/projects/update-api-status-all.md +14 -0
- package/docs/examples/projects/update-api-status.md +15 -0
- package/docs/examples/projects/update-auth-duration.md +9 -13
- package/docs/examples/projects/update-auth-limit.md +9 -13
- package/docs/examples/projects/update-auth-password-dictionary.md +9 -13
- package/docs/examples/projects/update-auth-password-history.md +9 -13
- package/docs/examples/projects/update-auth-sessions-limit.md +9 -13
- package/docs/examples/projects/update-auth-status.md +10 -13
- package/docs/examples/projects/update-email-template.md +15 -13
- package/docs/examples/projects/update-key.md +12 -13
- package/docs/examples/projects/update-o-auth2.md +12 -13
- package/docs/examples/projects/update-personal-data-check.md +9 -13
- package/docs/examples/projects/update-platform.md +13 -13
- package/docs/examples/projects/update-service-status-all.md +9 -13
- package/docs/examples/projects/update-service-status.md +10 -13
- package/docs/examples/projects/update-sms-template.md +11 -13
- package/docs/examples/projects/update-smtp.md +17 -13
- package/docs/examples/projects/update-team.md +9 -13
- package/docs/examples/projects/update-webhook-signature.md +9 -13
- package/docs/examples/projects/update-webhook.md +16 -13
- package/docs/examples/projects/update.md +18 -13
- package/docs/examples/proxy/create-rule.md +10 -13
- package/docs/examples/proxy/delete-rule.md +8 -13
- package/docs/examples/proxy/get-rule.md +8 -13
- package/docs/examples/proxy/list-rules.md +9 -13
- package/docs/examples/proxy/update-rule-verification.md +8 -13
- package/docs/examples/storage/create-bucket.md +17 -13
- package/docs/examples/storage/create-file.md +11 -13
- package/docs/examples/storage/delete-bucket.md +8 -13
- package/docs/examples/storage/delete-file.md +9 -13
- package/docs/examples/storage/get-bucket-usage.md +9 -13
- package/docs/examples/storage/get-bucket.md +8 -13
- package/docs/examples/storage/get-file-download.md +9 -9
- package/docs/examples/storage/get-file-preview.md +20 -9
- package/docs/examples/storage/get-file-view.md +9 -9
- package/docs/examples/storage/get-file.md +9 -13
- package/docs/examples/storage/get-usage.md +8 -13
- package/docs/examples/storage/list-buckets.md +9 -13
- package/docs/examples/storage/list-files.md +10 -13
- package/docs/examples/storage/update-bucket.md +17 -13
- package/docs/examples/storage/update-file.md +11 -13
- package/docs/examples/teams/create-membership.md +14 -13
- package/docs/examples/teams/create.md +10 -13
- package/docs/examples/teams/delete-membership.md +9 -13
- package/docs/examples/teams/delete.md +8 -13
- package/docs/examples/teams/get-membership.md +9 -13
- package/docs/examples/teams/get-prefs.md +8 -13
- package/docs/examples/teams/get.md +8 -13
- package/docs/examples/teams/list-logs.md +9 -13
- package/docs/examples/teams/list-memberships.md +10 -13
- package/docs/examples/teams/list.md +9 -13
- package/docs/examples/teams/update-membership-status.md +11 -13
- package/docs/examples/teams/update-membership.md +10 -13
- package/docs/examples/teams/update-name.md +9 -13
- package/docs/examples/teams/update-prefs.md +9 -13
- package/docs/examples/users/create-argon2user.md +11 -13
- package/docs/examples/users/create-bcrypt-user.md +11 -13
- package/docs/examples/users/create-m-d5user.md +11 -13
- package/docs/examples/users/create-mfa-recovery-codes.md +13 -0
- package/docs/examples/users/create-p-h-pass-user.md +11 -13
- package/docs/examples/users/create-s-h-a-user.md +12 -13
- package/docs/examples/users/create-scrypt-modified-user.md +14 -13
- package/docs/examples/users/create-scrypt-user.md +16 -13
- package/docs/examples/users/create-session.md +8 -13
- package/docs/examples/users/create-target.md +13 -13
- package/docs/examples/users/create-token.md +10 -13
- package/docs/examples/users/create.md +12 -13
- package/docs/examples/users/delete-identity.md +8 -13
- package/docs/examples/users/delete-mfa-authenticator.md +14 -0
- package/docs/examples/users/delete-session.md +9 -13
- package/docs/examples/users/delete-sessions.md +8 -13
- package/docs/examples/users/delete-target.md +9 -13
- package/docs/examples/users/delete.md +8 -13
- package/docs/examples/users/get-mfa-recovery-codes.md +13 -0
- package/docs/examples/users/get-prefs.md +8 -13
- package/docs/examples/users/get-target.md +9 -13
- package/docs/examples/users/get-usage.md +8 -13
- package/docs/examples/users/get.md +8 -13
- package/docs/examples/users/list-identities.md +9 -13
- package/docs/examples/users/list-logs.md +9 -13
- package/docs/examples/users/list-memberships.md +8 -13
- package/docs/examples/users/list-mfa-factors.md +13 -0
- package/docs/examples/users/list-sessions.md +8 -13
- package/docs/examples/users/list-targets.md +9 -13
- package/docs/examples/users/list.md +9 -13
- package/docs/examples/users/update-email-verification.md +9 -13
- package/docs/examples/users/update-email.md +9 -13
- package/docs/examples/users/update-labels.md +9 -13
- package/docs/examples/users/update-mfa-recovery-codes.md +13 -0
- package/docs/examples/users/update-mfa.md +9 -13
- package/docs/examples/users/update-name.md +9 -13
- package/docs/examples/users/update-password.md +9 -13
- package/docs/examples/users/update-phone-verification.md +9 -13
- package/docs/examples/users/update-phone.md +9 -13
- package/docs/examples/users/update-prefs.md +9 -13
- package/docs/examples/users/update-status.md +9 -13
- package/docs/examples/users/update-target.md +12 -13
- package/docs/examples/vcs/create-repository-detection.md +10 -13
- package/docs/examples/vcs/create-repository.md +10 -13
- package/docs/examples/vcs/delete-installation.md +8 -13
- package/docs/examples/vcs/get-installation.md +8 -13
- package/docs/examples/vcs/get-repository.md +9 -13
- package/docs/examples/vcs/list-installations.md +9 -13
- package/docs/examples/vcs/list-repositories.md +9 -13
- package/docs/examples/vcs/list-repository-branches.md +9 -13
- package/docs/examples/vcs/update-external-deployments.md +10 -13
- package/package.json +1 -1
- package/src/client.ts +3 -3
- package/src/enums/{a-p-i-service.ts → api-service.ts} +1 -1
- package/src/enums/api.ts +5 -0
- package/src/enums/authentication-factor.ts +6 -0
- package/src/enums/authenticator-type.ts +3 -0
- package/src/enums/email-template-locale.ts +133 -0
- package/src/enums/email-template-type.ts +7 -0
- package/src/enums/index-type.ts +0 -1
- package/src/enums/name.ts +15 -0
- package/src/enums/{password-version.ts → password-hash.ts} +1 -1
- package/src/enums/region.ts +1 -0
- package/src/enums/runtime.ts +40 -0
- package/src/enums/{template-locale.ts → sms-template-locale.ts} +1 -1
- package/src/enums/{template-type.ts → sms-template-type.ts} +2 -1
- package/src/enums/{s-m-t-p-encryption.ts → smtp-encryption.ts} +1 -1
- package/src/index.ts +11 -8
- package/src/models.ts +57 -19
- package/src/query.ts +2 -2
- package/src/service.ts +0 -3
- package/src/services/account.ts +239 -66
- package/src/services/assistant.ts +0 -1
- package/src/services/avatars.ts +0 -1
- package/src/services/console.ts +0 -1
- package/src/services/databases.ts +20 -4
- package/src/services/functions.ts +0 -1
- package/src/services/graphql.ts +0 -1
- package/src/services/health.ts +121 -1
- package/src/services/locale.ts +0 -1
- package/src/services/messaging.ts +161 -70
- package/src/services/migrations.ts +0 -1
- package/src/services/project.ts +1 -2
- package/src/services/projects.ts +97 -24
- package/src/services/proxy.ts +0 -1
- package/src/services/storage.ts +2 -3
- package/src/services/teams.ts +0 -1
- package/src/services/users.ts +115 -39
- package/src/services/vcs.ts +0 -1
- package/types/enums/{a-p-i-service.d.ts → api-service.d.ts} +1 -1
- package/types/enums/api.d.ts +5 -0
- package/types/enums/authentication-factor.d.ts +6 -0
- package/types/enums/authenticator-type.d.ts +3 -0
- package/types/enums/email-template-locale.d.ts +133 -0
- package/types/enums/email-template-type.d.ts +7 -0
- package/types/enums/index-type.d.ts +1 -2
- package/types/enums/name.d.ts +15 -0
- package/types/enums/{password-version.d.ts → password-hash.d.ts} +1 -1
- package/types/enums/region.d.ts +2 -1
- package/types/enums/runtime.d.ts +41 -1
- package/types/enums/{template-locale.d.ts → sms-template-locale.d.ts} +1 -1
- package/types/enums/sms-template-type.d.ts +6 -0
- package/types/enums/{s-m-t-p-encryption.d.ts → smtp-encryption.d.ts} +1 -1
- package/types/index.d.ts +11 -8
- package/types/models.d.ts +57 -19
- package/types/query.d.ts +2 -2
- package/types/services/account.d.ts +121 -28
- package/types/services/databases.d.ts +20 -3
- package/types/services/health.d.ts +56 -0
- package/types/services/messaging.d.ts +109 -49
- package/types/services/project.d.ts +1 -1
- package/types/services/projects.d.ts +47 -23
- package/types/services/storage.d.ts +2 -2
- package/types/services/users.d.ts +63 -17
- package/docs/examples/account/add-authenticator.md +0 -18
- package/docs/examples/account/create-challenge.md +0 -18
- package/docs/examples/account/delete-authenticator.md +0 -18
- package/docs/examples/account/list-factors.md +0 -18
- package/docs/examples/account/update-challenge.md +0 -18
- package/docs/examples/account/verify-authenticator.md +0 -18
- package/docs/examples/messaging/create-a-p-n-s-provider.md +0 -18
- package/docs/examples/messaging/create-f-c-m-provider.md +0 -18
- package/docs/examples/messaging/create-s-m-s.md +0 -18
- package/docs/examples/messaging/create-s-m-t-p-provider.md +0 -18
- package/docs/examples/messaging/update-a-p-n-s-provider.md +0 -18
- package/docs/examples/messaging/update-f-c-m-provider.md +0 -18
- package/docs/examples/messaging/update-s-m-s.md +0 -18
- package/docs/examples/messaging/update-s-m-t-p-provider.md +0 -18
- package/docs/examples/users/delete-authenticator.md +0 -18
- package/docs/examples/users/list-providers.md +0 -18
- package/src/enums/authenticator-factor.ts +0 -3
- package/src/enums/authenticator-provider.ts +0 -3
- package/src/enums/message-type.ts +0 -5
- package/types/enums/authenticator-factor.d.ts +0 -3
- package/types/enums/authenticator-provider.d.ts +0 -3
- package/types/enums/message-type.d.ts +0 -5
- package/types/enums/template-type.d.ts +0 -5
|
@@ -2,13 +2,16 @@ import { Service } from '../service';
|
|
|
2
2
|
import { Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import { Region } from '../enums/region';
|
|
5
|
+
import { Api } from '../enums/api';
|
|
5
6
|
import { AuthMethod } from '../enums/auth-method';
|
|
6
7
|
import { OAuthProvider } from '../enums/o-auth-provider';
|
|
7
8
|
import { PlatformType } from '../enums/platform-type';
|
|
8
|
-
import {
|
|
9
|
+
import { ApiService } from '../enums/api-service';
|
|
9
10
|
import { SMTPSecure } from '../enums/s-m-t-p-secure';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
11
|
+
import { EmailTemplateType } from '../enums/email-template-type';
|
|
12
|
+
import { EmailTemplateLocale } from '../enums/email-template-locale';
|
|
13
|
+
import { SmsTemplateType } from '../enums/sms-template-type';
|
|
14
|
+
import { SmsTemplateLocale } from '../enums/sms-template-locale';
|
|
12
15
|
export declare class Projects extends Service {
|
|
13
16
|
constructor(client: Client);
|
|
14
17
|
/**
|
|
@@ -79,6 +82,27 @@ export declare class Projects extends Service {
|
|
|
79
82
|
* @returns {Promise}
|
|
80
83
|
*/
|
|
81
84
|
delete(projectId: string): Promise<{}>;
|
|
85
|
+
/**
|
|
86
|
+
* Update API status
|
|
87
|
+
*
|
|
88
|
+
*
|
|
89
|
+
* @param {string} projectId
|
|
90
|
+
* @param {Api} api
|
|
91
|
+
* @param {boolean} status
|
|
92
|
+
* @throws {AppwriteException}
|
|
93
|
+
* @returns {Promise}
|
|
94
|
+
*/
|
|
95
|
+
updateApiStatus(projectId: string, api: Api, status: boolean): Promise<Models.Project>;
|
|
96
|
+
/**
|
|
97
|
+
* Update all API status
|
|
98
|
+
*
|
|
99
|
+
*
|
|
100
|
+
* @param {string} projectId
|
|
101
|
+
* @param {boolean} status
|
|
102
|
+
* @throws {AppwriteException}
|
|
103
|
+
* @returns {Promise}
|
|
104
|
+
*/
|
|
105
|
+
updateApiStatusAll(projectId: string, status: boolean): Promise<Models.Project>;
|
|
82
106
|
/**
|
|
83
107
|
* Update project authentication duration
|
|
84
108
|
*
|
|
@@ -279,12 +303,12 @@ export declare class Projects extends Service {
|
|
|
279
303
|
*
|
|
280
304
|
*
|
|
281
305
|
* @param {string} projectId
|
|
282
|
-
* @param {
|
|
306
|
+
* @param {ApiService} service
|
|
283
307
|
* @param {boolean} status
|
|
284
308
|
* @throws {AppwriteException}
|
|
285
309
|
* @returns {Promise}
|
|
286
310
|
*/
|
|
287
|
-
updateServiceStatus(projectId: string, service:
|
|
311
|
+
updateServiceStatus(projectId: string, service: ApiService, status: boolean): Promise<Models.Project>;
|
|
288
312
|
/**
|
|
289
313
|
* Update all service status
|
|
290
314
|
*
|
|
@@ -346,19 +370,19 @@ export declare class Projects extends Service {
|
|
|
346
370
|
*
|
|
347
371
|
*
|
|
348
372
|
* @param {string} projectId
|
|
349
|
-
* @param {
|
|
350
|
-
* @param {
|
|
373
|
+
* @param {EmailTemplateType} type
|
|
374
|
+
* @param {EmailTemplateLocale} locale
|
|
351
375
|
* @throws {AppwriteException}
|
|
352
376
|
* @returns {Promise}
|
|
353
377
|
*/
|
|
354
|
-
getEmailTemplate(projectId: string, type:
|
|
378
|
+
getEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate>;
|
|
355
379
|
/**
|
|
356
380
|
* Update custom email templates
|
|
357
381
|
*
|
|
358
382
|
*
|
|
359
383
|
* @param {string} projectId
|
|
360
|
-
* @param {
|
|
361
|
-
* @param {
|
|
384
|
+
* @param {EmailTemplateType} type
|
|
385
|
+
* @param {EmailTemplateLocale} locale
|
|
362
386
|
* @param {string} subject
|
|
363
387
|
* @param {string} message
|
|
364
388
|
* @param {string} senderName
|
|
@@ -367,52 +391,52 @@ export declare class Projects extends Service {
|
|
|
367
391
|
* @throws {AppwriteException}
|
|
368
392
|
* @returns {Promise}
|
|
369
393
|
*/
|
|
370
|
-
updateEmailTemplate(projectId: string, type:
|
|
394
|
+
updateEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string): Promise<Models.Project>;
|
|
371
395
|
/**
|
|
372
396
|
* Reset custom email template
|
|
373
397
|
*
|
|
374
398
|
*
|
|
375
399
|
* @param {string} projectId
|
|
376
|
-
* @param {
|
|
377
|
-
* @param {
|
|
400
|
+
* @param {EmailTemplateType} type
|
|
401
|
+
* @param {EmailTemplateLocale} locale
|
|
378
402
|
* @throws {AppwriteException}
|
|
379
403
|
* @returns {Promise}
|
|
380
404
|
*/
|
|
381
|
-
deleteEmailTemplate(projectId: string, type:
|
|
405
|
+
deleteEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate>;
|
|
382
406
|
/**
|
|
383
407
|
* Get custom SMS template
|
|
384
408
|
*
|
|
385
409
|
*
|
|
386
410
|
* @param {string} projectId
|
|
387
|
-
* @param {
|
|
388
|
-
* @param {
|
|
411
|
+
* @param {SmsTemplateType} type
|
|
412
|
+
* @param {SmsTemplateLocale} locale
|
|
389
413
|
* @throws {AppwriteException}
|
|
390
414
|
* @returns {Promise}
|
|
391
415
|
*/
|
|
392
|
-
getSmsTemplate(projectId: string, type:
|
|
416
|
+
getSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
|
|
393
417
|
/**
|
|
394
418
|
* Update custom SMS template
|
|
395
419
|
*
|
|
396
420
|
*
|
|
397
421
|
* @param {string} projectId
|
|
398
|
-
* @param {
|
|
399
|
-
* @param {
|
|
422
|
+
* @param {SmsTemplateType} type
|
|
423
|
+
* @param {SmsTemplateLocale} locale
|
|
400
424
|
* @param {string} message
|
|
401
425
|
* @throws {AppwriteException}
|
|
402
426
|
* @returns {Promise}
|
|
403
427
|
*/
|
|
404
|
-
updateSmsTemplate(projectId: string, type:
|
|
428
|
+
updateSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string): Promise<Models.SmsTemplate>;
|
|
405
429
|
/**
|
|
406
430
|
* Reset custom SMS template
|
|
407
431
|
*
|
|
408
432
|
*
|
|
409
433
|
* @param {string} projectId
|
|
410
|
-
* @param {
|
|
411
|
-
* @param {
|
|
434
|
+
* @param {SmsTemplateType} type
|
|
435
|
+
* @param {SmsTemplateLocale} locale
|
|
412
436
|
* @throws {AppwriteException}
|
|
413
437
|
* @returns {Promise}
|
|
414
438
|
*/
|
|
415
|
-
deleteSmsTemplate(projectId: string, type:
|
|
439
|
+
deleteSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
|
|
416
440
|
/**
|
|
417
441
|
* List webhooks
|
|
418
442
|
*
|
|
@@ -213,7 +213,7 @@ export declare class Storage extends Service {
|
|
|
213
213
|
*/
|
|
214
214
|
getFileView(bucketId: string, fileId: string): URL;
|
|
215
215
|
/**
|
|
216
|
-
* Get usage stats
|
|
216
|
+
* Get storage usage stats
|
|
217
217
|
*
|
|
218
218
|
*
|
|
219
219
|
* @param {StorageUsageRange} range
|
|
@@ -222,7 +222,7 @@ export declare class Storage extends Service {
|
|
|
222
222
|
*/
|
|
223
223
|
getUsage(range?: StorageUsageRange): Promise<Models.UsageStorage>;
|
|
224
224
|
/**
|
|
225
|
-
* Get usage stats
|
|
225
|
+
* Get bucket usage stats
|
|
226
226
|
*
|
|
227
227
|
*
|
|
228
228
|
* @param {string} bucketId
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
2
|
import { Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
|
-
import {
|
|
4
|
+
import { PasswordHash } from '../enums/password-hash';
|
|
5
5
|
import { UserUsageRange } from '../enums/user-usage-range';
|
|
6
|
-
import {
|
|
6
|
+
import { AuthenticatorType } from '../enums/authenticator-type';
|
|
7
7
|
import { MessagingProviderType } from '../enums/messaging-provider-type';
|
|
8
8
|
export declare class Users extends Service {
|
|
9
9
|
constructor(client: Client);
|
|
@@ -170,14 +170,14 @@ export declare class Users extends Service {
|
|
|
170
170
|
* @param {string} userId
|
|
171
171
|
* @param {string} email
|
|
172
172
|
* @param {string} password
|
|
173
|
-
* @param {
|
|
173
|
+
* @param {PasswordHash} passwordVersion
|
|
174
174
|
* @param {string} name
|
|
175
175
|
* @throws {AppwriteException}
|
|
176
176
|
* @returns {Promise}
|
|
177
177
|
*/
|
|
178
|
-
createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?:
|
|
178
|
+
createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string): Promise<Models.User<Preferences>>;
|
|
179
179
|
/**
|
|
180
|
-
* Get usage stats
|
|
180
|
+
* Get users usage stats
|
|
181
181
|
*
|
|
182
182
|
*
|
|
183
183
|
* @param {UserUsageRange} range
|
|
@@ -261,6 +261,7 @@ export declare class Users extends Service {
|
|
|
261
261
|
/**
|
|
262
262
|
* Update MFA
|
|
263
263
|
*
|
|
264
|
+
* Enable or disable MFA on a user account.
|
|
264
265
|
*
|
|
265
266
|
* @param {string} userId
|
|
266
267
|
* @param {boolean} mfa
|
|
@@ -271,14 +272,63 @@ export declare class Users extends Service {
|
|
|
271
272
|
/**
|
|
272
273
|
* Delete Authenticator
|
|
273
274
|
*
|
|
275
|
+
* Delete an authenticator app.
|
|
274
276
|
*
|
|
275
277
|
* @param {string} userId
|
|
276
|
-
* @param {
|
|
277
|
-
* @param {string} otp
|
|
278
|
+
* @param {AuthenticatorType} type
|
|
278
279
|
* @throws {AppwriteException}
|
|
279
280
|
* @returns {Promise}
|
|
280
281
|
*/
|
|
281
|
-
|
|
282
|
+
deleteMfaAuthenticator<Preferences extends Models.Preferences>(userId: string, type: AuthenticatorType): Promise<Models.User<Preferences>>;
|
|
283
|
+
/**
|
|
284
|
+
* List Factors
|
|
285
|
+
*
|
|
286
|
+
* List the factors available on the account to be used as a MFA challange.
|
|
287
|
+
*
|
|
288
|
+
* @param {string} userId
|
|
289
|
+
* @throws {AppwriteException}
|
|
290
|
+
* @returns {Promise}
|
|
291
|
+
*/
|
|
292
|
+
listMfaFactors(userId: string): Promise<Models.MfaFactors>;
|
|
293
|
+
/**
|
|
294
|
+
* Get MFA Recovery Codes
|
|
295
|
+
*
|
|
296
|
+
* Get recovery codes that can be used as backup for MFA flow by User ID.
|
|
297
|
+
* Before getting codes, they must be generated using
|
|
298
|
+
* [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
|
|
299
|
+
* method.
|
|
300
|
+
*
|
|
301
|
+
* @param {string} userId
|
|
302
|
+
* @throws {AppwriteException}
|
|
303
|
+
* @returns {Promise}
|
|
304
|
+
*/
|
|
305
|
+
getMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes>;
|
|
306
|
+
/**
|
|
307
|
+
* Regenerate MFA Recovery Codes
|
|
308
|
+
*
|
|
309
|
+
* Regenerate recovery codes that can be used as backup for MFA flow by User
|
|
310
|
+
* ID. Before regenerating codes, they must be first generated using
|
|
311
|
+
* [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
|
|
312
|
+
* method.
|
|
313
|
+
*
|
|
314
|
+
* @param {string} userId
|
|
315
|
+
* @throws {AppwriteException}
|
|
316
|
+
* @returns {Promise}
|
|
317
|
+
*/
|
|
318
|
+
updateMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes>;
|
|
319
|
+
/**
|
|
320
|
+
* Create MFA Recovery Codes
|
|
321
|
+
*
|
|
322
|
+
* Generate recovery codes used as backup for MFA flow for User ID. Recovery
|
|
323
|
+
* codes can be used as a MFA verification type in
|
|
324
|
+
* [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
|
|
325
|
+
* method by client SDK.
|
|
326
|
+
*
|
|
327
|
+
* @param {string} userId
|
|
328
|
+
* @throws {AppwriteException}
|
|
329
|
+
* @returns {Promise}
|
|
330
|
+
*/
|
|
331
|
+
createMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes>;
|
|
282
332
|
/**
|
|
283
333
|
* Update name
|
|
284
334
|
*
|
|
@@ -335,15 +385,6 @@ export declare class Users extends Service {
|
|
|
335
385
|
* @returns {Promise}
|
|
336
386
|
*/
|
|
337
387
|
updatePrefs<Preferences extends Models.Preferences>(userId: string, prefs: object): Promise<Preferences>;
|
|
338
|
-
/**
|
|
339
|
-
* List Providers
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
* @param {string} userId
|
|
343
|
-
* @throws {AppwriteException}
|
|
344
|
-
* @returns {Promise}
|
|
345
|
-
*/
|
|
346
|
-
listProviders(userId: string): Promise<Models.MfaProviders>;
|
|
347
388
|
/**
|
|
348
389
|
* List user sessions
|
|
349
390
|
*
|
|
@@ -405,6 +446,7 @@ export declare class Users extends Service {
|
|
|
405
446
|
/**
|
|
406
447
|
* List User Targets
|
|
407
448
|
*
|
|
449
|
+
* List the messaging targets that are associated with a user.
|
|
408
450
|
*
|
|
409
451
|
* @param {string} userId
|
|
410
452
|
* @param {string[]} queries
|
|
@@ -415,6 +457,7 @@ export declare class Users extends Service {
|
|
|
415
457
|
/**
|
|
416
458
|
* Create User Target
|
|
417
459
|
*
|
|
460
|
+
* Create a messaging target.
|
|
418
461
|
*
|
|
419
462
|
* @param {string} userId
|
|
420
463
|
* @param {string} targetId
|
|
@@ -429,6 +472,7 @@ export declare class Users extends Service {
|
|
|
429
472
|
/**
|
|
430
473
|
* Get User Target
|
|
431
474
|
*
|
|
475
|
+
* Get a user's push notification target by ID.
|
|
432
476
|
*
|
|
433
477
|
* @param {string} userId
|
|
434
478
|
* @param {string} targetId
|
|
@@ -439,6 +483,7 @@ export declare class Users extends Service {
|
|
|
439
483
|
/**
|
|
440
484
|
* Update User target
|
|
441
485
|
*
|
|
486
|
+
* Update a messaging target.
|
|
442
487
|
*
|
|
443
488
|
* @param {string} userId
|
|
444
489
|
* @param {string} targetId
|
|
@@ -452,6 +497,7 @@ export declare class Users extends Service {
|
|
|
452
497
|
/**
|
|
453
498
|
* Delete user target
|
|
454
499
|
*
|
|
500
|
+
* Delete a messaging target.
|
|
455
501
|
*
|
|
456
502
|
* @param {string} userId
|
|
457
503
|
* @param {string} targetId
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, AuthenticatorFactor, Account } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const account = new Account(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = account.addAuthenticator(AuthenticatorFactor.Totp);
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, AuthenticatorProvider, Account } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const account = new Account(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = account.createChallenge(AuthenticatorProvider.Totp);
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, AuthenticatorProvider, Account } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const account = new Account(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = account.deleteAuthenticator(AuthenticatorProvider.Totp, '[OTP]');
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, Account } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const account = new Account(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = account.listFactors();
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, Account } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const account = new Account(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = account.updateChallenge('[CHALLENGE_ID]', '[OTP]');
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, AuthenticatorFactor, Account } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const account = new Account(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = account.verifyAuthenticator(AuthenticatorFactor.Totp, '[OTP]');
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const messaging = new Messaging(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = messaging.createAPNSProvider('[PROVIDER_ID]', '[NAME]');
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const messaging = new Messaging(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = messaging.createFCMProvider('[PROVIDER_ID]', '[NAME]');
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const messaging = new Messaging(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = messaging.createSMS('[MESSAGE_ID]', '[CONTENT]');
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const messaging = new Messaging(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = messaging.createSMTPProvider('[PROVIDER_ID]', '[NAME]', '[HOST]');
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const messaging = new Messaging(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = messaging.updateAPNSProvider('[PROVIDER_ID]');
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const messaging = new Messaging(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = messaging.updateFCMProvider('[PROVIDER_ID]');
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const messaging = new Messaging(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = messaging.updateSMS('[MESSAGE_ID]');
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const messaging = new Messaging(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = messaging.updateSMTPProvider('[PROVIDER_ID]');
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, AuthenticatorProvider, Users } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const users = new Users(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = users.deleteAuthenticator('[USER_ID]', AuthenticatorProvider.Totp, '[OTP]');
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Client, Users } from "@appwrite.io/console";
|
|
2
|
-
|
|
3
|
-
const client = new Client();
|
|
4
|
-
|
|
5
|
-
const users = new Users(client);
|
|
6
|
-
|
|
7
|
-
client
|
|
8
|
-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
-
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
-
;
|
|
11
|
-
|
|
12
|
-
const promise = users.listProviders('[USER_ID]');
|
|
13
|
-
|
|
14
|
-
promise.then(function (response) {
|
|
15
|
-
console.log(response); // Success
|
|
16
|
-
}, function (error) {
|
|
17
|
-
console.log(error); // Failure
|
|
18
|
-
});
|