@appwrite.io/console 2.2.0 → 2.3.1
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 +10 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +412 -202
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +412 -203
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +412 -202
- package/docs/examples/account/create-anonymous-session.md +2 -0
- package/docs/examples/account/create-billing-address.md +2 -0
- package/docs/examples/account/create-email-password-session.md +2 -0
- package/docs/examples/account/create-email-token.md +2 -0
- package/docs/examples/account/create-email-verification.md +2 -0
- package/docs/examples/account/create-jwt.md +2 -0
- package/docs/examples/account/create-key.md +2 -0
- package/docs/examples/account/create-magic-url-token.md +2 -0
- package/docs/examples/account/create-mfa-authenticator.md +2 -0
- package/docs/examples/account/create-mfa-challenge.md +2 -0
- package/docs/examples/account/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/account/create-o-auth-2-session.md +2 -0
- package/docs/examples/account/create-o-auth-2-token.md +2 -0
- package/docs/examples/account/create-payment-method.md +2 -0
- package/docs/examples/account/create-phone-token.md +2 -0
- package/docs/examples/account/create-phone-verification.md +2 -0
- package/docs/examples/account/create-push-target.md +2 -0
- package/docs/examples/account/create-recovery.md +2 -0
- package/docs/examples/account/create-session.md +2 -0
- package/docs/examples/account/create-verification.md +2 -0
- package/docs/examples/account/create.md +2 -0
- package/docs/examples/account/delete-billing-address.md +2 -0
- package/docs/examples/account/delete-identity.md +2 -0
- package/docs/examples/account/delete-key.md +2 -0
- package/docs/examples/account/delete-mfa-authenticator.md +2 -0
- package/docs/examples/account/delete-payment-method.md +2 -0
- package/docs/examples/account/delete-push-target.md +2 -0
- package/docs/examples/account/delete-session.md +2 -0
- package/docs/examples/account/delete-sessions.md +2 -0
- package/docs/examples/account/delete.md +2 -0
- package/docs/examples/account/get-billing-address.md +2 -0
- package/docs/examples/account/get-coupon.md +2 -0
- package/docs/examples/account/get-key.md +2 -0
- package/docs/examples/account/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/account/get-payment-method.md +2 -0
- package/docs/examples/account/get-prefs.md +2 -0
- package/docs/examples/account/get-session.md +2 -0
- package/docs/examples/account/get.md +2 -0
- package/docs/examples/account/list-billing-addresses.md +2 -0
- package/docs/examples/account/list-identities.md +2 -0
- package/docs/examples/account/list-invoices.md +2 -0
- package/docs/examples/account/list-keys.md +2 -0
- package/docs/examples/account/list-logs.md +2 -0
- package/docs/examples/account/list-mfa-factors.md +2 -0
- package/docs/examples/account/list-payment-methods.md +2 -0
- package/docs/examples/account/list-sessions.md +2 -0
- package/docs/examples/account/update-billing-address.md +2 -0
- package/docs/examples/account/update-email-verification.md +2 -0
- package/docs/examples/account/update-email.md +2 -0
- package/docs/examples/account/update-key.md +2 -0
- package/docs/examples/account/update-magic-url-session.md +2 -0
- package/docs/examples/account/update-mfa-authenticator.md +2 -0
- package/docs/examples/account/update-mfa-challenge.md +2 -0
- package/docs/examples/account/update-mfa-recovery-codes.md +2 -0
- package/docs/examples/account/update-mfa.md +2 -0
- package/docs/examples/account/update-name.md +2 -0
- package/docs/examples/account/update-password.md +2 -0
- package/docs/examples/account/update-payment-method-mandate-options.md +2 -0
- package/docs/examples/account/update-payment-method-provider.md +2 -0
- package/docs/examples/account/update-payment-method.md +2 -0
- package/docs/examples/account/update-phone-session.md +2 -0
- package/docs/examples/account/update-phone-verification.md +2 -0
- package/docs/examples/account/update-phone.md +2 -0
- package/docs/examples/account/update-prefs.md +2 -0
- package/docs/examples/account/update-push-target.md +2 -0
- package/docs/examples/account/update-recovery.md +2 -0
- package/docs/examples/account/update-session.md +2 -0
- package/docs/examples/account/update-status.md +2 -0
- package/docs/examples/account/update-verification.md +2 -0
- package/docs/examples/activities/get-event.md +15 -0
- package/docs/examples/activities/list-events.md +15 -0
- package/docs/examples/assistant/chat.md +2 -0
- package/docs/examples/avatars/get-browser.md +2 -0
- package/docs/examples/avatars/get-credit-card.md +2 -0
- package/docs/examples/avatars/get-favicon.md +2 -0
- package/docs/examples/avatars/get-flag.md +2 -0
- package/docs/examples/avatars/get-image.md +2 -0
- package/docs/examples/avatars/get-initials.md +2 -0
- package/docs/examples/avatars/get-qr.md +2 -0
- package/docs/examples/avatars/get-screenshot.md +2 -0
- package/docs/examples/backups/create-archive.md +4 -2
- package/docs/examples/backups/create-policy.md +4 -2
- package/docs/examples/backups/create-restoration.md +4 -2
- package/docs/examples/backups/delete-archive.md +2 -0
- package/docs/examples/backups/delete-policy.md +2 -0
- package/docs/examples/backups/get-archive.md +2 -0
- package/docs/examples/backups/get-policy.md +2 -0
- package/docs/examples/backups/get-restoration.md +2 -0
- package/docs/examples/backups/list-archives.md +2 -0
- package/docs/examples/backups/list-policies.md +2 -0
- package/docs/examples/backups/list-restorations.md +2 -0
- package/docs/examples/backups/update-policy.md +2 -0
- package/docs/examples/console/create-program-membership.md +2 -0
- package/docs/examples/console/create-source.md +2 -0
- package/docs/examples/console/get-campaign.md +2 -0
- package/docs/examples/console/get-coupon.md +2 -0
- package/docs/examples/console/get-plan.md +2 -0
- package/docs/examples/console/get-plans.md +2 -0
- package/docs/examples/console/get-program.md +2 -0
- package/docs/examples/console/get-resource.md +2 -0
- package/docs/examples/console/list-regions.md +2 -0
- package/docs/examples/console/suggest-columns.md +2 -0
- package/docs/examples/console/suggest-indexes.md +2 -0
- package/docs/examples/console/variables.md +2 -0
- package/docs/examples/databases/create-boolean-attribute.md +2 -0
- package/docs/examples/databases/create-collection.md +2 -0
- package/docs/examples/databases/create-datetime-attribute.md +2 -0
- package/docs/examples/databases/create-document.md +2 -0
- package/docs/examples/databases/create-documents.md +2 -0
- package/docs/examples/databases/create-email-attribute.md +2 -0
- package/docs/examples/databases/create-enum-attribute.md +2 -0
- package/docs/examples/databases/create-float-attribute.md +2 -0
- package/docs/examples/databases/create-index.md +2 -0
- package/docs/examples/databases/create-integer-attribute.md +2 -0
- package/docs/examples/databases/create-ip-attribute.md +2 -0
- package/docs/examples/databases/create-line-attribute.md +2 -0
- package/docs/examples/databases/create-longtext-attribute.md +4 -1
- package/docs/examples/databases/create-mediumtext-attribute.md +4 -1
- package/docs/examples/databases/create-operations.md +2 -0
- package/docs/examples/databases/create-point-attribute.md +2 -0
- package/docs/examples/databases/create-polygon-attribute.md +2 -0
- package/docs/examples/databases/create-relationship-attribute.md +2 -0
- package/docs/examples/databases/create-string-attribute.md +2 -0
- package/docs/examples/databases/create-text-attribute.md +4 -1
- package/docs/examples/databases/create-transaction.md +2 -0
- package/docs/examples/databases/create-url-attribute.md +2 -0
- package/docs/examples/databases/create-varchar-attribute.md +4 -1
- package/docs/examples/databases/create.md +2 -0
- package/docs/examples/databases/decrement-document-attribute.md +2 -0
- package/docs/examples/databases/delete-attribute.md +2 -0
- package/docs/examples/databases/delete-collection.md +2 -0
- package/docs/examples/databases/delete-document.md +2 -0
- package/docs/examples/databases/delete-documents.md +2 -0
- package/docs/examples/databases/delete-index.md +2 -0
- package/docs/examples/databases/delete-transaction.md +2 -0
- package/docs/examples/databases/delete.md +2 -0
- package/docs/examples/databases/get-attribute.md +2 -0
- package/docs/examples/databases/get-collection-usage.md +2 -0
- package/docs/examples/databases/get-collection.md +2 -0
- package/docs/examples/databases/get-document.md +2 -0
- package/docs/examples/databases/get-index.md +2 -0
- package/docs/examples/databases/get-transaction.md +2 -0
- package/docs/examples/databases/get-usage.md +2 -0
- package/docs/examples/databases/get.md +2 -0
- package/docs/examples/databases/increment-document-attribute.md +2 -0
- package/docs/examples/databases/list-attributes.md +2 -0
- package/docs/examples/databases/list-collection-logs.md +2 -0
- package/docs/examples/databases/list-collections.md +2 -0
- package/docs/examples/databases/list-document-logs.md +2 -0
- package/docs/examples/databases/list-documents.md +2 -0
- package/docs/examples/databases/list-indexes.md +2 -0
- package/docs/examples/databases/list-logs.md +2 -0
- package/docs/examples/databases/list-transactions.md +2 -0
- package/docs/examples/databases/list-usage.md +2 -0
- package/docs/examples/databases/list.md +2 -0
- package/docs/examples/databases/update-boolean-attribute.md +2 -0
- package/docs/examples/databases/update-collection.md +2 -0
- package/docs/examples/databases/update-datetime-attribute.md +2 -0
- package/docs/examples/databases/update-document.md +2 -0
- package/docs/examples/databases/update-documents.md +2 -0
- package/docs/examples/databases/update-email-attribute.md +2 -0
- package/docs/examples/databases/update-enum-attribute.md +2 -0
- package/docs/examples/databases/update-float-attribute.md +2 -0
- package/docs/examples/databases/update-integer-attribute.md +2 -0
- package/docs/examples/databases/update-ip-attribute.md +2 -0
- package/docs/examples/databases/update-line-attribute.md +2 -0
- package/docs/examples/databases/update-longtext-attribute.md +2 -0
- package/docs/examples/databases/update-mediumtext-attribute.md +2 -0
- package/docs/examples/databases/update-point-attribute.md +2 -0
- package/docs/examples/databases/update-polygon-attribute.md +2 -0
- package/docs/examples/databases/update-relationship-attribute.md +2 -0
- package/docs/examples/databases/update-string-attribute.md +2 -0
- package/docs/examples/databases/update-text-attribute.md +2 -0
- package/docs/examples/databases/update-transaction.md +2 -0
- package/docs/examples/databases/update-url-attribute.md +2 -0
- package/docs/examples/databases/update-varchar-attribute.md +2 -0
- package/docs/examples/databases/update.md +2 -0
- package/docs/examples/databases/upsert-document.md +2 -0
- package/docs/examples/databases/upsert-documents.md +2 -0
- package/docs/examples/domains/create-preset-google-workspace.md +2 -0
- package/docs/examples/domains/create-preset-i-cloud.md +2 -0
- package/docs/examples/domains/create-preset-mailgun.md +2 -0
- package/docs/examples/domains/create-preset-outlook.md +2 -0
- package/docs/examples/domains/create-preset-proton-mail.md +2 -0
- package/docs/examples/domains/create-preset-zoho.md +2 -0
- package/docs/examples/domains/create-record-a.md +2 -0
- package/docs/examples/domains/create-record-aaaa.md +2 -0
- package/docs/examples/domains/create-record-alias.md +2 -0
- package/docs/examples/domains/create-record-caa.md +2 -0
- package/docs/examples/domains/create-record-cname.md +2 -0
- package/docs/examples/domains/create-record-https.md +2 -0
- package/docs/examples/domains/create-record-mx.md +2 -0
- package/docs/examples/domains/create-record-ns.md +2 -0
- package/docs/examples/domains/create-record-srv.md +2 -0
- package/docs/examples/domains/create-record-txt.md +2 -0
- package/docs/examples/domains/create.md +2 -0
- package/docs/examples/domains/delete-record.md +2 -0
- package/docs/examples/domains/delete.md +2 -0
- package/docs/examples/domains/get-preset-google-workspace.md +2 -0
- package/docs/examples/domains/get-preset-i-cloud.md +2 -0
- package/docs/examples/domains/get-preset-mailgun.md +2 -0
- package/docs/examples/domains/get-preset-outlook.md +2 -0
- package/docs/examples/domains/get-preset-proton-mail.md +2 -0
- package/docs/examples/domains/get-preset-zoho.md +2 -0
- package/docs/examples/domains/get-price.md +17 -0
- package/docs/examples/domains/get-record.md +2 -0
- package/docs/examples/domains/get-zone.md +2 -0
- package/docs/examples/domains/get.md +2 -0
- package/docs/examples/domains/list-records.md +2 -0
- package/docs/examples/domains/list-suggestions.md +2 -0
- package/docs/examples/domains/list.md +2 -0
- package/docs/examples/domains/update-nameservers.md +2 -0
- package/docs/examples/domains/update-record-a.md +2 -0
- package/docs/examples/domains/update-record-aaaa.md +2 -0
- package/docs/examples/domains/update-record-alias.md +2 -0
- package/docs/examples/domains/update-record-caa.md +2 -0
- package/docs/examples/domains/update-record-cname.md +2 -0
- package/docs/examples/domains/update-record-https.md +2 -0
- package/docs/examples/domains/update-record-mx.md +2 -0
- package/docs/examples/domains/update-record-ns.md +2 -0
- package/docs/examples/domains/update-record-srv.md +2 -0
- package/docs/examples/domains/update-record-txt.md +2 -0
- package/docs/examples/domains/update-team.md +2 -0
- package/docs/examples/domains/update-zone.md +2 -0
- package/docs/examples/functions/create-deployment.md +2 -0
- package/docs/examples/functions/create-duplicate-deployment.md +2 -0
- package/docs/examples/functions/create-execution.md +2 -0
- package/docs/examples/functions/create-template-deployment.md +2 -0
- package/docs/examples/functions/create-variable.md +2 -0
- package/docs/examples/functions/create-vcs-deployment.md +2 -0
- package/docs/examples/functions/create.md +2 -0
- package/docs/examples/functions/delete-deployment.md +2 -0
- package/docs/examples/functions/delete-execution.md +2 -0
- package/docs/examples/functions/delete-variable.md +2 -0
- package/docs/examples/functions/delete.md +2 -0
- package/docs/examples/functions/get-deployment-download.md +2 -0
- package/docs/examples/functions/get-deployment.md +2 -0
- package/docs/examples/functions/get-execution.md +2 -0
- package/docs/examples/functions/get-template.md +2 -0
- package/docs/examples/functions/get-usage.md +2 -0
- package/docs/examples/functions/get-variable.md +2 -0
- package/docs/examples/functions/get.md +2 -0
- package/docs/examples/functions/list-deployments.md +2 -0
- package/docs/examples/functions/list-executions.md +2 -0
- package/docs/examples/functions/list-runtimes.md +2 -0
- package/docs/examples/functions/list-specifications.md +2 -0
- package/docs/examples/functions/list-templates.md +2 -0
- package/docs/examples/functions/list-usage.md +2 -0
- package/docs/examples/functions/list-variables.md +2 -0
- package/docs/examples/functions/list.md +2 -0
- package/docs/examples/functions/update-deployment-status.md +2 -0
- package/docs/examples/functions/update-function-deployment.md +2 -0
- package/docs/examples/functions/update-variable.md +2 -0
- package/docs/examples/functions/update.md +2 -0
- package/docs/examples/graphql/mutation.md +2 -0
- package/docs/examples/graphql/query.md +2 -0
- package/docs/examples/health/get-antivirus.md +2 -0
- package/docs/examples/health/get-cache.md +2 -0
- package/docs/examples/health/get-certificate.md +2 -0
- package/docs/examples/health/get-db.md +2 -0
- package/docs/examples/health/get-failed-jobs.md +2 -0
- package/docs/examples/health/get-pub-sub.md +2 -0
- package/docs/examples/health/get-queue-audits.md +2 -0
- package/docs/examples/health/get-queue-billing-project-aggregation.md +2 -0
- package/docs/examples/health/get-queue-billing-team-aggregation.md +2 -0
- package/docs/examples/health/get-queue-builds.md +2 -0
- package/docs/examples/health/get-queue-certificates.md +2 -0
- package/docs/examples/health/get-queue-databases.md +2 -0
- package/docs/examples/health/get-queue-deletes.md +2 -0
- package/docs/examples/health/get-queue-functions.md +2 -0
- package/docs/examples/health/get-queue-logs.md +2 -0
- package/docs/examples/health/get-queue-mails.md +2 -0
- package/docs/examples/health/get-queue-messaging.md +2 -0
- package/docs/examples/health/get-queue-migrations.md +2 -0
- package/docs/examples/health/get-queue-priority-builds.md +2 -0
- package/docs/examples/health/get-queue-region-manager.md +2 -0
- package/docs/examples/health/get-queue-stats-resources.md +2 -0
- package/docs/examples/health/get-queue-threats.md +2 -0
- package/docs/examples/health/get-queue-usage.md +2 -0
- package/docs/examples/health/get-queue-webhooks.md +2 -0
- package/docs/examples/health/get-storage-local.md +2 -0
- package/docs/examples/health/get-storage.md +2 -0
- package/docs/examples/health/get-time.md +2 -0
- package/docs/examples/health/get.md +2 -0
- package/docs/examples/locale/get.md +2 -0
- package/docs/examples/locale/list-codes.md +2 -0
- package/docs/examples/locale/list-continents.md +2 -0
- package/docs/examples/locale/list-countries-eu.md +2 -0
- package/docs/examples/locale/list-countries-phones.md +2 -0
- package/docs/examples/locale/list-countries.md +2 -0
- package/docs/examples/locale/list-currencies.md +2 -0
- package/docs/examples/locale/list-languages.md +2 -0
- package/docs/examples/messaging/create-apns-provider.md +2 -0
- package/docs/examples/messaging/create-email.md +2 -0
- package/docs/examples/messaging/create-fcm-provider.md +2 -0
- package/docs/examples/messaging/create-mailgun-provider.md +2 -0
- package/docs/examples/messaging/create-msg-91-provider.md +2 -0
- package/docs/examples/messaging/create-push.md +2 -0
- package/docs/examples/messaging/create-resend-provider.md +2 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +2 -0
- package/docs/examples/messaging/create-sms.md +2 -0
- package/docs/examples/messaging/create-smtp-provider.md +2 -0
- package/docs/examples/messaging/create-subscriber.md +2 -0
- package/docs/examples/messaging/create-telesign-provider.md +2 -0
- package/docs/examples/messaging/create-textmagic-provider.md +2 -0
- package/docs/examples/messaging/create-topic.md +2 -0
- package/docs/examples/messaging/create-twilio-provider.md +2 -0
- package/docs/examples/messaging/create-vonage-provider.md +2 -0
- package/docs/examples/messaging/delete-provider.md +2 -0
- package/docs/examples/messaging/delete-subscriber.md +2 -0
- package/docs/examples/messaging/delete-topic.md +2 -0
- package/docs/examples/messaging/delete.md +2 -0
- package/docs/examples/messaging/get-message.md +2 -0
- package/docs/examples/messaging/get-provider.md +2 -0
- package/docs/examples/messaging/get-subscriber.md +2 -0
- package/docs/examples/messaging/get-topic.md +2 -0
- package/docs/examples/messaging/list-message-logs.md +2 -0
- package/docs/examples/messaging/list-messages.md +2 -0
- package/docs/examples/messaging/list-provider-logs.md +2 -0
- package/docs/examples/messaging/list-providers.md +2 -0
- package/docs/examples/messaging/list-subscriber-logs.md +2 -0
- package/docs/examples/messaging/list-subscribers.md +2 -0
- package/docs/examples/messaging/list-targets.md +2 -0
- package/docs/examples/messaging/list-topic-logs.md +2 -0
- package/docs/examples/messaging/list-topics.md +2 -0
- package/docs/examples/messaging/update-apns-provider.md +2 -0
- package/docs/examples/messaging/update-email.md +2 -0
- package/docs/examples/messaging/update-fcm-provider.md +2 -0
- package/docs/examples/messaging/update-mailgun-provider.md +2 -0
- package/docs/examples/messaging/update-msg-91-provider.md +2 -0
- package/docs/examples/messaging/update-push.md +2 -0
- package/docs/examples/messaging/update-resend-provider.md +2 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +2 -0
- package/docs/examples/messaging/update-sms.md +2 -0
- package/docs/examples/messaging/update-smtp-provider.md +2 -0
- package/docs/examples/messaging/update-telesign-provider.md +2 -0
- package/docs/examples/messaging/update-textmagic-provider.md +2 -0
- package/docs/examples/messaging/update-topic.md +2 -0
- package/docs/examples/messaging/update-twilio-provider.md +2 -0
- package/docs/examples/messaging/update-vonage-provider.md +2 -0
- package/docs/examples/migrations/create-appwrite-migration.md +2 -0
- package/docs/examples/migrations/create-csv-export.md +2 -0
- package/docs/examples/migrations/create-csv-import.md +2 -0
- package/docs/examples/migrations/create-firebase-migration.md +2 -0
- package/docs/examples/migrations/create-n-host-migration.md +2 -0
- package/docs/examples/migrations/create-supabase-migration.md +2 -0
- package/docs/examples/migrations/delete.md +2 -0
- package/docs/examples/migrations/get-appwrite-report.md +2 -0
- package/docs/examples/migrations/get-firebase-report.md +2 -0
- package/docs/examples/migrations/get-n-host-report.md +2 -0
- package/docs/examples/migrations/get-supabase-report.md +2 -0
- package/docs/examples/migrations/get.md +2 -0
- package/docs/examples/migrations/list.md +2 -0
- package/docs/examples/migrations/retry.md +2 -0
- package/docs/examples/organizations/add-credit.md +2 -0
- package/docs/examples/organizations/cancel-downgrade.md +2 -0
- package/docs/examples/organizations/create-downgrade-feedback.md +2 -0
- package/docs/examples/organizations/create-invoice-payment.md +2 -0
- package/docs/examples/organizations/create-key.md +2 -0
- package/docs/examples/organizations/create.md +2 -0
- package/docs/examples/organizations/delete-backup-payment-method.md +2 -0
- package/docs/examples/organizations/delete-billing-address.md +2 -0
- package/docs/examples/organizations/delete-default-payment-method.md +2 -0
- package/docs/examples/organizations/delete-key.md +2 -0
- package/docs/examples/organizations/delete.md +2 -0
- package/docs/examples/organizations/estimation-create-organization.md +2 -0
- package/docs/examples/organizations/estimation-delete-organization.md +2 -0
- package/docs/examples/organizations/estimation-update-plan.md +2 -0
- package/docs/examples/organizations/get-aggregation.md +2 -0
- package/docs/examples/organizations/get-available-credits.md +2 -0
- package/docs/examples/organizations/get-billing-address.md +2 -0
- package/docs/examples/organizations/get-credit.md +2 -0
- package/docs/examples/organizations/get-invoice-download.md +2 -0
- package/docs/examples/organizations/get-invoice-view.md +2 -0
- package/docs/examples/organizations/get-invoice.md +2 -0
- package/docs/examples/organizations/get-key.md +2 -0
- package/docs/examples/organizations/get-payment-method.md +2 -0
- package/docs/examples/organizations/get-plan.md +2 -0
- package/docs/examples/organizations/get-scopes.md +2 -0
- package/docs/examples/organizations/get-usage.md +2 -0
- package/docs/examples/organizations/list-aggregations.md +2 -0
- package/docs/examples/organizations/list-credits.md +2 -0
- package/docs/examples/organizations/list-invoices.md +2 -0
- package/docs/examples/organizations/list-keys.md +2 -0
- package/docs/examples/organizations/list-regions.md +2 -0
- package/docs/examples/organizations/list.md +2 -0
- package/docs/examples/organizations/set-backup-payment-method.md +2 -0
- package/docs/examples/organizations/set-billing-address.md +2 -0
- package/docs/examples/organizations/set-billing-email.md +2 -0
- package/docs/examples/organizations/set-billing-tax-id.md +2 -0
- package/docs/examples/organizations/set-default-payment-method.md +2 -0
- package/docs/examples/organizations/update-budget.md +2 -0
- package/docs/examples/organizations/update-key.md +2 -0
- package/docs/examples/organizations/update-plan.md +2 -0
- package/docs/examples/organizations/validate-invoice.md +2 -0
- package/docs/examples/organizations/validate-payment.md +2 -0
- package/docs/examples/project/create-variable.md +2 -0
- package/docs/examples/project/delete-variable.md +2 -0
- package/docs/examples/project/get-usage.md +2 -0
- package/docs/examples/project/get-variable.md +2 -0
- package/docs/examples/project/list-variables.md +2 -0
- package/docs/examples/project/update-variable.md +2 -0
- package/docs/examples/projects/create-dev-key.md +2 -0
- package/docs/examples/projects/create-jwt.md +2 -0
- package/docs/examples/projects/create-key.md +3 -0
- package/docs/examples/projects/create-platform.md +2 -0
- package/docs/examples/projects/create-smtp-test.md +2 -0
- package/docs/examples/projects/create-webhook.md +2 -0
- package/docs/examples/projects/create.md +2 -0
- package/docs/examples/projects/delete-dev-key.md +2 -0
- package/docs/examples/projects/delete-email-template.md +2 -0
- package/docs/examples/projects/delete-key.md +2 -0
- package/docs/examples/projects/delete-platform.md +2 -0
- package/docs/examples/projects/delete-sms-template.md +2 -0
- package/docs/examples/projects/delete-webhook.md +2 -0
- package/docs/examples/projects/delete.md +2 -0
- package/docs/examples/projects/get-dev-key.md +2 -0
- package/docs/examples/projects/get-email-template.md +2 -0
- package/docs/examples/projects/get-key.md +2 -0
- package/docs/examples/projects/get-platform.md +2 -0
- package/docs/examples/projects/get-sms-template.md +2 -0
- package/docs/examples/projects/get-webhook.md +2 -0
- package/docs/examples/projects/get.md +2 -0
- package/docs/examples/projects/list-dev-keys.md +2 -0
- package/docs/examples/projects/list-keys.md +3 -0
- package/docs/examples/projects/list-platforms.md +2 -0
- package/docs/examples/projects/list-webhooks.md +2 -0
- package/docs/examples/projects/list.md +2 -0
- package/docs/examples/projects/update-api-status-all.md +2 -0
- package/docs/examples/projects/update-api-status.md +2 -0
- package/docs/examples/projects/update-auth-duration.md +2 -0
- package/docs/examples/projects/update-auth-limit.md +2 -0
- package/docs/examples/projects/update-auth-password-dictionary.md +2 -0
- package/docs/examples/projects/update-auth-password-history.md +2 -0
- package/docs/examples/projects/update-auth-sessions-limit.md +2 -0
- package/docs/examples/projects/update-auth-status.md +2 -0
- package/docs/examples/projects/update-dev-key.md +2 -0
- package/docs/examples/projects/update-email-template.md +2 -0
- package/docs/examples/projects/update-key.md +2 -0
- package/docs/examples/projects/update-labels.md +2 -0
- package/docs/examples/projects/update-memberships-privacy.md +2 -0
- package/docs/examples/projects/update-mock-numbers.md +2 -0
- package/docs/examples/projects/update-o-auth-2.md +2 -0
- package/docs/examples/projects/update-personal-data-check.md +2 -0
- package/docs/examples/projects/update-platform.md +2 -0
- package/docs/examples/projects/update-service-status-all.md +2 -0
- package/docs/examples/projects/update-service-status.md +2 -0
- package/docs/examples/projects/update-session-alerts.md +2 -0
- package/docs/examples/projects/update-session-invalidation.md +2 -0
- package/docs/examples/projects/update-sms-template.md +2 -0
- package/docs/examples/projects/update-smtp.md +2 -0
- package/docs/examples/projects/update-team.md +2 -0
- package/docs/examples/projects/update-webhook-signature.md +2 -0
- package/docs/examples/projects/update-webhook.md +2 -0
- package/docs/examples/projects/update.md +2 -0
- package/docs/examples/proxy/create-api-rule.md +2 -0
- package/docs/examples/proxy/create-function-rule.md +2 -0
- package/docs/examples/proxy/create-redirect-rule.md +2 -0
- package/docs/examples/proxy/create-site-rule.md +2 -0
- package/docs/examples/proxy/delete-rule.md +2 -0
- package/docs/examples/proxy/get-rule.md +2 -0
- package/docs/examples/proxy/list-rules.md +2 -0
- package/docs/examples/proxy/update-rule-verification.md +2 -0
- package/docs/examples/sites/create-deployment.md +2 -0
- package/docs/examples/sites/create-duplicate-deployment.md +2 -0
- package/docs/examples/sites/create-template-deployment.md +2 -0
- package/docs/examples/sites/create-variable.md +2 -0
- package/docs/examples/sites/create-vcs-deployment.md +2 -0
- package/docs/examples/sites/create.md +2 -0
- package/docs/examples/sites/delete-deployment.md +2 -0
- package/docs/examples/sites/delete-log.md +2 -0
- package/docs/examples/sites/delete-variable.md +2 -0
- package/docs/examples/sites/delete.md +2 -0
- package/docs/examples/sites/get-deployment-download.md +2 -0
- package/docs/examples/sites/get-deployment.md +2 -0
- package/docs/examples/sites/get-log.md +2 -0
- package/docs/examples/sites/get-template.md +2 -0
- package/docs/examples/sites/get-usage.md +2 -0
- package/docs/examples/sites/get-variable.md +2 -0
- package/docs/examples/sites/get.md +2 -0
- package/docs/examples/sites/list-deployments.md +2 -0
- package/docs/examples/sites/list-frameworks.md +2 -0
- package/docs/examples/sites/list-logs.md +2 -0
- package/docs/examples/sites/list-specifications.md +2 -0
- package/docs/examples/sites/list-templates.md +2 -0
- package/docs/examples/sites/list-usage.md +2 -0
- package/docs/examples/sites/list-variables.md +2 -0
- package/docs/examples/sites/list.md +2 -0
- package/docs/examples/sites/update-deployment-status.md +2 -0
- package/docs/examples/sites/update-site-deployment.md +2 -0
- package/docs/examples/sites/update-variable.md +2 -0
- package/docs/examples/sites/update.md +2 -0
- package/docs/examples/storage/create-bucket.md +2 -0
- package/docs/examples/storage/create-file.md +2 -0
- package/docs/examples/storage/delete-bucket.md +2 -0
- package/docs/examples/storage/delete-file.md +2 -0
- package/docs/examples/storage/get-bucket-usage.md +2 -0
- package/docs/examples/storage/get-bucket.md +2 -0
- package/docs/examples/storage/get-file-download.md +2 -0
- package/docs/examples/storage/get-file-preview.md +2 -0
- package/docs/examples/storage/get-file-view.md +2 -0
- package/docs/examples/storage/get-file.md +2 -0
- package/docs/examples/storage/get-usage.md +2 -0
- package/docs/examples/storage/list-buckets.md +2 -0
- package/docs/examples/storage/list-files.md +2 -0
- package/docs/examples/storage/update-bucket.md +2 -0
- package/docs/examples/storage/update-file.md +2 -0
- package/docs/examples/tablesdb/create-boolean-column.md +2 -0
- package/docs/examples/tablesdb/create-datetime-column.md +2 -0
- package/docs/examples/tablesdb/create-email-column.md +2 -0
- package/docs/examples/tablesdb/create-enum-column.md +2 -0
- package/docs/examples/tablesdb/create-float-column.md +2 -0
- package/docs/examples/tablesdb/create-index.md +2 -0
- package/docs/examples/tablesdb/create-integer-column.md +2 -0
- package/docs/examples/tablesdb/create-ip-column.md +2 -0
- package/docs/examples/tablesdb/create-line-column.md +2 -0
- package/docs/examples/tablesdb/create-longtext-column.md +4 -1
- package/docs/examples/tablesdb/create-mediumtext-column.md +4 -1
- package/docs/examples/tablesdb/create-operations.md +2 -0
- package/docs/examples/tablesdb/create-point-column.md +2 -0
- package/docs/examples/tablesdb/create-polygon-column.md +2 -0
- package/docs/examples/tablesdb/create-relationship-column.md +2 -0
- package/docs/examples/tablesdb/create-row.md +2 -0
- package/docs/examples/tablesdb/create-rows.md +2 -0
- package/docs/examples/tablesdb/create-string-column.md +2 -0
- package/docs/examples/tablesdb/create-table.md +2 -0
- package/docs/examples/tablesdb/create-text-column.md +4 -1
- package/docs/examples/tablesdb/create-transaction.md +2 -0
- package/docs/examples/tablesdb/create-url-column.md +2 -0
- package/docs/examples/tablesdb/create-varchar-column.md +4 -1
- package/docs/examples/tablesdb/create.md +2 -0
- package/docs/examples/tablesdb/decrement-row-column.md +2 -0
- package/docs/examples/tablesdb/delete-column.md +2 -0
- package/docs/examples/tablesdb/delete-index.md +2 -0
- package/docs/examples/tablesdb/delete-row.md +2 -0
- package/docs/examples/tablesdb/delete-rows.md +2 -0
- package/docs/examples/tablesdb/delete-table.md +2 -0
- package/docs/examples/tablesdb/delete-transaction.md +2 -0
- package/docs/examples/tablesdb/delete.md +2 -0
- package/docs/examples/tablesdb/get-column.md +2 -0
- package/docs/examples/tablesdb/get-index.md +2 -0
- package/docs/examples/tablesdb/get-row.md +2 -0
- package/docs/examples/tablesdb/get-table-usage.md +2 -0
- package/docs/examples/tablesdb/get-table.md +2 -0
- package/docs/examples/tablesdb/get-transaction.md +2 -0
- package/docs/examples/tablesdb/get-usage.md +2 -0
- package/docs/examples/tablesdb/get.md +2 -0
- package/docs/examples/tablesdb/increment-row-column.md +2 -0
- package/docs/examples/tablesdb/list-columns.md +2 -0
- package/docs/examples/tablesdb/list-indexes.md +2 -0
- package/docs/examples/tablesdb/list-row-logs.md +2 -0
- package/docs/examples/tablesdb/list-rows.md +2 -0
- package/docs/examples/tablesdb/list-table-logs.md +2 -0
- package/docs/examples/tablesdb/list-tables.md +2 -0
- package/docs/examples/tablesdb/list-transactions.md +2 -0
- package/docs/examples/tablesdb/list-usage.md +2 -0
- package/docs/examples/tablesdb/list.md +2 -0
- package/docs/examples/tablesdb/update-boolean-column.md +2 -0
- package/docs/examples/tablesdb/update-datetime-column.md +2 -0
- package/docs/examples/tablesdb/update-email-column.md +2 -0
- package/docs/examples/tablesdb/update-enum-column.md +2 -0
- package/docs/examples/tablesdb/update-float-column.md +2 -0
- package/docs/examples/tablesdb/update-integer-column.md +2 -0
- package/docs/examples/tablesdb/update-ip-column.md +2 -0
- package/docs/examples/tablesdb/update-line-column.md +2 -0
- package/docs/examples/tablesdb/update-longtext-column.md +2 -0
- package/docs/examples/tablesdb/update-mediumtext-column.md +2 -0
- package/docs/examples/tablesdb/update-point-column.md +2 -0
- package/docs/examples/tablesdb/update-polygon-column.md +2 -0
- package/docs/examples/tablesdb/update-relationship-column.md +2 -0
- package/docs/examples/tablesdb/update-row.md +2 -0
- package/docs/examples/tablesdb/update-rows.md +2 -0
- package/docs/examples/tablesdb/update-string-column.md +2 -0
- package/docs/examples/tablesdb/update-table.md +2 -0
- package/docs/examples/tablesdb/update-text-column.md +2 -0
- package/docs/examples/tablesdb/update-transaction.md +2 -0
- package/docs/examples/tablesdb/update-url-column.md +2 -0
- package/docs/examples/tablesdb/update-varchar-column.md +2 -0
- package/docs/examples/tablesdb/update.md +2 -0
- package/docs/examples/tablesdb/upsert-row.md +2 -0
- package/docs/examples/tablesdb/upsert-rows.md +2 -0
- package/docs/examples/teams/create-membership.md +4 -2
- package/docs/examples/teams/create.md +2 -0
- package/docs/examples/teams/delete-membership.md +2 -0
- package/docs/examples/teams/delete.md +2 -0
- package/docs/examples/teams/get-membership.md +2 -0
- package/docs/examples/teams/get-prefs.md +2 -0
- package/docs/examples/teams/get.md +2 -0
- package/docs/examples/teams/list-logs.md +2 -0
- package/docs/examples/teams/list-memberships.md +2 -0
- package/docs/examples/teams/list.md +2 -0
- package/docs/examples/teams/update-membership-status.md +2 -0
- package/docs/examples/teams/update-membership.md +4 -2
- package/docs/examples/teams/update-name.md +2 -0
- package/docs/examples/teams/update-prefs.md +2 -0
- package/docs/examples/tokens/create-file-token.md +2 -0
- package/docs/examples/tokens/delete.md +2 -0
- package/docs/examples/tokens/get.md +2 -0
- package/docs/examples/tokens/list.md +2 -0
- package/docs/examples/tokens/update.md +2 -0
- package/docs/examples/users/create-argon-2-user.md +2 -0
- package/docs/examples/users/create-bcrypt-user.md +2 -0
- package/docs/examples/users/create-jwt.md +2 -0
- package/docs/examples/users/create-md-5-user.md +2 -0
- package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/create-ph-pass-user.md +2 -0
- package/docs/examples/users/create-scrypt-modified-user.md +2 -0
- package/docs/examples/users/create-scrypt-user.md +2 -0
- package/docs/examples/users/create-session.md +2 -0
- package/docs/examples/users/create-sha-user.md +2 -0
- package/docs/examples/users/create-target.md +2 -0
- package/docs/examples/users/create-token.md +2 -0
- package/docs/examples/users/create.md +2 -0
- package/docs/examples/users/delete-identity.md +2 -0
- package/docs/examples/users/delete-mfa-authenticator.md +2 -0
- package/docs/examples/users/delete-session.md +2 -0
- package/docs/examples/users/delete-sessions.md +2 -0
- package/docs/examples/users/delete-target.md +2 -0
- package/docs/examples/users/delete.md +2 -0
- package/docs/examples/users/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/get-prefs.md +2 -0
- package/docs/examples/users/get-target.md +2 -0
- package/docs/examples/users/get-usage.md +2 -0
- package/docs/examples/users/get.md +2 -0
- package/docs/examples/users/list-identities.md +2 -0
- package/docs/examples/users/list-logs.md +2 -0
- package/docs/examples/users/list-memberships.md +2 -0
- package/docs/examples/users/list-mfa-factors.md +2 -0
- package/docs/examples/users/list-sessions.md +2 -0
- package/docs/examples/users/list-targets.md +2 -0
- package/docs/examples/users/list.md +2 -0
- package/docs/examples/users/update-email-verification.md +2 -0
- package/docs/examples/users/update-email.md +2 -0
- package/docs/examples/users/update-labels.md +2 -0
- package/docs/examples/users/update-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/update-mfa.md +2 -0
- package/docs/examples/users/update-name.md +2 -0
- package/docs/examples/users/update-password.md +2 -0
- package/docs/examples/users/update-phone-verification.md +2 -0
- package/docs/examples/users/update-phone.md +2 -0
- package/docs/examples/users/update-prefs.md +2 -0
- package/docs/examples/users/update-status.md +2 -0
- package/docs/examples/users/update-target.md +2 -0
- package/docs/examples/vcs/create-repository-detection.md +2 -0
- package/docs/examples/vcs/create-repository.md +2 -0
- package/docs/examples/vcs/delete-installation.md +2 -0
- package/docs/examples/vcs/get-installation.md +2 -0
- package/docs/examples/vcs/get-repository-contents.md +2 -0
- package/docs/examples/vcs/get-repository.md +2 -0
- package/docs/examples/vcs/list-installations.md +2 -0
- package/docs/examples/vcs/list-repositories.md +2 -0
- package/docs/examples/vcs/list-repository-branches.md +2 -0
- package/docs/examples/vcs/update-external-deployments.md +2 -0
- package/package.json +1 -1
- package/src/channel.ts +30 -18
- package/src/client.ts +108 -22
- package/src/enums/{services.ts → backup-services.ts} +1 -1
- package/src/enums/build-runtime.ts +2 -0
- package/src/enums/registration-type.ts +6 -0
- package/src/enums/runtime.ts +2 -0
- package/src/enums/runtimes.ts +2 -0
- package/src/enums/scopes.ts +1 -0
- package/src/index.ts +3 -3
- package/src/models.ts +227 -5
- package/src/services/account.ts +11 -11
- package/src/services/activities.ts +116 -0
- package/src/services/avatars.ts +3 -3
- package/src/services/backups.ts +28 -28
- package/src/services/console.ts +1 -1
- package/src/services/databases.ts +57 -29
- package/src/services/domains.ts +70 -0
- package/src/services/functions.ts +2 -2
- package/src/services/graphql.ts +2 -2
- package/src/services/health.ts +1 -1
- package/src/services/migrations.ts +10 -10
- package/src/services/organizations.ts +0 -60
- package/src/services/projects.ts +28 -78
- package/src/services/realtime.ts +135 -58
- package/src/services/sites.ts +2 -2
- package/src/services/storage.ts +1 -1
- package/src/services/tables-db.ts +57 -29
- package/src/services/teams.ts +18 -19
- package/src/services/users.ts +1 -1
- package/types/channel.d.ts +4 -3
- package/types/client.d.ts +7 -2
- package/types/enums/{services.d.ts → backup-services.d.ts} +1 -1
- package/types/enums/build-runtime.d.ts +3 -1
- package/types/enums/registration-type.d.ts +6 -0
- package/types/enums/runtime.d.ts +3 -1
- package/types/enums/runtimes.d.ts +3 -1
- package/types/enums/scopes.d.ts +2 -1
- package/types/index.d.ts +3 -3
- package/types/models.d.ts +224 -5
- package/types/services/activities.d.ts +46 -0
- package/types/services/backups.d.ts +13 -13
- package/types/services/databases.d.ts +16 -4
- package/types/services/domains.d.ts +26 -0
- package/types/services/migrations.d.ts +2 -2
- package/types/services/organizations.d.ts +0 -22
- package/types/services/projects.d.ts +8 -25
- package/types/services/realtime.d.ts +13 -6
- package/types/services/tables-db.d.ts +16 -4
- package/types/services/teams.d.ts +8 -9
- package/docs/examples/organizations/update-projects.md +0 -14
- package/docs/examples/projects/update-status.md +0 -14
- package/src/enums/roles.ts +0 -7
- package/src/enums/status.ts +0 -4
- package/types/enums/roles.d.ts +0 -7
- package/types/enums/status.d.ts +0 -4
package/src/services/backups.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { BackupServices } from '../enums/backup-services';
|
|
6
6
|
|
|
7
7
|
export class Backups {
|
|
8
8
|
client: Client;
|
|
@@ -65,33 +65,33 @@ export class Backups {
|
|
|
65
65
|
/**
|
|
66
66
|
* Create a new archive asynchronously for a project.
|
|
67
67
|
*
|
|
68
|
-
* @param {
|
|
68
|
+
* @param {BackupServices[]} params.services - Array of services to backup
|
|
69
69
|
* @param {string} params.resourceId - Resource ID. When set, only this single resource will be backed up.
|
|
70
70
|
* @throws {AppwriteException}
|
|
71
71
|
* @returns {Promise<Models.BackupArchive>}
|
|
72
72
|
*/
|
|
73
|
-
createArchive(params: { services:
|
|
73
|
+
createArchive(params: { services: BackupServices[], resourceId?: string }): Promise<Models.BackupArchive>;
|
|
74
74
|
/**
|
|
75
75
|
* Create a new archive asynchronously for a project.
|
|
76
76
|
*
|
|
77
|
-
* @param {
|
|
77
|
+
* @param {BackupServices[]} services - Array of services to backup
|
|
78
78
|
* @param {string} resourceId - Resource ID. When set, only this single resource will be backed up.
|
|
79
79
|
* @throws {AppwriteException}
|
|
80
80
|
* @returns {Promise<Models.BackupArchive>}
|
|
81
81
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
82
82
|
*/
|
|
83
|
-
createArchive(services:
|
|
83
|
+
createArchive(services: BackupServices[], resourceId?: string): Promise<Models.BackupArchive>;
|
|
84
84
|
createArchive(
|
|
85
|
-
paramsOrFirst: { services:
|
|
85
|
+
paramsOrFirst: { services: BackupServices[], resourceId?: string } | BackupServices[],
|
|
86
86
|
...rest: [(string)?]
|
|
87
87
|
): Promise<Models.BackupArchive> {
|
|
88
|
-
let params: { services:
|
|
88
|
+
let params: { services: BackupServices[], resourceId?: string };
|
|
89
89
|
|
|
90
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'services' in paramsOrFirst)) {
|
|
91
|
-
params = (paramsOrFirst || {}) as { services:
|
|
90
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('services' in paramsOrFirst || 'resourceId' in paramsOrFirst))) {
|
|
91
|
+
params = (paramsOrFirst || {}) as { services: BackupServices[], resourceId?: string };
|
|
92
92
|
} else {
|
|
93
93
|
params = {
|
|
94
|
-
services: paramsOrFirst as
|
|
94
|
+
services: paramsOrFirst as BackupServices[],
|
|
95
95
|
resourceId: rest[0] as string
|
|
96
96
|
};
|
|
97
97
|
}
|
|
@@ -283,7 +283,7 @@ export class Backups {
|
|
|
283
283
|
* Create a new backup policy.
|
|
284
284
|
*
|
|
285
285
|
* @param {string} params.policyId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
286
|
-
* @param {
|
|
286
|
+
* @param {BackupServices[]} params.services - Array of services to backup
|
|
287
287
|
* @param {number} params.retention - Days to keep backups before deletion
|
|
288
288
|
* @param {string} params.schedule - Schedule CRON syntax.
|
|
289
289
|
* @param {string} params.name - Policy name. Max length: 128 chars.
|
|
@@ -292,12 +292,12 @@ export class Backups {
|
|
|
292
292
|
* @throws {AppwriteException}
|
|
293
293
|
* @returns {Promise<Models.BackupPolicy>}
|
|
294
294
|
*/
|
|
295
|
-
createPolicy(params: { policyId: string, services:
|
|
295
|
+
createPolicy(params: { policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean }): Promise<Models.BackupPolicy>;
|
|
296
296
|
/**
|
|
297
297
|
* Create a new backup policy.
|
|
298
298
|
*
|
|
299
299
|
* @param {string} policyId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
300
|
-
* @param {
|
|
300
|
+
* @param {BackupServices[]} services - Array of services to backup
|
|
301
301
|
* @param {number} retention - Days to keep backups before deletion
|
|
302
302
|
* @param {string} schedule - Schedule CRON syntax.
|
|
303
303
|
* @param {string} name - Policy name. Max length: 128 chars.
|
|
@@ -307,19 +307,19 @@ export class Backups {
|
|
|
307
307
|
* @returns {Promise<Models.BackupPolicy>}
|
|
308
308
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
309
309
|
*/
|
|
310
|
-
createPolicy(policyId: string, services:
|
|
310
|
+
createPolicy(policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean): Promise<Models.BackupPolicy>;
|
|
311
311
|
createPolicy(
|
|
312
|
-
paramsOrFirst: { policyId: string, services:
|
|
313
|
-
...rest: [(
|
|
312
|
+
paramsOrFirst: { policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean } | string,
|
|
313
|
+
...rest: [(BackupServices[])?, (number)?, (string)?, (string)?, (string)?, (boolean)?]
|
|
314
314
|
): Promise<Models.BackupPolicy> {
|
|
315
|
-
let params: { policyId: string, services:
|
|
315
|
+
let params: { policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean };
|
|
316
316
|
|
|
317
317
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
318
|
-
params = (paramsOrFirst || {}) as { policyId: string, services:
|
|
318
|
+
params = (paramsOrFirst || {}) as { policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean };
|
|
319
319
|
} else {
|
|
320
320
|
params = {
|
|
321
321
|
policyId: paramsOrFirst as string,
|
|
322
|
-
services: rest[0] as
|
|
322
|
+
services: rest[0] as BackupServices[],
|
|
323
323
|
retention: rest[1] as number,
|
|
324
324
|
schedule: rest[2] as string,
|
|
325
325
|
name: rest[3] as string,
|
|
@@ -574,37 +574,37 @@ export class Backups {
|
|
|
574
574
|
* Create and trigger a new restoration for a backup on a project.
|
|
575
575
|
*
|
|
576
576
|
* @param {string} params.archiveId - Backup archive ID to restore
|
|
577
|
-
* @param {
|
|
577
|
+
* @param {BackupServices[]} params.services - Array of services to restore
|
|
578
578
|
* @param {string} params.newResourceId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
579
579
|
* @param {string} params.newResourceName - Database name. Max length: 128 chars.
|
|
580
580
|
* @throws {AppwriteException}
|
|
581
581
|
* @returns {Promise<Models.BackupRestoration>}
|
|
582
582
|
*/
|
|
583
|
-
createRestoration(params: { archiveId: string, services:
|
|
583
|
+
createRestoration(params: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string }): Promise<Models.BackupRestoration>;
|
|
584
584
|
/**
|
|
585
585
|
* Create and trigger a new restoration for a backup on a project.
|
|
586
586
|
*
|
|
587
587
|
* @param {string} archiveId - Backup archive ID to restore
|
|
588
|
-
* @param {
|
|
588
|
+
* @param {BackupServices[]} services - Array of services to restore
|
|
589
589
|
* @param {string} newResourceId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
590
590
|
* @param {string} newResourceName - Database name. Max length: 128 chars.
|
|
591
591
|
* @throws {AppwriteException}
|
|
592
592
|
* @returns {Promise<Models.BackupRestoration>}
|
|
593
593
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
594
594
|
*/
|
|
595
|
-
createRestoration(archiveId: string, services:
|
|
595
|
+
createRestoration(archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string): Promise<Models.BackupRestoration>;
|
|
596
596
|
createRestoration(
|
|
597
|
-
paramsOrFirst: { archiveId: string, services:
|
|
598
|
-
...rest: [(
|
|
597
|
+
paramsOrFirst: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string } | string,
|
|
598
|
+
...rest: [(BackupServices[])?, (string)?, (string)?]
|
|
599
599
|
): Promise<Models.BackupRestoration> {
|
|
600
|
-
let params: { archiveId: string, services:
|
|
600
|
+
let params: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string };
|
|
601
601
|
|
|
602
602
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
603
|
-
params = (paramsOrFirst || {}) as { archiveId: string, services:
|
|
603
|
+
params = (paramsOrFirst || {}) as { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string };
|
|
604
604
|
} else {
|
|
605
605
|
params = {
|
|
606
606
|
archiveId: paramsOrFirst as string,
|
|
607
|
-
services: rest[0] as
|
|
607
|
+
services: rest[0] as BackupServices[],
|
|
608
608
|
newResourceId: rest[1] as string,
|
|
609
609
|
newResourceName: rest[2] as string
|
|
610
610
|
};
|
package/src/services/console.ts
CHANGED
|
@@ -136,7 +136,7 @@ export class Console {
|
|
|
136
136
|
): Promise<Models.BillingPlanList> {
|
|
137
137
|
let params: { platform?: Platform };
|
|
138
138
|
|
|
139
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'platform' in paramsOrFirst)) {
|
|
139
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('platform' in paramsOrFirst))) {
|
|
140
140
|
params = (paramsOrFirst || {}) as { platform?: Platform };
|
|
141
141
|
} else {
|
|
142
142
|
params = {
|
|
@@ -514,7 +514,7 @@ export class Databases {
|
|
|
514
514
|
): Promise<Models.UsageDatabases> {
|
|
515
515
|
let params: { range?: UsageRange };
|
|
516
516
|
|
|
517
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
517
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
518
518
|
params = (paramsOrFirst || {}) as { range?: UsageRange };
|
|
519
519
|
} else {
|
|
520
520
|
params = {
|
|
@@ -2801,10 +2801,11 @@ export class Databases {
|
|
|
2801
2801
|
* @param {boolean} params.required - Is attribute required?
|
|
2802
2802
|
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2803
2803
|
* @param {boolean} params.array - Is attribute an array?
|
|
2804
|
+
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
2804
2805
|
* @throws {AppwriteException}
|
|
2805
2806
|
* @returns {Promise<Models.AttributeLongtext>}
|
|
2806
2807
|
*/
|
|
2807
|
-
createLongtextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.AttributeLongtext>;
|
|
2808
|
+
createLongtextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.AttributeLongtext>;
|
|
2808
2809
|
/**
|
|
2809
2810
|
* Create a longtext attribute.
|
|
2810
2811
|
*
|
|
@@ -2815,19 +2816,20 @@ export class Databases {
|
|
|
2815
2816
|
* @param {boolean} required - Is attribute required?
|
|
2816
2817
|
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2817
2818
|
* @param {boolean} array - Is attribute an array?
|
|
2819
|
+
* @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
2818
2820
|
* @throws {AppwriteException}
|
|
2819
2821
|
* @returns {Promise<Models.AttributeLongtext>}
|
|
2820
2822
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2821
2823
|
*/
|
|
2822
|
-
createLongtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeLongtext>;
|
|
2824
|
+
createLongtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeLongtext>;
|
|
2823
2825
|
createLongtextAttribute(
|
|
2824
|
-
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean } | string,
|
|
2825
|
-
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?]
|
|
2826
|
+
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
|
|
2827
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
|
|
2826
2828
|
): Promise<Models.AttributeLongtext> {
|
|
2827
|
-
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
2829
|
+
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
2828
2830
|
|
|
2829
2831
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2830
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
2832
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
2831
2833
|
} else {
|
|
2832
2834
|
params = {
|
|
2833
2835
|
databaseId: paramsOrFirst as string,
|
|
@@ -2835,7 +2837,8 @@ export class Databases {
|
|
|
2835
2837
|
key: rest[1] as string,
|
|
2836
2838
|
required: rest[2] as boolean,
|
|
2837
2839
|
xdefault: rest[3] as string,
|
|
2838
|
-
array: rest[4] as boolean
|
|
2840
|
+
array: rest[4] as boolean,
|
|
2841
|
+
encrypt: rest[5] as boolean
|
|
2839
2842
|
};
|
|
2840
2843
|
}
|
|
2841
2844
|
|
|
@@ -2845,6 +2848,7 @@ export class Databases {
|
|
|
2845
2848
|
const required = params.required;
|
|
2846
2849
|
const xdefault = params.xdefault;
|
|
2847
2850
|
const array = params.array;
|
|
2851
|
+
const encrypt = params.encrypt;
|
|
2848
2852
|
|
|
2849
2853
|
if (typeof databaseId === 'undefined') {
|
|
2850
2854
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -2873,6 +2877,9 @@ export class Databases {
|
|
|
2873
2877
|
if (typeof array !== 'undefined') {
|
|
2874
2878
|
payload['array'] = array;
|
|
2875
2879
|
}
|
|
2880
|
+
if (typeof encrypt !== 'undefined') {
|
|
2881
|
+
payload['encrypt'] = encrypt;
|
|
2882
|
+
}
|
|
2876
2883
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2877
2884
|
|
|
2878
2885
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2993,10 +3000,11 @@ export class Databases {
|
|
|
2993
3000
|
* @param {boolean} params.required - Is attribute required?
|
|
2994
3001
|
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2995
3002
|
* @param {boolean} params.array - Is attribute an array?
|
|
3003
|
+
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
2996
3004
|
* @throws {AppwriteException}
|
|
2997
3005
|
* @returns {Promise<Models.AttributeMediumtext>}
|
|
2998
3006
|
*/
|
|
2999
|
-
createMediumtextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.AttributeMediumtext>;
|
|
3007
|
+
createMediumtextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.AttributeMediumtext>;
|
|
3000
3008
|
/**
|
|
3001
3009
|
* Create a mediumtext attribute.
|
|
3002
3010
|
*
|
|
@@ -3007,19 +3015,20 @@ export class Databases {
|
|
|
3007
3015
|
* @param {boolean} required - Is attribute required?
|
|
3008
3016
|
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
3009
3017
|
* @param {boolean} array - Is attribute an array?
|
|
3018
|
+
* @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
3010
3019
|
* @throws {AppwriteException}
|
|
3011
3020
|
* @returns {Promise<Models.AttributeMediumtext>}
|
|
3012
3021
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3013
3022
|
*/
|
|
3014
|
-
createMediumtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeMediumtext>;
|
|
3023
|
+
createMediumtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeMediumtext>;
|
|
3015
3024
|
createMediumtextAttribute(
|
|
3016
|
-
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean } | string,
|
|
3017
|
-
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?]
|
|
3025
|
+
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
|
|
3026
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
|
|
3018
3027
|
): Promise<Models.AttributeMediumtext> {
|
|
3019
|
-
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
3028
|
+
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3020
3029
|
|
|
3021
3030
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3022
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
3031
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3023
3032
|
} else {
|
|
3024
3033
|
params = {
|
|
3025
3034
|
databaseId: paramsOrFirst as string,
|
|
@@ -3027,7 +3036,8 @@ export class Databases {
|
|
|
3027
3036
|
key: rest[1] as string,
|
|
3028
3037
|
required: rest[2] as boolean,
|
|
3029
3038
|
xdefault: rest[3] as string,
|
|
3030
|
-
array: rest[4] as boolean
|
|
3039
|
+
array: rest[4] as boolean,
|
|
3040
|
+
encrypt: rest[5] as boolean
|
|
3031
3041
|
};
|
|
3032
3042
|
}
|
|
3033
3043
|
|
|
@@ -3037,6 +3047,7 @@ export class Databases {
|
|
|
3037
3047
|
const required = params.required;
|
|
3038
3048
|
const xdefault = params.xdefault;
|
|
3039
3049
|
const array = params.array;
|
|
3050
|
+
const encrypt = params.encrypt;
|
|
3040
3051
|
|
|
3041
3052
|
if (typeof databaseId === 'undefined') {
|
|
3042
3053
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -3065,6 +3076,9 @@ export class Databases {
|
|
|
3065
3076
|
if (typeof array !== 'undefined') {
|
|
3066
3077
|
payload['array'] = array;
|
|
3067
3078
|
}
|
|
3079
|
+
if (typeof encrypt !== 'undefined') {
|
|
3080
|
+
payload['encrypt'] = encrypt;
|
|
3081
|
+
}
|
|
3068
3082
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3069
3083
|
|
|
3070
3084
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -3874,10 +3888,11 @@ export class Databases {
|
|
|
3874
3888
|
* @param {boolean} params.required - Is attribute required?
|
|
3875
3889
|
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
3876
3890
|
* @param {boolean} params.array - Is attribute an array?
|
|
3891
|
+
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
3877
3892
|
* @throws {AppwriteException}
|
|
3878
3893
|
* @returns {Promise<Models.AttributeText>}
|
|
3879
3894
|
*/
|
|
3880
|
-
createTextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.AttributeText>;
|
|
3895
|
+
createTextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.AttributeText>;
|
|
3881
3896
|
/**
|
|
3882
3897
|
* Create a text attribute.
|
|
3883
3898
|
*
|
|
@@ -3888,19 +3903,20 @@ export class Databases {
|
|
|
3888
3903
|
* @param {boolean} required - Is attribute required?
|
|
3889
3904
|
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
3890
3905
|
* @param {boolean} array - Is attribute an array?
|
|
3906
|
+
* @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
3891
3907
|
* @throws {AppwriteException}
|
|
3892
3908
|
* @returns {Promise<Models.AttributeText>}
|
|
3893
3909
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3894
3910
|
*/
|
|
3895
|
-
createTextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeText>;
|
|
3911
|
+
createTextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeText>;
|
|
3896
3912
|
createTextAttribute(
|
|
3897
|
-
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean } | string,
|
|
3898
|
-
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?]
|
|
3913
|
+
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
|
|
3914
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
|
|
3899
3915
|
): Promise<Models.AttributeText> {
|
|
3900
|
-
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
3916
|
+
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3901
3917
|
|
|
3902
3918
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3903
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
3919
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3904
3920
|
} else {
|
|
3905
3921
|
params = {
|
|
3906
3922
|
databaseId: paramsOrFirst as string,
|
|
@@ -3908,7 +3924,8 @@ export class Databases {
|
|
|
3908
3924
|
key: rest[1] as string,
|
|
3909
3925
|
required: rest[2] as boolean,
|
|
3910
3926
|
xdefault: rest[3] as string,
|
|
3911
|
-
array: rest[4] as boolean
|
|
3927
|
+
array: rest[4] as boolean,
|
|
3928
|
+
encrypt: rest[5] as boolean
|
|
3912
3929
|
};
|
|
3913
3930
|
}
|
|
3914
3931
|
|
|
@@ -3918,6 +3935,7 @@ export class Databases {
|
|
|
3918
3935
|
const required = params.required;
|
|
3919
3936
|
const xdefault = params.xdefault;
|
|
3920
3937
|
const array = params.array;
|
|
3938
|
+
const encrypt = params.encrypt;
|
|
3921
3939
|
|
|
3922
3940
|
if (typeof databaseId === 'undefined') {
|
|
3923
3941
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -3946,6 +3964,9 @@ export class Databases {
|
|
|
3946
3964
|
if (typeof array !== 'undefined') {
|
|
3947
3965
|
payload['array'] = array;
|
|
3948
3966
|
}
|
|
3967
|
+
if (typeof encrypt !== 'undefined') {
|
|
3968
|
+
payload['encrypt'] = encrypt;
|
|
3969
|
+
}
|
|
3949
3970
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3950
3971
|
|
|
3951
3972
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -4261,10 +4282,11 @@ export class Databases {
|
|
|
4261
4282
|
* @param {boolean} params.required - Is attribute required?
|
|
4262
4283
|
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
4263
4284
|
* @param {boolean} params.array - Is attribute an array?
|
|
4285
|
+
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
4264
4286
|
* @throws {AppwriteException}
|
|
4265
4287
|
* @returns {Promise<Models.AttributeVarchar>}
|
|
4266
4288
|
*/
|
|
4267
|
-
createVarcharAttribute(params: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.AttributeVarchar>;
|
|
4289
|
+
createVarcharAttribute(params: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.AttributeVarchar>;
|
|
4268
4290
|
/**
|
|
4269
4291
|
* Create a varchar attribute.
|
|
4270
4292
|
*
|
|
@@ -4276,19 +4298,20 @@ export class Databases {
|
|
|
4276
4298
|
* @param {boolean} required - Is attribute required?
|
|
4277
4299
|
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
4278
4300
|
* @param {boolean} array - Is attribute an array?
|
|
4301
|
+
* @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
4279
4302
|
* @throws {AppwriteException}
|
|
4280
4303
|
* @returns {Promise<Models.AttributeVarchar>}
|
|
4281
4304
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
4282
4305
|
*/
|
|
4283
|
-
createVarcharAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeVarchar>;
|
|
4306
|
+
createVarcharAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeVarchar>;
|
|
4284
4307
|
createVarcharAttribute(
|
|
4285
|
-
paramsOrFirst: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean } | string,
|
|
4286
|
-
...rest: [(string)?, (string)?, (number)?, (boolean)?, (string)?, (boolean)?]
|
|
4308
|
+
paramsOrFirst: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
|
|
4309
|
+
...rest: [(string)?, (string)?, (number)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
|
|
4287
4310
|
): Promise<Models.AttributeVarchar> {
|
|
4288
|
-
let params: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean };
|
|
4311
|
+
let params: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
4289
4312
|
|
|
4290
4313
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4291
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean };
|
|
4314
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
4292
4315
|
} else {
|
|
4293
4316
|
params = {
|
|
4294
4317
|
databaseId: paramsOrFirst as string,
|
|
@@ -4297,7 +4320,8 @@ export class Databases {
|
|
|
4297
4320
|
size: rest[2] as number,
|
|
4298
4321
|
required: rest[3] as boolean,
|
|
4299
4322
|
xdefault: rest[4] as string,
|
|
4300
|
-
array: rest[5] as boolean
|
|
4323
|
+
array: rest[5] as boolean,
|
|
4324
|
+
encrypt: rest[6] as boolean
|
|
4301
4325
|
};
|
|
4302
4326
|
}
|
|
4303
4327
|
|
|
@@ -4308,6 +4332,7 @@ export class Databases {
|
|
|
4308
4332
|
const required = params.required;
|
|
4309
4333
|
const xdefault = params.xdefault;
|
|
4310
4334
|
const array = params.array;
|
|
4335
|
+
const encrypt = params.encrypt;
|
|
4311
4336
|
|
|
4312
4337
|
if (typeof databaseId === 'undefined') {
|
|
4313
4338
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -4342,6 +4367,9 @@ export class Databases {
|
|
|
4342
4367
|
if (typeof array !== 'undefined') {
|
|
4343
4368
|
payload['array'] = array;
|
|
4344
4369
|
}
|
|
4370
|
+
if (typeof encrypt !== 'undefined') {
|
|
4371
|
+
payload['encrypt'] = encrypt;
|
|
4372
|
+
}
|
|
4345
4373
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4346
4374
|
|
|
4347
4375
|
const apiHeaders: { [header: string]: string } = {
|
package/src/services/domains.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
|
|
5
|
+
import { RegistrationType } from '../enums/registration-type';
|
|
5
6
|
import { FilterType } from '../enums/filter-type';
|
|
6
7
|
|
|
7
8
|
export class Domains {
|
|
@@ -136,6 +137,75 @@ export class Domains {
|
|
|
136
137
|
);
|
|
137
138
|
}
|
|
138
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Get the registration price for a domain name.
|
|
142
|
+
*
|
|
143
|
+
* @param {string} params.domain - Domain name to get price for.
|
|
144
|
+
* @param {number} params.periodYears - Number of years to calculate the domain price for. Must be at least 1.
|
|
145
|
+
* @param {RegistrationType} params.registrationType - Type of registration pricing to fetch. Allowed values: new, transfer, renewal, trade.
|
|
146
|
+
* @throws {AppwriteException}
|
|
147
|
+
* @returns {Promise<Models.DomainPrice>}
|
|
148
|
+
*/
|
|
149
|
+
getPrice(params: { domain: string, periodYears?: number, registrationType?: RegistrationType }): Promise<Models.DomainPrice>;
|
|
150
|
+
/**
|
|
151
|
+
* Get the registration price for a domain name.
|
|
152
|
+
*
|
|
153
|
+
* @param {string} domain - Domain name to get price for.
|
|
154
|
+
* @param {number} periodYears - Number of years to calculate the domain price for. Must be at least 1.
|
|
155
|
+
* @param {RegistrationType} registrationType - Type of registration pricing to fetch. Allowed values: new, transfer, renewal, trade.
|
|
156
|
+
* @throws {AppwriteException}
|
|
157
|
+
* @returns {Promise<Models.DomainPrice>}
|
|
158
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
159
|
+
*/
|
|
160
|
+
getPrice(domain: string, periodYears?: number, registrationType?: RegistrationType): Promise<Models.DomainPrice>;
|
|
161
|
+
getPrice(
|
|
162
|
+
paramsOrFirst: { domain: string, periodYears?: number, registrationType?: RegistrationType } | string,
|
|
163
|
+
...rest: [(number)?, (RegistrationType)?]
|
|
164
|
+
): Promise<Models.DomainPrice> {
|
|
165
|
+
let params: { domain: string, periodYears?: number, registrationType?: RegistrationType };
|
|
166
|
+
|
|
167
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
168
|
+
params = (paramsOrFirst || {}) as { domain: string, periodYears?: number, registrationType?: RegistrationType };
|
|
169
|
+
} else {
|
|
170
|
+
params = {
|
|
171
|
+
domain: paramsOrFirst as string,
|
|
172
|
+
periodYears: rest[0] as number,
|
|
173
|
+
registrationType: rest[1] as RegistrationType
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const domain = params.domain;
|
|
178
|
+
const periodYears = params.periodYears;
|
|
179
|
+
const registrationType = params.registrationType;
|
|
180
|
+
|
|
181
|
+
if (typeof domain === 'undefined') {
|
|
182
|
+
throw new AppwriteException('Missing required parameter: "domain"');
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const apiPath = '/domains/price';
|
|
186
|
+
const payload: Payload = {};
|
|
187
|
+
if (typeof domain !== 'undefined') {
|
|
188
|
+
payload['domain'] = domain;
|
|
189
|
+
}
|
|
190
|
+
if (typeof periodYears !== 'undefined') {
|
|
191
|
+
payload['periodYears'] = periodYears;
|
|
192
|
+
}
|
|
193
|
+
if (typeof registrationType !== 'undefined') {
|
|
194
|
+
payload['registrationType'] = registrationType;
|
|
195
|
+
}
|
|
196
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
197
|
+
|
|
198
|
+
const apiHeaders: { [header: string]: string } = {
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return this.client.call(
|
|
202
|
+
'get',
|
|
203
|
+
uri,
|
|
204
|
+
apiHeaders,
|
|
205
|
+
payload
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
|
|
139
209
|
/**
|
|
140
210
|
* List domain suggestions.
|
|
141
211
|
*
|
|
@@ -343,7 +343,7 @@ export class Functions {
|
|
|
343
343
|
): Promise<Models.TemplateFunctionList> {
|
|
344
344
|
let params: { runtimes?: Runtimes[], useCases?: UseCases[], limit?: number, offset?: number, total?: boolean };
|
|
345
345
|
|
|
346
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'runtimes' in paramsOrFirst)) {
|
|
346
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('runtimes' in paramsOrFirst || 'useCases' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst || 'total' in paramsOrFirst))) {
|
|
347
347
|
params = (paramsOrFirst || {}) as { runtimes?: Runtimes[], useCases?: UseCases[], limit?: number, offset?: number, total?: boolean };
|
|
348
348
|
} else {
|
|
349
349
|
params = {
|
|
@@ -465,7 +465,7 @@ export class Functions {
|
|
|
465
465
|
): Promise<Models.UsageFunctions> {
|
|
466
466
|
let params: { range?: UsageRange };
|
|
467
467
|
|
|
468
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
468
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
469
469
|
params = (paramsOrFirst || {}) as { range?: UsageRange };
|
|
470
470
|
} else {
|
|
471
471
|
params = {
|
package/src/services/graphql.ts
CHANGED
|
@@ -32,7 +32,7 @@ export class Graphql {
|
|
|
32
32
|
): Promise<{}> {
|
|
33
33
|
let params: { query: object };
|
|
34
34
|
|
|
35
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {
|
|
35
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) {
|
|
36
36
|
params = (paramsOrFirst || {}) as { query: object };
|
|
37
37
|
} else {
|
|
38
38
|
params = {
|
|
@@ -88,7 +88,7 @@ export class Graphql {
|
|
|
88
88
|
): Promise<{}> {
|
|
89
89
|
let params: { query: object };
|
|
90
90
|
|
|
91
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {
|
|
91
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) {
|
|
92
92
|
params = (paramsOrFirst || {}) as { query: object };
|
|
93
93
|
} else {
|
|
94
94
|
params = {
|
package/src/services/health.ts
CHANGED
|
@@ -620,7 +620,7 @@ export class Health {
|
|
|
620
620
|
): Promise<Models.HealthQueue> {
|
|
621
621
|
let params: { name: Name, threshold?: number };
|
|
622
622
|
|
|
623
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'name' in paramsOrFirst)) {
|
|
623
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('name' in paramsOrFirst || 'threshold' in paramsOrFirst))) {
|
|
624
624
|
params = (paramsOrFirst || {}) as { name: Name, threshold?: number };
|
|
625
625
|
} else {
|
|
626
626
|
params = {
|