@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
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
2
|
import { Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
|
+
import { Region } from '../enums/region';
|
|
5
|
+
import { Api } from '../enums/api';
|
|
6
|
+
import { AuthMethod } from '../enums/auth-method';
|
|
7
|
+
import { OAuthProvider } from '../enums/o-auth-provider';
|
|
8
|
+
import { PlatformType } from '../enums/platform-type';
|
|
9
|
+
import { ApiService } from '../enums/api-service';
|
|
10
|
+
import { SMTPSecure } from '../enums/s-m-t-p-secure';
|
|
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';
|
|
4
15
|
export declare class Projects extends Service {
|
|
5
16
|
constructor(client: Client);
|
|
6
17
|
/**
|
|
@@ -20,7 +31,7 @@ export declare class Projects extends Service {
|
|
|
20
31
|
* @param {string} projectId
|
|
21
32
|
* @param {string} name
|
|
22
33
|
* @param {string} teamId
|
|
23
|
-
* @param {
|
|
34
|
+
* @param {Region} region
|
|
24
35
|
* @param {string} description
|
|
25
36
|
* @param {string} logo
|
|
26
37
|
* @param {string} url
|
|
@@ -33,7 +44,7 @@ export declare class Projects extends Service {
|
|
|
33
44
|
* @throws {AppwriteException}
|
|
34
45
|
* @returns {Promise}
|
|
35
46
|
*/
|
|
36
|
-
create(projectId: string, name: string, teamId: string, region?:
|
|
47
|
+
create(projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project>;
|
|
37
48
|
/**
|
|
38
49
|
* Get project
|
|
39
50
|
*
|
|
@@ -71,6 +82,27 @@ export declare class Projects extends Service {
|
|
|
71
82
|
* @returns {Promise}
|
|
72
83
|
*/
|
|
73
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>;
|
|
74
106
|
/**
|
|
75
107
|
* Update project authentication duration
|
|
76
108
|
*
|
|
@@ -101,16 +133,6 @@ export declare class Projects extends Service {
|
|
|
101
133
|
* @returns {Promise}
|
|
102
134
|
*/
|
|
103
135
|
updateAuthSessionsLimit(projectId: string, limit: number): Promise<Models.Project>;
|
|
104
|
-
/**
|
|
105
|
-
* Update Project user minimum sessions factors
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* @param {string} projectId
|
|
109
|
-
* @param {number} factors
|
|
110
|
-
* @throws {AppwriteException}
|
|
111
|
-
* @returns {Promise}
|
|
112
|
-
*/
|
|
113
|
-
updateAuthMfaFactors(projectId: string, factors: number): Promise<Models.Project>;
|
|
114
136
|
/**
|
|
115
137
|
* Update authentication password dictionary status. Use this endpoint to enable or disable the dicitonary check for user password
|
|
116
138
|
*
|
|
@@ -146,12 +168,12 @@ export declare class Projects extends Service {
|
|
|
146
168
|
*
|
|
147
169
|
*
|
|
148
170
|
* @param {string} projectId
|
|
149
|
-
* @param {
|
|
171
|
+
* @param {AuthMethod} method
|
|
150
172
|
* @param {boolean} status
|
|
151
173
|
* @throws {AppwriteException}
|
|
152
174
|
* @returns {Promise}
|
|
153
175
|
*/
|
|
154
|
-
updateAuthStatus(projectId: string, method:
|
|
176
|
+
updateAuthStatus(projectId: string, method: AuthMethod, status: boolean): Promise<Models.Project>;
|
|
155
177
|
/**
|
|
156
178
|
* List keys
|
|
157
179
|
*
|
|
@@ -211,14 +233,14 @@ export declare class Projects extends Service {
|
|
|
211
233
|
*
|
|
212
234
|
*
|
|
213
235
|
* @param {string} projectId
|
|
214
|
-
* @param {
|
|
236
|
+
* @param {OAuthProvider} provider
|
|
215
237
|
* @param {string} appId
|
|
216
238
|
* @param {string} secret
|
|
217
239
|
* @param {boolean} enabled
|
|
218
240
|
* @throws {AppwriteException}
|
|
219
241
|
* @returns {Promise}
|
|
220
242
|
*/
|
|
221
|
-
updateOAuth2(projectId: string, provider:
|
|
243
|
+
updateOAuth2(projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean): Promise<Models.Project>;
|
|
222
244
|
/**
|
|
223
245
|
* List platforms
|
|
224
246
|
*
|
|
@@ -233,7 +255,7 @@ export declare class Projects extends Service {
|
|
|
233
255
|
*
|
|
234
256
|
*
|
|
235
257
|
* @param {string} projectId
|
|
236
|
-
* @param {
|
|
258
|
+
* @param {PlatformType} type
|
|
237
259
|
* @param {string} name
|
|
238
260
|
* @param {string} key
|
|
239
261
|
* @param {string} store
|
|
@@ -241,7 +263,7 @@ export declare class Projects extends Service {
|
|
|
241
263
|
* @throws {AppwriteException}
|
|
242
264
|
* @returns {Promise}
|
|
243
265
|
*/
|
|
244
|
-
createPlatform(projectId: string, type:
|
|
266
|
+
createPlatform(projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform>;
|
|
245
267
|
/**
|
|
246
268
|
* Get platform
|
|
247
269
|
*
|
|
@@ -281,12 +303,12 @@ export declare class Projects extends Service {
|
|
|
281
303
|
*
|
|
282
304
|
*
|
|
283
305
|
* @param {string} projectId
|
|
284
|
-
* @param {
|
|
306
|
+
* @param {ApiService} service
|
|
285
307
|
* @param {boolean} status
|
|
286
308
|
* @throws {AppwriteException}
|
|
287
309
|
* @returns {Promise}
|
|
288
310
|
*/
|
|
289
|
-
updateServiceStatus(projectId: string, service:
|
|
311
|
+
updateServiceStatus(projectId: string, service: ApiService, status: boolean): Promise<Models.Project>;
|
|
290
312
|
/**
|
|
291
313
|
* Update all service status
|
|
292
314
|
*
|
|
@@ -310,11 +332,11 @@ export declare class Projects extends Service {
|
|
|
310
332
|
* @param {number} port
|
|
311
333
|
* @param {string} username
|
|
312
334
|
* @param {string} password
|
|
313
|
-
* @param {
|
|
335
|
+
* @param {SMTPSecure} secure
|
|
314
336
|
* @throws {AppwriteException}
|
|
315
337
|
* @returns {Promise}
|
|
316
338
|
*/
|
|
317
|
-
updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?:
|
|
339
|
+
updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project>;
|
|
318
340
|
/**
|
|
319
341
|
* Create SMTP test
|
|
320
342
|
*
|
|
@@ -328,11 +350,11 @@ export declare class Projects extends Service {
|
|
|
328
350
|
* @param {number} port
|
|
329
351
|
* @param {string} username
|
|
330
352
|
* @param {string} password
|
|
331
|
-
* @param {
|
|
353
|
+
* @param {SMTPSecure} secure
|
|
332
354
|
* @throws {AppwriteException}
|
|
333
355
|
* @returns {Promise}
|
|
334
356
|
*/
|
|
335
|
-
createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?:
|
|
357
|
+
createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
|
|
336
358
|
/**
|
|
337
359
|
* Update Project Team
|
|
338
360
|
*
|
|
@@ -348,19 +370,19 @@ export declare class Projects extends Service {
|
|
|
348
370
|
*
|
|
349
371
|
*
|
|
350
372
|
* @param {string} projectId
|
|
351
|
-
* @param {
|
|
352
|
-
* @param {
|
|
373
|
+
* @param {EmailTemplateType} type
|
|
374
|
+
* @param {EmailTemplateLocale} locale
|
|
353
375
|
* @throws {AppwriteException}
|
|
354
376
|
* @returns {Promise}
|
|
355
377
|
*/
|
|
356
|
-
getEmailTemplate(projectId: string, type:
|
|
378
|
+
getEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate>;
|
|
357
379
|
/**
|
|
358
380
|
* Update custom email templates
|
|
359
381
|
*
|
|
360
382
|
*
|
|
361
383
|
* @param {string} projectId
|
|
362
|
-
* @param {
|
|
363
|
-
* @param {
|
|
384
|
+
* @param {EmailTemplateType} type
|
|
385
|
+
* @param {EmailTemplateLocale} locale
|
|
364
386
|
* @param {string} subject
|
|
365
387
|
* @param {string} message
|
|
366
388
|
* @param {string} senderName
|
|
@@ -369,52 +391,52 @@ export declare class Projects extends Service {
|
|
|
369
391
|
* @throws {AppwriteException}
|
|
370
392
|
* @returns {Promise}
|
|
371
393
|
*/
|
|
372
|
-
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>;
|
|
373
395
|
/**
|
|
374
396
|
* Reset custom email template
|
|
375
397
|
*
|
|
376
398
|
*
|
|
377
399
|
* @param {string} projectId
|
|
378
|
-
* @param {
|
|
379
|
-
* @param {
|
|
400
|
+
* @param {EmailTemplateType} type
|
|
401
|
+
* @param {EmailTemplateLocale} locale
|
|
380
402
|
* @throws {AppwriteException}
|
|
381
403
|
* @returns {Promise}
|
|
382
404
|
*/
|
|
383
|
-
deleteEmailTemplate(projectId: string, type:
|
|
405
|
+
deleteEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate>;
|
|
384
406
|
/**
|
|
385
407
|
* Get custom SMS template
|
|
386
408
|
*
|
|
387
409
|
*
|
|
388
410
|
* @param {string} projectId
|
|
389
|
-
* @param {
|
|
390
|
-
* @param {
|
|
411
|
+
* @param {SmsTemplateType} type
|
|
412
|
+
* @param {SmsTemplateLocale} locale
|
|
391
413
|
* @throws {AppwriteException}
|
|
392
414
|
* @returns {Promise}
|
|
393
415
|
*/
|
|
394
|
-
getSmsTemplate(projectId: string, type:
|
|
416
|
+
getSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
|
|
395
417
|
/**
|
|
396
418
|
* Update custom SMS template
|
|
397
419
|
*
|
|
398
420
|
*
|
|
399
421
|
* @param {string} projectId
|
|
400
|
-
* @param {
|
|
401
|
-
* @param {
|
|
422
|
+
* @param {SmsTemplateType} type
|
|
423
|
+
* @param {SmsTemplateLocale} locale
|
|
402
424
|
* @param {string} message
|
|
403
425
|
* @throws {AppwriteException}
|
|
404
426
|
* @returns {Promise}
|
|
405
427
|
*/
|
|
406
|
-
updateSmsTemplate(projectId: string, type:
|
|
428
|
+
updateSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string): Promise<Models.SmsTemplate>;
|
|
407
429
|
/**
|
|
408
430
|
* Reset custom SMS template
|
|
409
431
|
*
|
|
410
432
|
*
|
|
411
433
|
* @param {string} projectId
|
|
412
|
-
* @param {
|
|
413
|
-
* @param {
|
|
434
|
+
* @param {SmsTemplateType} type
|
|
435
|
+
* @param {SmsTemplateLocale} locale
|
|
414
436
|
* @throws {AppwriteException}
|
|
415
437
|
* @returns {Promise}
|
|
416
438
|
*/
|
|
417
|
-
deleteSmsTemplate(projectId: string, type:
|
|
439
|
+
deleteSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
|
|
418
440
|
/**
|
|
419
441
|
* List webhooks
|
|
420
442
|
*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
2
|
import { Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
|
+
import { ResourceType } from '../enums/resource-type';
|
|
4
5
|
export declare class Proxy extends Service {
|
|
5
6
|
constructor(client: Client);
|
|
6
7
|
/**
|
|
@@ -21,12 +22,12 @@ export declare class Proxy extends Service {
|
|
|
21
22
|
* Create a new proxy rule.
|
|
22
23
|
*
|
|
23
24
|
* @param {string} domain
|
|
24
|
-
* @param {
|
|
25
|
+
* @param {ResourceType} resourceType
|
|
25
26
|
* @param {string} resourceId
|
|
26
27
|
* @throws {AppwriteException}
|
|
27
28
|
* @returns {Promise}
|
|
28
29
|
*/
|
|
29
|
-
createRule(domain: string, resourceType:
|
|
30
|
+
createRule(domain: string, resourceType: ResourceType, resourceId?: string): Promise<Models.ProxyRule>;
|
|
30
31
|
/**
|
|
31
32
|
* Get Rule
|
|
32
33
|
*
|
|
@@ -2,6 +2,10 @@ import { Service } from '../service';
|
|
|
2
2
|
import { Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import type { UploadProgress } from '../client';
|
|
5
|
+
import { Compression } from '../enums/compression';
|
|
6
|
+
import { ImageGravity } from '../enums/image-gravity';
|
|
7
|
+
import { ImageFormat } from '../enums/image-format';
|
|
8
|
+
import { StorageUsageRange } from '../enums/storage-usage-range';
|
|
5
9
|
export declare class Storage extends Service {
|
|
6
10
|
constructor(client: Client);
|
|
7
11
|
/**
|
|
@@ -28,13 +32,13 @@ export declare class Storage extends Service {
|
|
|
28
32
|
* @param {boolean} enabled
|
|
29
33
|
* @param {number} maximumFileSize
|
|
30
34
|
* @param {string[]} allowedFileExtensions
|
|
31
|
-
* @param {
|
|
35
|
+
* @param {Compression} compression
|
|
32
36
|
* @param {boolean} encryption
|
|
33
37
|
* @param {boolean} antivirus
|
|
34
38
|
* @throws {AppwriteException}
|
|
35
39
|
* @returns {Promise}
|
|
36
40
|
*/
|
|
37
|
-
createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?:
|
|
41
|
+
createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
|
|
38
42
|
/**
|
|
39
43
|
* Get bucket
|
|
40
44
|
*
|
|
@@ -58,13 +62,13 @@ export declare class Storage extends Service {
|
|
|
58
62
|
* @param {boolean} enabled
|
|
59
63
|
* @param {number} maximumFileSize
|
|
60
64
|
* @param {string[]} allowedFileExtensions
|
|
61
|
-
* @param {
|
|
65
|
+
* @param {Compression} compression
|
|
62
66
|
* @param {boolean} encryption
|
|
63
67
|
* @param {boolean} antivirus
|
|
64
68
|
* @throws {AppwriteException}
|
|
65
69
|
* @returns {Promise}
|
|
66
70
|
*/
|
|
67
|
-
updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?:
|
|
71
|
+
updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
|
|
68
72
|
/**
|
|
69
73
|
* Delete bucket
|
|
70
74
|
*
|
|
@@ -182,7 +186,7 @@ export declare class Storage extends Service {
|
|
|
182
186
|
* @param {string} fileId
|
|
183
187
|
* @param {number} width
|
|
184
188
|
* @param {number} height
|
|
185
|
-
* @param {
|
|
189
|
+
* @param {ImageGravity} gravity
|
|
186
190
|
* @param {number} quality
|
|
187
191
|
* @param {number} borderWidth
|
|
188
192
|
* @param {string} borderColor
|
|
@@ -190,11 +194,11 @@ export declare class Storage extends Service {
|
|
|
190
194
|
* @param {number} opacity
|
|
191
195
|
* @param {number} rotation
|
|
192
196
|
* @param {string} background
|
|
193
|
-
* @param {
|
|
197
|
+
* @param {ImageFormat} output
|
|
194
198
|
* @throws {AppwriteException}
|
|
195
199
|
* @returns {URL}
|
|
196
200
|
*/
|
|
197
|
-
getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?:
|
|
201
|
+
getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat): URL;
|
|
198
202
|
/**
|
|
199
203
|
* Get file for view
|
|
200
204
|
*
|
|
@@ -209,22 +213,22 @@ export declare class Storage extends Service {
|
|
|
209
213
|
*/
|
|
210
214
|
getFileView(bucketId: string, fileId: string): URL;
|
|
211
215
|
/**
|
|
212
|
-
* Get usage stats
|
|
216
|
+
* Get storage usage stats
|
|
213
217
|
*
|
|
214
218
|
*
|
|
215
|
-
* @param {
|
|
219
|
+
* @param {StorageUsageRange} range
|
|
216
220
|
* @throws {AppwriteException}
|
|
217
221
|
* @returns {Promise}
|
|
218
222
|
*/
|
|
219
|
-
getUsage(range?:
|
|
223
|
+
getUsage(range?: StorageUsageRange): Promise<Models.UsageStorage>;
|
|
220
224
|
/**
|
|
221
|
-
* Get usage stats
|
|
225
|
+
* Get bucket usage stats
|
|
222
226
|
*
|
|
223
227
|
*
|
|
224
228
|
* @param {string} bucketId
|
|
225
|
-
* @param {
|
|
229
|
+
* @param {StorageUsageRange} range
|
|
226
230
|
* @throws {AppwriteException}
|
|
227
231
|
* @returns {Promise}
|
|
228
232
|
*/
|
|
229
|
-
getBucketUsage(bucketId: string, range?:
|
|
233
|
+
getBucketUsage(bucketId: string, range?: StorageUsageRange): Promise<Models.UsageBuckets>;
|
|
230
234
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
2
|
import { Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
|
+
import { PasswordHash } from '../enums/password-hash';
|
|
5
|
+
import { UserUsageRange } from '../enums/user-usage-range';
|
|
6
|
+
import { AuthenticatorType } from '../enums/authenticator-type';
|
|
7
|
+
import { MessagingProviderType } from '../enums/messaging-provider-type';
|
|
4
8
|
export declare class Users extends Service {
|
|
5
9
|
constructor(client: Client);
|
|
6
10
|
/**
|
|
@@ -66,12 +70,12 @@ export declare class Users extends Service {
|
|
|
66
70
|
*
|
|
67
71
|
* Get identities for all users.
|
|
68
72
|
*
|
|
69
|
-
* @param {string} queries
|
|
73
|
+
* @param {string[]} queries
|
|
70
74
|
* @param {string} search
|
|
71
75
|
* @throws {AppwriteException}
|
|
72
76
|
* @returns {Promise}
|
|
73
77
|
*/
|
|
74
|
-
listIdentities(queries?: string, search?: string): Promise<Models.IdentityList>;
|
|
78
|
+
listIdentities(queries?: string[], search?: string): Promise<Models.IdentityList>;
|
|
75
79
|
/**
|
|
76
80
|
* Delete identity
|
|
77
81
|
*
|
|
@@ -166,21 +170,21 @@ export declare class Users extends Service {
|
|
|
166
170
|
* @param {string} userId
|
|
167
171
|
* @param {string} email
|
|
168
172
|
* @param {string} password
|
|
169
|
-
* @param {
|
|
173
|
+
* @param {PasswordHash} passwordVersion
|
|
170
174
|
* @param {string} name
|
|
171
175
|
* @throws {AppwriteException}
|
|
172
176
|
* @returns {Promise}
|
|
173
177
|
*/
|
|
174
|
-
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>>;
|
|
175
179
|
/**
|
|
176
|
-
* Get usage stats
|
|
180
|
+
* Get users usage stats
|
|
177
181
|
*
|
|
178
182
|
*
|
|
179
|
-
* @param {
|
|
183
|
+
* @param {UserUsageRange} range
|
|
180
184
|
* @throws {AppwriteException}
|
|
181
185
|
* @returns {Promise}
|
|
182
186
|
*/
|
|
183
|
-
getUsage(range?:
|
|
187
|
+
getUsage(range?: UserUsageRange): Promise<Models.UsageUsers>;
|
|
184
188
|
/**
|
|
185
189
|
* Get user
|
|
186
190
|
*
|
|
@@ -257,6 +261,7 @@ export declare class Users extends Service {
|
|
|
257
261
|
/**
|
|
258
262
|
* Update MFA
|
|
259
263
|
*
|
|
264
|
+
* Enable or disable MFA on a user account.
|
|
260
265
|
*
|
|
261
266
|
* @param {string} userId
|
|
262
267
|
* @param {boolean} mfa
|
|
@@ -267,14 +272,63 @@ export declare class Users extends Service {
|
|
|
267
272
|
/**
|
|
268
273
|
* Delete Authenticator
|
|
269
274
|
*
|
|
275
|
+
* Delete an authenticator app.
|
|
276
|
+
*
|
|
277
|
+
* @param {string} userId
|
|
278
|
+
* @param {AuthenticatorType} type
|
|
279
|
+
* @throws {AppwriteException}
|
|
280
|
+
* @returns {Promise}
|
|
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.
|
|
270
287
|
*
|
|
271
288
|
* @param {string} userId
|
|
272
|
-
* @param {string} provider
|
|
273
|
-
* @param {string} otp
|
|
274
289
|
* @throws {AppwriteException}
|
|
275
290
|
* @returns {Promise}
|
|
276
291
|
*/
|
|
277
|
-
|
|
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>;
|
|
278
332
|
/**
|
|
279
333
|
* Update name
|
|
280
334
|
*
|
|
@@ -331,15 +385,6 @@ export declare class Users extends Service {
|
|
|
331
385
|
* @returns {Promise}
|
|
332
386
|
*/
|
|
333
387
|
updatePrefs<Preferences extends Models.Preferences>(userId: string, prefs: object): Promise<Preferences>;
|
|
334
|
-
/**
|
|
335
|
-
* List Providers
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
* @param {string} userId
|
|
339
|
-
* @throws {AppwriteException}
|
|
340
|
-
* @returns {Promise}
|
|
341
|
-
*/
|
|
342
|
-
listProviders(userId: string): Promise<Models.MfaProviders>;
|
|
343
388
|
/**
|
|
344
389
|
* List user sessions
|
|
345
390
|
*
|
|
@@ -401,30 +446,33 @@ export declare class Users extends Service {
|
|
|
401
446
|
/**
|
|
402
447
|
* List User Targets
|
|
403
448
|
*
|
|
449
|
+
* List the messaging targets that are associated with a user.
|
|
404
450
|
*
|
|
405
451
|
* @param {string} userId
|
|
406
|
-
* @param {string} queries
|
|
452
|
+
* @param {string[]} queries
|
|
407
453
|
* @throws {AppwriteException}
|
|
408
454
|
* @returns {Promise}
|
|
409
455
|
*/
|
|
410
|
-
listTargets(userId: string, queries?: string): Promise<Models.TargetList>;
|
|
456
|
+
listTargets(userId: string, queries?: string[]): Promise<Models.TargetList>;
|
|
411
457
|
/**
|
|
412
458
|
* Create User Target
|
|
413
459
|
*
|
|
460
|
+
* Create a messaging target.
|
|
414
461
|
*
|
|
415
462
|
* @param {string} userId
|
|
416
463
|
* @param {string} targetId
|
|
417
|
-
* @param {
|
|
464
|
+
* @param {MessagingProviderType} providerType
|
|
418
465
|
* @param {string} identifier
|
|
419
466
|
* @param {string} providerId
|
|
420
467
|
* @param {string} name
|
|
421
468
|
* @throws {AppwriteException}
|
|
422
469
|
* @returns {Promise}
|
|
423
470
|
*/
|
|
424
|
-
createTarget(userId: string, targetId: string, providerType:
|
|
471
|
+
createTarget(userId: string, targetId: string, providerType: MessagingProviderType, identifier: string, providerId?: string, name?: string): Promise<Models.Target>;
|
|
425
472
|
/**
|
|
426
473
|
* Get User Target
|
|
427
474
|
*
|
|
475
|
+
* Get a user's push notification target by ID.
|
|
428
476
|
*
|
|
429
477
|
* @param {string} userId
|
|
430
478
|
* @param {string} targetId
|
|
@@ -435,6 +483,7 @@ export declare class Users extends Service {
|
|
|
435
483
|
/**
|
|
436
484
|
* Update User target
|
|
437
485
|
*
|
|
486
|
+
* Update a messaging target.
|
|
438
487
|
*
|
|
439
488
|
* @param {string} userId
|
|
440
489
|
* @param {string} targetId
|
|
@@ -448,6 +497,7 @@ export declare class Users extends Service {
|
|
|
448
497
|
/**
|
|
449
498
|
* Delete user target
|
|
450
499
|
*
|
|
500
|
+
* Delete a messaging target.
|
|
451
501
|
*
|
|
452
502
|
* @param {string} userId
|
|
453
503
|
* @param {string} targetId
|
|
@@ -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.addAuthenticator('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, 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('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, 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('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.listProviders();
|
|
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
|
-
});
|