@appwrite.io/console 0.6.0-rc.8 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.travis.yml +32 -0
- package/README.md +6 -6
- package/dist/cjs/sdk.js +1839 -338
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1840 -339
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +1839 -338
- package/docs/examples/account/create-anonymous-session.md +5 -12
- package/docs/examples/account/create-email-password-session.md +8 -12
- package/docs/examples/account/create-email-token.md +9 -12
- package/docs/examples/account/create-j-w-t.md +5 -12
- package/docs/examples/account/create-magic-u-r-l-token.md +10 -12
- package/docs/examples/account/create-mfa-authenticator.md +13 -0
- package/docs/examples/account/create-mfa-challenge.md +13 -0
- package/docs/examples/account/create-mfa-recovery-codes.md +11 -0
- package/docs/examples/account/create-o-auth2session.md +10 -9
- package/docs/examples/account/create-o-auth2token.md +15 -0
- package/docs/examples/account/create-phone-token.md +8 -12
- package/docs/examples/account/create-phone-verification.md +5 -12
- package/docs/examples/account/create-push-target.md +9 -12
- package/docs/examples/account/create-recovery.md +8 -12
- package/docs/examples/account/create-session.md +8 -12
- package/docs/examples/account/create-verification.md +7 -12
- package/docs/examples/account/create.md +10 -12
- package/docs/examples/account/delete-identity.md +7 -12
- package/docs/examples/account/delete-mfa-authenticator.md +14 -0
- package/docs/examples/account/delete-push-target.md +13 -0
- package/docs/examples/account/delete-session.md +7 -12
- package/docs/examples/account/delete-sessions.md +5 -12
- package/docs/examples/account/delete.md +5 -12
- package/docs/examples/account/get-mfa-recovery-codes.md +11 -0
- package/docs/examples/account/get-prefs.md +5 -12
- package/docs/examples/account/get-session.md +7 -12
- package/docs/examples/account/get.md +5 -12
- package/docs/examples/account/list-identities.md +7 -12
- package/docs/examples/account/list-logs.md +7 -12
- package/docs/examples/account/list-mfa-factors.md +11 -0
- package/docs/examples/account/list-sessions.md +5 -12
- package/docs/examples/account/update-email.md +8 -12
- package/docs/examples/account/update-m-f-a.md +7 -12
- package/docs/examples/account/update-magic-u-r-l-session.md +8 -12
- package/docs/examples/account/update-mfa-authenticator.md +14 -0
- package/docs/examples/account/update-mfa-challenge.md +14 -0
- package/docs/examples/account/update-mfa-recovery-codes.md +11 -0
- package/docs/examples/account/update-name.md +7 -12
- package/docs/examples/account/update-password.md +8 -12
- package/docs/examples/account/update-phone-session.md +14 -0
- package/docs/examples/account/update-phone-verification.md +8 -12
- package/docs/examples/account/update-phone.md +8 -12
- package/docs/examples/account/update-prefs.md +7 -12
- package/docs/examples/account/update-push-target.md +8 -12
- package/docs/examples/account/update-recovery.md +9 -12
- package/docs/examples/account/update-session.md +7 -12
- package/docs/examples/account/update-status.md +5 -12
- package/docs/examples/account/update-verification.md +8 -12
- package/docs/examples/assistant/chat.md +7 -12
- package/docs/examples/avatars/get-browser.md +11 -9
- package/docs/examples/avatars/get-credit-card.md +11 -9
- package/docs/examples/avatars/get-favicon.md +7 -8
- package/docs/examples/avatars/get-flag.md +11 -9
- package/docs/examples/avatars/get-image.md +9 -8
- package/docs/examples/avatars/get-initials.md +10 -8
- package/docs/examples/avatars/get-q-r.md +10 -8
- package/docs/examples/console/variables.md +5 -12
- package/docs/examples/databases/create-boolean-attribute.md +12 -12
- package/docs/examples/databases/create-collection.md +12 -12
- package/docs/examples/databases/create-datetime-attribute.md +12 -12
- package/docs/examples/databases/create-document.md +11 -12
- package/docs/examples/databases/create-email-attribute.md +12 -12
- package/docs/examples/databases/create-enum-attribute.md +13 -12
- package/docs/examples/databases/create-float-attribute.md +14 -12
- package/docs/examples/databases/create-index.md +13 -13
- package/docs/examples/databases/create-integer-attribute.md +14 -12
- package/docs/examples/databases/create-ip-attribute.md +12 -12
- package/docs/examples/databases/create-relationship-attribute.md +15 -13
- package/docs/examples/databases/create-string-attribute.md +14 -12
- package/docs/examples/databases/create-url-attribute.md +12 -12
- package/docs/examples/databases/create.md +9 -12
- package/docs/examples/databases/delete-attribute.md +9 -12
- package/docs/examples/databases/delete-collection.md +8 -12
- package/docs/examples/databases/delete-document.md +9 -12
- package/docs/examples/databases/delete-index.md +9 -12
- package/docs/examples/databases/delete.md +7 -12
- package/docs/examples/databases/get-attribute.md +9 -12
- package/docs/examples/databases/get-collection-usage.md +10 -13
- package/docs/examples/databases/get-collection.md +8 -12
- package/docs/examples/databases/get-database-usage.md +9 -13
- package/docs/examples/databases/get-document.md +10 -12
- package/docs/examples/databases/get-index.md +9 -12
- package/docs/examples/databases/get-usage.md +8 -13
- package/docs/examples/databases/get.md +7 -12
- package/docs/examples/databases/list-attributes.md +9 -12
- package/docs/examples/databases/list-collection-logs.md +9 -12
- package/docs/examples/databases/list-collections.md +9 -12
- package/docs/examples/databases/list-document-logs.md +10 -12
- package/docs/examples/databases/list-documents.md +9 -12
- package/docs/examples/databases/list-indexes.md +9 -12
- package/docs/examples/databases/list-logs.md +8 -12
- package/docs/examples/databases/list.md +8 -12
- package/docs/examples/databases/update-boolean-attribute.md +11 -12
- package/docs/examples/databases/update-collection.md +12 -12
- package/docs/examples/databases/update-datetime-attribute.md +11 -12
- package/docs/examples/databases/update-document.md +11 -12
- package/docs/examples/databases/update-email-attribute.md +11 -12
- package/docs/examples/databases/update-enum-attribute.md +12 -12
- package/docs/examples/databases/update-float-attribute.md +13 -12
- package/docs/examples/databases/update-integer-attribute.md +13 -12
- package/docs/examples/databases/update-ip-attribute.md +11 -12
- package/docs/examples/databases/update-relationship-attribute.md +11 -13
- package/docs/examples/databases/update-string-attribute.md +11 -12
- package/docs/examples/databases/update-url-attribute.md +11 -12
- package/docs/examples/databases/update.md +9 -12
- package/docs/examples/functions/create-build.md +9 -12
- package/docs/examples/functions/create-deployment.md +11 -12
- package/docs/examples/functions/create-execution.md +13 -13
- package/docs/examples/functions/create-variable.md +9 -12
- package/docs/examples/functions/create.md +27 -13
- package/docs/examples/functions/delete-deployment.md +8 -12
- package/docs/examples/functions/delete-variable.md +8 -12
- package/docs/examples/functions/delete.md +7 -12
- package/docs/examples/functions/download-deployment.md +8 -8
- package/docs/examples/functions/get-deployment.md +8 -12
- package/docs/examples/functions/get-execution.md +8 -12
- package/docs/examples/functions/get-function-usage.md +9 -13
- package/docs/examples/functions/get-usage.md +8 -13
- package/docs/examples/functions/get-variable.md +8 -12
- package/docs/examples/functions/get.md +7 -12
- package/docs/examples/functions/list-deployments.md +9 -12
- package/docs/examples/functions/list-executions.md +9 -12
- package/docs/examples/functions/list-runtimes.md +5 -12
- package/docs/examples/functions/list-variables.md +7 -12
- package/docs/examples/functions/list.md +8 -12
- package/docs/examples/functions/update-deployment.md +8 -12
- package/docs/examples/functions/update-variable.md +10 -12
- package/docs/examples/functions/update.md +23 -13
- package/docs/examples/graphql/mutation.md +7 -12
- package/docs/examples/graphql/query.md +7 -12
- package/docs/examples/health/get-antivirus.md +5 -12
- package/docs/examples/health/get-cache.md +5 -12
- package/docs/examples/health/get-certificate.md +13 -0
- package/docs/examples/health/get-d-b.md +5 -12
- package/docs/examples/health/get-failed-jobs.md +14 -0
- package/docs/examples/health/get-pub-sub.md +5 -12
- package/docs/examples/health/get-queue-builds.md +7 -12
- package/docs/examples/health/get-queue-certificates.md +7 -12
- package/docs/examples/health/get-queue-databases.md +8 -12
- package/docs/examples/health/get-queue-deletes.md +7 -12
- package/docs/examples/health/get-queue-functions.md +7 -12
- package/docs/examples/health/get-queue-logs.md +7 -12
- package/docs/examples/health/get-queue-mails.md +7 -12
- package/docs/examples/health/get-queue-messaging.md +7 -12
- package/docs/examples/health/get-queue-migrations.md +7 -12
- package/docs/examples/health/get-queue-usage-dump.md +13 -0
- package/docs/examples/health/get-queue-usage.md +13 -0
- package/docs/examples/health/get-queue-webhooks.md +7 -12
- package/docs/examples/health/get-queue.md +5 -12
- package/docs/examples/health/get-storage-local.md +5 -12
- package/docs/examples/health/get-storage.md +11 -0
- package/docs/examples/health/get-time.md +5 -12
- package/docs/examples/health/get.md +5 -12
- package/docs/examples/locale/get.md +5 -12
- package/docs/examples/locale/list-codes.md +5 -12
- package/docs/examples/locale/list-continents.md +5 -12
- package/docs/examples/locale/list-countries-e-u.md +5 -12
- package/docs/examples/locale/list-countries-phones.md +5 -12
- package/docs/examples/locale/list-countries.md +5 -12
- package/docs/examples/locale/list-currencies.md +5 -12
- package/docs/examples/locale/list-languages.md +5 -12
- package/docs/examples/messaging/create-apns-provider.md +20 -0
- package/docs/examples/messaging/create-email.md +18 -12
- package/docs/examples/messaging/create-fcm-provider.md +16 -0
- package/docs/examples/messaging/create-mailgun-provider.md +16 -12
- package/docs/examples/messaging/create-msg91provider.md +12 -12
- package/docs/examples/messaging/create-push.md +22 -12
- package/docs/examples/messaging/create-sendgrid-provider.md +14 -12
- package/docs/examples/messaging/create-sms.md +19 -0
- package/docs/examples/messaging/create-smtp-provider.md +26 -0
- package/docs/examples/messaging/create-subscriber.md +9 -12
- package/docs/examples/messaging/create-telesign-provider.md +12 -12
- package/docs/examples/messaging/create-textmagic-provider.md +12 -12
- package/docs/examples/messaging/create-topic.md +9 -12
- package/docs/examples/messaging/create-twilio-provider.md +12 -12
- package/docs/examples/messaging/create-vonage-provider.md +12 -12
- package/docs/examples/messaging/delete-provider.md +7 -12
- package/docs/examples/messaging/delete-subscriber.md +8 -12
- package/docs/examples/messaging/delete-topic.md +7 -12
- package/docs/examples/messaging/delete.md +13 -0
- package/docs/examples/messaging/get-message.md +7 -12
- package/docs/examples/messaging/get-provider.md +7 -12
- package/docs/examples/messaging/get-subscriber.md +8 -12
- package/docs/examples/messaging/get-topic.md +7 -12
- package/docs/examples/messaging/list-message-logs.md +8 -12
- package/docs/examples/messaging/list-messages.md +8 -12
- package/docs/examples/messaging/list-provider-logs.md +8 -12
- package/docs/examples/messaging/list-providers.md +8 -12
- package/docs/examples/messaging/list-subscriber-logs.md +8 -12
- package/docs/examples/messaging/list-subscribers.md +9 -12
- package/docs/examples/messaging/list-targets.md +8 -12
- package/docs/examples/messaging/list-topic-logs.md +8 -12
- package/docs/examples/messaging/list-topics.md +8 -12
- package/docs/examples/messaging/update-apns-provider.md +20 -0
- package/docs/examples/messaging/update-email.md +17 -12
- package/docs/examples/messaging/update-fcm-provider.md +16 -0
- package/docs/examples/messaging/update-mailgun-provider.md +16 -12
- package/docs/examples/messaging/update-msg91provider.md +12 -12
- package/docs/examples/messaging/update-push.md +28 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +14 -12
- package/docs/examples/messaging/update-sms.md +19 -0
- package/docs/examples/messaging/update-smtp-provider.md +26 -0
- package/docs/examples/messaging/update-telesign-provider.md +12 -12
- package/docs/examples/messaging/update-textmagic-provider.md +12 -12
- package/docs/examples/messaging/update-topic.md +9 -12
- package/docs/examples/messaging/update-twilio-provider.md +12 -12
- package/docs/examples/messaging/update-vonage-provider.md +12 -12
- package/docs/examples/migrations/create-appwrite-migration.md +10 -12
- package/docs/examples/migrations/create-firebase-migration.md +8 -12
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +8 -12
- package/docs/examples/migrations/create-n-host-migration.md +14 -12
- package/docs/examples/migrations/create-supabase-migration.md +13 -12
- package/docs/examples/migrations/delete-firebase-auth.md +5 -12
- package/docs/examples/migrations/delete.md +7 -12
- package/docs/examples/migrations/get-appwrite-report.md +10 -12
- package/docs/examples/migrations/get-firebase-report-o-auth.md +8 -12
- package/docs/examples/migrations/get-firebase-report.md +8 -12
- package/docs/examples/migrations/get-n-host-report.md +14 -12
- package/docs/examples/migrations/get-supabase-report.md +13 -12
- package/docs/examples/migrations/get.md +7 -12
- package/docs/examples/migrations/list-firebase-projects.md +5 -12
- package/docs/examples/migrations/list.md +8 -12
- package/docs/examples/migrations/retry.md +7 -12
- package/docs/examples/project/create-variable.md +8 -12
- package/docs/examples/project/delete-variable.md +7 -12
- package/docs/examples/project/get-usage.md +10 -13
- package/docs/examples/project/get-variable.md +7 -12
- package/docs/examples/project/list-variables.md +5 -12
- package/docs/examples/project/update-variable.md +9 -12
- package/docs/examples/projects/create-key.md +10 -12
- package/docs/examples/projects/create-platform.md +13 -13
- package/docs/examples/projects/create-smtp-test.md +17 -13
- package/docs/examples/projects/create-webhook.md +14 -12
- package/docs/examples/projects/create.md +20 -13
- package/docs/examples/projects/delete-email-template.md +10 -13
- package/docs/examples/projects/delete-key.md +8 -12
- package/docs/examples/projects/delete-platform.md +8 -12
- package/docs/examples/projects/delete-sms-template.md +10 -13
- package/docs/examples/projects/delete-webhook.md +8 -12
- package/docs/examples/projects/delete.md +7 -12
- package/docs/examples/projects/get-email-template.md +10 -13
- package/docs/examples/projects/get-key.md +8 -12
- package/docs/examples/projects/get-platform.md +8 -12
- package/docs/examples/projects/get-sms-template.md +10 -13
- package/docs/examples/projects/get-webhook.md +8 -12
- package/docs/examples/projects/get.md +7 -12
- package/docs/examples/projects/list-keys.md +7 -12
- package/docs/examples/projects/list-platforms.md +7 -12
- package/docs/examples/projects/list-webhooks.md +7 -12
- package/docs/examples/projects/list.md +8 -12
- package/docs/examples/projects/update-api-status-all.md +14 -0
- package/docs/examples/projects/update-api-status.md +15 -0
- package/docs/examples/projects/update-auth-duration.md +8 -12
- package/docs/examples/projects/update-auth-limit.md +8 -12
- package/docs/examples/projects/update-auth-password-dictionary.md +8 -12
- package/docs/examples/projects/update-auth-password-history.md +8 -12
- package/docs/examples/projects/update-auth-sessions-limit.md +8 -12
- package/docs/examples/projects/update-auth-status.md +10 -13
- package/docs/examples/projects/update-email-template.md +15 -13
- package/docs/examples/projects/update-key.md +11 -12
- package/docs/examples/projects/update-o-auth2.md +12 -13
- package/docs/examples/projects/update-personal-data-check.md +8 -12
- package/docs/examples/projects/update-platform.md +12 -12
- package/docs/examples/projects/update-service-status-all.md +8 -12
- package/docs/examples/projects/update-service-status.md +10 -13
- package/docs/examples/projects/update-sms-template.md +11 -13
- package/docs/examples/projects/update-smtp.md +17 -13
- package/docs/examples/projects/update-team.md +8 -12
- package/docs/examples/projects/update-webhook-signature.md +8 -12
- package/docs/examples/projects/update-webhook.md +15 -12
- package/docs/examples/projects/update.md +17 -12
- package/docs/examples/proxy/create-rule.md +10 -13
- package/docs/examples/proxy/delete-rule.md +7 -12
- package/docs/examples/proxy/get-rule.md +7 -12
- package/docs/examples/proxy/list-rules.md +8 -12
- package/docs/examples/proxy/update-rule-verification.md +7 -12
- package/docs/examples/storage/create-bucket.md +17 -13
- package/docs/examples/storage/create-file.md +10 -12
- package/docs/examples/storage/delete-bucket.md +7 -12
- package/docs/examples/storage/delete-file.md +8 -12
- package/docs/examples/storage/get-bucket-usage.md +9 -13
- package/docs/examples/storage/get-bucket.md +7 -12
- package/docs/examples/storage/get-file-download.md +8 -8
- package/docs/examples/storage/get-file-preview.md +20 -9
- package/docs/examples/storage/get-file-view.md +8 -8
- package/docs/examples/storage/get-file.md +8 -12
- package/docs/examples/storage/get-usage.md +8 -13
- package/docs/examples/storage/list-buckets.md +8 -12
- package/docs/examples/storage/list-files.md +9 -12
- package/docs/examples/storage/update-bucket.md +17 -13
- package/docs/examples/storage/update-file.md +10 -12
- package/docs/examples/teams/create-membership.md +13 -12
- package/docs/examples/teams/create.md +9 -12
- package/docs/examples/teams/delete-membership.md +8 -12
- package/docs/examples/teams/delete.md +7 -12
- package/docs/examples/teams/get-membership.md +8 -12
- package/docs/examples/teams/get-prefs.md +7 -12
- package/docs/examples/teams/get.md +7 -12
- package/docs/examples/teams/list-logs.md +8 -12
- package/docs/examples/teams/list-memberships.md +9 -12
- package/docs/examples/teams/list.md +8 -12
- package/docs/examples/teams/update-membership-status.md +10 -12
- package/docs/examples/teams/update-membership.md +9 -12
- package/docs/examples/teams/update-name.md +8 -12
- package/docs/examples/teams/update-prefs.md +8 -12
- package/docs/examples/users/create-argon2user.md +10 -12
- package/docs/examples/users/create-bcrypt-user.md +10 -12
- package/docs/examples/users/create-m-d5user.md +10 -12
- package/docs/examples/users/create-mfa-recovery-codes.md +13 -0
- package/docs/examples/users/create-p-h-pass-user.md +10 -12
- package/docs/examples/users/create-s-h-a-user.md +12 -13
- package/docs/examples/users/create-scrypt-modified-user.md +13 -12
- package/docs/examples/users/create-scrypt-user.md +15 -12
- package/docs/examples/users/create-session.md +7 -12
- package/docs/examples/users/create-target.md +13 -13
- package/docs/examples/users/create-token.md +9 -12
- package/docs/examples/users/create.md +11 -12
- package/docs/examples/users/delete-identity.md +7 -12
- package/docs/examples/users/delete-mfa-authenticator.md +14 -0
- package/docs/examples/users/delete-session.md +8 -12
- package/docs/examples/users/delete-sessions.md +7 -12
- package/docs/examples/users/delete-target.md +8 -12
- package/docs/examples/users/delete.md +7 -12
- package/docs/examples/users/get-mfa-recovery-codes.md +13 -0
- package/docs/examples/users/get-prefs.md +7 -12
- package/docs/examples/users/get-target.md +8 -12
- package/docs/examples/users/get-usage.md +8 -13
- package/docs/examples/users/get.md +7 -12
- package/docs/examples/users/list-identities.md +8 -12
- package/docs/examples/users/list-logs.md +8 -12
- package/docs/examples/users/list-memberships.md +7 -12
- package/docs/examples/users/list-mfa-factors.md +13 -0
- package/docs/examples/users/list-sessions.md +7 -12
- package/docs/examples/users/list-targets.md +8 -12
- package/docs/examples/users/list.md +8 -12
- package/docs/examples/users/update-email-verification.md +8 -12
- package/docs/examples/users/update-email.md +8 -12
- package/docs/examples/users/update-labels.md +8 -12
- package/docs/examples/users/update-mfa-recovery-codes.md +13 -0
- package/docs/examples/users/update-mfa.md +8 -12
- package/docs/examples/users/update-name.md +8 -12
- package/docs/examples/users/update-password.md +8 -12
- package/docs/examples/users/update-phone-verification.md +8 -12
- package/docs/examples/users/update-phone.md +8 -12
- package/docs/examples/users/update-prefs.md +8 -12
- package/docs/examples/users/update-status.md +8 -12
- package/docs/examples/users/update-target.md +11 -12
- package/docs/examples/vcs/create-repository-detection.md +9 -12
- package/docs/examples/vcs/create-repository.md +9 -12
- package/docs/examples/vcs/delete-installation.md +7 -12
- package/docs/examples/vcs/get-installation.md +7 -12
- package/docs/examples/vcs/get-repository.md +8 -12
- package/docs/examples/vcs/list-installations.md +8 -12
- package/docs/examples/vcs/list-repositories.md +8 -12
- package/docs/examples/vcs/list-repository-branches.md +8 -12
- package/docs/examples/vcs/update-external-deployments.md +9 -12
- package/package.json +1 -1
- package/src/client.ts +3 -3
- package/src/enums/api-service.ts +13 -0
- package/src/enums/api.ts +5 -0
- package/src/enums/auth-method.ts +9 -0
- package/src/enums/authentication-factor.ts +6 -0
- package/src/enums/authenticator-type.ts +3 -0
- package/src/enums/browser.ts +16 -0
- package/src/enums/compression.ts +5 -0
- package/src/enums/credit-card.ts +18 -0
- package/src/enums/database-usage-range.ts +5 -0
- package/src/enums/email-template-locale.ts +133 -0
- package/src/enums/email-template-type.ts +7 -0
- package/src/enums/execution-method.ts +8 -0
- package/src/enums/flag.ts +196 -0
- package/src/enums/function-usage-range.ts +5 -0
- package/src/enums/image-format.ts +7 -0
- package/src/enums/image-gravity.ts +11 -0
- package/src/enums/index-type.ts +5 -0
- package/src/enums/messaging-provider-type.ts +5 -0
- package/src/enums/name.ts +15 -0
- package/src/enums/o-auth-provider.ts +41 -0
- package/src/enums/password-hash.ts +13 -0
- package/src/enums/platform-type.ts +15 -0
- package/src/enums/project-usage-range.ts +4 -0
- package/src/enums/region.ts +4 -0
- package/src/enums/relation-mutate.ts +5 -0
- package/src/enums/relationship-type.ts +6 -0
- package/src/enums/resource-type.ts +4 -0
- package/src/enums/runtime.ts +46 -0
- package/src/enums/s-m-t-p-secure.ts +3 -0
- package/src/enums/sms-template-locale.ts +133 -0
- package/src/enums/sms-template-type.ts +6 -0
- package/src/enums/smtp-encryption.ts +5 -0
- package/src/enums/storage-usage-range.ts +5 -0
- package/src/enums/user-usage-range.ts +5 -0
- package/src/index.ts +35 -1
- package/src/models.ts +61 -23
- package/src/query.ts +61 -34
- package/src/service.ts +4 -7
- package/src/services/account.ts +274 -75
- package/src/services/avatars.ts +9 -6
- package/src/services/databases.ts +37 -16
- package/src/services/functions.ts +13 -10
- package/src/services/health.ts +121 -0
- package/src/services/messaging.ts +374 -117
- package/src/services/migrations.ts +2 -2
- package/src/services/project.ts +4 -3
- package/src/services/projects.ts +110 -59
- package/src/services/proxy.ts +3 -2
- package/src/services/storage.ts +17 -13
- package/src/services/users.ts +125 -44
- package/types/enums/api-service.d.ts +13 -0
- package/types/enums/api.d.ts +5 -0
- package/types/enums/auth-method.d.ts +9 -0
- package/types/enums/authentication-factor.d.ts +6 -0
- package/types/enums/authenticator-type.d.ts +3 -0
- package/types/enums/browser.d.ts +16 -0
- package/types/enums/compression.d.ts +5 -0
- package/types/enums/credit-card.d.ts +18 -0
- package/types/enums/database-usage-range.d.ts +5 -0
- package/types/enums/email-template-locale.d.ts +133 -0
- package/types/enums/email-template-type.d.ts +7 -0
- package/types/enums/execution-method.d.ts +8 -0
- package/types/enums/flag.d.ts +196 -0
- package/types/enums/function-usage-range.d.ts +5 -0
- package/types/enums/image-format.d.ts +7 -0
- package/types/enums/image-gravity.d.ts +11 -0
- package/types/enums/index-type.d.ts +5 -0
- package/types/enums/messaging-provider-type.d.ts +5 -0
- package/types/enums/name.d.ts +15 -0
- package/types/enums/o-auth-provider.d.ts +41 -0
- package/types/enums/password-hash.d.ts +13 -0
- package/types/enums/platform-type.d.ts +15 -0
- package/types/enums/project-usage-range.d.ts +4 -0
- package/types/enums/region.d.ts +4 -0
- package/types/enums/relation-mutate.d.ts +5 -0
- package/types/enums/relationship-type.d.ts +6 -0
- package/types/enums/resource-type.d.ts +4 -0
- package/types/enums/runtime.d.ts +46 -0
- package/types/enums/s-m-t-p-secure.d.ts +3 -0
- package/types/enums/sms-template-locale.d.ts +133 -0
- package/types/enums/sms-template-type.d.ts +6 -0
- package/types/enums/smtp-encryption.d.ts +5 -0
- package/types/enums/storage-usage-range.d.ts +5 -0
- package/types/enums/user-usage-range.d.ts +5 -0
- package/types/index.d.ts +34 -0
- package/types/models.d.ts +61 -23
- package/types/query.d.ts +10 -3
- package/types/services/account.d.ts +138 -33
- package/types/services/avatars.d.ts +9 -6
- package/types/services/databases.d.ts +37 -16
- package/types/services/functions.d.ts +13 -10
- package/types/services/health.d.ts +56 -0
- package/types/services/messaging.d.ts +170 -64
- package/types/services/migrations.d.ts +2 -2
- package/types/services/project.d.ts +4 -3
- package/types/services/projects.d.ts +64 -42
- package/types/services/proxy.d.ts +3 -2
- package/types/services/storage.d.ts +17 -13
- package/types/services/users.d.ts +73 -23
- package/docs/examples/account/add-authenticator.md +0 -18
- package/docs/examples/account/create-challenge.md +0 -18
- package/docs/examples/account/delete-authenticator.md +0 -18
- package/docs/examples/account/list-providers.md +0 -18
- package/docs/examples/account/update-challenge.md +0 -18
- package/docs/examples/account/verify-authenticator.md +0 -18
- package/docs/examples/messaging/create-a-p-n-s-provider.md +0 -18
- package/docs/examples/messaging/create-f-c-m-provider.md +0 -18
- package/docs/examples/messaging/create-s-m-s.md +0 -18
- package/docs/examples/messaging/update-a-p-n-s-provider.md +0 -18
- package/docs/examples/messaging/update-f-c-m-provider.md +0 -18
- package/docs/examples/messaging/update-push-notification.md +0 -18
- package/docs/examples/messaging/update-s-m-s.md +0 -18
- package/docs/examples/projects/update-auth-mfa-factors.md +0 -18
- package/docs/examples/users/delete-authenticator.md +0 -18
- package/docs/examples/users/list-providers.md +0 -18
package/types/models.d.ts
CHANGED
|
@@ -1186,10 +1186,6 @@ export declare namespace Models {
|
|
|
1186
1186
|
* Multi factor authentication status.
|
|
1187
1187
|
*/
|
|
1188
1188
|
mfa: boolean;
|
|
1189
|
-
/**
|
|
1190
|
-
* TOTP status.
|
|
1191
|
-
*/
|
|
1192
|
-
totp: boolean;
|
|
1193
1189
|
/**
|
|
1194
1190
|
* User preferences as a key-value object
|
|
1195
1191
|
*/
|
|
@@ -1417,13 +1413,17 @@ export declare namespace Models {
|
|
|
1417
1413
|
*/
|
|
1418
1414
|
current: boolean;
|
|
1419
1415
|
/**
|
|
1420
|
-
* Returns
|
|
1416
|
+
* Returns a list of active session factors.
|
|
1421
1417
|
*/
|
|
1422
|
-
factors:
|
|
1418
|
+
factors: string[];
|
|
1423
1419
|
/**
|
|
1424
1420
|
* Secret used to authenticate the user. Only included if the request was made with an API key
|
|
1425
1421
|
*/
|
|
1426
1422
|
secret: string;
|
|
1423
|
+
/**
|
|
1424
|
+
* Most recent date in ISO 8601 format when the session successfully passed MFA challenge.
|
|
1425
|
+
*/
|
|
1426
|
+
mfaUpdatedAt: string;
|
|
1427
1427
|
};
|
|
1428
1428
|
/**
|
|
1429
1429
|
* Identity
|
|
@@ -1497,7 +1497,7 @@ export declare namespace Models {
|
|
|
1497
1497
|
/**
|
|
1498
1498
|
* Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.
|
|
1499
1499
|
*/
|
|
1500
|
-
|
|
1500
|
+
phrase: string;
|
|
1501
1501
|
};
|
|
1502
1502
|
/**
|
|
1503
1503
|
* JWT
|
|
@@ -2656,6 +2656,35 @@ export declare namespace Models {
|
|
|
2656
2656
|
*/
|
|
2657
2657
|
status: string;
|
|
2658
2658
|
};
|
|
2659
|
+
/**
|
|
2660
|
+
* Health Certificate
|
|
2661
|
+
*/
|
|
2662
|
+
type HealthCertificate = {
|
|
2663
|
+
/**
|
|
2664
|
+
* Certificate name
|
|
2665
|
+
*/
|
|
2666
|
+
name: string;
|
|
2667
|
+
/**
|
|
2668
|
+
* Subject SN
|
|
2669
|
+
*/
|
|
2670
|
+
subjectSN: string;
|
|
2671
|
+
/**
|
|
2672
|
+
* Issuer organisation
|
|
2673
|
+
*/
|
|
2674
|
+
issuerOrganisation: string;
|
|
2675
|
+
/**
|
|
2676
|
+
* Valid from
|
|
2677
|
+
*/
|
|
2678
|
+
validFrom: string;
|
|
2679
|
+
/**
|
|
2680
|
+
* Valid to
|
|
2681
|
+
*/
|
|
2682
|
+
validTo: string;
|
|
2683
|
+
/**
|
|
2684
|
+
* Signature type SN
|
|
2685
|
+
*/
|
|
2686
|
+
signatureTypeSN: string;
|
|
2687
|
+
};
|
|
2659
2688
|
/**
|
|
2660
2689
|
* Health Time
|
|
2661
2690
|
*/
|
|
@@ -3211,26 +3240,31 @@ export declare namespace Models {
|
|
|
3211
3240
|
expire: string;
|
|
3212
3241
|
};
|
|
3213
3242
|
/**
|
|
3214
|
-
*
|
|
3243
|
+
* MFA Recovery Codes
|
|
3215
3244
|
*/
|
|
3216
|
-
type
|
|
3245
|
+
type MfaRecoveryCodes = {
|
|
3217
3246
|
/**
|
|
3218
|
-
*
|
|
3247
|
+
* Recovery codes.
|
|
3219
3248
|
*/
|
|
3220
|
-
|
|
3249
|
+
recoveryCodes: string[];
|
|
3250
|
+
};
|
|
3251
|
+
/**
|
|
3252
|
+
* MFAType
|
|
3253
|
+
*/
|
|
3254
|
+
type MfaType = {
|
|
3221
3255
|
/**
|
|
3222
|
-
*
|
|
3256
|
+
* Secret token used for TOTP factor.
|
|
3223
3257
|
*/
|
|
3224
3258
|
secret: string;
|
|
3225
3259
|
/**
|
|
3226
|
-
*
|
|
3260
|
+
* URI for authenticator apps.
|
|
3227
3261
|
*/
|
|
3228
3262
|
uri: string;
|
|
3229
3263
|
};
|
|
3230
3264
|
/**
|
|
3231
|
-
*
|
|
3265
|
+
* MFAFactors
|
|
3232
3266
|
*/
|
|
3233
|
-
type
|
|
3267
|
+
type MfaFactors = {
|
|
3234
3268
|
/**
|
|
3235
3269
|
* TOTP
|
|
3236
3270
|
*/
|
|
@@ -3341,10 +3375,6 @@ export declare namespace Models {
|
|
|
3341
3375
|
* Status of delivery.
|
|
3342
3376
|
*/
|
|
3343
3377
|
status: string;
|
|
3344
|
-
/**
|
|
3345
|
-
* Message description.
|
|
3346
|
-
*/
|
|
3347
|
-
description?: string;
|
|
3348
3378
|
};
|
|
3349
3379
|
/**
|
|
3350
3380
|
* Topic
|
|
@@ -3367,13 +3397,21 @@ export declare namespace Models {
|
|
|
3367
3397
|
*/
|
|
3368
3398
|
name: string;
|
|
3369
3399
|
/**
|
|
3370
|
-
* Total count of subscribers subscribed to topic.
|
|
3400
|
+
* Total count of email subscribers subscribed to the topic.
|
|
3371
3401
|
*/
|
|
3372
|
-
|
|
3402
|
+
emailTotal: number;
|
|
3403
|
+
/**
|
|
3404
|
+
* Total count of SMS subscribers subscribed to the topic.
|
|
3405
|
+
*/
|
|
3406
|
+
smsTotal: number;
|
|
3407
|
+
/**
|
|
3408
|
+
* Total count of push subscribers subscribed to the topic.
|
|
3409
|
+
*/
|
|
3410
|
+
pushTotal: number;
|
|
3373
3411
|
/**
|
|
3374
|
-
*
|
|
3412
|
+
* Subscribe permissions.
|
|
3375
3413
|
*/
|
|
3376
|
-
|
|
3414
|
+
subscribe: string[];
|
|
3377
3415
|
};
|
|
3378
3416
|
/**
|
|
3379
3417
|
* Subscriber
|
package/types/query.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
declare type QueryTypesSingle = string | number | boolean;
|
|
2
|
-
export declare type QueryTypesList = string[] | number[] | boolean[];
|
|
2
|
+
export declare type QueryTypesList = string[] | number[] | boolean[] | Query[];
|
|
3
3
|
export declare type QueryTypes = QueryTypesSingle | QueryTypesList;
|
|
4
|
+
declare type AttributesTypes = string | string[];
|
|
4
5
|
export declare class Query {
|
|
6
|
+
method: string;
|
|
7
|
+
attribute: AttributesTypes | undefined;
|
|
8
|
+
values: QueryTypesList | undefined;
|
|
9
|
+
constructor(method: string, attribute?: AttributesTypes, values?: QueryTypes);
|
|
10
|
+
toString(): string;
|
|
5
11
|
static equal: (attribute: string, value: QueryTypes) => string;
|
|
6
12
|
static notEqual: (attribute: string, value: QueryTypes) => string;
|
|
7
13
|
static lessThan: (attribute: string, value: QueryTypes) => string;
|
|
@@ -21,7 +27,8 @@ export declare class Query {
|
|
|
21
27
|
static cursorBefore: (documentId: string) => string;
|
|
22
28
|
static limit: (limit: number) => string;
|
|
23
29
|
static offset: (offset: number) => string;
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
static contains: (attribute: string, value: string | string[]) => string;
|
|
31
|
+
static or: (queries: string[]) => string;
|
|
32
|
+
static and: (queries: string[]) => string;
|
|
26
33
|
}
|
|
27
34
|
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
2
|
import { Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
|
+
import { AuthenticatorType } from '../enums/authenticator-type';
|
|
5
|
+
import { AuthenticationFactor } from '../enums/authentication-factor';
|
|
6
|
+
import { OAuthProvider } from '../enums/o-auth-provider';
|
|
4
7
|
export declare class Account extends Service {
|
|
5
8
|
constructor(client: Client);
|
|
6
9
|
/**
|
|
@@ -63,11 +66,11 @@ export declare class Account extends Service {
|
|
|
63
66
|
*
|
|
64
67
|
* Get the list of identities for the currently logged in user.
|
|
65
68
|
*
|
|
66
|
-
* @param {string} queries
|
|
69
|
+
* @param {string[]} queries
|
|
67
70
|
* @throws {AppwriteException}
|
|
68
71
|
* @returns {Promise}
|
|
69
72
|
*/
|
|
70
|
-
listIdentities(queries?: string): Promise<Models.IdentityList>;
|
|
73
|
+
listIdentities(queries?: string[]): Promise<Models.IdentityList>;
|
|
71
74
|
/**
|
|
72
75
|
* Delete identity
|
|
73
76
|
*
|
|
@@ -105,6 +108,7 @@ export declare class Account extends Service {
|
|
|
105
108
|
/**
|
|
106
109
|
* Update MFA
|
|
107
110
|
*
|
|
111
|
+
* Enable or disable MFA on an account.
|
|
108
112
|
*
|
|
109
113
|
* @param {boolean} mfa
|
|
110
114
|
* @throws {AppwriteException}
|
|
@@ -112,62 +116,115 @@ export declare class Account extends Service {
|
|
|
112
116
|
*/
|
|
113
117
|
updateMFA<Preferences extends Models.Preferences>(mfa: boolean): Promise<Models.User<Preferences>>;
|
|
114
118
|
/**
|
|
115
|
-
*
|
|
119
|
+
* Add Authenticator
|
|
120
|
+
*
|
|
121
|
+
* Add an authenticator app to be used as an MFA factor. Verify the
|
|
122
|
+
* authenticator using the [verify
|
|
123
|
+
* authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
|
|
124
|
+
* method.
|
|
125
|
+
*
|
|
126
|
+
* @param {AuthenticatorType} type
|
|
127
|
+
* @throws {AppwriteException}
|
|
128
|
+
* @returns {Promise}
|
|
129
|
+
*/
|
|
130
|
+
createMfaAuthenticator(type: AuthenticatorType): Promise<Models.MfaType>;
|
|
131
|
+
/**
|
|
132
|
+
* Verify Authenticator
|
|
133
|
+
*
|
|
134
|
+
* Verify an authenticator app after adding it using the [add
|
|
135
|
+
* authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
|
|
136
|
+
* method.
|
|
137
|
+
*
|
|
138
|
+
* @param {AuthenticatorType} type
|
|
139
|
+
* @param {string} otp
|
|
140
|
+
* @throws {AppwriteException}
|
|
141
|
+
* @returns {Promise}
|
|
142
|
+
*/
|
|
143
|
+
updateMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>>;
|
|
144
|
+
/**
|
|
145
|
+
* Delete Authenticator
|
|
146
|
+
*
|
|
147
|
+
* Delete an authenticator for a user by ID.
|
|
148
|
+
*
|
|
149
|
+
* @param {AuthenticatorType} type
|
|
150
|
+
* @param {string} otp
|
|
151
|
+
* @throws {AppwriteException}
|
|
152
|
+
* @returns {Promise}
|
|
153
|
+
*/
|
|
154
|
+
deleteMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>>;
|
|
155
|
+
/**
|
|
156
|
+
* Create 2FA Challenge
|
|
116
157
|
*
|
|
158
|
+
* Begin the process of MFA verification after sign-in. Finish the flow with
|
|
159
|
+
* [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge)
|
|
160
|
+
* method.
|
|
117
161
|
*
|
|
118
|
-
* @param {
|
|
162
|
+
* @param {AuthenticationFactor} factor
|
|
119
163
|
* @throws {AppwriteException}
|
|
120
164
|
* @returns {Promise}
|
|
121
165
|
*/
|
|
122
|
-
|
|
166
|
+
createMfaChallenge(factor: AuthenticationFactor): Promise<Models.MfaChallenge>;
|
|
123
167
|
/**
|
|
124
168
|
* Create MFA Challenge (confirmation)
|
|
125
169
|
*
|
|
170
|
+
* Complete the MFA challenge by providing the one-time password. Finish the
|
|
171
|
+
* process of MFA verification by providing the one-time password. To begin
|
|
172
|
+
* the flow, use
|
|
173
|
+
* [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
|
|
174
|
+
* method.
|
|
126
175
|
*
|
|
127
176
|
* @param {string} challengeId
|
|
128
177
|
* @param {string} otp
|
|
129
178
|
* @throws {AppwriteException}
|
|
130
179
|
* @returns {Promise}
|
|
131
180
|
*/
|
|
132
|
-
|
|
181
|
+
updateMfaChallenge(challengeId: string, otp: string): Promise<{}>;
|
|
133
182
|
/**
|
|
134
|
-
* List
|
|
183
|
+
* List Factors
|
|
135
184
|
*
|
|
136
|
-
*
|
|
185
|
+
* List the factors available on the account to be used as a MFA challange.
|
|
137
186
|
*
|
|
138
187
|
* @throws {AppwriteException}
|
|
139
188
|
* @returns {Promise}
|
|
140
189
|
*/
|
|
141
|
-
|
|
190
|
+
listMfaFactors(): Promise<Models.MfaFactors>;
|
|
142
191
|
/**
|
|
143
|
-
*
|
|
192
|
+
* Get MFA Recovery Codes
|
|
144
193
|
*
|
|
194
|
+
* Get recovery codes that can be used as backup for MFA flow. Before getting
|
|
195
|
+
* codes, they must be generated using
|
|
196
|
+
* [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
|
|
197
|
+
* method. An OTP challenge is required to read recovery codes.
|
|
145
198
|
*
|
|
146
|
-
* @param {string} provider
|
|
147
199
|
* @throws {AppwriteException}
|
|
148
200
|
* @returns {Promise}
|
|
149
201
|
*/
|
|
150
|
-
|
|
202
|
+
getMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
|
|
151
203
|
/**
|
|
152
|
-
*
|
|
204
|
+
* Create MFA Recovery Codes
|
|
153
205
|
*
|
|
206
|
+
* Generate recovery codes as backup for MFA flow. It's recommended to
|
|
207
|
+
* generate and show then immediately after user successfully adds their
|
|
208
|
+
* authehticator. Recovery codes can be used as a MFA verification type in
|
|
209
|
+
* [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
|
|
210
|
+
* method.
|
|
154
211
|
*
|
|
155
|
-
* @param {string} provider
|
|
156
|
-
* @param {string} otp
|
|
157
212
|
* @throws {AppwriteException}
|
|
158
213
|
* @returns {Promise}
|
|
159
214
|
*/
|
|
160
|
-
|
|
215
|
+
createMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
|
|
161
216
|
/**
|
|
162
|
-
*
|
|
217
|
+
* Regenerate MFA Recovery Codes
|
|
163
218
|
*
|
|
219
|
+
* Regenerate recovery codes that can be used as backup for MFA flow. Before
|
|
220
|
+
* regenerating codes, they must be first generated using
|
|
221
|
+
* [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
|
|
222
|
+
* method. An OTP challenge is required to regenreate recovery codes.
|
|
164
223
|
*
|
|
165
|
-
* @param {string} provider
|
|
166
|
-
* @param {string} otp
|
|
167
224
|
* @throws {AppwriteException}
|
|
168
225
|
* @returns {Promise}
|
|
169
226
|
*/
|
|
170
|
-
|
|
227
|
+
updateMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
|
|
171
228
|
/**
|
|
172
229
|
* Update name
|
|
173
230
|
*
|
|
@@ -318,7 +375,7 @@ export declare class Account extends Service {
|
|
|
318
375
|
*/
|
|
319
376
|
createEmailPasswordSession(email: string, password: string): Promise<Models.Session>;
|
|
320
377
|
/**
|
|
321
|
-
*
|
|
378
|
+
* Update magic URL session
|
|
322
379
|
*
|
|
323
380
|
* Use this endpoint to create a session from token. Provide the **userId**
|
|
324
381
|
* and **secret** parameters from the successful response of authentication
|
|
@@ -350,15 +407,27 @@ export declare class Account extends Service {
|
|
|
350
407
|
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
351
408
|
*
|
|
352
409
|
*
|
|
353
|
-
* @param {
|
|
410
|
+
* @param {OAuthProvider} provider
|
|
354
411
|
* @param {string} success
|
|
355
412
|
* @param {string} failure
|
|
356
|
-
* @param {boolean} token
|
|
357
413
|
* @param {string[]} scopes
|
|
358
414
|
* @throws {AppwriteException}
|
|
359
415
|
* @returns {void|string}
|
|
360
416
|
*/
|
|
361
|
-
createOAuth2Session(provider:
|
|
417
|
+
createOAuth2Session(provider: OAuthProvider, success?: string, failure?: string, scopes?: string[]): void | URL;
|
|
418
|
+
/**
|
|
419
|
+
* Update phone session
|
|
420
|
+
*
|
|
421
|
+
* Use this endpoint to create a session from token. Provide the **userId**
|
|
422
|
+
* and **secret** parameters from the successful response of authentication
|
|
423
|
+
* flows initiated by token creation. For example, magic URL and phone login.
|
|
424
|
+
*
|
|
425
|
+
* @param {string} userId
|
|
426
|
+
* @param {string} secret
|
|
427
|
+
* @throws {AppwriteException}
|
|
428
|
+
* @returns {Promise}
|
|
429
|
+
*/
|
|
430
|
+
updatePhoneSession(userId: string, secret: string): Promise<Models.Session>;
|
|
362
431
|
/**
|
|
363
432
|
* Create session
|
|
364
433
|
*
|
|
@@ -384,10 +453,11 @@ export declare class Account extends Service {
|
|
|
384
453
|
*/
|
|
385
454
|
getSession(sessionId: string): Promise<Models.Session>;
|
|
386
455
|
/**
|
|
387
|
-
* Update
|
|
456
|
+
* Update session
|
|
388
457
|
*
|
|
389
|
-
*
|
|
390
|
-
* useful when session
|
|
458
|
+
* Use this endpoint to extend a session's length. Extending a session is
|
|
459
|
+
* useful when session expiry is short. If the session was created using an
|
|
460
|
+
* OAuth provider, this endpoint refreshes the access token from the provider.
|
|
391
461
|
*
|
|
392
462
|
* @param {string} sessionId
|
|
393
463
|
* @throws {AppwriteException}
|
|
@@ -420,7 +490,7 @@ export declare class Account extends Service {
|
|
|
420
490
|
*/
|
|
421
491
|
updateStatus<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
|
|
422
492
|
/**
|
|
423
|
-
* Create
|
|
493
|
+
* Create push target
|
|
424
494
|
*
|
|
425
495
|
*
|
|
426
496
|
* @param {string} targetId
|
|
@@ -431,7 +501,7 @@ export declare class Account extends Service {
|
|
|
431
501
|
*/
|
|
432
502
|
createPushTarget(targetId: string, identifier: string, providerId?: string): Promise<Models.Target>;
|
|
433
503
|
/**
|
|
434
|
-
* Update
|
|
504
|
+
* Update push target
|
|
435
505
|
*
|
|
436
506
|
*
|
|
437
507
|
* @param {string} targetId
|
|
@@ -440,6 +510,15 @@ export declare class Account extends Service {
|
|
|
440
510
|
* @returns {Promise}
|
|
441
511
|
*/
|
|
442
512
|
updatePushTarget(targetId: string, identifier: string): Promise<Models.Target>;
|
|
513
|
+
/**
|
|
514
|
+
* Delete push target
|
|
515
|
+
*
|
|
516
|
+
*
|
|
517
|
+
* @param {string} targetId
|
|
518
|
+
* @throws {AppwriteException}
|
|
519
|
+
* @returns {Promise}
|
|
520
|
+
*/
|
|
521
|
+
deletePushTarget(targetId: string): Promise<{}>;
|
|
443
522
|
/**
|
|
444
523
|
* Create email token (OTP)
|
|
445
524
|
*
|
|
@@ -456,11 +535,11 @@ export declare class Account extends Service {
|
|
|
456
535
|
*
|
|
457
536
|
* @param {string} userId
|
|
458
537
|
* @param {string} email
|
|
459
|
-
* @param {boolean}
|
|
538
|
+
* @param {boolean} phrase
|
|
460
539
|
* @throws {AppwriteException}
|
|
461
540
|
* @returns {Promise}
|
|
462
541
|
*/
|
|
463
|
-
createEmailToken(userId: string, email: string,
|
|
542
|
+
createEmailToken(userId: string, email: string, phrase?: boolean): Promise<Models.Token>;
|
|
464
543
|
/**
|
|
465
544
|
* Create magic URL token
|
|
466
545
|
*
|
|
@@ -484,11 +563,37 @@ export declare class Account extends Service {
|
|
|
484
563
|
* @param {string} userId
|
|
485
564
|
* @param {string} email
|
|
486
565
|
* @param {string} url
|
|
487
|
-
* @param {boolean}
|
|
566
|
+
* @param {boolean} phrase
|
|
488
567
|
* @throws {AppwriteException}
|
|
489
568
|
* @returns {Promise}
|
|
490
569
|
*/
|
|
491
|
-
createMagicURLToken(userId: string, email: string, url?: string,
|
|
570
|
+
createMagicURLToken(userId: string, email: string, url?: string, phrase?: boolean): Promise<Models.Token>;
|
|
571
|
+
/**
|
|
572
|
+
* Create OAuth2 token
|
|
573
|
+
*
|
|
574
|
+
* Allow the user to login to their account using the OAuth2 provider of their
|
|
575
|
+
* choice. Each OAuth2 provider should be enabled from the Appwrite console
|
|
576
|
+
* first. Use the success and failure arguments to provide a redirect URL's
|
|
577
|
+
* back to your app when login is completed.
|
|
578
|
+
*
|
|
579
|
+
* If authentication succeeds, `userId` and `secret` of a token will be
|
|
580
|
+
* appended to the success URL as query parameters. These can be used to
|
|
581
|
+
* create a new session using the [Create
|
|
582
|
+
* session](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
|
|
583
|
+
* endpoint.
|
|
584
|
+
*
|
|
585
|
+
* A user is limited to 10 active sessions at a time by default. [Learn more
|
|
586
|
+
* about session
|
|
587
|
+
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
588
|
+
*
|
|
589
|
+
* @param {OAuthProvider} provider
|
|
590
|
+
* @param {string} success
|
|
591
|
+
* @param {string} failure
|
|
592
|
+
* @param {string[]} scopes
|
|
593
|
+
* @throws {AppwriteException}
|
|
594
|
+
* @returns {void|string}
|
|
595
|
+
*/
|
|
596
|
+
createOAuth2Token(provider: OAuthProvider, success?: string, failure?: string, scopes?: string[]): void | URL;
|
|
492
597
|
/**
|
|
493
598
|
* Create phone token
|
|
494
599
|
*
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
2
|
import { Client } from '../client';
|
|
3
|
+
import { Browser } from '../enums/browser';
|
|
4
|
+
import { CreditCard } from '../enums/credit-card';
|
|
5
|
+
import { Flag } from '../enums/flag';
|
|
3
6
|
export declare class Avatars extends Service {
|
|
4
7
|
constructor(client: Client);
|
|
5
8
|
/**
|
|
@@ -16,14 +19,14 @@ export declare class Avatars extends Service {
|
|
|
16
19
|
* image at source quality. If dimensions are not specified, the default size
|
|
17
20
|
* of image returned is 100x100px.
|
|
18
21
|
*
|
|
19
|
-
* @param {
|
|
22
|
+
* @param {Browser} code
|
|
20
23
|
* @param {number} width
|
|
21
24
|
* @param {number} height
|
|
22
25
|
* @param {number} quality
|
|
23
26
|
* @throws {AppwriteException}
|
|
24
27
|
* @returns {URL}
|
|
25
28
|
*/
|
|
26
|
-
getBrowser(code:
|
|
29
|
+
getBrowser(code: Browser, width?: number, height?: number, quality?: number): URL;
|
|
27
30
|
/**
|
|
28
31
|
* Get credit card icon
|
|
29
32
|
*
|
|
@@ -37,14 +40,14 @@ export declare class Avatars extends Service {
|
|
|
37
40
|
* of image returned is 100x100px.
|
|
38
41
|
*
|
|
39
42
|
*
|
|
40
|
-
* @param {
|
|
43
|
+
* @param {CreditCard} code
|
|
41
44
|
* @param {number} width
|
|
42
45
|
* @param {number} height
|
|
43
46
|
* @param {number} quality
|
|
44
47
|
* @throws {AppwriteException}
|
|
45
48
|
* @returns {URL}
|
|
46
49
|
*/
|
|
47
|
-
getCreditCard(code:
|
|
50
|
+
getCreditCard(code: CreditCard, width?: number, height?: number, quality?: number): URL;
|
|
48
51
|
/**
|
|
49
52
|
* Get favicon
|
|
50
53
|
*
|
|
@@ -71,14 +74,14 @@ export declare class Avatars extends Service {
|
|
|
71
74
|
* of image returned is 100x100px.
|
|
72
75
|
*
|
|
73
76
|
*
|
|
74
|
-
* @param {
|
|
77
|
+
* @param {Flag} code
|
|
75
78
|
* @param {number} width
|
|
76
79
|
* @param {number} height
|
|
77
80
|
* @param {number} quality
|
|
78
81
|
* @throws {AppwriteException}
|
|
79
82
|
* @returns {URL}
|
|
80
83
|
*/
|
|
81
|
-
getFlag(code:
|
|
84
|
+
getFlag(code: Flag, width?: number, height?: number, quality?: number): URL;
|
|
82
85
|
/**
|
|
83
86
|
* Get image from URL
|
|
84
87
|
*
|