@appwrite.io/console 1.6.0 → 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 +6731 -3907
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +6729 -3908
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +6731 -3907
- 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 +1 -1
- 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 +12 -2
- 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/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 +1092 -221
- package/src/services/account.ts +0 -16
- package/src/services/avatars.ts +0 -7
- package/src/services/backups.ts +0 -6
- package/src/services/console.ts +36 -5
- package/src/services/databases.ts +149 -18
- package/src/services/domains.ts +1821 -0
- package/src/services/functions.ts +174 -69
- package/src/services/health.ts +9 -34
- package/src/services/locale.ts +0 -8
- package/src/services/messaging.ts +0 -13
- package/src/services/migrations.ts +43 -6
- package/src/services/organizations.ts +0 -47
- package/src/services/project.ts +10 -5
- package/src/services/projects.ts +172 -10
- package/src/services/proxy.ts +124 -14
- package/src/services/sites.ts +1104 -0
- package/src/services/storage.ts +15 -12
- package/src/services/teams.ts +0 -6
- package/src/services/tokens.ts +160 -0
- package/src/services/users.ts +9 -13
- package/src/services/vcs.ts +54 -42
- 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/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 +1092 -221
- package/types/services/console.d.ts +10 -0
- package/types/services/databases.d.ts +44 -2
- package/types/services/domains.d.ts +524 -0
- package/types/services/functions.d.ts +60 -30
- package/types/services/health.d.ts +6 -6
- package/types/services/migrations.d.ts +10 -0
- package/types/services/organizations.d.ts +0 -10
- package/types/services/project.d.ts +4 -2
- package/types/services/projects.d.ts +48 -0
- package/types/services/proxy.d.ts +33 -5
- package/types/services/sites.d.ts +319 -0
- package/types/services/storage.d.ts +6 -3
- package/types/services/tokens.d.ts +51 -0
- package/types/services/users.d.ts +3 -1
- package/types/services/vcs.d.ts +15 -12
package/src/services/project.ts
CHANGED
|
@@ -40,7 +40,6 @@ export class Project {
|
|
|
40
40
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
41
41
|
|
|
42
42
|
const apiHeaders: { [header: string]: string } = {
|
|
43
|
-
'content-type': 'application/json',
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
return this.client.call(
|
|
@@ -62,7 +61,6 @@ export class Project {
|
|
|
62
61
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
63
62
|
|
|
64
63
|
const apiHeaders: { [header: string]: string } = {
|
|
65
|
-
'content-type': 'application/json',
|
|
66
64
|
}
|
|
67
65
|
|
|
68
66
|
return this.client.call(
|
|
@@ -77,10 +75,11 @@ export class Project {
|
|
|
77
75
|
*
|
|
78
76
|
* @param {string} key
|
|
79
77
|
* @param {string} value
|
|
78
|
+
* @param {boolean} secret
|
|
80
79
|
* @throws {AppwriteException}
|
|
81
80
|
* @returns {Promise<Models.Variable>}
|
|
82
81
|
*/
|
|
83
|
-
createVariable(key: string, value: string): Promise<Models.Variable> {
|
|
82
|
+
createVariable(key: string, value: string, secret?: boolean): Promise<Models.Variable> {
|
|
84
83
|
if (typeof key === 'undefined') {
|
|
85
84
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
86
85
|
}
|
|
@@ -95,6 +94,9 @@ export class Project {
|
|
|
95
94
|
if (typeof value !== 'undefined') {
|
|
96
95
|
payload['value'] = value;
|
|
97
96
|
}
|
|
97
|
+
if (typeof secret !== 'undefined') {
|
|
98
|
+
payload['secret'] = secret;
|
|
99
|
+
}
|
|
98
100
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
99
101
|
|
|
100
102
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -124,7 +126,6 @@ export class Project {
|
|
|
124
126
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
125
127
|
|
|
126
128
|
const apiHeaders: { [header: string]: string } = {
|
|
127
|
-
'content-type': 'application/json',
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
return this.client.call(
|
|
@@ -140,10 +141,11 @@ export class Project {
|
|
|
140
141
|
* @param {string} variableId
|
|
141
142
|
* @param {string} key
|
|
142
143
|
* @param {string} value
|
|
144
|
+
* @param {boolean} secret
|
|
143
145
|
* @throws {AppwriteException}
|
|
144
146
|
* @returns {Promise<Models.Variable>}
|
|
145
147
|
*/
|
|
146
|
-
updateVariable(variableId: string, key: string, value?: string): Promise<Models.Variable> {
|
|
148
|
+
updateVariable(variableId: string, key: string, value?: string, secret?: boolean): Promise<Models.Variable> {
|
|
147
149
|
if (typeof variableId === 'undefined') {
|
|
148
150
|
throw new AppwriteException('Missing required parameter: "variableId"');
|
|
149
151
|
}
|
|
@@ -158,6 +160,9 @@ export class Project {
|
|
|
158
160
|
if (typeof value !== 'undefined') {
|
|
159
161
|
payload['value'] = value;
|
|
160
162
|
}
|
|
163
|
+
if (typeof secret !== 'undefined') {
|
|
164
|
+
payload['secret'] = secret;
|
|
165
|
+
}
|
|
161
166
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
162
167
|
|
|
163
168
|
const apiHeaders: { [header: string]: string } = {
|
package/src/services/projects.ts
CHANGED
|
@@ -40,7 +40,6 @@ export class Projects {
|
|
|
40
40
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
41
41
|
|
|
42
42
|
const apiHeaders: { [header: string]: string } = {
|
|
43
|
-
'content-type': 'application/json',
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
return this.client.call(
|
|
@@ -149,7 +148,6 @@ export class Projects {
|
|
|
149
148
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
150
149
|
|
|
151
150
|
const apiHeaders: { [header: string]: string } = {
|
|
152
|
-
'content-type': 'application/json',
|
|
153
151
|
}
|
|
154
152
|
|
|
155
153
|
return this.client.call(
|
|
@@ -675,6 +673,178 @@ export class Projects {
|
|
|
675
673
|
payload
|
|
676
674
|
);
|
|
677
675
|
}
|
|
676
|
+
/**
|
|
677
|
+
* List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'
|
|
678
|
+
*
|
|
679
|
+
* @param {string} projectId
|
|
680
|
+
* @param {string[]} queries
|
|
681
|
+
* @throws {AppwriteException}
|
|
682
|
+
* @returns {Promise<Models.DevKeyList>}
|
|
683
|
+
*/
|
|
684
|
+
listDevKeys(projectId: string, queries?: string[]): Promise<Models.DevKeyList> {
|
|
685
|
+
if (typeof projectId === 'undefined') {
|
|
686
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
687
|
+
}
|
|
688
|
+
const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
|
|
689
|
+
const payload: Payload = {};
|
|
690
|
+
if (typeof queries !== 'undefined') {
|
|
691
|
+
payload['queries'] = queries;
|
|
692
|
+
}
|
|
693
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
694
|
+
|
|
695
|
+
const apiHeaders: { [header: string]: string } = {
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
return this.client.call(
|
|
699
|
+
'get',
|
|
700
|
+
uri,
|
|
701
|
+
apiHeaders,
|
|
702
|
+
payload
|
|
703
|
+
);
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.
|
|
707
|
+
*
|
|
708
|
+
* @param {string} projectId
|
|
709
|
+
* @param {string} name
|
|
710
|
+
* @param {string} expire
|
|
711
|
+
* @throws {AppwriteException}
|
|
712
|
+
* @returns {Promise<Models.DevKey>}
|
|
713
|
+
*/
|
|
714
|
+
createDevKey(projectId: string, name: string, expire: string): Promise<Models.DevKey> {
|
|
715
|
+
if (typeof projectId === 'undefined') {
|
|
716
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
717
|
+
}
|
|
718
|
+
if (typeof name === 'undefined') {
|
|
719
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
720
|
+
}
|
|
721
|
+
if (typeof expire === 'undefined') {
|
|
722
|
+
throw new AppwriteException('Missing required parameter: "expire"');
|
|
723
|
+
}
|
|
724
|
+
const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
|
|
725
|
+
const payload: Payload = {};
|
|
726
|
+
if (typeof name !== 'undefined') {
|
|
727
|
+
payload['name'] = name;
|
|
728
|
+
}
|
|
729
|
+
if (typeof expire !== 'undefined') {
|
|
730
|
+
payload['expire'] = expire;
|
|
731
|
+
}
|
|
732
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
733
|
+
|
|
734
|
+
const apiHeaders: { [header: string]: string } = {
|
|
735
|
+
'content-type': 'application/json',
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
return this.client.call(
|
|
739
|
+
'post',
|
|
740
|
+
uri,
|
|
741
|
+
apiHeaders,
|
|
742
|
+
payload
|
|
743
|
+
);
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* Get a project\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.
|
|
747
|
+
*
|
|
748
|
+
* @param {string} projectId
|
|
749
|
+
* @param {string} keyId
|
|
750
|
+
* @throws {AppwriteException}
|
|
751
|
+
* @returns {Promise<Models.DevKey>}
|
|
752
|
+
*/
|
|
753
|
+
getDevKey(projectId: string, keyId: string): Promise<Models.DevKey> {
|
|
754
|
+
if (typeof projectId === 'undefined') {
|
|
755
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
756
|
+
}
|
|
757
|
+
if (typeof keyId === 'undefined') {
|
|
758
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
759
|
+
}
|
|
760
|
+
const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
761
|
+
const payload: Payload = {};
|
|
762
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
763
|
+
|
|
764
|
+
const apiHeaders: { [header: string]: string } = {
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
return this.client.call(
|
|
768
|
+
'get',
|
|
769
|
+
uri,
|
|
770
|
+
apiHeaders,
|
|
771
|
+
payload
|
|
772
|
+
);
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Update a project\'s dev key by its unique ID. Use this endpoint to update a project\'s dev key name or expiration time.'
|
|
776
|
+
*
|
|
777
|
+
* @param {string} projectId
|
|
778
|
+
* @param {string} keyId
|
|
779
|
+
* @param {string} name
|
|
780
|
+
* @param {string} expire
|
|
781
|
+
* @throws {AppwriteException}
|
|
782
|
+
* @returns {Promise<Models.DevKey>}
|
|
783
|
+
*/
|
|
784
|
+
updateDevKey(projectId: string, keyId: string, name: string, expire: string): Promise<Models.DevKey> {
|
|
785
|
+
if (typeof projectId === 'undefined') {
|
|
786
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
787
|
+
}
|
|
788
|
+
if (typeof keyId === 'undefined') {
|
|
789
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
790
|
+
}
|
|
791
|
+
if (typeof name === 'undefined') {
|
|
792
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
793
|
+
}
|
|
794
|
+
if (typeof expire === 'undefined') {
|
|
795
|
+
throw new AppwriteException('Missing required parameter: "expire"');
|
|
796
|
+
}
|
|
797
|
+
const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
798
|
+
const payload: Payload = {};
|
|
799
|
+
if (typeof name !== 'undefined') {
|
|
800
|
+
payload['name'] = name;
|
|
801
|
+
}
|
|
802
|
+
if (typeof expire !== 'undefined') {
|
|
803
|
+
payload['expire'] = expire;
|
|
804
|
+
}
|
|
805
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
806
|
+
|
|
807
|
+
const apiHeaders: { [header: string]: string } = {
|
|
808
|
+
'content-type': 'application/json',
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
return this.client.call(
|
|
812
|
+
'put',
|
|
813
|
+
uri,
|
|
814
|
+
apiHeaders,
|
|
815
|
+
payload
|
|
816
|
+
);
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* Delete a project\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.
|
|
820
|
+
*
|
|
821
|
+
* @param {string} projectId
|
|
822
|
+
* @param {string} keyId
|
|
823
|
+
* @throws {AppwriteException}
|
|
824
|
+
* @returns {Promise<{}>}
|
|
825
|
+
*/
|
|
826
|
+
deleteDevKey(projectId: string, keyId: string): Promise<{}> {
|
|
827
|
+
if (typeof projectId === 'undefined') {
|
|
828
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
829
|
+
}
|
|
830
|
+
if (typeof keyId === 'undefined') {
|
|
831
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
832
|
+
}
|
|
833
|
+
const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
834
|
+
const payload: Payload = {};
|
|
835
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
836
|
+
|
|
837
|
+
const apiHeaders: { [header: string]: string } = {
|
|
838
|
+
'content-type': 'application/json',
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
return this.client.call(
|
|
842
|
+
'delete',
|
|
843
|
+
uri,
|
|
844
|
+
apiHeaders,
|
|
845
|
+
payload
|
|
846
|
+
);
|
|
847
|
+
}
|
|
678
848
|
/**
|
|
679
849
|
* Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
|
|
680
850
|
*
|
|
@@ -728,7 +898,6 @@ export class Projects {
|
|
|
728
898
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
729
899
|
|
|
730
900
|
const apiHeaders: { [header: string]: string } = {
|
|
731
|
-
'content-type': 'application/json',
|
|
732
901
|
}
|
|
733
902
|
|
|
734
903
|
return this.client.call(
|
|
@@ -802,7 +971,6 @@ export class Projects {
|
|
|
802
971
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
803
972
|
|
|
804
973
|
const apiHeaders: { [header: string]: string } = {
|
|
805
|
-
'content-type': 'application/json',
|
|
806
974
|
}
|
|
807
975
|
|
|
808
976
|
return this.client.call(
|
|
@@ -951,7 +1119,6 @@ export class Projects {
|
|
|
951
1119
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
952
1120
|
|
|
953
1121
|
const apiHeaders: { [header: string]: string } = {
|
|
954
|
-
'content-type': 'application/json',
|
|
955
1122
|
}
|
|
956
1123
|
|
|
957
1124
|
return this.client.call(
|
|
@@ -1033,7 +1200,6 @@ export class Projects {
|
|
|
1033
1200
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1034
1201
|
|
|
1035
1202
|
const apiHeaders: { [header: string]: string } = {
|
|
1036
|
-
'content-type': 'application/json',
|
|
1037
1203
|
}
|
|
1038
1204
|
|
|
1039
1205
|
return this.client.call(
|
|
@@ -1391,7 +1557,6 @@ export class Projects {
|
|
|
1391
1557
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1392
1558
|
|
|
1393
1559
|
const apiHeaders: { [header: string]: string } = {
|
|
1394
|
-
'content-type': 'application/json',
|
|
1395
1560
|
}
|
|
1396
1561
|
|
|
1397
1562
|
return this.client.call(
|
|
@@ -1519,7 +1684,6 @@ export class Projects {
|
|
|
1519
1684
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1520
1685
|
|
|
1521
1686
|
const apiHeaders: { [header: string]: string } = {
|
|
1522
|
-
'content-type': 'application/json',
|
|
1523
1687
|
}
|
|
1524
1688
|
|
|
1525
1689
|
return this.client.call(
|
|
@@ -1620,7 +1784,6 @@ export class Projects {
|
|
|
1620
1784
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1621
1785
|
|
|
1622
1786
|
const apiHeaders: { [header: string]: string } = {
|
|
1623
|
-
'content-type': 'application/json',
|
|
1624
1787
|
}
|
|
1625
1788
|
|
|
1626
1789
|
return this.client.call(
|
|
@@ -1716,7 +1879,6 @@ export class Projects {
|
|
|
1716
1879
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1717
1880
|
|
|
1718
1881
|
const apiHeaders: { [header: string]: string } = {
|
|
1719
|
-
'content-type': 'application/json',
|
|
1720
1882
|
}
|
|
1721
1883
|
|
|
1722
1884
|
return this.client.call(
|
package/src/services/proxy.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
2
|
import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
|
-
import {
|
|
4
|
+
import { StatusCode } from '../enums/status-code';
|
|
5
5
|
|
|
6
6
|
export class Proxy {
|
|
7
7
|
client: Client;
|
|
@@ -30,7 +30,6 @@ export class Proxy {
|
|
|
30
30
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
31
31
|
|
|
32
32
|
const apiHeaders: { [header: string]: string } = {
|
|
33
|
-
'content-type': 'application/json',
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
return this.client.call(
|
|
@@ -41,31 +40,143 @@ export class Proxy {
|
|
|
41
40
|
);
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
44
|
-
* Create a new proxy rule.
|
|
43
|
+
* Create a new proxy rule for serving Appwrite's API on custom domain.
|
|
45
44
|
*
|
|
46
45
|
* @param {string} domain
|
|
47
|
-
* @param {ResourceType} resourceType
|
|
48
|
-
* @param {string} resourceId
|
|
49
46
|
* @throws {AppwriteException}
|
|
50
47
|
* @returns {Promise<Models.ProxyRule>}
|
|
51
48
|
*/
|
|
52
|
-
|
|
49
|
+
createAPIRule(domain: string): Promise<Models.ProxyRule> {
|
|
53
50
|
if (typeof domain === 'undefined') {
|
|
54
51
|
throw new AppwriteException('Missing required parameter: "domain"');
|
|
55
52
|
}
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
const apiPath = '/proxy/rules/api';
|
|
54
|
+
const payload: Payload = {};
|
|
55
|
+
if (typeof domain !== 'undefined') {
|
|
56
|
+
payload['domain'] = domain;
|
|
58
57
|
}
|
|
59
|
-
const
|
|
58
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
59
|
+
|
|
60
|
+
const apiHeaders: { [header: string]: string } = {
|
|
61
|
+
'content-type': 'application/json',
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return this.client.call(
|
|
65
|
+
'post',
|
|
66
|
+
uri,
|
|
67
|
+
apiHeaders,
|
|
68
|
+
payload
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Create a new proxy rule for executing Appwrite Function on custom domain.
|
|
73
|
+
*
|
|
74
|
+
* @param {string} domain
|
|
75
|
+
* @param {string} functionId
|
|
76
|
+
* @param {string} branch
|
|
77
|
+
* @throws {AppwriteException}
|
|
78
|
+
* @returns {Promise<Models.ProxyRule>}
|
|
79
|
+
*/
|
|
80
|
+
createFunctionRule(domain: string, functionId: string, branch?: string): Promise<Models.ProxyRule> {
|
|
81
|
+
if (typeof domain === 'undefined') {
|
|
82
|
+
throw new AppwriteException('Missing required parameter: "domain"');
|
|
83
|
+
}
|
|
84
|
+
if (typeof functionId === 'undefined') {
|
|
85
|
+
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
86
|
+
}
|
|
87
|
+
const apiPath = '/proxy/rules/function';
|
|
88
|
+
const payload: Payload = {};
|
|
89
|
+
if (typeof domain !== 'undefined') {
|
|
90
|
+
payload['domain'] = domain;
|
|
91
|
+
}
|
|
92
|
+
if (typeof functionId !== 'undefined') {
|
|
93
|
+
payload['functionId'] = functionId;
|
|
94
|
+
}
|
|
95
|
+
if (typeof branch !== 'undefined') {
|
|
96
|
+
payload['branch'] = branch;
|
|
97
|
+
}
|
|
98
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
99
|
+
|
|
100
|
+
const apiHeaders: { [header: string]: string } = {
|
|
101
|
+
'content-type': 'application/json',
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return this.client.call(
|
|
105
|
+
'post',
|
|
106
|
+
uri,
|
|
107
|
+
apiHeaders,
|
|
108
|
+
payload
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Create a new proxy rule for to redirect from custom domain to another domain.
|
|
113
|
+
*
|
|
114
|
+
* @param {string} domain
|
|
115
|
+
* @param {string} url
|
|
116
|
+
* @param {StatusCode} statusCode
|
|
117
|
+
* @throws {AppwriteException}
|
|
118
|
+
* @returns {Promise<Models.ProxyRule>}
|
|
119
|
+
*/
|
|
120
|
+
createRedirectRule(domain: string, url: string, statusCode: StatusCode): Promise<Models.ProxyRule> {
|
|
121
|
+
if (typeof domain === 'undefined') {
|
|
122
|
+
throw new AppwriteException('Missing required parameter: "domain"');
|
|
123
|
+
}
|
|
124
|
+
if (typeof url === 'undefined') {
|
|
125
|
+
throw new AppwriteException('Missing required parameter: "url"');
|
|
126
|
+
}
|
|
127
|
+
if (typeof statusCode === 'undefined') {
|
|
128
|
+
throw new AppwriteException('Missing required parameter: "statusCode"');
|
|
129
|
+
}
|
|
130
|
+
const apiPath = '/proxy/rules/redirect';
|
|
131
|
+
const payload: Payload = {};
|
|
132
|
+
if (typeof domain !== 'undefined') {
|
|
133
|
+
payload['domain'] = domain;
|
|
134
|
+
}
|
|
135
|
+
if (typeof url !== 'undefined') {
|
|
136
|
+
payload['url'] = url;
|
|
137
|
+
}
|
|
138
|
+
if (typeof statusCode !== 'undefined') {
|
|
139
|
+
payload['statusCode'] = statusCode;
|
|
140
|
+
}
|
|
141
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
142
|
+
|
|
143
|
+
const apiHeaders: { [header: string]: string } = {
|
|
144
|
+
'content-type': 'application/json',
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return this.client.call(
|
|
148
|
+
'post',
|
|
149
|
+
uri,
|
|
150
|
+
apiHeaders,
|
|
151
|
+
payload
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Create a new proxy rule for serving Appwrite Site on custom domain.
|
|
156
|
+
*
|
|
157
|
+
* @param {string} domain
|
|
158
|
+
* @param {string} siteId
|
|
159
|
+
* @param {string} branch
|
|
160
|
+
* @throws {AppwriteException}
|
|
161
|
+
* @returns {Promise<Models.ProxyRule>}
|
|
162
|
+
*/
|
|
163
|
+
createSiteRule(domain: string, siteId: string, branch?: string): Promise<Models.ProxyRule> {
|
|
164
|
+
if (typeof domain === 'undefined') {
|
|
165
|
+
throw new AppwriteException('Missing required parameter: "domain"');
|
|
166
|
+
}
|
|
167
|
+
if (typeof siteId === 'undefined') {
|
|
168
|
+
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
169
|
+
}
|
|
170
|
+
const apiPath = '/proxy/rules/site';
|
|
60
171
|
const payload: Payload = {};
|
|
61
172
|
if (typeof domain !== 'undefined') {
|
|
62
173
|
payload['domain'] = domain;
|
|
63
174
|
}
|
|
64
|
-
if (typeof
|
|
65
|
-
payload['
|
|
175
|
+
if (typeof siteId !== 'undefined') {
|
|
176
|
+
payload['siteId'] = siteId;
|
|
66
177
|
}
|
|
67
|
-
if (typeof
|
|
68
|
-
payload['
|
|
178
|
+
if (typeof branch !== 'undefined') {
|
|
179
|
+
payload['branch'] = branch;
|
|
69
180
|
}
|
|
70
181
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
71
182
|
|
|
@@ -96,7 +207,6 @@ export class Proxy {
|
|
|
96
207
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
97
208
|
|
|
98
209
|
const apiHeaders: { [header: string]: string } = {
|
|
99
|
-
'content-type': 'application/json',
|
|
100
210
|
}
|
|
101
211
|
|
|
102
212
|
return this.client.call(
|