@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
|
@@ -14,12 +14,12 @@ export class Migrations extends Service {
|
|
|
14
14
|
* List Migrations
|
|
15
15
|
*
|
|
16
16
|
*
|
|
17
|
-
* @param {string} queries
|
|
17
|
+
* @param {string[]} queries
|
|
18
18
|
* @param {string} search
|
|
19
19
|
* @throws {AppwriteException}
|
|
20
20
|
* @returns {Promise}
|
|
21
21
|
*/
|
|
22
|
-
async list(queries?: string, search?: string): Promise<Models.MigrationList> {
|
|
22
|
+
async list(queries?: string[], search?: string): Promise<Models.MigrationList> {
|
|
23
23
|
const apiPath = '/migrations';
|
|
24
24
|
const payload: Payload = {};
|
|
25
25
|
|
package/src/services/project.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 { ProjectUsageRange } from '../enums/project-usage-range';
|
|
5
6
|
|
|
6
7
|
export class Project extends Service {
|
|
7
8
|
|
|
@@ -11,16 +12,16 @@ export class Project extends Service {
|
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
|
-
* Get usage stats
|
|
15
|
+
* Get project usage stats
|
|
15
16
|
*
|
|
16
17
|
*
|
|
17
18
|
* @param {string} startDate
|
|
18
19
|
* @param {string} endDate
|
|
19
|
-
* @param {
|
|
20
|
+
* @param {ProjectUsageRange} period
|
|
20
21
|
* @throws {AppwriteException}
|
|
21
22
|
* @returns {Promise}
|
|
22
23
|
*/
|
|
23
|
-
async getUsage(startDate: string, endDate: string, period?:
|
|
24
|
+
async getUsage(startDate: string, endDate: string, period?: ProjectUsageRange): Promise<Models.UsageProject> {
|
|
24
25
|
if (typeof startDate === 'undefined') {
|
|
25
26
|
throw new AppwriteException('Missing required parameter: "startDate"');
|
|
26
27
|
}
|
package/src/services/projects.ts
CHANGED
|
@@ -2,6 +2,17 @@ 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 { Region } from '../enums/region';
|
|
6
|
+
import { Api } from '../enums/api';
|
|
7
|
+
import { AuthMethod } from '../enums/auth-method';
|
|
8
|
+
import { OAuthProvider } from '../enums/o-auth-provider';
|
|
9
|
+
import { PlatformType } from '../enums/platform-type';
|
|
10
|
+
import { ApiService } from '../enums/api-service';
|
|
11
|
+
import { SMTPSecure } from '../enums/s-m-t-p-secure';
|
|
12
|
+
import { EmailTemplateType } from '../enums/email-template-type';
|
|
13
|
+
import { EmailTemplateLocale } from '../enums/email-template-locale';
|
|
14
|
+
import { SmsTemplateType } from '../enums/sms-template-type';
|
|
15
|
+
import { SmsTemplateLocale } from '../enums/sms-template-locale';
|
|
5
16
|
|
|
6
17
|
export class Projects extends Service {
|
|
7
18
|
|
|
@@ -44,7 +55,7 @@ export class Projects extends Service {
|
|
|
44
55
|
* @param {string} projectId
|
|
45
56
|
* @param {string} name
|
|
46
57
|
* @param {string} teamId
|
|
47
|
-
* @param {
|
|
58
|
+
* @param {Region} region
|
|
48
59
|
* @param {string} description
|
|
49
60
|
* @param {string} logo
|
|
50
61
|
* @param {string} url
|
|
@@ -57,7 +68,7 @@ export class Projects extends Service {
|
|
|
57
68
|
* @throws {AppwriteException}
|
|
58
69
|
* @returns {Promise}
|
|
59
70
|
*/
|
|
60
|
-
async create(projectId: string, name: string, teamId: string, region?:
|
|
71
|
+
async 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> {
|
|
61
72
|
if (typeof projectId === 'undefined') {
|
|
62
73
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
63
74
|
}
|
|
@@ -252,28 +263,37 @@ export class Projects extends Service {
|
|
|
252
263
|
}
|
|
253
264
|
|
|
254
265
|
/**
|
|
255
|
-
* Update
|
|
266
|
+
* Update API status
|
|
256
267
|
*
|
|
257
268
|
*
|
|
258
269
|
* @param {string} projectId
|
|
259
|
-
* @param {
|
|
270
|
+
* @param {Api} api
|
|
271
|
+
* @param {boolean} status
|
|
260
272
|
* @throws {AppwriteException}
|
|
261
273
|
* @returns {Promise}
|
|
262
274
|
*/
|
|
263
|
-
async
|
|
275
|
+
async updateApiStatus(projectId: string, api: Api, status: boolean): Promise<Models.Project> {
|
|
264
276
|
if (typeof projectId === 'undefined') {
|
|
265
277
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
266
278
|
}
|
|
267
279
|
|
|
268
|
-
if (typeof
|
|
269
|
-
throw new AppwriteException('Missing required parameter: "
|
|
280
|
+
if (typeof api === 'undefined') {
|
|
281
|
+
throw new AppwriteException('Missing required parameter: "api"');
|
|
270
282
|
}
|
|
271
283
|
|
|
272
|
-
|
|
284
|
+
if (typeof status === 'undefined') {
|
|
285
|
+
throw new AppwriteException('Missing required parameter: "status"');
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
|
|
273
289
|
const payload: Payload = {};
|
|
274
290
|
|
|
275
|
-
if (typeof
|
|
276
|
-
payload['
|
|
291
|
+
if (typeof api !== 'undefined') {
|
|
292
|
+
payload['api'] = api;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (typeof status !== 'undefined') {
|
|
296
|
+
payload['status'] = status;
|
|
277
297
|
}
|
|
278
298
|
|
|
279
299
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -283,28 +303,28 @@ export class Projects extends Service {
|
|
|
283
303
|
}
|
|
284
304
|
|
|
285
305
|
/**
|
|
286
|
-
* Update
|
|
306
|
+
* Update all API status
|
|
287
307
|
*
|
|
288
308
|
*
|
|
289
309
|
* @param {string} projectId
|
|
290
|
-
* @param {
|
|
310
|
+
* @param {boolean} status
|
|
291
311
|
* @throws {AppwriteException}
|
|
292
312
|
* @returns {Promise}
|
|
293
313
|
*/
|
|
294
|
-
async
|
|
314
|
+
async updateApiStatusAll(projectId: string, status: boolean): Promise<Models.Project> {
|
|
295
315
|
if (typeof projectId === 'undefined') {
|
|
296
316
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
297
317
|
}
|
|
298
318
|
|
|
299
|
-
if (typeof
|
|
300
|
-
throw new AppwriteException('Missing required parameter: "
|
|
319
|
+
if (typeof status === 'undefined') {
|
|
320
|
+
throw new AppwriteException('Missing required parameter: "status"');
|
|
301
321
|
}
|
|
302
322
|
|
|
303
|
-
const apiPath = '/projects/{projectId}/
|
|
323
|
+
const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
|
|
304
324
|
const payload: Payload = {};
|
|
305
325
|
|
|
306
|
-
if (typeof
|
|
307
|
-
payload['
|
|
326
|
+
if (typeof status !== 'undefined') {
|
|
327
|
+
payload['status'] = status;
|
|
308
328
|
}
|
|
309
329
|
|
|
310
330
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -314,7 +334,38 @@ export class Projects extends Service {
|
|
|
314
334
|
}
|
|
315
335
|
|
|
316
336
|
/**
|
|
317
|
-
* Update project
|
|
337
|
+
* Update project authentication duration
|
|
338
|
+
*
|
|
339
|
+
*
|
|
340
|
+
* @param {string} projectId
|
|
341
|
+
* @param {number} duration
|
|
342
|
+
* @throws {AppwriteException}
|
|
343
|
+
* @returns {Promise}
|
|
344
|
+
*/
|
|
345
|
+
async updateAuthDuration(projectId: string, duration: number): Promise<Models.Project> {
|
|
346
|
+
if (typeof projectId === 'undefined') {
|
|
347
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
if (typeof duration === 'undefined') {
|
|
351
|
+
throw new AppwriteException('Missing required parameter: "duration"');
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
|
|
355
|
+
const payload: Payload = {};
|
|
356
|
+
|
|
357
|
+
if (typeof duration !== 'undefined') {
|
|
358
|
+
payload['duration'] = duration;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
362
|
+
return await this.client.call('patch', uri, {
|
|
363
|
+
'content-type': 'application/json',
|
|
364
|
+
}, payload);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Update project users limit
|
|
318
369
|
*
|
|
319
370
|
*
|
|
320
371
|
* @param {string} projectId
|
|
@@ -322,7 +373,7 @@ export class Projects extends Service {
|
|
|
322
373
|
* @throws {AppwriteException}
|
|
323
374
|
* @returns {Promise}
|
|
324
375
|
*/
|
|
325
|
-
async
|
|
376
|
+
async updateAuthLimit(projectId: string, limit: number): Promise<Models.Project> {
|
|
326
377
|
if (typeof projectId === 'undefined') {
|
|
327
378
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
328
379
|
}
|
|
@@ -331,7 +382,7 @@ export class Projects extends Service {
|
|
|
331
382
|
throw new AppwriteException('Missing required parameter: "limit"');
|
|
332
383
|
}
|
|
333
384
|
|
|
334
|
-
const apiPath = '/projects/{projectId}/auth/
|
|
385
|
+
const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
|
|
335
386
|
const payload: Payload = {};
|
|
336
387
|
|
|
337
388
|
if (typeof limit !== 'undefined') {
|
|
@@ -345,28 +396,28 @@ export class Projects extends Service {
|
|
|
345
396
|
}
|
|
346
397
|
|
|
347
398
|
/**
|
|
348
|
-
* Update
|
|
399
|
+
* Update project user sessions limit
|
|
349
400
|
*
|
|
350
401
|
*
|
|
351
402
|
* @param {string} projectId
|
|
352
|
-
* @param {number}
|
|
403
|
+
* @param {number} limit
|
|
353
404
|
* @throws {AppwriteException}
|
|
354
405
|
* @returns {Promise}
|
|
355
406
|
*/
|
|
356
|
-
async
|
|
407
|
+
async updateAuthSessionsLimit(projectId: string, limit: number): Promise<Models.Project> {
|
|
357
408
|
if (typeof projectId === 'undefined') {
|
|
358
409
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
359
410
|
}
|
|
360
411
|
|
|
361
|
-
if (typeof
|
|
362
|
-
throw new AppwriteException('Missing required parameter: "
|
|
412
|
+
if (typeof limit === 'undefined') {
|
|
413
|
+
throw new AppwriteException('Missing required parameter: "limit"');
|
|
363
414
|
}
|
|
364
415
|
|
|
365
|
-
const apiPath = '/projects/{projectId}/auth/
|
|
416
|
+
const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
|
|
366
417
|
const payload: Payload = {};
|
|
367
418
|
|
|
368
|
-
if (typeof
|
|
369
|
-
payload['
|
|
419
|
+
if (typeof limit !== 'undefined') {
|
|
420
|
+
payload['limit'] = limit;
|
|
370
421
|
}
|
|
371
422
|
|
|
372
423
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -473,12 +524,12 @@ export class Projects extends Service {
|
|
|
473
524
|
*
|
|
474
525
|
*
|
|
475
526
|
* @param {string} projectId
|
|
476
|
-
* @param {
|
|
527
|
+
* @param {AuthMethod} method
|
|
477
528
|
* @param {boolean} status
|
|
478
529
|
* @throws {AppwriteException}
|
|
479
530
|
* @returns {Promise}
|
|
480
531
|
*/
|
|
481
|
-
async updateAuthStatus(projectId: string, method:
|
|
532
|
+
async updateAuthStatus(projectId: string, method: AuthMethod, status: boolean): Promise<Models.Project> {
|
|
482
533
|
if (typeof projectId === 'undefined') {
|
|
483
534
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
484
535
|
}
|
|
@@ -680,14 +731,14 @@ export class Projects extends Service {
|
|
|
680
731
|
*
|
|
681
732
|
*
|
|
682
733
|
* @param {string} projectId
|
|
683
|
-
* @param {
|
|
734
|
+
* @param {OAuthProvider} provider
|
|
684
735
|
* @param {string} appId
|
|
685
736
|
* @param {string} secret
|
|
686
737
|
* @param {boolean} enabled
|
|
687
738
|
* @throws {AppwriteException}
|
|
688
739
|
* @returns {Promise}
|
|
689
740
|
*/
|
|
690
|
-
async updateOAuth2(projectId: string, provider:
|
|
741
|
+
async updateOAuth2(projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean): Promise<Models.Project> {
|
|
691
742
|
if (typeof projectId === 'undefined') {
|
|
692
743
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
693
744
|
}
|
|
@@ -748,7 +799,7 @@ export class Projects extends Service {
|
|
|
748
799
|
*
|
|
749
800
|
*
|
|
750
801
|
* @param {string} projectId
|
|
751
|
-
* @param {
|
|
802
|
+
* @param {PlatformType} type
|
|
752
803
|
* @param {string} name
|
|
753
804
|
* @param {string} key
|
|
754
805
|
* @param {string} store
|
|
@@ -756,7 +807,7 @@ export class Projects extends Service {
|
|
|
756
807
|
* @throws {AppwriteException}
|
|
757
808
|
* @returns {Promise}
|
|
758
809
|
*/
|
|
759
|
-
async createPlatform(projectId: string, type:
|
|
810
|
+
async createPlatform(projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform> {
|
|
760
811
|
if (typeof projectId === 'undefined') {
|
|
761
812
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
762
813
|
}
|
|
@@ -908,12 +959,12 @@ export class Projects extends Service {
|
|
|
908
959
|
*
|
|
909
960
|
*
|
|
910
961
|
* @param {string} projectId
|
|
911
|
-
* @param {
|
|
962
|
+
* @param {ApiService} service
|
|
912
963
|
* @param {boolean} status
|
|
913
964
|
* @throws {AppwriteException}
|
|
914
965
|
* @returns {Promise}
|
|
915
966
|
*/
|
|
916
|
-
async updateServiceStatus(projectId: string, service:
|
|
967
|
+
async updateServiceStatus(projectId: string, service: ApiService, status: boolean): Promise<Models.Project> {
|
|
917
968
|
if (typeof projectId === 'undefined') {
|
|
918
969
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
919
970
|
}
|
|
@@ -987,11 +1038,11 @@ export class Projects extends Service {
|
|
|
987
1038
|
* @param {number} port
|
|
988
1039
|
* @param {string} username
|
|
989
1040
|
* @param {string} password
|
|
990
|
-
* @param {
|
|
1041
|
+
* @param {SMTPSecure} secure
|
|
991
1042
|
* @throws {AppwriteException}
|
|
992
1043
|
* @returns {Promise}
|
|
993
1044
|
*/
|
|
994
|
-
async updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?:
|
|
1045
|
+
async updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project> {
|
|
995
1046
|
if (typeof projectId === 'undefined') {
|
|
996
1047
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
997
1048
|
}
|
|
@@ -1058,11 +1109,11 @@ export class Projects extends Service {
|
|
|
1058
1109
|
* @param {number} port
|
|
1059
1110
|
* @param {string} username
|
|
1060
1111
|
* @param {string} password
|
|
1061
|
-
* @param {
|
|
1112
|
+
* @param {SMTPSecure} secure
|
|
1062
1113
|
* @throws {AppwriteException}
|
|
1063
1114
|
* @returns {Promise}
|
|
1064
1115
|
*/
|
|
1065
|
-
async createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?:
|
|
1116
|
+
async createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}> {
|
|
1066
1117
|
if (typeof projectId === 'undefined') {
|
|
1067
1118
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1068
1119
|
}
|
|
@@ -1164,12 +1215,12 @@ export class Projects extends Service {
|
|
|
1164
1215
|
*
|
|
1165
1216
|
*
|
|
1166
1217
|
* @param {string} projectId
|
|
1167
|
-
* @param {
|
|
1168
|
-
* @param {
|
|
1218
|
+
* @param {EmailTemplateType} type
|
|
1219
|
+
* @param {EmailTemplateLocale} locale
|
|
1169
1220
|
* @throws {AppwriteException}
|
|
1170
1221
|
* @returns {Promise}
|
|
1171
1222
|
*/
|
|
1172
|
-
async getEmailTemplate(projectId: string, type:
|
|
1223
|
+
async getEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate> {
|
|
1173
1224
|
if (typeof projectId === 'undefined') {
|
|
1174
1225
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1175
1226
|
}
|
|
@@ -1196,8 +1247,8 @@ export class Projects extends Service {
|
|
|
1196
1247
|
*
|
|
1197
1248
|
*
|
|
1198
1249
|
* @param {string} projectId
|
|
1199
|
-
* @param {
|
|
1200
|
-
* @param {
|
|
1250
|
+
* @param {EmailTemplateType} type
|
|
1251
|
+
* @param {EmailTemplateLocale} locale
|
|
1201
1252
|
* @param {string} subject
|
|
1202
1253
|
* @param {string} message
|
|
1203
1254
|
* @param {string} senderName
|
|
@@ -1206,7 +1257,7 @@ export class Projects extends Service {
|
|
|
1206
1257
|
* @throws {AppwriteException}
|
|
1207
1258
|
* @returns {Promise}
|
|
1208
1259
|
*/
|
|
1209
|
-
async updateEmailTemplate(projectId: string, type:
|
|
1260
|
+
async updateEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string): Promise<Models.Project> {
|
|
1210
1261
|
if (typeof projectId === 'undefined') {
|
|
1211
1262
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1212
1263
|
}
|
|
@@ -1261,12 +1312,12 @@ export class Projects extends Service {
|
|
|
1261
1312
|
*
|
|
1262
1313
|
*
|
|
1263
1314
|
* @param {string} projectId
|
|
1264
|
-
* @param {
|
|
1265
|
-
* @param {
|
|
1315
|
+
* @param {EmailTemplateType} type
|
|
1316
|
+
* @param {EmailTemplateLocale} locale
|
|
1266
1317
|
* @throws {AppwriteException}
|
|
1267
1318
|
* @returns {Promise}
|
|
1268
1319
|
*/
|
|
1269
|
-
async deleteEmailTemplate(projectId: string, type:
|
|
1320
|
+
async deleteEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate> {
|
|
1270
1321
|
if (typeof projectId === 'undefined') {
|
|
1271
1322
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1272
1323
|
}
|
|
@@ -1293,12 +1344,12 @@ export class Projects extends Service {
|
|
|
1293
1344
|
*
|
|
1294
1345
|
*
|
|
1295
1346
|
* @param {string} projectId
|
|
1296
|
-
* @param {
|
|
1297
|
-
* @param {
|
|
1347
|
+
* @param {SmsTemplateType} type
|
|
1348
|
+
* @param {SmsTemplateLocale} locale
|
|
1298
1349
|
* @throws {AppwriteException}
|
|
1299
1350
|
* @returns {Promise}
|
|
1300
1351
|
*/
|
|
1301
|
-
async getSmsTemplate(projectId: string, type:
|
|
1352
|
+
async getSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate> {
|
|
1302
1353
|
if (typeof projectId === 'undefined') {
|
|
1303
1354
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1304
1355
|
}
|
|
@@ -1325,13 +1376,13 @@ export class Projects extends Service {
|
|
|
1325
1376
|
*
|
|
1326
1377
|
*
|
|
1327
1378
|
* @param {string} projectId
|
|
1328
|
-
* @param {
|
|
1329
|
-
* @param {
|
|
1379
|
+
* @param {SmsTemplateType} type
|
|
1380
|
+
* @param {SmsTemplateLocale} locale
|
|
1330
1381
|
* @param {string} message
|
|
1331
1382
|
* @throws {AppwriteException}
|
|
1332
1383
|
* @returns {Promise}
|
|
1333
1384
|
*/
|
|
1334
|
-
async updateSmsTemplate(projectId: string, type:
|
|
1385
|
+
async updateSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string): Promise<Models.SmsTemplate> {
|
|
1335
1386
|
if (typeof projectId === 'undefined') {
|
|
1336
1387
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1337
1388
|
}
|
|
@@ -1366,12 +1417,12 @@ export class Projects extends Service {
|
|
|
1366
1417
|
*
|
|
1367
1418
|
*
|
|
1368
1419
|
* @param {string} projectId
|
|
1369
|
-
* @param {
|
|
1370
|
-
* @param {
|
|
1420
|
+
* @param {SmsTemplateType} type
|
|
1421
|
+
* @param {SmsTemplateLocale} locale
|
|
1371
1422
|
* @throws {AppwriteException}
|
|
1372
1423
|
* @returns {Promise}
|
|
1373
1424
|
*/
|
|
1374
|
-
async deleteSmsTemplate(projectId: string, type:
|
|
1425
|
+
async deleteSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate> {
|
|
1375
1426
|
if (typeof projectId === 'undefined') {
|
|
1376
1427
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1377
1428
|
}
|
package/src/services/proxy.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 { ResourceType } from '../enums/resource-type';
|
|
5
6
|
|
|
6
7
|
export class Proxy extends Service {
|
|
7
8
|
|
|
@@ -45,12 +46,12 @@ export class Proxy extends Service {
|
|
|
45
46
|
* Create a new proxy rule.
|
|
46
47
|
*
|
|
47
48
|
* @param {string} domain
|
|
48
|
-
* @param {
|
|
49
|
+
* @param {ResourceType} resourceType
|
|
49
50
|
* @param {string} resourceId
|
|
50
51
|
* @throws {AppwriteException}
|
|
51
52
|
* @returns {Promise}
|
|
52
53
|
*/
|
|
53
|
-
async createRule(domain: string, resourceType:
|
|
54
|
+
async createRule(domain: string, resourceType: ResourceType, resourceId?: string): Promise<Models.ProxyRule> {
|
|
54
55
|
if (typeof domain === 'undefined') {
|
|
55
56
|
throw new AppwriteException('Missing required parameter: "domain"');
|
|
56
57
|
}
|
package/src/services/storage.ts
CHANGED
|
@@ -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 { 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
|
|
|
6
10
|
export class Storage extends Service {
|
|
7
11
|
|
|
@@ -51,13 +55,13 @@ export class Storage extends Service {
|
|
|
51
55
|
* @param {boolean} enabled
|
|
52
56
|
* @param {number} maximumFileSize
|
|
53
57
|
* @param {string[]} allowedFileExtensions
|
|
54
|
-
* @param {
|
|
58
|
+
* @param {Compression} compression
|
|
55
59
|
* @param {boolean} encryption
|
|
56
60
|
* @param {boolean} antivirus
|
|
57
61
|
* @throws {AppwriteException}
|
|
58
62
|
* @returns {Promise}
|
|
59
63
|
*/
|
|
60
|
-
async createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?:
|
|
64
|
+
async createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket> {
|
|
61
65
|
if (typeof bucketId === 'undefined') {
|
|
62
66
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
63
67
|
}
|
|
@@ -151,13 +155,13 @@ export class Storage extends Service {
|
|
|
151
155
|
* @param {boolean} enabled
|
|
152
156
|
* @param {number} maximumFileSize
|
|
153
157
|
* @param {string[]} allowedFileExtensions
|
|
154
|
-
* @param {
|
|
158
|
+
* @param {Compression} compression
|
|
155
159
|
* @param {boolean} encryption
|
|
156
160
|
* @param {boolean} antivirus
|
|
157
161
|
* @throws {AppwriteException}
|
|
158
162
|
* @returns {Promise}
|
|
159
163
|
*/
|
|
160
|
-
async updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?:
|
|
164
|
+
async updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket> {
|
|
161
165
|
if (typeof bucketId === 'undefined') {
|
|
162
166
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
163
167
|
}
|
|
@@ -523,7 +527,7 @@ export class Storage extends Service {
|
|
|
523
527
|
* @param {string} fileId
|
|
524
528
|
* @param {number} width
|
|
525
529
|
* @param {number} height
|
|
526
|
-
* @param {
|
|
530
|
+
* @param {ImageGravity} gravity
|
|
527
531
|
* @param {number} quality
|
|
528
532
|
* @param {number} borderWidth
|
|
529
533
|
* @param {string} borderColor
|
|
@@ -531,11 +535,11 @@ export class Storage extends Service {
|
|
|
531
535
|
* @param {number} opacity
|
|
532
536
|
* @param {number} rotation
|
|
533
537
|
* @param {string} background
|
|
534
|
-
* @param {
|
|
538
|
+
* @param {ImageFormat} output
|
|
535
539
|
* @throws {AppwriteException}
|
|
536
540
|
* @returns {URL}
|
|
537
541
|
*/
|
|
538
|
-
getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?:
|
|
542
|
+
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 {
|
|
539
543
|
if (typeof bucketId === 'undefined') {
|
|
540
544
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
541
545
|
}
|
|
@@ -636,14 +640,14 @@ export class Storage extends Service {
|
|
|
636
640
|
}
|
|
637
641
|
|
|
638
642
|
/**
|
|
639
|
-
* Get usage stats
|
|
643
|
+
* Get storage usage stats
|
|
640
644
|
*
|
|
641
645
|
*
|
|
642
|
-
* @param {
|
|
646
|
+
* @param {StorageUsageRange} range
|
|
643
647
|
* @throws {AppwriteException}
|
|
644
648
|
* @returns {Promise}
|
|
645
649
|
*/
|
|
646
|
-
async getUsage(range?:
|
|
650
|
+
async getUsage(range?: StorageUsageRange): Promise<Models.UsageStorage> {
|
|
647
651
|
const apiPath = '/storage/usage';
|
|
648
652
|
const payload: Payload = {};
|
|
649
653
|
|
|
@@ -658,15 +662,15 @@ export class Storage extends Service {
|
|
|
658
662
|
}
|
|
659
663
|
|
|
660
664
|
/**
|
|
661
|
-
* Get usage stats
|
|
665
|
+
* Get bucket usage stats
|
|
662
666
|
*
|
|
663
667
|
*
|
|
664
668
|
* @param {string} bucketId
|
|
665
|
-
* @param {
|
|
669
|
+
* @param {StorageUsageRange} range
|
|
666
670
|
* @throws {AppwriteException}
|
|
667
671
|
* @returns {Promise}
|
|
668
672
|
*/
|
|
669
|
-
async getBucketUsage(bucketId: string, range?:
|
|
673
|
+
async getBucketUsage(bucketId: string, range?: StorageUsageRange): Promise<Models.UsageBuckets> {
|
|
670
674
|
if (typeof bucketId === 'undefined') {
|
|
671
675
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
672
676
|
}
|