@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
|
@@ -2,6 +2,10 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import type { UploadProgress, Payload } from '../client';
|
|
5
|
+
import { DatabaseUsageRange } from '../enums/database-usage-range';
|
|
6
|
+
import { RelationshipType } from '../enums/relationship-type';
|
|
7
|
+
import { RelationMutate } from '../enums/relation-mutate';
|
|
8
|
+
import { IndexType } from '../enums/index-type';
|
|
5
9
|
|
|
6
10
|
export class Databases extends Service {
|
|
7
11
|
|
|
@@ -82,14 +86,14 @@ export class Databases extends Service {
|
|
|
82
86
|
}
|
|
83
87
|
|
|
84
88
|
/**
|
|
85
|
-
* Get usage stats
|
|
89
|
+
* Get databases usage stats
|
|
86
90
|
*
|
|
87
91
|
*
|
|
88
|
-
* @param {
|
|
92
|
+
* @param {DatabaseUsageRange} range
|
|
89
93
|
* @throws {AppwriteException}
|
|
90
94
|
* @returns {Promise}
|
|
91
95
|
*/
|
|
92
|
-
async getUsage(range?:
|
|
96
|
+
async getUsage(range?: DatabaseUsageRange): Promise<Models.UsageDatabases> {
|
|
93
97
|
const apiPath = '/databases/usage';
|
|
94
98
|
const payload: Payload = {};
|
|
95
99
|
|
|
@@ -394,6 +398,7 @@ export class Databases extends Service {
|
|
|
394
398
|
/**
|
|
395
399
|
* List attributes
|
|
396
400
|
*
|
|
401
|
+
* List attributes in the collection.
|
|
397
402
|
*
|
|
398
403
|
* @param {string} databaseId
|
|
399
404
|
* @param {string} collectionId
|
|
@@ -483,6 +488,8 @@ export class Databases extends Service {
|
|
|
483
488
|
/**
|
|
484
489
|
* Update boolean attribute
|
|
485
490
|
*
|
|
491
|
+
* Update a boolean attribute. Changing the `default` value will not update
|
|
492
|
+
* already existing documents.
|
|
486
493
|
*
|
|
487
494
|
* @param {string} databaseId
|
|
488
495
|
* @param {string} collectionId
|
|
@@ -533,6 +540,7 @@ export class Databases extends Service {
|
|
|
533
540
|
/**
|
|
534
541
|
* Create datetime attribute
|
|
535
542
|
*
|
|
543
|
+
* Create a date time attribute according to the ISO 8601 standard.
|
|
536
544
|
*
|
|
537
545
|
* @param {string} databaseId
|
|
538
546
|
* @param {string} collectionId
|
|
@@ -588,6 +596,8 @@ export class Databases extends Service {
|
|
|
588
596
|
/**
|
|
589
597
|
* Update dateTime attribute
|
|
590
598
|
*
|
|
599
|
+
* Update a date time attribute. Changing the `default` value will not update
|
|
600
|
+
* already existing documents.
|
|
591
601
|
*
|
|
592
602
|
* @param {string} databaseId
|
|
593
603
|
* @param {string} collectionId
|
|
@@ -748,6 +758,9 @@ export class Databases extends Service {
|
|
|
748
758
|
/**
|
|
749
759
|
* Create enum attribute
|
|
750
760
|
*
|
|
761
|
+
* Create an enumeration attribute. The `elements` param acts as a white-list
|
|
762
|
+
* of accepted values for this attribute.
|
|
763
|
+
*
|
|
751
764
|
*
|
|
752
765
|
* @param {string} databaseId
|
|
753
766
|
* @param {string} collectionId
|
|
@@ -1269,15 +1282,15 @@ export class Databases extends Service {
|
|
|
1269
1282
|
* @param {string} databaseId
|
|
1270
1283
|
* @param {string} collectionId
|
|
1271
1284
|
* @param {string} relatedCollectionId
|
|
1272
|
-
* @param {
|
|
1285
|
+
* @param {RelationshipType} type
|
|
1273
1286
|
* @param {boolean} twoWay
|
|
1274
1287
|
* @param {string} key
|
|
1275
1288
|
* @param {string} twoWayKey
|
|
1276
|
-
* @param {
|
|
1289
|
+
* @param {RelationMutate} onDelete
|
|
1277
1290
|
* @throws {AppwriteException}
|
|
1278
1291
|
* @returns {Promise}
|
|
1279
1292
|
*/
|
|
1280
|
-
async createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type:
|
|
1293
|
+
async createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship> {
|
|
1281
1294
|
if (typeof databaseId === 'undefined') {
|
|
1282
1295
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
1283
1296
|
}
|
|
@@ -1564,6 +1577,7 @@ export class Databases extends Service {
|
|
|
1564
1577
|
/**
|
|
1565
1578
|
* Get attribute
|
|
1566
1579
|
*
|
|
1580
|
+
* Get attribute by ID.
|
|
1567
1581
|
*
|
|
1568
1582
|
* @param {string} databaseId
|
|
1569
1583
|
* @param {string} collectionId
|
|
@@ -1596,6 +1610,7 @@ export class Databases extends Service {
|
|
|
1596
1610
|
/**
|
|
1597
1611
|
* Delete attribute
|
|
1598
1612
|
*
|
|
1613
|
+
* Deletes an attribute.
|
|
1599
1614
|
*
|
|
1600
1615
|
* @param {string} databaseId
|
|
1601
1616
|
* @param {string} collectionId
|
|
@@ -1635,11 +1650,11 @@ export class Databases extends Service {
|
|
|
1635
1650
|
* @param {string} databaseId
|
|
1636
1651
|
* @param {string} collectionId
|
|
1637
1652
|
* @param {string} key
|
|
1638
|
-
* @param {
|
|
1653
|
+
* @param {RelationMutate} onDelete
|
|
1639
1654
|
* @throws {AppwriteException}
|
|
1640
1655
|
* @returns {Promise}
|
|
1641
1656
|
*/
|
|
1642
|
-
async updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?:
|
|
1657
|
+
async updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship> {
|
|
1643
1658
|
if (typeof databaseId === 'undefined') {
|
|
1644
1659
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
1645
1660
|
}
|
|
@@ -1910,6 +1925,7 @@ export class Databases extends Service {
|
|
|
1910
1925
|
/**
|
|
1911
1926
|
* List indexes
|
|
1912
1927
|
*
|
|
1928
|
+
* List indexes in the collection.
|
|
1913
1929
|
*
|
|
1914
1930
|
* @param {string} databaseId
|
|
1915
1931
|
* @param {string} collectionId
|
|
@@ -1942,17 +1958,20 @@ export class Databases extends Service {
|
|
|
1942
1958
|
/**
|
|
1943
1959
|
* Create index
|
|
1944
1960
|
*
|
|
1961
|
+
* Creates an index on the attributes listed. Your index should include all
|
|
1962
|
+
* the attributes you will query in a single request.
|
|
1963
|
+
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
1945
1964
|
*
|
|
1946
1965
|
* @param {string} databaseId
|
|
1947
1966
|
* @param {string} collectionId
|
|
1948
1967
|
* @param {string} key
|
|
1949
|
-
* @param {
|
|
1968
|
+
* @param {IndexType} type
|
|
1950
1969
|
* @param {string[]} attributes
|
|
1951
1970
|
* @param {string[]} orders
|
|
1952
1971
|
* @throws {AppwriteException}
|
|
1953
1972
|
* @returns {Promise}
|
|
1954
1973
|
*/
|
|
1955
|
-
async createIndex(databaseId: string, collectionId: string, key: string, type:
|
|
1974
|
+
async createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[]): Promise<Models.Index> {
|
|
1956
1975
|
if (typeof databaseId === 'undefined') {
|
|
1957
1976
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
1958
1977
|
}
|
|
@@ -2001,6 +2020,7 @@ export class Databases extends Service {
|
|
|
2001
2020
|
/**
|
|
2002
2021
|
* Get index
|
|
2003
2022
|
*
|
|
2023
|
+
* Get index by ID.
|
|
2004
2024
|
*
|
|
2005
2025
|
* @param {string} databaseId
|
|
2006
2026
|
* @param {string} collectionId
|
|
@@ -2033,6 +2053,7 @@ export class Databases extends Service {
|
|
|
2033
2053
|
/**
|
|
2034
2054
|
* Delete index
|
|
2035
2055
|
*
|
|
2056
|
+
* Delete an index.
|
|
2036
2057
|
*
|
|
2037
2058
|
* @param {string} databaseId
|
|
2038
2059
|
* @param {string} collectionId
|
|
@@ -2096,16 +2117,16 @@ export class Databases extends Service {
|
|
|
2096
2117
|
}
|
|
2097
2118
|
|
|
2098
2119
|
/**
|
|
2099
|
-
* Get usage stats
|
|
2120
|
+
* Get collection usage stats
|
|
2100
2121
|
*
|
|
2101
2122
|
*
|
|
2102
2123
|
* @param {string} databaseId
|
|
2103
2124
|
* @param {string} collectionId
|
|
2104
|
-
* @param {
|
|
2125
|
+
* @param {DatabaseUsageRange} range
|
|
2105
2126
|
* @throws {AppwriteException}
|
|
2106
2127
|
* @returns {Promise}
|
|
2107
2128
|
*/
|
|
2108
|
-
async getCollectionUsage(databaseId: string, collectionId: string, range?:
|
|
2129
|
+
async getCollectionUsage(databaseId: string, collectionId: string, range?: DatabaseUsageRange): Promise<Models.UsageCollection> {
|
|
2109
2130
|
if (typeof databaseId === 'undefined') {
|
|
2110
2131
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
2111
2132
|
}
|
|
@@ -2156,15 +2177,15 @@ export class Databases extends Service {
|
|
|
2156
2177
|
}
|
|
2157
2178
|
|
|
2158
2179
|
/**
|
|
2159
|
-
* Get usage stats
|
|
2180
|
+
* Get database usage stats
|
|
2160
2181
|
*
|
|
2161
2182
|
*
|
|
2162
2183
|
* @param {string} databaseId
|
|
2163
|
-
* @param {
|
|
2184
|
+
* @param {DatabaseUsageRange} range
|
|
2164
2185
|
* @throws {AppwriteException}
|
|
2165
2186
|
* @returns {Promise}
|
|
2166
2187
|
*/
|
|
2167
|
-
async getDatabaseUsage(databaseId: string, range?:
|
|
2188
|
+
async getDatabaseUsage(databaseId: string, range?: DatabaseUsageRange): Promise<Models.UsageDatabase> {
|
|
2168
2189
|
if (typeof databaseId === 'undefined') {
|
|
2169
2190
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
2170
2191
|
}
|
|
@@ -2,6 +2,9 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import type { UploadProgress, Payload } from '../client';
|
|
5
|
+
import { Runtime } from '../enums/runtime';
|
|
6
|
+
import { FunctionUsageRange } from '../enums/function-usage-range';
|
|
7
|
+
import { ExecutionMethod } from '../enums/execution-method';
|
|
5
8
|
|
|
6
9
|
export class Functions extends Service {
|
|
7
10
|
|
|
@@ -49,7 +52,7 @@ export class Functions extends Service {
|
|
|
49
52
|
*
|
|
50
53
|
* @param {string} functionId
|
|
51
54
|
* @param {string} name
|
|
52
|
-
* @param {
|
|
55
|
+
* @param {Runtime} runtime
|
|
53
56
|
* @param {string[]} execute
|
|
54
57
|
* @param {string[]} events
|
|
55
58
|
* @param {string} schedule
|
|
@@ -70,7 +73,7 @@ export class Functions extends Service {
|
|
|
70
73
|
* @throws {AppwriteException}
|
|
71
74
|
* @returns {Promise}
|
|
72
75
|
*/
|
|
73
|
-
async create(functionId: string, name: string, runtime:
|
|
76
|
+
async create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, templateRepository?: string, templateOwner?: string, templateRootDirectory?: string, templateBranch?: string): Promise<Models.Function> {
|
|
74
77
|
if (typeof functionId === 'undefined') {
|
|
75
78
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
76
79
|
}
|
|
@@ -194,11 +197,11 @@ export class Functions extends Service {
|
|
|
194
197
|
* Get functions usage
|
|
195
198
|
*
|
|
196
199
|
*
|
|
197
|
-
* @param {
|
|
200
|
+
* @param {FunctionUsageRange} range
|
|
198
201
|
* @throws {AppwriteException}
|
|
199
202
|
* @returns {Promise}
|
|
200
203
|
*/
|
|
201
|
-
async getUsage(range?:
|
|
204
|
+
async getUsage(range?: FunctionUsageRange): Promise<Models.UsageFunctions> {
|
|
202
205
|
const apiPath = '/functions/usage';
|
|
203
206
|
const payload: Payload = {};
|
|
204
207
|
|
|
@@ -242,7 +245,7 @@ export class Functions extends Service {
|
|
|
242
245
|
*
|
|
243
246
|
* @param {string} functionId
|
|
244
247
|
* @param {string} name
|
|
245
|
-
* @param {
|
|
248
|
+
* @param {Runtime} runtime
|
|
246
249
|
* @param {string[]} execute
|
|
247
250
|
* @param {string[]} events
|
|
248
251
|
* @param {string} schedule
|
|
@@ -259,7 +262,7 @@ export class Functions extends Service {
|
|
|
259
262
|
* @throws {AppwriteException}
|
|
260
263
|
* @returns {Promise}
|
|
261
264
|
*/
|
|
262
|
-
async update(functionId: string, name: string, runtime?:
|
|
265
|
+
async update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string): Promise<Models.Function> {
|
|
263
266
|
if (typeof functionId === 'undefined') {
|
|
264
267
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
265
268
|
}
|
|
@@ -694,12 +697,12 @@ export class Functions extends Service {
|
|
|
694
697
|
* @param {string} body
|
|
695
698
|
* @param {boolean} async
|
|
696
699
|
* @param {string} xpath
|
|
697
|
-
* @param {
|
|
700
|
+
* @param {ExecutionMethod} method
|
|
698
701
|
* @param {object} headers
|
|
699
702
|
* @throws {AppwriteException}
|
|
700
703
|
* @returns {Promise}
|
|
701
704
|
*/
|
|
702
|
-
async createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?:
|
|
705
|
+
async createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object): Promise<Models.Execution> {
|
|
703
706
|
if (typeof functionId === 'undefined') {
|
|
704
707
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
705
708
|
}
|
|
@@ -766,11 +769,11 @@ export class Functions extends Service {
|
|
|
766
769
|
*
|
|
767
770
|
*
|
|
768
771
|
* @param {string} functionId
|
|
769
|
-
* @param {
|
|
772
|
+
* @param {FunctionUsageRange} range
|
|
770
773
|
* @throws {AppwriteException}
|
|
771
774
|
* @returns {Promise}
|
|
772
775
|
*/
|
|
773
|
-
async getFunctionUsage(functionId: string, range?:
|
|
776
|
+
async getFunctionUsage(functionId: string, range?: FunctionUsageRange): Promise<Models.UsageFunction> {
|
|
774
777
|
if (typeof functionId === 'undefined') {
|
|
775
778
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
776
779
|
}
|
package/src/services/health.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import type { UploadProgress, Payload } from '../client';
|
|
5
|
+
import { Name } from '../enums/name';
|
|
5
6
|
|
|
6
7
|
export class Health extends Service {
|
|
7
8
|
|
|
@@ -65,6 +66,29 @@ export class Health extends Service {
|
|
|
65
66
|
}, payload);
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Get the SSL certificate for a domain
|
|
71
|
+
*
|
|
72
|
+
* Get the SSL certificate for a domain
|
|
73
|
+
*
|
|
74
|
+
* @param {string} domain
|
|
75
|
+
* @throws {AppwriteException}
|
|
76
|
+
* @returns {Promise}
|
|
77
|
+
*/
|
|
78
|
+
async getCertificate(domain?: string): Promise<Models.HealthCertificate> {
|
|
79
|
+
const apiPath = '/health/certificate';
|
|
80
|
+
const payload: Payload = {};
|
|
81
|
+
|
|
82
|
+
if (typeof domain !== 'undefined') {
|
|
83
|
+
payload['domain'] = domain;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
87
|
+
return await this.client.call('get', uri, {
|
|
88
|
+
'content-type': 'application/json',
|
|
89
|
+
}, payload);
|
|
90
|
+
}
|
|
91
|
+
|
|
68
92
|
/**
|
|
69
93
|
* Get DB
|
|
70
94
|
*
|
|
@@ -222,9 +246,40 @@ export class Health extends Service {
|
|
|
222
246
|
}, payload);
|
|
223
247
|
}
|
|
224
248
|
|
|
249
|
+
/**
|
|
250
|
+
* Get number of failed queue jobs
|
|
251
|
+
*
|
|
252
|
+
* Returns the amount of failed jobs in a given queue.
|
|
253
|
+
*
|
|
254
|
+
*
|
|
255
|
+
* @param {Name} name
|
|
256
|
+
* @param {number} threshold
|
|
257
|
+
* @throws {AppwriteException}
|
|
258
|
+
* @returns {Promise}
|
|
259
|
+
*/
|
|
260
|
+
async getFailedJobs(name: Name, threshold?: number): Promise<Models.HealthQueue> {
|
|
261
|
+
if (typeof name === 'undefined') {
|
|
262
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const apiPath = '/health/queue/failed/{name}'.replace('{name}', name);
|
|
266
|
+
const payload: Payload = {};
|
|
267
|
+
|
|
268
|
+
if (typeof threshold !== 'undefined') {
|
|
269
|
+
payload['threshold'] = threshold;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
273
|
+
return await this.client.call('get', uri, {
|
|
274
|
+
'content-type': 'application/json',
|
|
275
|
+
}, payload);
|
|
276
|
+
}
|
|
277
|
+
|
|
225
278
|
/**
|
|
226
279
|
* Get functions queue
|
|
227
280
|
*
|
|
281
|
+
* Get the number of function executions that are waiting to be processed in
|
|
282
|
+
* the Appwrite internal queue server.
|
|
228
283
|
*
|
|
229
284
|
* @param {number} threshold
|
|
230
285
|
* @throws {AppwriteException}
|
|
@@ -340,6 +395,54 @@ export class Health extends Service {
|
|
|
340
395
|
}, payload);
|
|
341
396
|
}
|
|
342
397
|
|
|
398
|
+
/**
|
|
399
|
+
* Get usage queue
|
|
400
|
+
*
|
|
401
|
+
* Get the number of metrics that are waiting to be processed in the Appwrite
|
|
402
|
+
* internal queue server.
|
|
403
|
+
*
|
|
404
|
+
* @param {number} threshold
|
|
405
|
+
* @throws {AppwriteException}
|
|
406
|
+
* @returns {Promise}
|
|
407
|
+
*/
|
|
408
|
+
async getQueueUsage(threshold?: number): Promise<Models.HealthQueue> {
|
|
409
|
+
const apiPath = '/health/queue/usage';
|
|
410
|
+
const payload: Payload = {};
|
|
411
|
+
|
|
412
|
+
if (typeof threshold !== 'undefined') {
|
|
413
|
+
payload['threshold'] = threshold;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
417
|
+
return await this.client.call('get', uri, {
|
|
418
|
+
'content-type': 'application/json',
|
|
419
|
+
}, payload);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Get usage dump queue
|
|
424
|
+
*
|
|
425
|
+
* Get the number of projects containing metrics that are waiting to be
|
|
426
|
+
* processed in the Appwrite internal queue server.
|
|
427
|
+
*
|
|
428
|
+
* @param {number} threshold
|
|
429
|
+
* @throws {AppwriteException}
|
|
430
|
+
* @returns {Promise}
|
|
431
|
+
*/
|
|
432
|
+
async getQueueUsageDump(threshold?: number): Promise<Models.HealthQueue> {
|
|
433
|
+
const apiPath = '/health/queue/usage-dump';
|
|
434
|
+
const payload: Payload = {};
|
|
435
|
+
|
|
436
|
+
if (typeof threshold !== 'undefined') {
|
|
437
|
+
payload['threshold'] = threshold;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
441
|
+
return await this.client.call('get', uri, {
|
|
442
|
+
'content-type': 'application/json',
|
|
443
|
+
}, payload);
|
|
444
|
+
}
|
|
445
|
+
|
|
343
446
|
/**
|
|
344
447
|
* Get webhooks queue
|
|
345
448
|
*
|
|
@@ -364,6 +467,24 @@ export class Health extends Service {
|
|
|
364
467
|
}, payload);
|
|
365
468
|
}
|
|
366
469
|
|
|
470
|
+
/**
|
|
471
|
+
* Get storage
|
|
472
|
+
*
|
|
473
|
+
* Check the Appwrite storage device is up and connection is successful.
|
|
474
|
+
*
|
|
475
|
+
* @throws {AppwriteException}
|
|
476
|
+
* @returns {Promise}
|
|
477
|
+
*/
|
|
478
|
+
async getStorage(): Promise<Models.HealthStatus> {
|
|
479
|
+
const apiPath = '/health/storage';
|
|
480
|
+
const payload: Payload = {};
|
|
481
|
+
|
|
482
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
483
|
+
return await this.client.call('get', uri, {
|
|
484
|
+
'content-type': 'application/json',
|
|
485
|
+
}, payload);
|
|
486
|
+
}
|
|
487
|
+
|
|
367
488
|
/**
|
|
368
489
|
* Get local storage
|
|
369
490
|
*
|