@appwrite.io/console 0.6.2 → 0.6.4
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/.github/workflows/autoclose.yml +11 -0
- package/.github/workflows/publish.yml +40 -16
- package/README.md +2 -2
- package/dist/cjs/sdk.js +293 -19
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +293 -19
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +293 -19
- package/docs/examples/account/create-anonymous-session.md +1 -1
- package/docs/examples/account/create-email-password-session.md +1 -1
- package/docs/examples/account/create-email-token.md +1 -1
- package/docs/examples/account/create-j-w-t.md +1 -1
- package/docs/examples/account/create-magic-u-r-l-token.md +1 -1
- package/docs/examples/account/create-mfa-authenticator.md +1 -1
- package/docs/examples/account/create-mfa-challenge.md +1 -1
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/create-o-auth2session.md +1 -1
- package/docs/examples/account/create-o-auth2token.md +1 -1
- package/docs/examples/account/create-phone-token.md +1 -1
- package/docs/examples/account/create-phone-verification.md +1 -1
- package/docs/examples/account/create-push-target.md +1 -1
- package/docs/examples/account/create-recovery.md +1 -1
- package/docs/examples/account/create-session.md +1 -1
- package/docs/examples/account/create-verification.md +1 -1
- package/docs/examples/account/create.md +1 -1
- package/docs/examples/account/delete-identity.md +1 -1
- package/docs/examples/account/delete-mfa-authenticator.md +1 -1
- package/docs/examples/account/delete-push-target.md +1 -1
- package/docs/examples/account/delete-session.md +1 -1
- package/docs/examples/account/delete-sessions.md +1 -1
- package/docs/examples/account/delete.md +1 -1
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/get-prefs.md +1 -1
- package/docs/examples/account/get-session.md +1 -1
- package/docs/examples/account/get.md +1 -1
- package/docs/examples/account/list-identities.md +1 -1
- package/docs/examples/account/list-logs.md +1 -1
- package/docs/examples/account/list-mfa-factors.md +1 -1
- package/docs/examples/account/list-sessions.md +1 -1
- package/docs/examples/account/update-email.md +1 -1
- package/docs/examples/account/update-m-f-a.md +1 -1
- package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
- package/docs/examples/account/update-mfa-authenticator.md +1 -1
- package/docs/examples/account/update-mfa-challenge.md +1 -1
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/update-name.md +1 -1
- package/docs/examples/account/update-password.md +1 -1
- package/docs/examples/account/update-phone-session.md +1 -1
- package/docs/examples/account/update-phone-verification.md +1 -1
- package/docs/examples/account/update-phone.md +1 -1
- package/docs/examples/account/update-prefs.md +1 -1
- package/docs/examples/account/update-push-target.md +1 -1
- package/docs/examples/account/update-recovery.md +1 -1
- package/docs/examples/account/update-session.md +1 -1
- package/docs/examples/account/update-status.md +1 -1
- package/docs/examples/account/update-verification.md +1 -1
- package/docs/examples/assistant/chat.md +1 -1
- package/docs/examples/avatars/get-browser.md +1 -1
- package/docs/examples/avatars/get-credit-card.md +1 -1
- package/docs/examples/avatars/get-favicon.md +1 -1
- package/docs/examples/avatars/get-flag.md +1 -1
- package/docs/examples/avatars/get-image.md +1 -1
- package/docs/examples/avatars/get-initials.md +1 -1
- package/docs/examples/avatars/get-q-r.md +1 -1
- package/docs/examples/console/variables.md +1 -1
- package/docs/examples/databases/create-boolean-attribute.md +1 -1
- package/docs/examples/databases/create-collection.md +1 -1
- package/docs/examples/databases/create-datetime-attribute.md +1 -1
- package/docs/examples/databases/create-document.md +1 -1
- package/docs/examples/databases/create-email-attribute.md +1 -1
- package/docs/examples/databases/create-enum-attribute.md +1 -1
- package/docs/examples/databases/create-float-attribute.md +1 -1
- package/docs/examples/databases/create-index.md +1 -1
- package/docs/examples/databases/create-integer-attribute.md +1 -1
- package/docs/examples/databases/create-ip-attribute.md +1 -1
- package/docs/examples/databases/create-relationship-attribute.md +1 -1
- package/docs/examples/databases/create-string-attribute.md +1 -1
- package/docs/examples/databases/create-url-attribute.md +1 -1
- package/docs/examples/databases/create.md +1 -1
- package/docs/examples/databases/delete-attribute.md +1 -1
- package/docs/examples/databases/delete-collection.md +1 -1
- package/docs/examples/databases/delete-document.md +1 -1
- package/docs/examples/databases/delete-index.md +1 -1
- package/docs/examples/databases/delete.md +1 -1
- package/docs/examples/databases/get-attribute.md +1 -1
- package/docs/examples/databases/get-collection-usage.md +1 -1
- package/docs/examples/databases/get-collection.md +1 -1
- package/docs/examples/databases/get-database-usage.md +1 -1
- package/docs/examples/databases/get-document.md +1 -1
- package/docs/examples/databases/get-index.md +1 -1
- package/docs/examples/databases/get-usage.md +1 -1
- package/docs/examples/databases/get.md +1 -1
- package/docs/examples/databases/list-attributes.md +1 -1
- package/docs/examples/databases/list-collection-logs.md +1 -1
- package/docs/examples/databases/list-collections.md +1 -1
- package/docs/examples/databases/list-document-logs.md +1 -1
- package/docs/examples/databases/list-documents.md +1 -1
- package/docs/examples/databases/list-indexes.md +1 -1
- package/docs/examples/databases/list-logs.md +1 -1
- package/docs/examples/databases/list.md +1 -1
- package/docs/examples/databases/update-boolean-attribute.md +1 -1
- package/docs/examples/databases/update-collection.md +1 -1
- package/docs/examples/databases/update-datetime-attribute.md +1 -1
- package/docs/examples/databases/update-document.md +1 -1
- package/docs/examples/databases/update-email-attribute.md +1 -1
- package/docs/examples/databases/update-enum-attribute.md +1 -1
- package/docs/examples/databases/update-float-attribute.md +1 -1
- package/docs/examples/databases/update-integer-attribute.md +1 -1
- package/docs/examples/databases/update-ip-attribute.md +1 -1
- package/docs/examples/databases/update-relationship-attribute.md +1 -1
- package/docs/examples/databases/update-string-attribute.md +1 -1
- package/docs/examples/databases/update-url-attribute.md +1 -1
- package/docs/examples/databases/update.md +1 -1
- package/docs/examples/functions/create-build.md +1 -1
- package/docs/examples/functions/create-deployment.md +1 -1
- package/docs/examples/functions/create-execution.md +1 -1
- package/docs/examples/functions/create-variable.md +1 -1
- package/docs/examples/functions/create.md +3 -2
- package/docs/examples/functions/delete-deployment.md +1 -1
- package/docs/examples/functions/delete-variable.md +1 -1
- package/docs/examples/functions/delete.md +1 -1
- package/docs/examples/functions/download-deployment.md +1 -1
- package/docs/examples/functions/get-deployment.md +1 -1
- package/docs/examples/functions/get-execution.md +1 -1
- package/docs/examples/functions/get-function-usage.md +1 -1
- package/docs/examples/functions/get-specifications.md +11 -0
- package/docs/examples/functions/get-usage.md +1 -1
- package/docs/examples/functions/get-variable.md +1 -1
- package/docs/examples/functions/get.md +1 -1
- package/docs/examples/functions/list-deployments.md +1 -1
- package/docs/examples/functions/list-executions.md +1 -1
- package/docs/examples/functions/list-runtimes.md +1 -1
- package/docs/examples/functions/list-variables.md +1 -1
- package/docs/examples/functions/list.md +1 -1
- package/docs/examples/functions/update-deployment.md +1 -1
- package/docs/examples/functions/update-variable.md +1 -1
- package/docs/examples/functions/update.md +3 -2
- package/docs/examples/graphql/mutation.md +1 -1
- package/docs/examples/graphql/query.md +1 -1
- package/docs/examples/health/get-antivirus.md +1 -1
- package/docs/examples/health/get-cache.md +1 -1
- package/docs/examples/health/get-certificate.md +1 -1
- package/docs/examples/health/get-d-b.md +1 -1
- package/docs/examples/health/get-failed-jobs.md +1 -1
- package/docs/examples/health/get-pub-sub.md +1 -1
- package/docs/examples/health/get-queue-builds.md +1 -1
- package/docs/examples/health/get-queue-certificates.md +1 -1
- package/docs/examples/health/get-queue-databases.md +1 -1
- package/docs/examples/health/get-queue-deletes.md +1 -1
- package/docs/examples/health/get-queue-functions.md +1 -1
- package/docs/examples/health/get-queue-logs.md +1 -1
- package/docs/examples/health/get-queue-mails.md +1 -1
- package/docs/examples/health/get-queue-messaging.md +1 -1
- package/docs/examples/health/get-queue-migrations.md +1 -1
- package/docs/examples/health/get-queue-usage-dump.md +1 -1
- package/docs/examples/health/get-queue-usage.md +1 -1
- package/docs/examples/health/get-queue-webhooks.md +1 -1
- package/docs/examples/health/get-queue.md +1 -1
- package/docs/examples/health/get-storage-local.md +1 -1
- package/docs/examples/health/get-storage.md +1 -1
- package/docs/examples/health/get-time.md +1 -1
- package/docs/examples/health/get.md +1 -1
- package/docs/examples/locale/get.md +1 -1
- package/docs/examples/locale/list-codes.md +1 -1
- package/docs/examples/locale/list-continents.md +1 -1
- package/docs/examples/locale/list-countries-e-u.md +1 -1
- package/docs/examples/locale/list-countries-phones.md +1 -1
- package/docs/examples/locale/list-countries.md +1 -1
- package/docs/examples/locale/list-currencies.md +1 -1
- package/docs/examples/locale/list-languages.md +1 -1
- package/docs/examples/messaging/create-apns-provider.md +1 -1
- package/docs/examples/messaging/create-email.md +1 -1
- package/docs/examples/messaging/create-fcm-provider.md +1 -1
- package/docs/examples/messaging/create-mailgun-provider.md +1 -1
- package/docs/examples/messaging/create-msg91provider.md +1 -1
- package/docs/examples/messaging/create-push.md +1 -1
- package/docs/examples/messaging/create-sendgrid-provider.md +1 -1
- package/docs/examples/messaging/create-sms.md +1 -1
- package/docs/examples/messaging/create-smtp-provider.md +1 -1
- package/docs/examples/messaging/create-subscriber.md +1 -1
- package/docs/examples/messaging/create-telesign-provider.md +1 -1
- package/docs/examples/messaging/create-textmagic-provider.md +1 -1
- package/docs/examples/messaging/create-topic.md +1 -1
- package/docs/examples/messaging/create-twilio-provider.md +1 -1
- package/docs/examples/messaging/create-vonage-provider.md +1 -1
- package/docs/examples/messaging/delete-provider.md +1 -1
- package/docs/examples/messaging/delete-subscriber.md +1 -1
- package/docs/examples/messaging/delete-topic.md +1 -1
- package/docs/examples/messaging/delete.md +1 -1
- package/docs/examples/messaging/get-message.md +1 -1
- package/docs/examples/messaging/get-provider.md +1 -1
- package/docs/examples/messaging/get-subscriber.md +1 -1
- package/docs/examples/messaging/get-topic.md +1 -1
- package/docs/examples/messaging/list-message-logs.md +1 -1
- package/docs/examples/messaging/list-messages.md +1 -1
- package/docs/examples/messaging/list-provider-logs.md +1 -1
- package/docs/examples/messaging/list-providers.md +1 -1
- package/docs/examples/messaging/list-subscriber-logs.md +1 -1
- package/docs/examples/messaging/list-subscribers.md +1 -1
- package/docs/examples/messaging/list-targets.md +1 -1
- package/docs/examples/messaging/list-topic-logs.md +1 -1
- package/docs/examples/messaging/list-topics.md +1 -1
- package/docs/examples/messaging/update-apns-provider.md +1 -1
- package/docs/examples/messaging/update-email.md +1 -1
- package/docs/examples/messaging/update-fcm-provider.md +1 -1
- package/docs/examples/messaging/update-mailgun-provider.md +1 -1
- package/docs/examples/messaging/update-msg91provider.md +1 -1
- package/docs/examples/messaging/update-push.md +1 -1
- package/docs/examples/messaging/update-sendgrid-provider.md +1 -1
- package/docs/examples/messaging/update-sms.md +1 -1
- package/docs/examples/messaging/update-smtp-provider.md +1 -1
- package/docs/examples/messaging/update-telesign-provider.md +1 -1
- package/docs/examples/messaging/update-textmagic-provider.md +1 -1
- package/docs/examples/messaging/update-topic.md +1 -1
- package/docs/examples/messaging/update-twilio-provider.md +1 -1
- package/docs/examples/messaging/update-vonage-provider.md +1 -1
- package/docs/examples/migrations/create-appwrite-migration.md +1 -1
- package/docs/examples/migrations/create-firebase-migration.md +1 -1
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +1 -1
- package/docs/examples/migrations/create-n-host-migration.md +1 -1
- package/docs/examples/migrations/create-supabase-migration.md +1 -1
- package/docs/examples/migrations/delete-firebase-auth.md +1 -1
- package/docs/examples/migrations/delete.md +1 -1
- package/docs/examples/migrations/get-appwrite-report.md +1 -1
- package/docs/examples/migrations/get-firebase-report-o-auth.md +1 -1
- package/docs/examples/migrations/get-firebase-report.md +1 -1
- package/docs/examples/migrations/get-n-host-report.md +1 -1
- package/docs/examples/migrations/get-supabase-report.md +1 -1
- package/docs/examples/migrations/get.md +1 -1
- package/docs/examples/migrations/list-firebase-projects.md +1 -1
- package/docs/examples/migrations/list.md +1 -1
- package/docs/examples/migrations/retry.md +1 -1
- package/docs/examples/project/create-variable.md +1 -1
- package/docs/examples/project/delete-variable.md +1 -1
- package/docs/examples/project/get-usage.md +1 -1
- package/docs/examples/project/get-variable.md +1 -1
- package/docs/examples/project/list-variables.md +1 -1
- package/docs/examples/project/update-variable.md +1 -1
- package/docs/examples/projects/create-key.md +1 -1
- package/docs/examples/projects/create-platform.md +1 -1
- package/docs/examples/projects/create-smtp-test.md +1 -1
- package/docs/examples/projects/create-webhook.md +1 -1
- package/docs/examples/projects/create.md +1 -1
- package/docs/examples/projects/delete-email-template.md +1 -1
- package/docs/examples/projects/delete-key.md +1 -1
- package/docs/examples/projects/delete-platform.md +1 -1
- package/docs/examples/projects/delete-sms-template.md +1 -1
- package/docs/examples/projects/delete-webhook.md +1 -1
- package/docs/examples/projects/delete.md +1 -1
- package/docs/examples/projects/get-email-template.md +1 -1
- package/docs/examples/projects/get-key.md +1 -1
- package/docs/examples/projects/get-platform.md +1 -1
- package/docs/examples/projects/get-sms-template.md +1 -1
- package/docs/examples/projects/get-webhook.md +1 -1
- package/docs/examples/projects/get.md +1 -1
- package/docs/examples/projects/list-keys.md +1 -1
- package/docs/examples/projects/list-platforms.md +1 -1
- package/docs/examples/projects/list-webhooks.md +1 -1
- package/docs/examples/projects/list.md +1 -1
- package/docs/examples/projects/update-api-status-all.md +1 -1
- package/docs/examples/projects/update-api-status.md +1 -1
- package/docs/examples/projects/update-auth-duration.md +1 -1
- package/docs/examples/projects/update-auth-limit.md +1 -1
- package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
- package/docs/examples/projects/update-auth-password-history.md +1 -1
- package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
- package/docs/examples/projects/update-auth-status.md +1 -1
- package/docs/examples/projects/update-email-template.md +1 -1
- package/docs/examples/projects/update-key.md +1 -1
- package/docs/examples/projects/update-o-auth2.md +1 -1
- package/docs/examples/projects/update-personal-data-check.md +1 -1
- package/docs/examples/projects/update-platform.md +1 -1
- package/docs/examples/projects/update-service-status-all.md +1 -1
- package/docs/examples/projects/update-service-status.md +1 -1
- package/docs/examples/projects/update-sms-template.md +1 -1
- package/docs/examples/projects/update-smtp.md +1 -1
- package/docs/examples/projects/update-team.md +1 -1
- package/docs/examples/projects/update-webhook-signature.md +1 -1
- package/docs/examples/projects/update-webhook.md +1 -1
- package/docs/examples/projects/update.md +1 -1
- package/docs/examples/proxy/create-rule.md +1 -1
- package/docs/examples/proxy/delete-rule.md +1 -1
- package/docs/examples/proxy/get-rule.md +1 -1
- package/docs/examples/proxy/list-rules.md +1 -1
- package/docs/examples/proxy/update-rule-verification.md +1 -1
- package/docs/examples/storage/create-bucket.md +1 -1
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/storage/delete-bucket.md +1 -1
- package/docs/examples/storage/delete-file.md +1 -1
- package/docs/examples/storage/get-bucket-usage.md +1 -1
- package/docs/examples/storage/get-bucket.md +1 -1
- package/docs/examples/storage/get-file-download.md +1 -1
- package/docs/examples/storage/get-file-preview.md +1 -1
- package/docs/examples/storage/get-file-view.md +1 -1
- package/docs/examples/storage/get-file.md +1 -1
- package/docs/examples/storage/get-usage.md +1 -1
- package/docs/examples/storage/list-buckets.md +1 -1
- package/docs/examples/storage/list-files.md +1 -1
- package/docs/examples/storage/update-bucket.md +1 -1
- package/docs/examples/storage/update-file.md +1 -1
- package/docs/examples/teams/create-membership.md +1 -1
- package/docs/examples/teams/create.md +1 -1
- package/docs/examples/teams/delete-membership.md +1 -1
- package/docs/examples/teams/delete.md +1 -1
- package/docs/examples/teams/get-membership.md +1 -1
- package/docs/examples/teams/get-prefs.md +1 -1
- package/docs/examples/teams/get.md +1 -1
- package/docs/examples/teams/list-logs.md +1 -1
- package/docs/examples/teams/list-memberships.md +1 -1
- package/docs/examples/teams/list.md +1 -1
- package/docs/examples/teams/update-membership-status.md +1 -1
- package/docs/examples/teams/update-membership.md +1 -1
- package/docs/examples/teams/update-name.md +1 -1
- package/docs/examples/teams/update-prefs.md +1 -1
- package/docs/examples/users/create-argon2user.md +1 -1
- package/docs/examples/users/create-bcrypt-user.md +1 -1
- package/docs/examples/users/create-m-d5user.md +1 -1
- package/docs/examples/users/create-mfa-recovery-codes.md +1 -1
- package/docs/examples/users/create-p-h-pass-user.md +1 -1
- package/docs/examples/users/create-s-h-a-user.md +1 -1
- package/docs/examples/users/create-scrypt-modified-user.md +1 -1
- package/docs/examples/users/create-scrypt-user.md +1 -1
- package/docs/examples/users/create-session.md +1 -1
- package/docs/examples/users/create-target.md +1 -1
- package/docs/examples/users/create-token.md +1 -1
- package/docs/examples/users/create.md +1 -1
- package/docs/examples/users/delete-identity.md +1 -1
- package/docs/examples/users/delete-mfa-authenticator.md +1 -1
- package/docs/examples/users/delete-session.md +1 -1
- package/docs/examples/users/delete-sessions.md +1 -1
- package/docs/examples/users/delete-target.md +1 -1
- package/docs/examples/users/delete.md +1 -1
- package/docs/examples/users/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/users/get-prefs.md +1 -1
- package/docs/examples/users/get-target.md +1 -1
- package/docs/examples/users/get-usage.md +1 -1
- package/docs/examples/users/get.md +1 -1
- package/docs/examples/users/list-identities.md +1 -1
- package/docs/examples/users/list-logs.md +1 -1
- package/docs/examples/users/list-memberships.md +1 -1
- package/docs/examples/users/list-mfa-factors.md +1 -1
- package/docs/examples/users/list-sessions.md +1 -1
- package/docs/examples/users/list-targets.md +1 -1
- package/docs/examples/users/list.md +1 -1
- package/docs/examples/users/update-email-verification.md +1 -1
- package/docs/examples/users/update-email.md +1 -1
- package/docs/examples/users/update-labels.md +1 -1
- package/docs/examples/users/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/users/update-mfa.md +1 -1
- package/docs/examples/users/update-name.md +1 -1
- package/docs/examples/users/update-password.md +1 -1
- package/docs/examples/users/update-phone-verification.md +1 -1
- package/docs/examples/users/update-phone.md +1 -1
- package/docs/examples/users/update-prefs.md +1 -1
- package/docs/examples/users/update-status.md +1 -1
- package/docs/examples/users/update-target.md +1 -1
- package/docs/examples/vcs/create-repository-detection.md +1 -1
- package/docs/examples/vcs/create-repository.md +1 -1
- package/docs/examples/vcs/delete-installation.md +1 -1
- package/docs/examples/vcs/get-installation.md +1 -1
- package/docs/examples/vcs/get-repository.md +1 -1
- package/docs/examples/vcs/list-installations.md +1 -1
- package/docs/examples/vcs/list-repositories.md +1 -1
- package/docs/examples/vcs/list-repository-branches.md +1 -1
- package/docs/examples/vcs/update-external-deployments.md +1 -1
- package/package.json +1 -1
- package/src/client.ts +221 -1
- package/src/enums/credit-card.ts +1 -1
- package/src/enums/name.ts +1 -2
- package/src/enums/runtime.ts +0 -3
- package/src/id.ts +21 -2
- package/src/index.ts +7 -0
- package/src/models.ts +97 -0
- package/src/permission.ts +41 -6
- package/src/query.ts +161 -1
- package/src/service.ts +3 -0
- package/src/services/account.ts +4 -4
- package/src/services/functions.ts +33 -4
- package/src/services/users.ts +4 -4
- package/types/client.d.ts +82 -0
- package/types/enums/credit-card.d.ts +1 -1
- package/types/enums/name.d.ts +2 -3
- package/types/enums/runtime.d.ts +0 -3
- package/types/id.d.ts +15 -0
- package/types/index.d.ts +7 -0
- package/types/models.d.ts +97 -0
- package/types/permission.d.ts +36 -0
- package/types/query.d.ts +160 -0
- package/types/service.d.ts +3 -0
- package/types/services/account.d.ts +4 -4
- package/types/services/functions.d.ts +16 -4
- package/types/services/users.d.ts +4 -4
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
name: Auto-close External Pull Requests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types: [opened, reopened]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
auto_close:
|
|
9
|
+
uses: appwrite/.github/.github/workflows/autoclose.yml@main
|
|
10
|
+
secrets:
|
|
11
|
+
GH_AUTO_CLOSE_PR_TOKEN: ${{ secrets.GH_AUTO_CLOSE_PR_TOKEN }}
|
|
@@ -1,18 +1,42 @@
|
|
|
1
|
-
name: Publish
|
|
1
|
+
name: Publish to NPM
|
|
2
|
+
|
|
2
3
|
on:
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
5
8
|
jobs:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
# Setup Node.js environment
|
|
16
|
+
- name: Use Node.js
|
|
17
|
+
uses: actions/setup-node@v4
|
|
18
|
+
with:
|
|
19
|
+
node-version: '20.x'
|
|
20
|
+
registry-url: 'https://registry.npmjs.org'
|
|
21
|
+
|
|
22
|
+
# Determine release tag based on the tag name
|
|
23
|
+
- name: Determine release tag
|
|
24
|
+
id: release_tag
|
|
25
|
+
run: |
|
|
26
|
+
if [[ "${{ github.ref }}" == *"-rc"* ]] || [[ "${{ github.ref }}" == *"-RC"* ]]; then
|
|
27
|
+
echo "tag=next" >> "$GITHUB_OUTPUT"
|
|
28
|
+
else
|
|
29
|
+
echo "tag=latest" >> "$GITHUB_OUTPUT"
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
# Install dependencies (if any) and build your project (if necessary)
|
|
33
|
+
- name: Install dependencies and build
|
|
34
|
+
run: |
|
|
35
|
+
npm install
|
|
36
|
+
npm run build
|
|
37
|
+
|
|
38
|
+
# Publish to NPM with the appropriate tag
|
|
39
|
+
- name: Publish
|
|
40
|
+
run: npm publish --tag ${{ steps.release_tag.outputs.tag }}
|
|
41
|
+
env:
|
|
42
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Appwrite Console SDK
|
|
2
2
|
|
|
3
3
|

|
|
4
|
-

|
|
5
5
|
[](https://travis-ci.com/appwrite/sdk-generator)
|
|
6
6
|
[](https://twitter.com/appwrite)
|
|
7
7
|
[](https://appwrite.io/discord)
|
|
@@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
|
|
|
33
33
|
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
|
|
34
34
|
|
|
35
35
|
```html
|
|
36
|
-
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@0.6.
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@0.6.4"></script>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
|
package/dist/cjs/sdk.js
CHANGED
|
@@ -49,9 +49,22 @@ class Service {
|
|
|
49
49
|
return output;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* The size for chunked uploads in bytes.
|
|
54
|
+
*/
|
|
52
55
|
Service.CHUNK_SIZE = 5 * 1024 * 1024; // 5MB
|
|
53
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Helper class to generate query strings.
|
|
59
|
+
*/
|
|
54
60
|
class Query {
|
|
61
|
+
/**
|
|
62
|
+
* Constructor for Query class.
|
|
63
|
+
*
|
|
64
|
+
* @param {string} method
|
|
65
|
+
* @param {AttributesTypes} attribute
|
|
66
|
+
* @param {QueryTypes} values
|
|
67
|
+
*/
|
|
55
68
|
constructor(method, attribute, values) {
|
|
56
69
|
this.method = method;
|
|
57
70
|
this.attribute = attribute;
|
|
@@ -64,6 +77,11 @@ class Query {
|
|
|
64
77
|
}
|
|
65
78
|
}
|
|
66
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Convert the query object to a JSON string.
|
|
82
|
+
*
|
|
83
|
+
* @returns {string}
|
|
84
|
+
*/
|
|
67
85
|
toString() {
|
|
68
86
|
return JSON.stringify({
|
|
69
87
|
method: this.method,
|
|
@@ -72,30 +90,186 @@ class Query {
|
|
|
72
90
|
});
|
|
73
91
|
}
|
|
74
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Filter resources where attribute is equal to value.
|
|
95
|
+
*
|
|
96
|
+
* @param {string} attribute
|
|
97
|
+
* @param {QueryTypes} value
|
|
98
|
+
* @returns {string}
|
|
99
|
+
*/
|
|
75
100
|
Query.equal = (attribute, value) => new Query("equal", attribute, value).toString();
|
|
101
|
+
/**
|
|
102
|
+
* Filter resources where attribute is not equal to value.
|
|
103
|
+
*
|
|
104
|
+
* @param {string} attribute
|
|
105
|
+
* @param {QueryTypes} value
|
|
106
|
+
* @returns {string}
|
|
107
|
+
*/
|
|
76
108
|
Query.notEqual = (attribute, value) => new Query("notEqual", attribute, value).toString();
|
|
109
|
+
/**
|
|
110
|
+
* Filter resources where attribute is less than value.
|
|
111
|
+
*
|
|
112
|
+
* @param {string} attribute
|
|
113
|
+
* @param {QueryTypes} value
|
|
114
|
+
* @returns {string}
|
|
115
|
+
*/
|
|
77
116
|
Query.lessThan = (attribute, value) => new Query("lessThan", attribute, value).toString();
|
|
117
|
+
/**
|
|
118
|
+
* Filter resources where attribute is less than or equal to value.
|
|
119
|
+
*
|
|
120
|
+
* @param {string} attribute
|
|
121
|
+
* @param {QueryTypes} value
|
|
122
|
+
* @returns {string}
|
|
123
|
+
*/
|
|
78
124
|
Query.lessThanEqual = (attribute, value) => new Query("lessThanEqual", attribute, value).toString();
|
|
125
|
+
/**
|
|
126
|
+
* Filter resources where attribute is greater than value.
|
|
127
|
+
*
|
|
128
|
+
* @param {string} attribute
|
|
129
|
+
* @param {QueryTypes} value
|
|
130
|
+
* @returns {string}
|
|
131
|
+
*/
|
|
79
132
|
Query.greaterThan = (attribute, value) => new Query("greaterThan", attribute, value).toString();
|
|
133
|
+
/**
|
|
134
|
+
* Filter resources where attribute is greater than or equal to value.
|
|
135
|
+
*
|
|
136
|
+
* @param {string} attribute
|
|
137
|
+
* @param {QueryTypes} value
|
|
138
|
+
* @returns {string}
|
|
139
|
+
*/
|
|
80
140
|
Query.greaterThanEqual = (attribute, value) => new Query("greaterThanEqual", attribute, value).toString();
|
|
141
|
+
/**
|
|
142
|
+
* Filter resources where attribute is null.
|
|
143
|
+
*
|
|
144
|
+
* @param {string} attribute
|
|
145
|
+
* @returns {string}
|
|
146
|
+
*/
|
|
81
147
|
Query.isNull = (attribute) => new Query("isNull", attribute).toString();
|
|
148
|
+
/**
|
|
149
|
+
* Filter resources where attribute is not null.
|
|
150
|
+
*
|
|
151
|
+
* @param {string} attribute
|
|
152
|
+
* @returns {string}
|
|
153
|
+
*/
|
|
82
154
|
Query.isNotNull = (attribute) => new Query("isNotNull", attribute).toString();
|
|
155
|
+
/**
|
|
156
|
+
* Filter resources where attribute is between start and end (inclusive).
|
|
157
|
+
*
|
|
158
|
+
* @param {string} attribute
|
|
159
|
+
* @param {string | number} start
|
|
160
|
+
* @param {string | number} end
|
|
161
|
+
* @returns {string}
|
|
162
|
+
*/
|
|
83
163
|
Query.between = (attribute, start, end) => new Query("between", attribute, [start, end]).toString();
|
|
164
|
+
/**
|
|
165
|
+
* Filter resources where attribute starts with value.
|
|
166
|
+
*
|
|
167
|
+
* @param {string} attribute
|
|
168
|
+
* @param {string} value
|
|
169
|
+
* @returns {string}
|
|
170
|
+
*/
|
|
84
171
|
Query.startsWith = (attribute, value) => new Query("startsWith", attribute, value).toString();
|
|
172
|
+
/**
|
|
173
|
+
* Filter resources where attribute ends with value.
|
|
174
|
+
*
|
|
175
|
+
* @param {string} attribute
|
|
176
|
+
* @param {string} value
|
|
177
|
+
* @returns {string}
|
|
178
|
+
*/
|
|
85
179
|
Query.endsWith = (attribute, value) => new Query("endsWith", attribute, value).toString();
|
|
180
|
+
/**
|
|
181
|
+
* Specify which attributes should be returned by the API call.
|
|
182
|
+
*
|
|
183
|
+
* @param {string[]} attributes
|
|
184
|
+
* @returns {string}
|
|
185
|
+
*/
|
|
86
186
|
Query.select = (attributes) => new Query("select", undefined, attributes).toString();
|
|
187
|
+
/**
|
|
188
|
+
* Filter resources by searching attribute for value.
|
|
189
|
+
* A fulltext index on attribute is required for this query to work.
|
|
190
|
+
*
|
|
191
|
+
* @param {string} attribute
|
|
192
|
+
* @param {string} value
|
|
193
|
+
* @returns {string}
|
|
194
|
+
*/
|
|
87
195
|
Query.search = (attribute, value) => new Query("search", attribute, value).toString();
|
|
196
|
+
/**
|
|
197
|
+
* Sort results by attribute descending.
|
|
198
|
+
*
|
|
199
|
+
* @param {string} attribute
|
|
200
|
+
* @returns {string}
|
|
201
|
+
*/
|
|
88
202
|
Query.orderDesc = (attribute) => new Query("orderDesc", attribute).toString();
|
|
203
|
+
/**
|
|
204
|
+
* Sort results by attribute ascending.
|
|
205
|
+
*
|
|
206
|
+
* @param {string} attribute
|
|
207
|
+
* @returns {string}
|
|
208
|
+
*/
|
|
89
209
|
Query.orderAsc = (attribute) => new Query("orderAsc", attribute).toString();
|
|
210
|
+
/**
|
|
211
|
+
* Return results after documentId.
|
|
212
|
+
*
|
|
213
|
+
* @param {string} documentId
|
|
214
|
+
* @returns {string}
|
|
215
|
+
*/
|
|
90
216
|
Query.cursorAfter = (documentId) => new Query("cursorAfter", undefined, documentId).toString();
|
|
217
|
+
/**
|
|
218
|
+
* Return results before documentId.
|
|
219
|
+
*
|
|
220
|
+
* @param {string} documentId
|
|
221
|
+
* @returns {string}
|
|
222
|
+
*/
|
|
91
223
|
Query.cursorBefore = (documentId) => new Query("cursorBefore", undefined, documentId).toString();
|
|
224
|
+
/**
|
|
225
|
+
* Return only limit results.
|
|
226
|
+
*
|
|
227
|
+
* @param {number} limit
|
|
228
|
+
* @returns {string}
|
|
229
|
+
*/
|
|
92
230
|
Query.limit = (limit) => new Query("limit", undefined, limit).toString();
|
|
231
|
+
/**
|
|
232
|
+
* Filter resources by skipping the first offset results.
|
|
233
|
+
*
|
|
234
|
+
* @param {number} offset
|
|
235
|
+
* @returns {string}
|
|
236
|
+
*/
|
|
93
237
|
Query.offset = (offset) => new Query("offset", undefined, offset).toString();
|
|
238
|
+
/**
|
|
239
|
+
* Filter resources where attribute contains the specified value.
|
|
240
|
+
*
|
|
241
|
+
* @param {string} attribute
|
|
242
|
+
* @param {string | string[]} value
|
|
243
|
+
* @returns {string}
|
|
244
|
+
*/
|
|
94
245
|
Query.contains = (attribute, value) => new Query("contains", attribute, value).toString();
|
|
246
|
+
/**
|
|
247
|
+
* Combine multiple queries using logical OR operator.
|
|
248
|
+
*
|
|
249
|
+
* @param {string[]} queries
|
|
250
|
+
* @returns {string}
|
|
251
|
+
*/
|
|
95
252
|
Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
|
|
253
|
+
/**
|
|
254
|
+
* Combine multiple queries using logical AND operator.
|
|
255
|
+
*
|
|
256
|
+
* @param {string[]} queries
|
|
257
|
+
* @returns {string}
|
|
258
|
+
*/
|
|
96
259
|
Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
|
|
97
260
|
|
|
261
|
+
/**
|
|
262
|
+
* Exception thrown by the package
|
|
263
|
+
*/
|
|
98
264
|
class AppwriteException extends Error {
|
|
265
|
+
/**
|
|
266
|
+
* Initializes a Appwrite Exception.
|
|
267
|
+
*
|
|
268
|
+
* @param {string} message - The error message.
|
|
269
|
+
* @param {number} code - The error code. Default is 0.
|
|
270
|
+
* @param {string} type - The error type. Default is an empty string.
|
|
271
|
+
* @param {string} response - The response string. Default is an empty string.
|
|
272
|
+
*/
|
|
99
273
|
constructor(message, code = 0, type = '', response = '') {
|
|
100
274
|
super(message);
|
|
101
275
|
this.name = 'AppwriteException';
|
|
@@ -105,8 +279,14 @@ class AppwriteException extends Error {
|
|
|
105
279
|
this.response = response;
|
|
106
280
|
}
|
|
107
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* Client that handles requests to Appwrite
|
|
284
|
+
*/
|
|
108
285
|
class Client {
|
|
109
286
|
constructor() {
|
|
287
|
+
/**
|
|
288
|
+
* Holds configuration such as project.
|
|
289
|
+
*/
|
|
110
290
|
this.config = {
|
|
111
291
|
endpoint: 'https://cloud.appwrite.io/v1',
|
|
112
292
|
endpointRealtime: '',
|
|
@@ -116,11 +296,14 @@ class Client {
|
|
|
116
296
|
locale: '',
|
|
117
297
|
mode: '',
|
|
118
298
|
};
|
|
299
|
+
/**
|
|
300
|
+
* Custom headers for API requests.
|
|
301
|
+
*/
|
|
119
302
|
this.headers = {
|
|
120
303
|
'x-sdk-name': 'Console',
|
|
121
304
|
'x-sdk-platform': 'console',
|
|
122
305
|
'x-sdk-language': 'web',
|
|
123
|
-
'x-sdk-version': '0.6.
|
|
306
|
+
'x-sdk-version': '0.6.4',
|
|
124
307
|
'X-Appwrite-Response-Format': '1.5.0',
|
|
125
308
|
};
|
|
126
309
|
this.realtime = {
|
|
@@ -385,6 +568,19 @@ class Client {
|
|
|
385
568
|
this.realtime.connect();
|
|
386
569
|
};
|
|
387
570
|
}
|
|
571
|
+
/**
|
|
572
|
+
* Call API endpoint with the specified method, URL, headers, and parameters.
|
|
573
|
+
*
|
|
574
|
+
* @param {string} method - HTTP method (e.g., 'GET', 'POST', 'PUT', 'DELETE').
|
|
575
|
+
* @param {URL} url - The URL of the API endpoint.
|
|
576
|
+
* @param {Headers} headers - Custom headers for the API request.
|
|
577
|
+
* @param {Payload} params - Request parameters.
|
|
578
|
+
* @returns {Promise<any>} - A promise that resolves with the response data.
|
|
579
|
+
*
|
|
580
|
+
* @typedef {Object} Payload - Request payload data.
|
|
581
|
+
* @property {string} key - The key.
|
|
582
|
+
* @property {string} value - The value.
|
|
583
|
+
*/
|
|
388
584
|
call(method, url, headers = {}, params = {}) {
|
|
389
585
|
var _a;
|
|
390
586
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -431,6 +627,10 @@ class Client {
|
|
|
431
627
|
try {
|
|
432
628
|
let data = null;
|
|
433
629
|
const response = yield fetch(url.toString(), options);
|
|
630
|
+
const warnings = response.headers.get('x-appwrite-warning');
|
|
631
|
+
if (warnings) {
|
|
632
|
+
warnings.split(';').forEach((warning) => console.warn('Warning: ' + warning));
|
|
633
|
+
}
|
|
434
634
|
if ((_a = response.headers.get('content-type')) === null || _a === void 0 ? void 0 : _a.includes('application/json')) {
|
|
435
635
|
data = yield response.json();
|
|
436
636
|
}
|
|
@@ -702,7 +902,7 @@ class Account extends Service {
|
|
|
702
902
|
});
|
|
703
903
|
}
|
|
704
904
|
/**
|
|
705
|
-
*
|
|
905
|
+
* Create Authenticator
|
|
706
906
|
*
|
|
707
907
|
* Add an authenticator app to be used as an MFA factor. Verify the
|
|
708
908
|
* authenticator using the [verify
|
|
@@ -731,7 +931,7 @@ class Account extends Service {
|
|
|
731
931
|
*
|
|
732
932
|
* Verify an authenticator app after adding it using the [add
|
|
733
933
|
* authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator)
|
|
734
|
-
* method.
|
|
934
|
+
* method.
|
|
735
935
|
*
|
|
736
936
|
* @param {AuthenticatorType} type
|
|
737
937
|
* @param {string} otp
|
|
@@ -787,7 +987,7 @@ class Account extends Service {
|
|
|
787
987
|
});
|
|
788
988
|
}
|
|
789
989
|
/**
|
|
790
|
-
* Create
|
|
990
|
+
* Create MFA Challenge
|
|
791
991
|
*
|
|
792
992
|
* Begin the process of MFA verification after sign-in. Finish the flow with
|
|
793
993
|
* [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge)
|
|
@@ -1880,7 +2080,7 @@ class Account extends Service {
|
|
|
1880
2080
|
});
|
|
1881
2081
|
}
|
|
1882
2082
|
/**
|
|
1883
|
-
*
|
|
2083
|
+
* Update phone verification (confirmation)
|
|
1884
2084
|
*
|
|
1885
2085
|
* Use this endpoint to complete the user phone verification process. Use the
|
|
1886
2086
|
* **userId** and **secret** that were sent to your user's phone number to
|
|
@@ -4248,10 +4448,11 @@ class Functions extends Service {
|
|
|
4248
4448
|
* @param {string} templateOwner
|
|
4249
4449
|
* @param {string} templateRootDirectory
|
|
4250
4450
|
* @param {string} templateBranch
|
|
4451
|
+
* @param {string} specification
|
|
4251
4452
|
* @throws {AppwriteException}
|
|
4252
4453
|
* @returns {Promise}
|
|
4253
4454
|
*/
|
|
4254
|
-
create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, templateRepository, templateOwner, templateRootDirectory, templateBranch) {
|
|
4455
|
+
create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, templateRepository, templateOwner, templateRootDirectory, templateBranch, specification) {
|
|
4255
4456
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4256
4457
|
if (typeof functionId === 'undefined') {
|
|
4257
4458
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
@@ -4324,6 +4525,9 @@ class Functions extends Service {
|
|
|
4324
4525
|
if (typeof templateBranch !== 'undefined') {
|
|
4325
4526
|
payload['templateBranch'] = templateBranch;
|
|
4326
4527
|
}
|
|
4528
|
+
if (typeof specification !== 'undefined') {
|
|
4529
|
+
payload['specification'] = specification;
|
|
4530
|
+
}
|
|
4327
4531
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4328
4532
|
return yield this.client.call('post', uri, {
|
|
4329
4533
|
'content-type': 'application/json',
|
|
@@ -4348,6 +4552,25 @@ class Functions extends Service {
|
|
|
4348
4552
|
}, payload);
|
|
4349
4553
|
});
|
|
4350
4554
|
}
|
|
4555
|
+
/**
|
|
4556
|
+
* Get available function runtime specifications
|
|
4557
|
+
*
|
|
4558
|
+
* Get allowed function specifications for this instance.
|
|
4559
|
+
*
|
|
4560
|
+
*
|
|
4561
|
+
* @throws {AppwriteException}
|
|
4562
|
+
* @returns {Promise}
|
|
4563
|
+
*/
|
|
4564
|
+
getSpecifications() {
|
|
4565
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4566
|
+
const apiPath = '/functions/specifications';
|
|
4567
|
+
const payload = {};
|
|
4568
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4569
|
+
return yield this.client.call('get', uri, {
|
|
4570
|
+
'content-type': 'application/json',
|
|
4571
|
+
}, payload);
|
|
4572
|
+
});
|
|
4573
|
+
}
|
|
4351
4574
|
/**
|
|
4352
4575
|
* Get functions usage
|
|
4353
4576
|
*
|
|
@@ -4412,10 +4635,11 @@ class Functions extends Service {
|
|
|
4412
4635
|
* @param {string} providerBranch
|
|
4413
4636
|
* @param {boolean} providerSilentMode
|
|
4414
4637
|
* @param {string} providerRootDirectory
|
|
4638
|
+
* @param {string} specification
|
|
4415
4639
|
* @throws {AppwriteException}
|
|
4416
4640
|
* @returns {Promise}
|
|
4417
4641
|
*/
|
|
4418
|
-
update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory) {
|
|
4642
|
+
update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification) {
|
|
4419
4643
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4420
4644
|
if (typeof functionId === 'undefined') {
|
|
4421
4645
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
@@ -4470,6 +4694,9 @@ class Functions extends Service {
|
|
|
4470
4694
|
if (typeof providerRootDirectory !== 'undefined') {
|
|
4471
4695
|
payload['providerRootDirectory'] = providerRootDirectory;
|
|
4472
4696
|
}
|
|
4697
|
+
if (typeof specification !== 'undefined') {
|
|
4698
|
+
payload['specification'] = specification;
|
|
4699
|
+
}
|
|
4473
4700
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4474
4701
|
return yield this.client.call('put', uri, {
|
|
4475
4702
|
'content-type': 'application/json',
|
|
@@ -4641,7 +4868,7 @@ class Functions extends Service {
|
|
|
4641
4868
|
});
|
|
4642
4869
|
}
|
|
4643
4870
|
/**
|
|
4644
|
-
* Update
|
|
4871
|
+
* Update deployment
|
|
4645
4872
|
*
|
|
4646
4873
|
* Update the function code deployment ID using the unique function ID. Use
|
|
4647
4874
|
* this endpoint to switch the code deployment that should be executed by the
|
|
@@ -4726,7 +4953,7 @@ class Functions extends Service {
|
|
|
4726
4953
|
});
|
|
4727
4954
|
}
|
|
4728
4955
|
/**
|
|
4729
|
-
* Download
|
|
4956
|
+
* Download deployment
|
|
4730
4957
|
*
|
|
4731
4958
|
* Get a Deployment's contents by its unique ID. This endpoint supports range
|
|
4732
4959
|
* requests for partial or streaming file download.
|
|
@@ -12449,12 +12676,12 @@ class Users extends Service {
|
|
|
12449
12676
|
/**
|
|
12450
12677
|
* Create token
|
|
12451
12678
|
*
|
|
12452
|
-
* Returns a token with a secret key for creating a session.
|
|
12453
|
-
*
|
|
12454
|
-
*
|
|
12455
|
-
* /account/sessions/custom](https://appwrite.io/docs/references/cloud/client-web/account#updateCustomSession)
|
|
12679
|
+
* Returns a token with a secret key for creating a session. Use the user ID
|
|
12680
|
+
* and secret and submit a request to the [PUT
|
|
12681
|
+
* /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
|
|
12456
12682
|
* endpoint to complete the login process.
|
|
12457
12683
|
*
|
|
12684
|
+
*
|
|
12458
12685
|
* @param {string} userId
|
|
12459
12686
|
* @param {number} length
|
|
12460
12687
|
* @param {number} expire
|
|
@@ -12784,20 +13011,56 @@ class Vcs extends Service {
|
|
|
12784
13011
|
}
|
|
12785
13012
|
}
|
|
12786
13013
|
|
|
13014
|
+
/**
|
|
13015
|
+
* Helper class to generate permission strings for resources.
|
|
13016
|
+
*/
|
|
12787
13017
|
class Permission {
|
|
12788
13018
|
}
|
|
13019
|
+
/**
|
|
13020
|
+
* Generate read permission string for the provided role.
|
|
13021
|
+
*
|
|
13022
|
+
* @param {string} role
|
|
13023
|
+
* @returns {string}
|
|
13024
|
+
*/
|
|
12789
13025
|
Permission.read = (role) => {
|
|
12790
13026
|
return `read("${role}")`;
|
|
12791
13027
|
};
|
|
13028
|
+
/**
|
|
13029
|
+
* Generate write permission string for the provided role.
|
|
13030
|
+
*
|
|
13031
|
+
* This is an alias of update, delete, and possibly create.
|
|
13032
|
+
* Don't use write in combination with update, delete, or create.
|
|
13033
|
+
*
|
|
13034
|
+
* @param {string} role
|
|
13035
|
+
* @returns {string}
|
|
13036
|
+
*/
|
|
12792
13037
|
Permission.write = (role) => {
|
|
12793
13038
|
return `write("${role}")`;
|
|
12794
13039
|
};
|
|
13040
|
+
/**
|
|
13041
|
+
* Generate create permission string for the provided role.
|
|
13042
|
+
*
|
|
13043
|
+
* @param {string} role
|
|
13044
|
+
* @returns {string}
|
|
13045
|
+
*/
|
|
12795
13046
|
Permission.create = (role) => {
|
|
12796
13047
|
return `create("${role}")`;
|
|
12797
13048
|
};
|
|
13049
|
+
/**
|
|
13050
|
+
* Generate update permission string for the provided role.
|
|
13051
|
+
*
|
|
13052
|
+
* @param {string} role
|
|
13053
|
+
* @returns {string}
|
|
13054
|
+
*/
|
|
12798
13055
|
Permission.update = (role) => {
|
|
12799
13056
|
return `update("${role}")`;
|
|
12800
13057
|
};
|
|
13058
|
+
/**
|
|
13059
|
+
* Generate delete permission string for the provided role.
|
|
13060
|
+
*
|
|
13061
|
+
* @param {string} role
|
|
13062
|
+
* @returns {string}
|
|
13063
|
+
*/
|
|
12801
13064
|
Permission.delete = (role) => {
|
|
12802
13065
|
return `delete("${role}")`;
|
|
12803
13066
|
};
|
|
@@ -12897,10 +13160,25 @@ class Role {
|
|
|
12897
13160
|
}
|
|
12898
13161
|
|
|
12899
13162
|
var _a, _ID_hexTimestamp;
|
|
13163
|
+
/**
|
|
13164
|
+
* Helper class to generate ID strings for resources.
|
|
13165
|
+
*/
|
|
12900
13166
|
class ID {
|
|
13167
|
+
/**
|
|
13168
|
+
* Uses the provided ID as the ID for the resource.
|
|
13169
|
+
*
|
|
13170
|
+
* @param {string} id
|
|
13171
|
+
* @returns {string}
|
|
13172
|
+
*/
|
|
12901
13173
|
static custom(id) {
|
|
12902
13174
|
return id;
|
|
12903
13175
|
}
|
|
13176
|
+
/**
|
|
13177
|
+
* Have Appwrite generate a unique ID for you.
|
|
13178
|
+
*
|
|
13179
|
+
* @param {number} padding. Default is 7.
|
|
13180
|
+
* @returns {string}
|
|
13181
|
+
*/
|
|
12904
13182
|
static unique(padding = 7) {
|
|
12905
13183
|
// Generate a unique ID with padding to have a longer ID
|
|
12906
13184
|
const baseId = __classPrivateFieldGet(ID, _a, "m", _ID_hexTimestamp).call(ID);
|
|
@@ -13000,7 +13278,7 @@ exports.CreditCard = void 0;
|
|
|
13000
13278
|
CreditCard["AmericanExpress"] = "amex";
|
|
13001
13279
|
CreditCard["Argencard"] = "argencard";
|
|
13002
13280
|
CreditCard["Cabal"] = "cabal";
|
|
13003
|
-
CreditCard["
|
|
13281
|
+
CreditCard["Cencosud"] = "cencosud";
|
|
13004
13282
|
CreditCard["DinersClub"] = "diners";
|
|
13005
13283
|
CreditCard["Discover"] = "discover";
|
|
13006
13284
|
CreditCard["Elo"] = "elo";
|
|
@@ -13265,9 +13543,6 @@ exports.Runtime = void 0;
|
|
|
13265
13543
|
Runtime["Python311"] = "python-3.11";
|
|
13266
13544
|
Runtime["Python312"] = "python-3.12";
|
|
13267
13545
|
Runtime["Pythonml311"] = "python-ml-3.11";
|
|
13268
|
-
Runtime["Deno121"] = "deno-1.21";
|
|
13269
|
-
Runtime["Deno124"] = "deno-1.24";
|
|
13270
|
-
Runtime["Deno135"] = "deno-1.35";
|
|
13271
13546
|
Runtime["Deno140"] = "deno-1.40";
|
|
13272
13547
|
Runtime["Dart215"] = "dart-2.15";
|
|
13273
13548
|
Runtime["Dart216"] = "dart-2.16";
|
|
@@ -13321,12 +13596,11 @@ exports.Name = void 0;
|
|
|
13321
13596
|
Name["V1functions"] = "v1-functions";
|
|
13322
13597
|
Name["V1usage"] = "v1-usage";
|
|
13323
13598
|
Name["V1usagedump"] = "v1-usage-dump";
|
|
13324
|
-
Name["
|
|
13599
|
+
Name["V1webhooks"] = "v1-webhooks";
|
|
13325
13600
|
Name["V1certificates"] = "v1-certificates";
|
|
13326
13601
|
Name["V1builds"] = "v1-builds";
|
|
13327
13602
|
Name["V1messaging"] = "v1-messaging";
|
|
13328
13603
|
Name["V1migrations"] = "v1-migrations";
|
|
13329
|
-
Name["Hamsterv1"] = "hamsterv1";
|
|
13330
13604
|
})(exports.Name || (exports.Name = {}));
|
|
13331
13605
|
|
|
13332
13606
|
exports.SmtpEncryption = void 0;
|