@appwrite.io/console 1.5.2 → 1.7.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/CHANGELOG.md +9 -1
- package/README.md +3 -3
- package/dist/cjs/sdk.js +11874 -11100
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +11872 -11101
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +11874 -11100
- package/docs/examples/account/create-anonymous-session.md +1 -1
- package/docs/examples/account/create-billing-address.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-payment-method.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-billing-address.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-payment-method.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-billing-address.md +1 -1
- package/docs/examples/account/get-coupon.md +1 -1
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/get-payment-method.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-billing-addresses.md +1 -1
- package/docs/examples/account/list-identities.md +1 -1
- package/docs/examples/account/list-invoices.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-payment-methods.md +1 -1
- package/docs/examples/account/list-sessions.md +1 -1
- package/docs/examples/account/update-billing-address.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-payment-method-mandate-options.md +1 -1
- package/docs/examples/account/update-payment-method-provider.md +1 -1
- package/docs/examples/account/update-payment-method.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 +2 -2
- package/docs/examples/avatars/get-credit-card.md +2 -2
- package/docs/examples/avatars/get-favicon.md +1 -1
- package/docs/examples/avatars/get-flag.md +2 -2
- 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/backups/create-archive.md +1 -1
- package/docs/examples/backups/create-policy.md +1 -1
- package/docs/examples/backups/create-restoration.md +1 -1
- package/docs/examples/backups/delete-archive.md +1 -1
- package/docs/examples/backups/delete-policy.md +1 -1
- package/docs/examples/backups/get-archive.md +1 -1
- package/docs/examples/backups/get-policy.md +1 -1
- package/docs/examples/backups/get-restoration.md +1 -1
- package/docs/examples/backups/list-archives.md +1 -1
- package/docs/examples/backups/list-policies.md +1 -1
- package/docs/examples/backups/list-restorations.md +1 -1
- package/docs/examples/backups/update-policy.md +1 -1
- package/docs/examples/console/create-program-membership.md +1 -1
- package/docs/examples/console/create-source.md +1 -1
- package/docs/examples/console/get-campaign.md +1 -1
- package/docs/examples/console/get-coupon.md +1 -1
- package/docs/examples/console/get-resource.md +14 -0
- package/docs/examples/console/plans.md +1 -1
- package/docs/examples/console/regions.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 +4 -2
- package/docs/examples/databases/create-documents.md +15 -0
- 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 +3 -2
- 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-documents.md +15 -0
- 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-documents.md +16 -0
- 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/databases/upsert-documents.md +15 -0
- package/docs/examples/domains/create-preset-google-workspace.md +13 -0
- package/docs/examples/domains/create-preset-i-cloud.md +13 -0
- package/docs/examples/domains/create-preset-mailgun.md +13 -0
- package/docs/examples/domains/create-preset-outlook.md +13 -0
- package/docs/examples/domains/create-preset-proton-mail.md +13 -0
- package/docs/examples/domains/create-preset-zoho.md +13 -0
- package/docs/examples/domains/create-record-a-a-a-a.md +17 -0
- package/docs/examples/domains/create-record-a.md +17 -0
- package/docs/examples/domains/create-record-alias.md +17 -0
- package/docs/examples/domains/create-record-c-a-a.md +17 -0
- package/docs/examples/domains/create-record-c-n-a-m-e.md +17 -0
- package/docs/examples/domains/create-record-h-t-t-p-s.md +17 -0
- package/docs/examples/domains/create-record-m-x.md +18 -0
- package/docs/examples/domains/create-record-n-s.md +17 -0
- package/docs/examples/domains/create-record-s-r-v.md +20 -0
- package/docs/examples/domains/create-record-t-x-t.md +17 -0
- package/docs/examples/domains/create.md +14 -0
- package/docs/examples/domains/delete-record.md +14 -0
- package/docs/examples/domains/delete.md +13 -0
- package/docs/examples/domains/get-preset-google-workspace.md +13 -0
- package/docs/examples/domains/get-preset-i-cloud.md +13 -0
- package/docs/examples/domains/get-preset-mailgun.md +13 -0
- package/docs/examples/domains/get-preset-outlook.md +13 -0
- package/docs/examples/domains/get-preset-proton-mail.md +13 -0
- package/docs/examples/domains/get-preset-zoho.md +13 -0
- package/docs/examples/domains/get-record.md +14 -0
- package/docs/examples/domains/get-zone.md +13 -0
- package/docs/examples/domains/get.md +13 -0
- package/docs/examples/domains/list-records.md +14 -0
- package/docs/examples/domains/list.md +14 -0
- package/docs/examples/domains/update-nameservers.md +13 -0
- package/docs/examples/domains/update-record-a-a-a-a.md +18 -0
- package/docs/examples/domains/update-record-a.md +18 -0
- package/docs/examples/domains/update-record-alias.md +18 -0
- package/docs/examples/domains/update-record-c-a-a.md +18 -0
- package/docs/examples/domains/update-record-c-n-a-m-e.md +18 -0
- package/docs/examples/domains/update-record-h-t-t-p-s.md +18 -0
- package/docs/examples/domains/update-record-m-x.md +19 -0
- package/docs/examples/domains/update-record-n-s.md +18 -0
- package/docs/examples/domains/update-record-s-r-v.md +21 -0
- package/docs/examples/domains/update-record-t-x-t.md +18 -0
- package/docs/examples/domains/update-team.md +14 -0
- package/docs/examples/domains/update-zone.md +14 -0
- package/docs/examples/functions/create-deployment.md +1 -1
- package/docs/examples/functions/create-duplicate-deployment.md +15 -0
- package/docs/examples/functions/create-execution.md +1 -1
- package/docs/examples/functions/create-template-deployment.md +18 -0
- package/docs/examples/functions/create-variable.md +3 -2
- package/docs/examples/functions/create-vcs-deployment.md +16 -0
- package/docs/examples/functions/create.md +3 -3
- package/docs/examples/functions/delete-deployment.md +1 -1
- package/docs/examples/functions/delete-execution.md +1 -1
- package/docs/examples/functions/delete-variable.md +1 -1
- package/docs/examples/functions/delete.md +1 -1
- package/docs/examples/functions/get-deployment-download.md +4 -3
- package/docs/examples/functions/get-deployment.md +1 -1
- package/docs/examples/functions/get-execution.md +1 -1
- package/docs/examples/functions/get-template.md +1 -1
- package/docs/examples/functions/get-usage.md +2 -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 +2 -3
- package/docs/examples/functions/list-runtimes.md +1 -1
- package/docs/examples/functions/list-specifications.md +1 -1
- package/docs/examples/functions/list-templates.md +1 -1
- package/docs/examples/functions/list-usage.md +13 -0
- package/docs/examples/functions/list-variables.md +1 -1
- package/docs/examples/functions/list.md +1 -1
- package/docs/examples/functions/update-deployment-status.md +14 -0
- package/docs/examples/functions/update-function-deployment.md +14 -0
- package/docs/examples/functions/update-variable.md +3 -2
- package/docs/examples/functions/update.md +1 -1
- 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-billing-aggregation.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-priority-builds.md +1 -1
- package/docs/examples/health/get-queue-region-manager.md +13 -0
- package/docs/examples/health/get-queue-stats-resources.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-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-csv-migration.md +15 -0
- package/docs/examples/migrations/create-firebase-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.md +1 -1
- package/docs/examples/migrations/get-appwrite-report.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.md +1 -1
- package/docs/examples/migrations/retry.md +1 -1
- package/docs/examples/organizations/add-credit.md +1 -1
- package/docs/examples/organizations/create-invoice-payment.md +1 -1
- package/docs/examples/organizations/create.md +1 -1
- package/docs/examples/organizations/delete-backup-payment-method.md +1 -1
- package/docs/examples/organizations/delete-billing-address.md +1 -1
- package/docs/examples/organizations/delete-default-payment-method.md +1 -1
- package/docs/examples/organizations/delete.md +1 -1
- package/docs/examples/organizations/get-aggregation.md +1 -1
- package/docs/examples/organizations/get-billing-address.md +1 -1
- package/docs/examples/organizations/get-credit.md +1 -1
- package/docs/examples/organizations/get-invoice-download.md +1 -1
- package/docs/examples/organizations/get-invoice-view.md +1 -1
- package/docs/examples/organizations/get-invoice.md +1 -1
- package/docs/examples/organizations/get-payment-method.md +1 -1
- package/docs/examples/organizations/get-plan.md +1 -1
- package/docs/examples/organizations/get-scopes.md +1 -1
- package/docs/examples/organizations/list-aggregations.md +1 -1
- package/docs/examples/organizations/list-credits.md +1 -1
- package/docs/examples/organizations/list-invoices.md +1 -1
- package/docs/examples/organizations/list.md +1 -1
- package/docs/examples/organizations/set-backup-payment-method.md +1 -1
- package/docs/examples/organizations/set-billing-address.md +1 -1
- package/docs/examples/organizations/set-billing-email.md +1 -1
- package/docs/examples/organizations/set-billing-tax-id.md +1 -1
- package/docs/examples/organizations/set-default-payment-method.md +1 -1
- package/docs/examples/organizations/update-budget.md +1 -1
- package/docs/examples/organizations/update-plan.md +1 -1
- package/docs/examples/organizations/validate-invoice.md +14 -0
- package/docs/examples/project/create-variable.md +3 -2
- 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 +3 -2
- package/docs/examples/projects/create-dev-key.md +15 -0
- package/docs/examples/projects/create-j-w-t.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 +2 -2
- package/docs/examples/projects/delete-dev-key.md +14 -0
- 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-dev-key.md +14 -0
- 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-dev-keys.md +14 -0
- 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-dev-key.md +16 -0
- package/docs/examples/projects/update-email-template.md +1 -1
- package/docs/examples/projects/update-key.md +1 -1
- package/docs/examples/projects/update-memberships-privacy.md +1 -1
- package/docs/examples/projects/update-mock-numbers.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-session-alerts.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-a-p-i-rule.md +13 -0
- package/docs/examples/proxy/create-function-rule.md +15 -0
- package/docs/examples/proxy/create-redirect-rule.md +15 -0
- package/docs/examples/proxy/create-site-rule.md +15 -0
- 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/sites/create-deployment.md +18 -0
- package/docs/examples/sites/create-duplicate-deployment.md +14 -0
- package/docs/examples/sites/create-template-deployment.md +18 -0
- package/docs/examples/sites/create-variable.md +16 -0
- package/docs/examples/sites/create-vcs-deployment.md +16 -0
- package/docs/examples/sites/create.md +30 -0
- package/docs/examples/sites/delete-deployment.md +14 -0
- package/docs/examples/sites/delete-log.md +14 -0
- package/docs/examples/sites/delete-variable.md +14 -0
- package/docs/examples/sites/delete.md +13 -0
- package/docs/examples/sites/get-deployment-download.md +15 -0
- package/docs/examples/sites/get-deployment.md +14 -0
- package/docs/examples/sites/get-log.md +14 -0
- package/docs/examples/sites/get-template.md +13 -0
- package/docs/examples/sites/get-usage.md +14 -0
- package/docs/examples/sites/get-variable.md +14 -0
- package/docs/examples/sites/get.md +13 -0
- package/docs/examples/sites/list-deployments.md +15 -0
- package/docs/examples/sites/list-frameworks.md +11 -0
- package/docs/examples/sites/list-logs.md +14 -0
- package/docs/examples/sites/list-specifications.md +11 -0
- package/docs/examples/sites/list-templates.md +16 -0
- package/docs/examples/sites/list-usage.md +13 -0
- package/docs/examples/sites/list-variables.md +13 -0
- package/docs/examples/sites/list.md +14 -0
- package/docs/examples/sites/update-deployment-status.md +14 -0
- package/docs/examples/sites/update-site-deployment.md +14 -0
- package/docs/examples/sites/update-variable.md +17 -0
- package/docs/examples/sites/update.md +30 -0
- 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 +3 -2
- package/docs/examples/storage/get-file-preview.md +4 -3
- package/docs/examples/storage/get-file-view.md +3 -2
- 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/tokens/create-file-token.md +15 -0
- package/docs/examples/tokens/delete.md +13 -0
- package/docs/examples/tokens/get.md +13 -0
- package/docs/examples/tokens/list.md +15 -0
- package/docs/examples/tokens/update.md +14 -0
- package/docs/examples/users/create-argon2user.md +1 -1
- package/docs/examples/users/create-bcrypt-user.md +1 -1
- package/docs/examples/users/create-j-w-t.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 +4 -2
- 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 +3 -2
- 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-contents.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 +3 -2
- 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 +32 -5
- package/src/enums/adapter.ts +4 -0
- package/src/enums/api-service.ts +1 -0
- package/src/enums/build-runtime.ts +62 -0
- package/src/enums/console-resource-type.ts +3 -0
- package/src/enums/deployment-download-type.ts +4 -0
- package/src/enums/framework.ts +16 -0
- package/src/enums/image-format.ts +0 -1
- package/src/enums/name.ts +0 -1
- package/src/enums/o-auth-provider.ts +1 -0
- package/src/enums/region.ts +2 -1
- package/src/enums/runtime.ts +4 -3
- package/src/enums/site-usage-range.ts +5 -0
- package/src/enums/status-code.ts +6 -0
- package/src/enums/v-c-s-deployment-type.ts +5 -0
- package/src/enums/v-c-s-detection-type.ts +4 -0
- package/src/index.ts +13 -2
- package/src/models.ts +1171 -188
- package/src/services/account.ts +126 -446
- package/src/services/assistant.ts +2 -7
- package/src/services/avatars.ts +7 -28
- package/src/services/backups.ts +24 -90
- package/src/services/console.ts +48 -52
- package/src/services/databases.ts +241 -350
- package/src/services/domains.ts +1821 -0
- package/src/services/functions.ts +216 -248
- package/src/services/graphql.ts +4 -14
- package/src/services/health.ts +56 -206
- package/src/services/locale.ts +16 -64
- package/src/services/messaging.ts +92 -335
- package/src/services/migrations.ts +66 -89
- package/src/services/organizations.ts +84 -241
- package/src/services/project.ts +20 -45
- package/src/services/projects.ts +262 -330
- package/src/services/proxy.ts +129 -44
- package/src/services/sites.ts +1104 -0
- package/src/services/storage.ts +42 -105
- package/src/services/teams.ts +28 -104
- package/src/services/tokens.ts +160 -0
- package/src/services/users.ts +94 -313
- package/src/services/vcs.ts +70 -108
- package/types/enums/adapter.d.ts +4 -0
- package/types/enums/api-service.d.ts +1 -0
- package/types/enums/build-runtime.d.ts +62 -0
- package/types/enums/console-resource-type.d.ts +3 -0
- package/types/enums/deployment-download-type.d.ts +4 -0
- package/types/enums/framework.d.ts +16 -0
- package/types/enums/image-format.d.ts +0 -1
- package/types/enums/name.d.ts +0 -1
- package/types/enums/o-auth-provider.d.ts +1 -0
- package/types/enums/region.d.ts +3 -2
- package/types/enums/runtime.d.ts +5 -4
- package/types/enums/site-usage-range.d.ts +5 -0
- package/types/enums/status-code.d.ts +6 -0
- package/types/enums/v-c-s-deployment-type.d.ts +5 -0
- package/types/enums/v-c-s-detection-type.d.ts +4 -0
- package/types/index.d.ts +13 -2
- package/types/models.d.ts +1171 -188
- package/types/services/account.d.ts +4 -128
- package/types/services/assistant.d.ts +0 -2
- package/types/services/avatars.d.ts +0 -14
- package/types/services/backups.d.ts +0 -24
- package/types/services/console.d.ts +9 -13
- package/types/services/databases.d.ts +43 -97
- package/types/services/domains.d.ts +524 -0
- package/types/services/functions.d.ts +58 -84
- package/types/services/graphql.d.ts +0 -4
- package/types/services/health.d.ts +6 -56
- package/types/services/locale.d.ts +0 -16
- package/types/services/messaging.d.ts +0 -92
- package/types/services/migrations.d.ts +9 -23
- package/types/services/organizations.d.ts +11 -68
- package/types/services/project.d.ts +4 -14
- package/types/services/projects.d.ts +47 -91
- package/types/services/proxy.d.ts +31 -13
- package/types/services/sites.d.ts +319 -0
- package/types/services/storage.d.ts +6 -33
- package/types/services/teams.d.ts +0 -28
- package/types/services/tokens.d.ts +51 -0
- package/types/services/users.d.ts +3 -87
- package/types/services/vcs.d.ts +14 -31
package/src/services/storage.ts
CHANGED
|
@@ -14,8 +14,6 @@ export class Storage {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* List buckets
|
|
18
|
-
*
|
|
19
17
|
* Get a list of all the storage buckets. You can use the query params to filter your results.
|
|
20
18
|
*
|
|
21
19
|
* @param {string[]} queries
|
|
@@ -23,7 +21,7 @@ export class Storage {
|
|
|
23
21
|
* @throws {AppwriteException}
|
|
24
22
|
* @returns {Promise<Models.BucketList>}
|
|
25
23
|
*/
|
|
26
|
-
|
|
24
|
+
listBuckets(queries?: string[], search?: string): Promise<Models.BucketList> {
|
|
27
25
|
const apiPath = '/storage/buckets';
|
|
28
26
|
const payload: Payload = {};
|
|
29
27
|
if (typeof queries !== 'undefined') {
|
|
@@ -35,13 +33,9 @@ export class Storage {
|
|
|
35
33
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
36
34
|
|
|
37
35
|
const apiHeaders: { [header: string]: string } = {
|
|
38
|
-
'content-type': 'application/json',
|
|
39
36
|
}
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return await this.client.call(
|
|
38
|
+
return this.client.call(
|
|
45
39
|
'get',
|
|
46
40
|
uri,
|
|
47
41
|
apiHeaders,
|
|
@@ -49,8 +43,6 @@ export class Storage {
|
|
|
49
43
|
);
|
|
50
44
|
}
|
|
51
45
|
/**
|
|
52
|
-
* Create bucket
|
|
53
|
-
*
|
|
54
46
|
* Create a new storage bucket.
|
|
55
47
|
*
|
|
56
48
|
* @param {string} bucketId
|
|
@@ -66,7 +58,7 @@ export class Storage {
|
|
|
66
58
|
* @throws {AppwriteException}
|
|
67
59
|
* @returns {Promise<Models.Bucket>}
|
|
68
60
|
*/
|
|
69
|
-
|
|
61
|
+
createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket> {
|
|
70
62
|
if (typeof bucketId === 'undefined') {
|
|
71
63
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
72
64
|
}
|
|
@@ -111,10 +103,7 @@ export class Storage {
|
|
|
111
103
|
'content-type': 'application/json',
|
|
112
104
|
}
|
|
113
105
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
return await this.client.call(
|
|
106
|
+
return this.client.call(
|
|
118
107
|
'post',
|
|
119
108
|
uri,
|
|
120
109
|
apiHeaders,
|
|
@@ -122,15 +111,13 @@ export class Storage {
|
|
|
122
111
|
);
|
|
123
112
|
}
|
|
124
113
|
/**
|
|
125
|
-
* Get bucket
|
|
126
|
-
*
|
|
127
114
|
* Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.
|
|
128
115
|
*
|
|
129
116
|
* @param {string} bucketId
|
|
130
117
|
* @throws {AppwriteException}
|
|
131
118
|
* @returns {Promise<Models.Bucket>}
|
|
132
119
|
*/
|
|
133
|
-
|
|
120
|
+
getBucket(bucketId: string): Promise<Models.Bucket> {
|
|
134
121
|
if (typeof bucketId === 'undefined') {
|
|
135
122
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
136
123
|
}
|
|
@@ -139,13 +126,9 @@ export class Storage {
|
|
|
139
126
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
140
127
|
|
|
141
128
|
const apiHeaders: { [header: string]: string } = {
|
|
142
|
-
'content-type': 'application/json',
|
|
143
129
|
}
|
|
144
130
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
return await this.client.call(
|
|
131
|
+
return this.client.call(
|
|
149
132
|
'get',
|
|
150
133
|
uri,
|
|
151
134
|
apiHeaders,
|
|
@@ -153,8 +136,6 @@ export class Storage {
|
|
|
153
136
|
);
|
|
154
137
|
}
|
|
155
138
|
/**
|
|
156
|
-
* Update bucket
|
|
157
|
-
*
|
|
158
139
|
* Update a storage bucket by its unique ID.
|
|
159
140
|
*
|
|
160
141
|
* @param {string} bucketId
|
|
@@ -170,7 +151,7 @@ export class Storage {
|
|
|
170
151
|
* @throws {AppwriteException}
|
|
171
152
|
* @returns {Promise<Models.Bucket>}
|
|
172
153
|
*/
|
|
173
|
-
|
|
154
|
+
updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket> {
|
|
174
155
|
if (typeof bucketId === 'undefined') {
|
|
175
156
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
176
157
|
}
|
|
@@ -212,10 +193,7 @@ export class Storage {
|
|
|
212
193
|
'content-type': 'application/json',
|
|
213
194
|
}
|
|
214
195
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
return await this.client.call(
|
|
196
|
+
return this.client.call(
|
|
219
197
|
'put',
|
|
220
198
|
uri,
|
|
221
199
|
apiHeaders,
|
|
@@ -223,15 +201,13 @@ export class Storage {
|
|
|
223
201
|
);
|
|
224
202
|
}
|
|
225
203
|
/**
|
|
226
|
-
* Delete bucket
|
|
227
|
-
*
|
|
228
204
|
* Delete a storage bucket by its unique ID.
|
|
229
205
|
*
|
|
230
206
|
* @param {string} bucketId
|
|
231
207
|
* @throws {AppwriteException}
|
|
232
208
|
* @returns {Promise<{}>}
|
|
233
209
|
*/
|
|
234
|
-
|
|
210
|
+
deleteBucket(bucketId: string): Promise<{}> {
|
|
235
211
|
if (typeof bucketId === 'undefined') {
|
|
236
212
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
237
213
|
}
|
|
@@ -243,10 +219,7 @@ export class Storage {
|
|
|
243
219
|
'content-type': 'application/json',
|
|
244
220
|
}
|
|
245
221
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
return await this.client.call(
|
|
222
|
+
return this.client.call(
|
|
250
223
|
'delete',
|
|
251
224
|
uri,
|
|
252
225
|
apiHeaders,
|
|
@@ -254,8 +227,6 @@ export class Storage {
|
|
|
254
227
|
);
|
|
255
228
|
}
|
|
256
229
|
/**
|
|
257
|
-
* List files
|
|
258
|
-
*
|
|
259
230
|
* Get a list of all the user files. You can use the query params to filter your results.
|
|
260
231
|
*
|
|
261
232
|
* @param {string} bucketId
|
|
@@ -264,7 +235,7 @@ export class Storage {
|
|
|
264
235
|
* @throws {AppwriteException}
|
|
265
236
|
* @returns {Promise<Models.FileList>}
|
|
266
237
|
*/
|
|
267
|
-
|
|
238
|
+
listFiles(bucketId: string, queries?: string[], search?: string): Promise<Models.FileList> {
|
|
268
239
|
if (typeof bucketId === 'undefined') {
|
|
269
240
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
270
241
|
}
|
|
@@ -279,13 +250,9 @@ export class Storage {
|
|
|
279
250
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
280
251
|
|
|
281
252
|
const apiHeaders: { [header: string]: string } = {
|
|
282
|
-
'content-type': 'application/json',
|
|
283
253
|
}
|
|
284
254
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
return await this.client.call(
|
|
255
|
+
return this.client.call(
|
|
289
256
|
'get',
|
|
290
257
|
uri,
|
|
291
258
|
apiHeaders,
|
|
@@ -293,8 +260,6 @@ export class Storage {
|
|
|
293
260
|
);
|
|
294
261
|
}
|
|
295
262
|
/**
|
|
296
|
-
* Create file
|
|
297
|
-
*
|
|
298
263
|
* Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.
|
|
299
264
|
|
|
300
265
|
Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.
|
|
@@ -311,7 +276,7 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
311
276
|
* @throws {AppwriteException}
|
|
312
277
|
* @returns {Promise<Models.File>}
|
|
313
278
|
*/
|
|
314
|
-
|
|
279
|
+
createFile(bucketId: string, fileId: string, file: File, permissions?: string[], onProgress = (progress: UploadProgress) => {}): Promise<Models.File> {
|
|
315
280
|
if (typeof bucketId === 'undefined') {
|
|
316
281
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
317
282
|
}
|
|
@@ -338,10 +303,7 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
338
303
|
'content-type': 'multipart/form-data',
|
|
339
304
|
}
|
|
340
305
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
return await this.client.chunkedUpload(
|
|
306
|
+
return this.client.chunkedUpload(
|
|
345
307
|
'post',
|
|
346
308
|
uri,
|
|
347
309
|
apiHeaders,
|
|
@@ -350,8 +312,6 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
350
312
|
);
|
|
351
313
|
}
|
|
352
314
|
/**
|
|
353
|
-
* Get file
|
|
354
|
-
*
|
|
355
315
|
* Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.
|
|
356
316
|
*
|
|
357
317
|
* @param {string} bucketId
|
|
@@ -359,7 +319,7 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
359
319
|
* @throws {AppwriteException}
|
|
360
320
|
* @returns {Promise<Models.File>}
|
|
361
321
|
*/
|
|
362
|
-
|
|
322
|
+
getFile(bucketId: string, fileId: string): Promise<Models.File> {
|
|
363
323
|
if (typeof bucketId === 'undefined') {
|
|
364
324
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
365
325
|
}
|
|
@@ -371,13 +331,9 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
371
331
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
372
332
|
|
|
373
333
|
const apiHeaders: { [header: string]: string } = {
|
|
374
|
-
'content-type': 'application/json',
|
|
375
334
|
}
|
|
376
335
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
return await this.client.call(
|
|
336
|
+
return this.client.call(
|
|
381
337
|
'get',
|
|
382
338
|
uri,
|
|
383
339
|
apiHeaders,
|
|
@@ -385,8 +341,6 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
385
341
|
);
|
|
386
342
|
}
|
|
387
343
|
/**
|
|
388
|
-
* Update file
|
|
389
|
-
*
|
|
390
344
|
* Update a file by its unique ID. Only users with write permissions have access to update this resource.
|
|
391
345
|
*
|
|
392
346
|
* @param {string} bucketId
|
|
@@ -396,7 +350,7 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
396
350
|
* @throws {AppwriteException}
|
|
397
351
|
* @returns {Promise<Models.File>}
|
|
398
352
|
*/
|
|
399
|
-
|
|
353
|
+
updateFile(bucketId: string, fileId: string, name?: string, permissions?: string[]): Promise<Models.File> {
|
|
400
354
|
if (typeof bucketId === 'undefined') {
|
|
401
355
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
402
356
|
}
|
|
@@ -417,10 +371,7 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
417
371
|
'content-type': 'application/json',
|
|
418
372
|
}
|
|
419
373
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
return await this.client.call(
|
|
374
|
+
return this.client.call(
|
|
424
375
|
'put',
|
|
425
376
|
uri,
|
|
426
377
|
apiHeaders,
|
|
@@ -428,8 +379,6 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
428
379
|
);
|
|
429
380
|
}
|
|
430
381
|
/**
|
|
431
|
-
* Delete file
|
|
432
|
-
*
|
|
433
382
|
* Delete a file by its unique ID. Only users with write permissions have access to delete this resource.
|
|
434
383
|
*
|
|
435
384
|
* @param {string} bucketId
|
|
@@ -437,7 +386,7 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
437
386
|
* @throws {AppwriteException}
|
|
438
387
|
* @returns {Promise<{}>}
|
|
439
388
|
*/
|
|
440
|
-
|
|
389
|
+
deleteFile(bucketId: string, fileId: string): Promise<{}> {
|
|
441
390
|
if (typeof bucketId === 'undefined') {
|
|
442
391
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
443
392
|
}
|
|
@@ -452,10 +401,7 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
452
401
|
'content-type': 'application/json',
|
|
453
402
|
}
|
|
454
403
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
return await this.client.call(
|
|
404
|
+
return this.client.call(
|
|
459
405
|
'delete',
|
|
460
406
|
uri,
|
|
461
407
|
apiHeaders,
|
|
@@ -463,16 +409,15 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
463
409
|
);
|
|
464
410
|
}
|
|
465
411
|
/**
|
|
466
|
-
* Get file for download
|
|
467
|
-
*
|
|
468
412
|
* Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
|
|
469
413
|
*
|
|
470
414
|
* @param {string} bucketId
|
|
471
415
|
* @param {string} fileId
|
|
416
|
+
* @param {string} token
|
|
472
417
|
* @throws {AppwriteException}
|
|
473
418
|
* @returns {string}
|
|
474
419
|
*/
|
|
475
|
-
getFileDownload(bucketId: string, fileId: string): string {
|
|
420
|
+
getFileDownload(bucketId: string, fileId: string, token?: string): string {
|
|
476
421
|
if (typeof bucketId === 'undefined') {
|
|
477
422
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
478
423
|
}
|
|
@@ -481,10 +426,12 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
481
426
|
}
|
|
482
427
|
const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
|
|
483
428
|
const payload: Payload = {};
|
|
429
|
+
if (typeof token !== 'undefined') {
|
|
430
|
+
payload['token'] = token;
|
|
431
|
+
}
|
|
484
432
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
485
433
|
|
|
486
434
|
const apiHeaders: { [header: string]: string } = {
|
|
487
|
-
'content-type': 'application/json',
|
|
488
435
|
}
|
|
489
436
|
|
|
490
437
|
payload['project'] = this.client.config.project;
|
|
@@ -492,12 +439,10 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
492
439
|
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
493
440
|
uri.searchParams.append(key, value);
|
|
494
441
|
}
|
|
495
|
-
|
|
442
|
+
|
|
496
443
|
return uri.toString();
|
|
497
444
|
}
|
|
498
445
|
/**
|
|
499
|
-
* Get file preview
|
|
500
|
-
*
|
|
501
446
|
* Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.
|
|
502
447
|
*
|
|
503
448
|
* @param {string} bucketId
|
|
@@ -513,10 +458,11 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
513
458
|
* @param {number} rotation
|
|
514
459
|
* @param {string} background
|
|
515
460
|
* @param {ImageFormat} output
|
|
461
|
+
* @param {string} token
|
|
516
462
|
* @throws {AppwriteException}
|
|
517
463
|
* @returns {string}
|
|
518
464
|
*/
|
|
519
|
-
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): string {
|
|
465
|
+
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, token?: string): string {
|
|
520
466
|
if (typeof bucketId === 'undefined') {
|
|
521
467
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
522
468
|
}
|
|
@@ -558,10 +504,12 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
558
504
|
if (typeof output !== 'undefined') {
|
|
559
505
|
payload['output'] = output;
|
|
560
506
|
}
|
|
507
|
+
if (typeof token !== 'undefined') {
|
|
508
|
+
payload['token'] = token;
|
|
509
|
+
}
|
|
561
510
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
562
511
|
|
|
563
512
|
const apiHeaders: { [header: string]: string } = {
|
|
564
|
-
'content-type': 'application/json',
|
|
565
513
|
}
|
|
566
514
|
|
|
567
515
|
payload['project'] = this.client.config.project;
|
|
@@ -569,20 +517,19 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
569
517
|
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
570
518
|
uri.searchParams.append(key, value);
|
|
571
519
|
}
|
|
572
|
-
|
|
520
|
+
|
|
573
521
|
return uri.toString();
|
|
574
522
|
}
|
|
575
523
|
/**
|
|
576
|
-
* Get file for view
|
|
577
|
-
*
|
|
578
524
|
* Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.
|
|
579
525
|
*
|
|
580
526
|
* @param {string} bucketId
|
|
581
527
|
* @param {string} fileId
|
|
528
|
+
* @param {string} token
|
|
582
529
|
* @throws {AppwriteException}
|
|
583
530
|
* @returns {string}
|
|
584
531
|
*/
|
|
585
|
-
getFileView(bucketId: string, fileId: string): string {
|
|
532
|
+
getFileView(bucketId: string, fileId: string, token?: string): string {
|
|
586
533
|
if (typeof bucketId === 'undefined') {
|
|
587
534
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
588
535
|
}
|
|
@@ -591,10 +538,12 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
591
538
|
}
|
|
592
539
|
const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
|
|
593
540
|
const payload: Payload = {};
|
|
541
|
+
if (typeof token !== 'undefined') {
|
|
542
|
+
payload['token'] = token;
|
|
543
|
+
}
|
|
594
544
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
595
545
|
|
|
596
546
|
const apiHeaders: { [header: string]: string } = {
|
|
597
|
-
'content-type': 'application/json',
|
|
598
547
|
}
|
|
599
548
|
|
|
600
549
|
payload['project'] = this.client.config.project;
|
|
@@ -602,12 +551,10 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
602
551
|
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
603
552
|
uri.searchParams.append(key, value);
|
|
604
553
|
}
|
|
605
|
-
|
|
554
|
+
|
|
606
555
|
return uri.toString();
|
|
607
556
|
}
|
|
608
557
|
/**
|
|
609
|
-
* Get storage usage stats
|
|
610
|
-
*
|
|
611
558
|
* Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
612
559
|
|
|
613
560
|
*
|
|
@@ -615,7 +562,7 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
615
562
|
* @throws {AppwriteException}
|
|
616
563
|
* @returns {Promise<Models.UsageStorage>}
|
|
617
564
|
*/
|
|
618
|
-
|
|
565
|
+
getUsage(range?: StorageUsageRange): Promise<Models.UsageStorage> {
|
|
619
566
|
const apiPath = '/storage/usage';
|
|
620
567
|
const payload: Payload = {};
|
|
621
568
|
if (typeof range !== 'undefined') {
|
|
@@ -624,13 +571,9 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
624
571
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
625
572
|
|
|
626
573
|
const apiHeaders: { [header: string]: string } = {
|
|
627
|
-
'content-type': 'application/json',
|
|
628
574
|
}
|
|
629
575
|
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
return await this.client.call(
|
|
576
|
+
return this.client.call(
|
|
634
577
|
'get',
|
|
635
578
|
uri,
|
|
636
579
|
apiHeaders,
|
|
@@ -638,8 +581,6 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
638
581
|
);
|
|
639
582
|
}
|
|
640
583
|
/**
|
|
641
|
-
* Get bucket usage stats
|
|
642
|
-
*
|
|
643
584
|
* Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
644
585
|
|
|
645
586
|
*
|
|
@@ -648,7 +589,7 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
648
589
|
* @throws {AppwriteException}
|
|
649
590
|
* @returns {Promise<Models.UsageBuckets>}
|
|
650
591
|
*/
|
|
651
|
-
|
|
592
|
+
getBucketUsage(bucketId: string, range?: StorageUsageRange): Promise<Models.UsageBuckets> {
|
|
652
593
|
if (typeof bucketId === 'undefined') {
|
|
653
594
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
654
595
|
}
|
|
@@ -660,13 +601,9 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
660
601
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
661
602
|
|
|
662
603
|
const apiHeaders: { [header: string]: string } = {
|
|
663
|
-
'content-type': 'application/json',
|
|
664
604
|
}
|
|
665
605
|
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
return await this.client.call(
|
|
606
|
+
return this.client.call(
|
|
670
607
|
'get',
|
|
671
608
|
uri,
|
|
672
609
|
apiHeaders,
|