@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/teams.ts
CHANGED
|
@@ -10,8 +10,6 @@ export class Teams {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* List teams
|
|
14
|
-
*
|
|
15
13
|
* Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
|
|
16
14
|
*
|
|
17
15
|
* @param {string[]} queries
|
|
@@ -19,7 +17,7 @@ export class Teams {
|
|
|
19
17
|
* @throws {AppwriteException}
|
|
20
18
|
* @returns {Promise<Models.TeamList<Preferences>>}
|
|
21
19
|
*/
|
|
22
|
-
|
|
20
|
+
list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>> {
|
|
23
21
|
const apiPath = '/teams';
|
|
24
22
|
const payload: Payload = {};
|
|
25
23
|
if (typeof queries !== 'undefined') {
|
|
@@ -31,13 +29,9 @@ export class Teams {
|
|
|
31
29
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
32
30
|
|
|
33
31
|
const apiHeaders: { [header: string]: string } = {
|
|
34
|
-
'content-type': 'application/json',
|
|
35
32
|
}
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return await this.client.call(
|
|
34
|
+
return this.client.call(
|
|
41
35
|
'get',
|
|
42
36
|
uri,
|
|
43
37
|
apiHeaders,
|
|
@@ -45,8 +39,6 @@ export class Teams {
|
|
|
45
39
|
);
|
|
46
40
|
}
|
|
47
41
|
/**
|
|
48
|
-
* Create team
|
|
49
|
-
*
|
|
50
42
|
* Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.
|
|
51
43
|
*
|
|
52
44
|
* @param {string} teamId
|
|
@@ -55,7 +47,7 @@ export class Teams {
|
|
|
55
47
|
* @throws {AppwriteException}
|
|
56
48
|
* @returns {Promise<Models.Team<Preferences>>}
|
|
57
49
|
*/
|
|
58
|
-
|
|
50
|
+
create<Preferences extends Models.Preferences>(teamId: string, name: string, roles?: string[]): Promise<Models.Team<Preferences>> {
|
|
59
51
|
if (typeof teamId === 'undefined') {
|
|
60
52
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
61
53
|
}
|
|
@@ -79,10 +71,7 @@ export class Teams {
|
|
|
79
71
|
'content-type': 'application/json',
|
|
80
72
|
}
|
|
81
73
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
return await this.client.call(
|
|
74
|
+
return this.client.call(
|
|
86
75
|
'post',
|
|
87
76
|
uri,
|
|
88
77
|
apiHeaders,
|
|
@@ -90,15 +79,13 @@ export class Teams {
|
|
|
90
79
|
);
|
|
91
80
|
}
|
|
92
81
|
/**
|
|
93
|
-
* Get team
|
|
94
|
-
*
|
|
95
82
|
* Get a team by its ID. All team members have read access for this resource.
|
|
96
83
|
*
|
|
97
84
|
* @param {string} teamId
|
|
98
85
|
* @throws {AppwriteException}
|
|
99
86
|
* @returns {Promise<Models.Team<Preferences>>}
|
|
100
87
|
*/
|
|
101
|
-
|
|
88
|
+
get<Preferences extends Models.Preferences>(teamId: string): Promise<Models.Team<Preferences>> {
|
|
102
89
|
if (typeof teamId === 'undefined') {
|
|
103
90
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
104
91
|
}
|
|
@@ -107,13 +94,9 @@ export class Teams {
|
|
|
107
94
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
108
95
|
|
|
109
96
|
const apiHeaders: { [header: string]: string } = {
|
|
110
|
-
'content-type': 'application/json',
|
|
111
97
|
}
|
|
112
98
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return await this.client.call(
|
|
99
|
+
return this.client.call(
|
|
117
100
|
'get',
|
|
118
101
|
uri,
|
|
119
102
|
apiHeaders,
|
|
@@ -121,8 +104,6 @@ export class Teams {
|
|
|
121
104
|
);
|
|
122
105
|
}
|
|
123
106
|
/**
|
|
124
|
-
* Update name
|
|
125
|
-
*
|
|
126
107
|
* Update the team's name by its unique ID.
|
|
127
108
|
*
|
|
128
109
|
* @param {string} teamId
|
|
@@ -130,7 +111,7 @@ export class Teams {
|
|
|
130
111
|
* @throws {AppwriteException}
|
|
131
112
|
* @returns {Promise<Models.Team<Preferences>>}
|
|
132
113
|
*/
|
|
133
|
-
|
|
114
|
+
updateName<Preferences extends Models.Preferences>(teamId: string, name: string): Promise<Models.Team<Preferences>> {
|
|
134
115
|
if (typeof teamId === 'undefined') {
|
|
135
116
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
136
117
|
}
|
|
@@ -148,10 +129,7 @@ export class Teams {
|
|
|
148
129
|
'content-type': 'application/json',
|
|
149
130
|
}
|
|
150
131
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
return await this.client.call(
|
|
132
|
+
return this.client.call(
|
|
155
133
|
'put',
|
|
156
134
|
uri,
|
|
157
135
|
apiHeaders,
|
|
@@ -159,15 +137,13 @@ export class Teams {
|
|
|
159
137
|
);
|
|
160
138
|
}
|
|
161
139
|
/**
|
|
162
|
-
* Delete team
|
|
163
|
-
*
|
|
164
140
|
* Delete a team using its ID. Only team members with the owner role can delete the team.
|
|
165
141
|
*
|
|
166
142
|
* @param {string} teamId
|
|
167
143
|
* @throws {AppwriteException}
|
|
168
144
|
* @returns {Promise<{}>}
|
|
169
145
|
*/
|
|
170
|
-
|
|
146
|
+
delete(teamId: string): Promise<{}> {
|
|
171
147
|
if (typeof teamId === 'undefined') {
|
|
172
148
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
173
149
|
}
|
|
@@ -179,10 +155,7 @@ export class Teams {
|
|
|
179
155
|
'content-type': 'application/json',
|
|
180
156
|
}
|
|
181
157
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return await this.client.call(
|
|
158
|
+
return this.client.call(
|
|
186
159
|
'delete',
|
|
187
160
|
uri,
|
|
188
161
|
apiHeaders,
|
|
@@ -190,8 +163,6 @@ export class Teams {
|
|
|
190
163
|
);
|
|
191
164
|
}
|
|
192
165
|
/**
|
|
193
|
-
* List team logs
|
|
194
|
-
*
|
|
195
166
|
* Get the team activity logs list by its unique ID.
|
|
196
167
|
*
|
|
197
168
|
* @param {string} teamId
|
|
@@ -199,7 +170,7 @@ export class Teams {
|
|
|
199
170
|
* @throws {AppwriteException}
|
|
200
171
|
* @returns {Promise<Models.LogList>}
|
|
201
172
|
*/
|
|
202
|
-
|
|
173
|
+
listLogs(teamId: string, queries?: string[]): Promise<Models.LogList> {
|
|
203
174
|
if (typeof teamId === 'undefined') {
|
|
204
175
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
205
176
|
}
|
|
@@ -211,13 +182,9 @@ export class Teams {
|
|
|
211
182
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
212
183
|
|
|
213
184
|
const apiHeaders: { [header: string]: string } = {
|
|
214
|
-
'content-type': 'application/json',
|
|
215
185
|
}
|
|
216
186
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return await this.client.call(
|
|
187
|
+
return this.client.call(
|
|
221
188
|
'get',
|
|
222
189
|
uri,
|
|
223
190
|
apiHeaders,
|
|
@@ -225,8 +192,6 @@ export class Teams {
|
|
|
225
192
|
);
|
|
226
193
|
}
|
|
227
194
|
/**
|
|
228
|
-
* List team memberships
|
|
229
|
-
*
|
|
230
195
|
* Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.
|
|
231
196
|
*
|
|
232
197
|
* @param {string} teamId
|
|
@@ -235,7 +200,7 @@ export class Teams {
|
|
|
235
200
|
* @throws {AppwriteException}
|
|
236
201
|
* @returns {Promise<Models.MembershipList>}
|
|
237
202
|
*/
|
|
238
|
-
|
|
203
|
+
listMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList> {
|
|
239
204
|
if (typeof teamId === 'undefined') {
|
|
240
205
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
241
206
|
}
|
|
@@ -250,13 +215,9 @@ export class Teams {
|
|
|
250
215
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
251
216
|
|
|
252
217
|
const apiHeaders: { [header: string]: string } = {
|
|
253
|
-
'content-type': 'application/json',
|
|
254
218
|
}
|
|
255
219
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
return await this.client.call(
|
|
220
|
+
return this.client.call(
|
|
260
221
|
'get',
|
|
261
222
|
uri,
|
|
262
223
|
apiHeaders,
|
|
@@ -264,8 +225,6 @@ export class Teams {
|
|
|
264
225
|
);
|
|
265
226
|
}
|
|
266
227
|
/**
|
|
267
|
-
* Create team membership
|
|
268
|
-
*
|
|
269
228
|
* Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.
|
|
270
229
|
|
|
271
230
|
You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.
|
|
@@ -285,7 +244,7 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
|
|
|
285
244
|
* @throws {AppwriteException}
|
|
286
245
|
* @returns {Promise<Models.Membership>}
|
|
287
246
|
*/
|
|
288
|
-
|
|
247
|
+
createMembership(teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership> {
|
|
289
248
|
if (typeof teamId === 'undefined') {
|
|
290
249
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
291
250
|
}
|
|
@@ -318,10 +277,7 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
|
|
|
318
277
|
'content-type': 'application/json',
|
|
319
278
|
}
|
|
320
279
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
return await this.client.call(
|
|
280
|
+
return this.client.call(
|
|
325
281
|
'post',
|
|
326
282
|
uri,
|
|
327
283
|
apiHeaders,
|
|
@@ -329,8 +285,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
|
|
|
329
285
|
);
|
|
330
286
|
}
|
|
331
287
|
/**
|
|
332
|
-
* Get team membership
|
|
333
|
-
*
|
|
334
288
|
* Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.
|
|
335
289
|
*
|
|
336
290
|
* @param {string} teamId
|
|
@@ -338,7 +292,7 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
|
|
|
338
292
|
* @throws {AppwriteException}
|
|
339
293
|
* @returns {Promise<Models.Membership>}
|
|
340
294
|
*/
|
|
341
|
-
|
|
295
|
+
getMembership(teamId: string, membershipId: string): Promise<Models.Membership> {
|
|
342
296
|
if (typeof teamId === 'undefined') {
|
|
343
297
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
344
298
|
}
|
|
@@ -350,13 +304,9 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
|
|
|
350
304
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
351
305
|
|
|
352
306
|
const apiHeaders: { [header: string]: string } = {
|
|
353
|
-
'content-type': 'application/json',
|
|
354
307
|
}
|
|
355
308
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
return await this.client.call(
|
|
309
|
+
return this.client.call(
|
|
360
310
|
'get',
|
|
361
311
|
uri,
|
|
362
312
|
apiHeaders,
|
|
@@ -364,8 +314,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
|
|
|
364
314
|
);
|
|
365
315
|
}
|
|
366
316
|
/**
|
|
367
|
-
* Update membership
|
|
368
|
-
*
|
|
369
317
|
* Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions).
|
|
370
318
|
|
|
371
319
|
*
|
|
@@ -375,7 +323,7 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
|
|
|
375
323
|
* @throws {AppwriteException}
|
|
376
324
|
* @returns {Promise<Models.Membership>}
|
|
377
325
|
*/
|
|
378
|
-
|
|
326
|
+
updateMembership(teamId: string, membershipId: string, roles: string[]): Promise<Models.Membership> {
|
|
379
327
|
if (typeof teamId === 'undefined') {
|
|
380
328
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
381
329
|
}
|
|
@@ -396,10 +344,7 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
|
|
|
396
344
|
'content-type': 'application/json',
|
|
397
345
|
}
|
|
398
346
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
return await this.client.call(
|
|
347
|
+
return this.client.call(
|
|
403
348
|
'patch',
|
|
404
349
|
uri,
|
|
405
350
|
apiHeaders,
|
|
@@ -407,8 +352,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
|
|
|
407
352
|
);
|
|
408
353
|
}
|
|
409
354
|
/**
|
|
410
|
-
* Delete team membership
|
|
411
|
-
*
|
|
412
355
|
* This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.
|
|
413
356
|
*
|
|
414
357
|
* @param {string} teamId
|
|
@@ -416,7 +359,7 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
|
|
|
416
359
|
* @throws {AppwriteException}
|
|
417
360
|
* @returns {Promise<{}>}
|
|
418
361
|
*/
|
|
419
|
-
|
|
362
|
+
deleteMembership(teamId: string, membershipId: string): Promise<{}> {
|
|
420
363
|
if (typeof teamId === 'undefined') {
|
|
421
364
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
422
365
|
}
|
|
@@ -431,10 +374,7 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
|
|
|
431
374
|
'content-type': 'application/json',
|
|
432
375
|
}
|
|
433
376
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
return await this.client.call(
|
|
377
|
+
return this.client.call(
|
|
438
378
|
'delete',
|
|
439
379
|
uri,
|
|
440
380
|
apiHeaders,
|
|
@@ -442,8 +382,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
|
|
|
442
382
|
);
|
|
443
383
|
}
|
|
444
384
|
/**
|
|
445
|
-
* Update team membership status
|
|
446
|
-
*
|
|
447
385
|
* Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.
|
|
448
386
|
|
|
449
387
|
If the request is successful, a session for the user is automatically created.
|
|
@@ -456,7 +394,7 @@ If the request is successful, a session for the user is automatically created.
|
|
|
456
394
|
* @throws {AppwriteException}
|
|
457
395
|
* @returns {Promise<Models.Membership>}
|
|
458
396
|
*/
|
|
459
|
-
|
|
397
|
+
updateMembershipStatus(teamId: string, membershipId: string, userId: string, secret: string): Promise<Models.Membership> {
|
|
460
398
|
if (typeof teamId === 'undefined') {
|
|
461
399
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
462
400
|
}
|
|
@@ -483,10 +421,7 @@ If the request is successful, a session for the user is automatically created.
|
|
|
483
421
|
'content-type': 'application/json',
|
|
484
422
|
}
|
|
485
423
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
return await this.client.call(
|
|
424
|
+
return this.client.call(
|
|
490
425
|
'patch',
|
|
491
426
|
uri,
|
|
492
427
|
apiHeaders,
|
|
@@ -494,15 +429,13 @@ If the request is successful, a session for the user is automatically created.
|
|
|
494
429
|
);
|
|
495
430
|
}
|
|
496
431
|
/**
|
|
497
|
-
* Get team preferences
|
|
498
|
-
*
|
|
499
432
|
* Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).
|
|
500
433
|
*
|
|
501
434
|
* @param {string} teamId
|
|
502
435
|
* @throws {AppwriteException}
|
|
503
436
|
* @returns {Promise<Preferences>}
|
|
504
437
|
*/
|
|
505
|
-
|
|
438
|
+
getPrefs<Preferences extends Models.Preferences>(teamId: string): Promise<Preferences> {
|
|
506
439
|
if (typeof teamId === 'undefined') {
|
|
507
440
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
508
441
|
}
|
|
@@ -511,13 +444,9 @@ If the request is successful, a session for the user is automatically created.
|
|
|
511
444
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
512
445
|
|
|
513
446
|
const apiHeaders: { [header: string]: string } = {
|
|
514
|
-
'content-type': 'application/json',
|
|
515
447
|
}
|
|
516
448
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
return await this.client.call(
|
|
449
|
+
return this.client.call(
|
|
521
450
|
'get',
|
|
522
451
|
uri,
|
|
523
452
|
apiHeaders,
|
|
@@ -525,8 +454,6 @@ If the request is successful, a session for the user is automatically created.
|
|
|
525
454
|
);
|
|
526
455
|
}
|
|
527
456
|
/**
|
|
528
|
-
* Update preferences
|
|
529
|
-
*
|
|
530
457
|
* Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.
|
|
531
458
|
*
|
|
532
459
|
* @param {string} teamId
|
|
@@ -534,7 +461,7 @@ If the request is successful, a session for the user is automatically created.
|
|
|
534
461
|
* @throws {AppwriteException}
|
|
535
462
|
* @returns {Promise<Preferences>}
|
|
536
463
|
*/
|
|
537
|
-
|
|
464
|
+
updatePrefs<Preferences extends Models.Preferences>(teamId: string, prefs: object): Promise<Preferences> {
|
|
538
465
|
if (typeof teamId === 'undefined') {
|
|
539
466
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
540
467
|
}
|
|
@@ -552,10 +479,7 @@ If the request is successful, a session for the user is automatically created.
|
|
|
552
479
|
'content-type': 'application/json',
|
|
553
480
|
}
|
|
554
481
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
return await this.client.call(
|
|
482
|
+
return this.client.call(
|
|
559
483
|
'put',
|
|
560
484
|
uri,
|
|
561
485
|
apiHeaders,
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { Service } from '../service';
|
|
2
|
+
import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
|
|
3
|
+
import type { Models } from '../models';
|
|
4
|
+
|
|
5
|
+
export class Tokens {
|
|
6
|
+
client: Client;
|
|
7
|
+
|
|
8
|
+
constructor(client: Client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* List all the tokens created for a specific file or bucket. You can use the query params to filter your results.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} bucketId
|
|
16
|
+
* @param {string} fileId
|
|
17
|
+
* @param {string[]} queries
|
|
18
|
+
* @throws {AppwriteException}
|
|
19
|
+
* @returns {Promise<Models.ResourceTokenList>}
|
|
20
|
+
*/
|
|
21
|
+
list(bucketId: string, fileId: string, queries?: string[]): Promise<Models.ResourceTokenList> {
|
|
22
|
+
if (typeof bucketId === 'undefined') {
|
|
23
|
+
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
24
|
+
}
|
|
25
|
+
if (typeof fileId === 'undefined') {
|
|
26
|
+
throw new AppwriteException('Missing required parameter: "fileId"');
|
|
27
|
+
}
|
|
28
|
+
const apiPath = '/tokens/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
|
|
29
|
+
const payload: Payload = {};
|
|
30
|
+
if (typeof queries !== 'undefined') {
|
|
31
|
+
payload['queries'] = queries;
|
|
32
|
+
}
|
|
33
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
34
|
+
|
|
35
|
+
const apiHeaders: { [header: string]: string } = {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return this.client.call(
|
|
39
|
+
'get',
|
|
40
|
+
uri,
|
|
41
|
+
apiHeaders,
|
|
42
|
+
payload
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.
|
|
47
|
+
*
|
|
48
|
+
* @param {string} bucketId
|
|
49
|
+
* @param {string} fileId
|
|
50
|
+
* @param {string} expire
|
|
51
|
+
* @throws {AppwriteException}
|
|
52
|
+
* @returns {Promise<Models.ResourceToken>}
|
|
53
|
+
*/
|
|
54
|
+
createFileToken(bucketId: string, fileId: string, expire?: string): Promise<Models.ResourceToken> {
|
|
55
|
+
if (typeof bucketId === 'undefined') {
|
|
56
|
+
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
57
|
+
}
|
|
58
|
+
if (typeof fileId === 'undefined') {
|
|
59
|
+
throw new AppwriteException('Missing required parameter: "fileId"');
|
|
60
|
+
}
|
|
61
|
+
const apiPath = '/tokens/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
|
|
62
|
+
const payload: Payload = {};
|
|
63
|
+
if (typeof expire !== 'undefined') {
|
|
64
|
+
payload['expire'] = expire;
|
|
65
|
+
}
|
|
66
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
67
|
+
|
|
68
|
+
const apiHeaders: { [header: string]: string } = {
|
|
69
|
+
'content-type': 'application/json',
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return this.client.call(
|
|
73
|
+
'post',
|
|
74
|
+
uri,
|
|
75
|
+
apiHeaders,
|
|
76
|
+
payload
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Get a token by its unique ID.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} tokenId
|
|
83
|
+
* @throws {AppwriteException}
|
|
84
|
+
* @returns {Promise<Models.ResourceToken>}
|
|
85
|
+
*/
|
|
86
|
+
get(tokenId: string): Promise<Models.ResourceToken> {
|
|
87
|
+
if (typeof tokenId === 'undefined') {
|
|
88
|
+
throw new AppwriteException('Missing required parameter: "tokenId"');
|
|
89
|
+
}
|
|
90
|
+
const apiPath = '/tokens/{tokenId}'.replace('{tokenId}', tokenId);
|
|
91
|
+
const payload: Payload = {};
|
|
92
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
93
|
+
|
|
94
|
+
const apiHeaders: { [header: string]: string } = {
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return this.client.call(
|
|
98
|
+
'get',
|
|
99
|
+
uri,
|
|
100
|
+
apiHeaders,
|
|
101
|
+
payload
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Update a token by its unique ID. Use this endpoint to update a token's expiry date.
|
|
106
|
+
*
|
|
107
|
+
* @param {string} tokenId
|
|
108
|
+
* @param {string} expire
|
|
109
|
+
* @throws {AppwriteException}
|
|
110
|
+
* @returns {Promise<Models.ResourceToken>}
|
|
111
|
+
*/
|
|
112
|
+
update(tokenId: string, expire?: string): Promise<Models.ResourceToken> {
|
|
113
|
+
if (typeof tokenId === 'undefined') {
|
|
114
|
+
throw new AppwriteException('Missing required parameter: "tokenId"');
|
|
115
|
+
}
|
|
116
|
+
const apiPath = '/tokens/{tokenId}'.replace('{tokenId}', tokenId);
|
|
117
|
+
const payload: Payload = {};
|
|
118
|
+
if (typeof expire !== 'undefined') {
|
|
119
|
+
payload['expire'] = expire;
|
|
120
|
+
}
|
|
121
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
122
|
+
|
|
123
|
+
const apiHeaders: { [header: string]: string } = {
|
|
124
|
+
'content-type': 'application/json',
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return this.client.call(
|
|
128
|
+
'patch',
|
|
129
|
+
uri,
|
|
130
|
+
apiHeaders,
|
|
131
|
+
payload
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Delete a token by its unique ID.
|
|
136
|
+
*
|
|
137
|
+
* @param {string} tokenId
|
|
138
|
+
* @throws {AppwriteException}
|
|
139
|
+
* @returns {Promise<{}>}
|
|
140
|
+
*/
|
|
141
|
+
delete(tokenId: string): Promise<{}> {
|
|
142
|
+
if (typeof tokenId === 'undefined') {
|
|
143
|
+
throw new AppwriteException('Missing required parameter: "tokenId"');
|
|
144
|
+
}
|
|
145
|
+
const apiPath = '/tokens/{tokenId}'.replace('{tokenId}', tokenId);
|
|
146
|
+
const payload: Payload = {};
|
|
147
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
148
|
+
|
|
149
|
+
const apiHeaders: { [header: string]: string } = {
|
|
150
|
+
'content-type': 'application/json',
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return this.client.call(
|
|
154
|
+
'delete',
|
|
155
|
+
uri,
|
|
156
|
+
apiHeaders,
|
|
157
|
+
payload
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
}
|