@appwrite.io/console 2.1.3 → 2.3.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 +18 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +2201 -692
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +2202 -693
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +2201 -692
- 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 +17 -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 +15 -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 +15 -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 +15 -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 +18 -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/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 +7 -5
- 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/{get-regions.md → list-regions.md} +3 -3
- 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 +4 -2
- 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 +20 -0
- package/docs/examples/databases/create-mediumtext-attribute.md +20 -0
- 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 +20 -0
- 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 +21 -0
- 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 +3 -1
- 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 +20 -0
- package/docs/examples/databases/update-mediumtext-attribute.md +20 -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 +20 -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 +21 -0
- package/docs/examples/databases/update.md +3 -1
- 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 +4 -2
- 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 +5 -3
- 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 +4 -2
- 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 +4 -2
- 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 +4 -2
- package/docs/examples/migrations/create-n-host-migration.md +4 -2
- package/docs/examples/migrations/create-supabase-migration.md +4 -2
- package/docs/examples/migrations/delete.md +2 -0
- package/docs/examples/migrations/get-appwrite-report.md +4 -2
- package/docs/examples/migrations/get-firebase-report.md +4 -2
- package/docs/examples/migrations/get-n-host-report.md +4 -2
- package/docs/examples/migrations/get-supabase-report.md +4 -2
- 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 +18 -0
- package/docs/examples/organizations/create.md +4 -2
- 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 +16 -0
- package/docs/examples/organizations/delete.md +2 -0
- package/docs/examples/organizations/estimation-create-organization.md +4 -2
- package/docs/examples/organizations/estimation-delete-organization.md +2 -0
- package/docs/examples/organizations/estimation-update-plan.md +4 -2
- 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/{update-projects.md → get-key.md} +4 -2
- 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 +16 -0
- package/docs/examples/organizations/list-regions.md +15 -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 +19 -0
- package/docs/examples/organizations/update-plan.md +4 -2
- 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 +4 -2
- package/docs/examples/projects/create-key.md +5 -2
- 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 +4 -2
- 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 +5 -3
- 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 +4 -2
- 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 +20 -0
- package/docs/examples/tablesdb/create-mediumtext-column.md +20 -0
- 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 +20 -0
- 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 +21 -0
- 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 +20 -0
- package/docs/examples/tablesdb/update-mediumtext-column.md +20 -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 +3 -1
- package/docs/examples/tablesdb/update-text-column.md +20 -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 +21 -0
- package/docs/examples/tablesdb/update.md +3 -1
- 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 +2 -0
- 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 +2 -0
- 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 +38 -22
- package/src/client.ts +110 -49
- package/src/enums/backup-services.ts +5 -0
- package/src/enums/browser-permission.ts +22 -0
- package/src/enums/build-runtime.ts +5 -0
- package/src/enums/deployment-status.ts +1 -0
- package/src/enums/frameworks.ts +17 -0
- package/src/enums/order-by.ts +4 -0
- package/src/enums/registration-type.ts +6 -0
- package/src/enums/resources.ts +13 -0
- package/src/enums/runtime.ts +5 -0
- package/src/enums/runtimes.ts +71 -0
- package/src/enums/scopes.ts +66 -0
- package/src/enums/use-cases.ts +11 -0
- package/src/index.ts +9 -2
- package/src/models.ts +394 -4
- package/src/services/account.ts +375 -67
- package/src/services/assistant.ts +1 -1
- package/src/services/avatars.ts +20 -19
- package/src/services/backups.ts +37 -36
- package/src/services/console.ts +12 -43
- package/src/services/databases.ts +1061 -281
- package/src/services/domains.ts +114 -44
- package/src/services/functions.ts +61 -58
- package/src/services/graphql.ts +4 -4
- package/src/services/health.ts +23 -21
- package/src/services/messaging.ts +56 -56
- package/src/services/migrations.ts +79 -78
- package/src/services/organizations.ts +430 -94
- package/src/services/project.ts +5 -5
- package/src/services/projects.ts +106 -155
- package/src/services/proxy.ts +8 -8
- package/src/services/realtime.ts +135 -58
- package/src/services/sites.ts +43 -41
- package/src/services/storage.ts +17 -17
- package/src/services/tables-db.ts +1051 -269
- package/src/services/teams.ts +14 -14
- package/src/services/tokens.ts +5 -5
- package/src/services/users.ts +50 -50
- package/src/services/vcs.ts +10 -10
- package/types/channel.d.ts +9 -7
- package/types/client.d.ts +7 -2
- package/types/enums/backup-services.d.ts +5 -0
- package/types/enums/browser-permission.d.ts +22 -0
- package/types/enums/build-runtime.d.ts +6 -1
- package/types/enums/deployment-status.d.ts +1 -0
- package/types/enums/frameworks.d.ts +17 -0
- package/types/enums/order-by.d.ts +4 -0
- package/types/enums/registration-type.d.ts +6 -0
- package/types/enums/resources.d.ts +13 -0
- package/types/enums/runtime.d.ts +6 -1
- package/types/enums/runtimes.d.ts +71 -0
- package/types/enums/scopes.d.ts +66 -0
- package/types/enums/use-cases.d.ts +11 -0
- package/types/index.d.ts +9 -2
- package/types/models.d.ts +385 -4
- package/types/services/account.d.ts +111 -0
- package/types/services/avatars.d.ts +5 -4
- package/types/services/backups.d.ts +13 -12
- package/types/services/console.d.ts +1 -13
- package/types/services/databases.d.ts +303 -8
- package/types/services/domains.d.ts +26 -0
- package/types/services/functions.d.ts +18 -15
- package/types/services/health.d.ts +2 -0
- package/types/services/migrations.d.ts +33 -32
- package/types/services/organizations.d.ts +151 -29
- package/types/services/projects.d.ts +20 -36
- package/types/services/realtime.d.ts +13 -6
- package/types/services/sites.d.ts +9 -7
- package/types/services/tables-db.d.ts +305 -8
- package/docs/examples/projects/update-status.md +0 -14
- package/src/enums/billing-plan.ts +0 -17
- package/src/enums/status.ts +0 -4
- package/types/enums/billing-plan.d.ts +0 -17
- package/types/enums/status.d.ts +0 -4
package/dist/esm/sdk.js
CHANGED
|
@@ -465,20 +465,9 @@ Query.notTouches = (attribute, values) => new Query("notTouches", attribute, [va
|
|
|
465
465
|
|
|
466
466
|
const JSONbigParser = JSONbigModule({ storeAsString: false });
|
|
467
467
|
const JSONbigSerializer = JSONbigModule({ useNativeBigInt: true });
|
|
468
|
-
/**
|
|
469
|
-
* Converts BigNumber objects from json-bigint to native types.
|
|
470
|
-
* - Integer BigNumbers → BigInt (if unsafe) or number (if safe)
|
|
471
|
-
* - Float BigNumbers → number
|
|
472
|
-
* - Strings remain strings (never converted to BigNumber by json-bigint)
|
|
473
|
-
*/
|
|
474
468
|
const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
|
|
475
469
|
const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
|
|
476
|
-
function
|
|
477
|
-
if (value === null || value === undefined)
|
|
478
|
-
return value;
|
|
479
|
-
if (Array.isArray(value)) {
|
|
480
|
-
return value.map(convertBigNumbers);
|
|
481
|
-
}
|
|
470
|
+
function reviver(_key, value) {
|
|
482
471
|
if (BigNumber.isBigNumber(value)) {
|
|
483
472
|
if (value.isInteger()) {
|
|
484
473
|
const str = value.toFixed();
|
|
@@ -488,20 +477,12 @@ function convertBigNumbers(value) {
|
|
|
488
477
|
}
|
|
489
478
|
return bi;
|
|
490
479
|
}
|
|
491
|
-
// float
|
|
492
480
|
return value.toNumber();
|
|
493
481
|
}
|
|
494
|
-
if (typeof value === 'object') {
|
|
495
|
-
const result = {};
|
|
496
|
-
for (const [k, v] of Object.entries(value)) {
|
|
497
|
-
result[k] = convertBigNumbers(v);
|
|
498
|
-
}
|
|
499
|
-
return result;
|
|
500
|
-
}
|
|
501
482
|
return value;
|
|
502
483
|
}
|
|
503
484
|
const JSONbig = {
|
|
504
|
-
parse: (text) =>
|
|
485
|
+
parse: (text) => JSONbigParser.parse(text, reviver),
|
|
505
486
|
stringify: JSONbigSerializer.stringify
|
|
506
487
|
};
|
|
507
488
|
/**
|
|
@@ -553,7 +534,7 @@ class Client {
|
|
|
553
534
|
'x-sdk-name': 'Console',
|
|
554
535
|
'x-sdk-platform': 'console',
|
|
555
536
|
'x-sdk-language': 'web',
|
|
556
|
-
'x-sdk-version': '2.
|
|
537
|
+
'x-sdk-version': '2.3.0',
|
|
557
538
|
'X-Appwrite-Response-Format': '1.8.0',
|
|
558
539
|
};
|
|
559
540
|
this.realtime = {
|
|
@@ -562,7 +543,10 @@ class Client {
|
|
|
562
543
|
heartbeat: undefined,
|
|
563
544
|
url: '',
|
|
564
545
|
channels: new Set(),
|
|
546
|
+
queries: new Set(),
|
|
565
547
|
subscriptions: new Map(),
|
|
548
|
+
slotToSubscriptionId: new Map(),
|
|
549
|
+
subscriptionIdToSlot: new Map(),
|
|
566
550
|
subscriptionsCounter: 0,
|
|
567
551
|
reconnect: true,
|
|
568
552
|
reconnectAttempts: 0,
|
|
@@ -597,26 +581,34 @@ class Client {
|
|
|
597
581
|
}, 20000);
|
|
598
582
|
},
|
|
599
583
|
createSocket: () => {
|
|
600
|
-
var _a, _b, _c;
|
|
601
|
-
if (this.realtime.
|
|
584
|
+
var _a, _b, _c, _d;
|
|
585
|
+
if (this.realtime.subscriptions.size < 1) {
|
|
602
586
|
this.realtime.reconnect = false;
|
|
603
587
|
(_a = this.realtime.socket) === null || _a === void 0 ? void 0 : _a.close();
|
|
604
588
|
return;
|
|
605
589
|
}
|
|
606
|
-
const
|
|
607
|
-
|
|
608
|
-
channels.set('project', this.config.project);
|
|
609
|
-
}
|
|
590
|
+
const encodedProject = encodeURIComponent((_b = this.config.project) !== null && _b !== void 0 ? _b : '');
|
|
591
|
+
let queryParams = 'project=' + encodedProject;
|
|
610
592
|
this.realtime.channels.forEach(channel => {
|
|
611
|
-
|
|
593
|
+
queryParams += '&channels[]=' + encodeURIComponent(channel);
|
|
594
|
+
});
|
|
595
|
+
// Per-subscription queries: channel[slot][]=query so server can route events by subscription
|
|
596
|
+
const selectAllQuery = Query.select(['*']).toString();
|
|
597
|
+
this.realtime.subscriptions.forEach((sub, slot) => {
|
|
598
|
+
const queries = sub.queries.length > 0 ? sub.queries : [selectAllQuery];
|
|
599
|
+
sub.channels.forEach(channel => {
|
|
600
|
+
queries.forEach(query => {
|
|
601
|
+
queryParams += '&' + encodeURIComponent(channel) + '[' + slot + '][]=' + encodeURIComponent(query);
|
|
602
|
+
});
|
|
603
|
+
});
|
|
612
604
|
});
|
|
613
|
-
const url = this.config.endpointRealtime + '/realtime?' +
|
|
605
|
+
const url = this.config.endpointRealtime + '/realtime?' + queryParams;
|
|
614
606
|
if (url !== this.realtime.url || // Check if URL is present
|
|
615
607
|
!this.realtime.socket || // Check if WebSocket has not been created
|
|
616
|
-
((
|
|
608
|
+
((_c = this.realtime.socket) === null || _c === void 0 ? void 0 : _c.readyState) > WebSocket.OPEN // Check if WebSocket is CLOSING (3) or CLOSED (4)
|
|
617
609
|
) {
|
|
618
610
|
if (this.realtime.socket &&
|
|
619
|
-
((
|
|
611
|
+
((_d = this.realtime.socket) === null || _d === void 0 ? void 0 : _d.readyState) < WebSocket.CLOSING // Close WebSocket if it is CONNECTING (0) or OPEN (1)
|
|
620
612
|
) {
|
|
621
613
|
this.realtime.reconnect = false;
|
|
622
614
|
this.realtime.socket.close();
|
|
@@ -652,14 +644,25 @@ class Client {
|
|
|
652
644
|
const message = JSONbig.parse(event.data);
|
|
653
645
|
this.realtime.lastMessage = message;
|
|
654
646
|
switch (message.type) {
|
|
655
|
-
case 'connected':
|
|
647
|
+
case 'connected': {
|
|
648
|
+
const messageData = message.data;
|
|
649
|
+
if (messageData === null || messageData === void 0 ? void 0 : messageData.subscriptions) {
|
|
650
|
+
this.realtime.slotToSubscriptionId.clear();
|
|
651
|
+
this.realtime.subscriptionIdToSlot.clear();
|
|
652
|
+
for (const [slotStr, subscriptionId] of Object.entries(messageData.subscriptions)) {
|
|
653
|
+
const slot = Number(slotStr);
|
|
654
|
+
if (!isNaN(slot) && typeof subscriptionId === 'string') {
|
|
655
|
+
this.realtime.slotToSubscriptionId.set(slot, subscriptionId);
|
|
656
|
+
this.realtime.subscriptionIdToSlot.set(subscriptionId, slot);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
656
660
|
let session = this.config.session;
|
|
657
661
|
if (!session) {
|
|
658
662
|
const cookie = JSONbig.parse((_a = window.localStorage.getItem('cookieFallback')) !== null && _a !== void 0 ? _a : '{}');
|
|
659
663
|
session = cookie === null || cookie === void 0 ? void 0 : cookie[`a_session_${this.config.project}`];
|
|
660
664
|
}
|
|
661
|
-
|
|
662
|
-
if (session && !messageData.user) {
|
|
665
|
+
if (session && !(messageData === null || messageData === void 0 ? void 0 : messageData.user)) {
|
|
663
666
|
(_b = this.realtime.socket) === null || _b === void 0 ? void 0 : _b.send(JSONbig.stringify({
|
|
664
667
|
type: 'authentication',
|
|
665
668
|
data: {
|
|
@@ -668,12 +671,27 @@ class Client {
|
|
|
668
671
|
}));
|
|
669
672
|
}
|
|
670
673
|
break;
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
+
}
|
|
675
|
+
case 'event': {
|
|
676
|
+
const data = message.data;
|
|
677
|
+
if (!(data === null || data === void 0 ? void 0 : data.channels))
|
|
678
|
+
break;
|
|
679
|
+
const eventSubIds = data.subscriptions;
|
|
680
|
+
if (eventSubIds && eventSubIds.length > 0) {
|
|
681
|
+
for (const subscriptionId of eventSubIds) {
|
|
682
|
+
const slot = this.realtime.subscriptionIdToSlot.get(subscriptionId);
|
|
683
|
+
if (slot !== undefined) {
|
|
684
|
+
const subscription = this.realtime.subscriptions.get(slot);
|
|
685
|
+
if (subscription) {
|
|
686
|
+
setTimeout(() => subscription.callback(data));
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
else {
|
|
674
692
|
const isSubscribed = data.channels.some(channel => this.realtime.channels.has(channel));
|
|
675
693
|
if (!isSubscribed)
|
|
676
|
-
|
|
694
|
+
break;
|
|
677
695
|
this.realtime.subscriptions.forEach(subscription => {
|
|
678
696
|
if (data.channels.some(channel => subscription.channels.includes(channel))) {
|
|
679
697
|
setTimeout(() => subscription.callback(data));
|
|
@@ -681,6 +699,7 @@ class Client {
|
|
|
681
699
|
});
|
|
682
700
|
}
|
|
683
701
|
break;
|
|
702
|
+
}
|
|
684
703
|
case 'pong':
|
|
685
704
|
break; // Handle pong response if needed
|
|
686
705
|
case 'error':
|
|
@@ -693,7 +712,7 @@ class Client {
|
|
|
693
712
|
console.error(e);
|
|
694
713
|
}
|
|
695
714
|
},
|
|
696
|
-
cleanUp: channels => {
|
|
715
|
+
cleanUp: (channels, queries) => {
|
|
697
716
|
this.realtime.channels.forEach(channel => {
|
|
698
717
|
if (channels.includes(channel)) {
|
|
699
718
|
let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
|
|
@@ -704,6 +723,17 @@ class Client {
|
|
|
704
723
|
}
|
|
705
724
|
}
|
|
706
725
|
});
|
|
726
|
+
this.realtime.queries.forEach(query => {
|
|
727
|
+
if (queries.includes(query)) {
|
|
728
|
+
let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
|
|
729
|
+
var _a;
|
|
730
|
+
return (_a = subscription.queries) === null || _a === void 0 ? void 0 : _a.includes(query);
|
|
731
|
+
});
|
|
732
|
+
if (!found) {
|
|
733
|
+
this.realtime.queries.delete(query);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
});
|
|
707
737
|
}
|
|
708
738
|
};
|
|
709
739
|
}
|
|
@@ -884,7 +914,7 @@ class Client {
|
|
|
884
914
|
* @param {(payload: RealtimeMessage) => void} callback Is called on every realtime update.
|
|
885
915
|
* @returns {() => void} Unsubscribes from events.
|
|
886
916
|
*/
|
|
887
|
-
subscribe(channels, callback) {
|
|
917
|
+
subscribe(channels, callback, queries = []) {
|
|
888
918
|
const channelArray = Array.isArray(channels) ? channels : [channels];
|
|
889
919
|
// Convert Channel instances to strings
|
|
890
920
|
const channelStrings = channelArray.map(ch => {
|
|
@@ -899,15 +929,18 @@ class Client {
|
|
|
899
929
|
return String(ch);
|
|
900
930
|
});
|
|
901
931
|
channelStrings.forEach(channel => this.realtime.channels.add(channel));
|
|
932
|
+
const queryStrings = (queries !== null && queries !== void 0 ? queries : []).map(q => typeof q === 'string' ? q : q.toString());
|
|
933
|
+
queryStrings.forEach(query => this.realtime.queries.add(query));
|
|
902
934
|
const counter = this.realtime.subscriptionsCounter++;
|
|
903
935
|
this.realtime.subscriptions.set(counter, {
|
|
904
936
|
channels: channelStrings,
|
|
937
|
+
queries: queryStrings,
|
|
905
938
|
callback
|
|
906
939
|
});
|
|
907
940
|
this.realtime.connect();
|
|
908
941
|
return () => {
|
|
909
942
|
this.realtime.subscriptions.delete(counter);
|
|
910
|
-
this.realtime.cleanUp(channelStrings);
|
|
943
|
+
this.realtime.cleanUp(channelStrings, queryStrings);
|
|
911
944
|
this.realtime.connect();
|
|
912
945
|
};
|
|
913
946
|
}
|
|
@@ -1484,6 +1517,149 @@ class Account {
|
|
|
1484
1517
|
};
|
|
1485
1518
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
1486
1519
|
}
|
|
1520
|
+
listKeys(paramsOrFirst) {
|
|
1521
|
+
let params;
|
|
1522
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1523
|
+
params = (paramsOrFirst || {});
|
|
1524
|
+
}
|
|
1525
|
+
else {
|
|
1526
|
+
params = {
|
|
1527
|
+
total: paramsOrFirst
|
|
1528
|
+
};
|
|
1529
|
+
}
|
|
1530
|
+
const total = params.total;
|
|
1531
|
+
const apiPath = '/account/keys';
|
|
1532
|
+
const payload = {};
|
|
1533
|
+
if (typeof total !== 'undefined') {
|
|
1534
|
+
payload['total'] = total;
|
|
1535
|
+
}
|
|
1536
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1537
|
+
const apiHeaders = {};
|
|
1538
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
1539
|
+
}
|
|
1540
|
+
createKey(paramsOrFirst, ...rest) {
|
|
1541
|
+
let params;
|
|
1542
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1543
|
+
params = (paramsOrFirst || {});
|
|
1544
|
+
}
|
|
1545
|
+
else {
|
|
1546
|
+
params = {
|
|
1547
|
+
name: paramsOrFirst,
|
|
1548
|
+
scopes: rest[0],
|
|
1549
|
+
expire: rest[1]
|
|
1550
|
+
};
|
|
1551
|
+
}
|
|
1552
|
+
const name = params.name;
|
|
1553
|
+
const scopes = params.scopes;
|
|
1554
|
+
const expire = params.expire;
|
|
1555
|
+
if (typeof name === 'undefined') {
|
|
1556
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
1557
|
+
}
|
|
1558
|
+
if (typeof scopes === 'undefined') {
|
|
1559
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
1560
|
+
}
|
|
1561
|
+
const apiPath = '/account/keys';
|
|
1562
|
+
const payload = {};
|
|
1563
|
+
if (typeof name !== 'undefined') {
|
|
1564
|
+
payload['name'] = name;
|
|
1565
|
+
}
|
|
1566
|
+
if (typeof scopes !== 'undefined') {
|
|
1567
|
+
payload['scopes'] = scopes;
|
|
1568
|
+
}
|
|
1569
|
+
if (typeof expire !== 'undefined') {
|
|
1570
|
+
payload['expire'] = expire;
|
|
1571
|
+
}
|
|
1572
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1573
|
+
const apiHeaders = {
|
|
1574
|
+
'content-type': 'application/json',
|
|
1575
|
+
};
|
|
1576
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
1577
|
+
}
|
|
1578
|
+
getKey(paramsOrFirst) {
|
|
1579
|
+
let params;
|
|
1580
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1581
|
+
params = (paramsOrFirst || {});
|
|
1582
|
+
}
|
|
1583
|
+
else {
|
|
1584
|
+
params = {
|
|
1585
|
+
keyId: paramsOrFirst
|
|
1586
|
+
};
|
|
1587
|
+
}
|
|
1588
|
+
const keyId = params.keyId;
|
|
1589
|
+
if (typeof keyId === 'undefined') {
|
|
1590
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
1591
|
+
}
|
|
1592
|
+
const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
|
|
1593
|
+
const payload = {};
|
|
1594
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1595
|
+
const apiHeaders = {};
|
|
1596
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
1597
|
+
}
|
|
1598
|
+
updateKey(paramsOrFirst, ...rest) {
|
|
1599
|
+
let params;
|
|
1600
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1601
|
+
params = (paramsOrFirst || {});
|
|
1602
|
+
}
|
|
1603
|
+
else {
|
|
1604
|
+
params = {
|
|
1605
|
+
keyId: paramsOrFirst,
|
|
1606
|
+
name: rest[0],
|
|
1607
|
+
scopes: rest[1],
|
|
1608
|
+
expire: rest[2]
|
|
1609
|
+
};
|
|
1610
|
+
}
|
|
1611
|
+
const keyId = params.keyId;
|
|
1612
|
+
const name = params.name;
|
|
1613
|
+
const scopes = params.scopes;
|
|
1614
|
+
const expire = params.expire;
|
|
1615
|
+
if (typeof keyId === 'undefined') {
|
|
1616
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
1617
|
+
}
|
|
1618
|
+
if (typeof name === 'undefined') {
|
|
1619
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
1620
|
+
}
|
|
1621
|
+
if (typeof scopes === 'undefined') {
|
|
1622
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
1623
|
+
}
|
|
1624
|
+
const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
|
|
1625
|
+
const payload = {};
|
|
1626
|
+
if (typeof name !== 'undefined') {
|
|
1627
|
+
payload['name'] = name;
|
|
1628
|
+
}
|
|
1629
|
+
if (typeof scopes !== 'undefined') {
|
|
1630
|
+
payload['scopes'] = scopes;
|
|
1631
|
+
}
|
|
1632
|
+
if (typeof expire !== 'undefined') {
|
|
1633
|
+
payload['expire'] = expire;
|
|
1634
|
+
}
|
|
1635
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1636
|
+
const apiHeaders = {
|
|
1637
|
+
'content-type': 'application/json',
|
|
1638
|
+
};
|
|
1639
|
+
return this.client.call('put', uri, apiHeaders, payload);
|
|
1640
|
+
}
|
|
1641
|
+
deleteKey(paramsOrFirst) {
|
|
1642
|
+
let params;
|
|
1643
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1644
|
+
params = (paramsOrFirst || {});
|
|
1645
|
+
}
|
|
1646
|
+
else {
|
|
1647
|
+
params = {
|
|
1648
|
+
keyId: paramsOrFirst
|
|
1649
|
+
};
|
|
1650
|
+
}
|
|
1651
|
+
const keyId = params.keyId;
|
|
1652
|
+
if (typeof keyId === 'undefined') {
|
|
1653
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
1654
|
+
}
|
|
1655
|
+
const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
|
|
1656
|
+
const payload = {};
|
|
1657
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1658
|
+
const apiHeaders = {
|
|
1659
|
+
'content-type': 'application/json',
|
|
1660
|
+
};
|
|
1661
|
+
return this.client.call('delete', uri, apiHeaders, payload);
|
|
1662
|
+
}
|
|
1487
1663
|
listLogs(paramsOrFirst, ...rest) {
|
|
1488
1664
|
let params;
|
|
1489
1665
|
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -1536,7 +1712,7 @@ class Account {
|
|
|
1536
1712
|
}
|
|
1537
1713
|
createMfaAuthenticator(paramsOrFirst) {
|
|
1538
1714
|
let params;
|
|
1539
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1715
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1540
1716
|
params = (paramsOrFirst || {});
|
|
1541
1717
|
}
|
|
1542
1718
|
else {
|
|
@@ -1558,7 +1734,7 @@ class Account {
|
|
|
1558
1734
|
}
|
|
1559
1735
|
createMFAAuthenticator(paramsOrFirst) {
|
|
1560
1736
|
let params;
|
|
1561
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1737
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1562
1738
|
params = (paramsOrFirst || {});
|
|
1563
1739
|
}
|
|
1564
1740
|
else {
|
|
@@ -1580,7 +1756,7 @@ class Account {
|
|
|
1580
1756
|
}
|
|
1581
1757
|
updateMfaAuthenticator(paramsOrFirst, ...rest) {
|
|
1582
1758
|
let params;
|
|
1583
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1759
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst || 'otp' in paramsOrFirst))) {
|
|
1584
1760
|
params = (paramsOrFirst || {});
|
|
1585
1761
|
}
|
|
1586
1762
|
else {
|
|
@@ -1610,7 +1786,7 @@ class Account {
|
|
|
1610
1786
|
}
|
|
1611
1787
|
updateMFAAuthenticator(paramsOrFirst, ...rest) {
|
|
1612
1788
|
let params;
|
|
1613
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1789
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst || 'otp' in paramsOrFirst))) {
|
|
1614
1790
|
params = (paramsOrFirst || {});
|
|
1615
1791
|
}
|
|
1616
1792
|
else {
|
|
@@ -1640,7 +1816,7 @@ class Account {
|
|
|
1640
1816
|
}
|
|
1641
1817
|
deleteMfaAuthenticator(paramsOrFirst) {
|
|
1642
1818
|
let params;
|
|
1643
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1819
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1644
1820
|
params = (paramsOrFirst || {});
|
|
1645
1821
|
}
|
|
1646
1822
|
else {
|
|
@@ -1662,7 +1838,7 @@ class Account {
|
|
|
1662
1838
|
}
|
|
1663
1839
|
deleteMFAAuthenticator(paramsOrFirst) {
|
|
1664
1840
|
let params;
|
|
1665
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1841
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1666
1842
|
params = (paramsOrFirst || {});
|
|
1667
1843
|
}
|
|
1668
1844
|
else {
|
|
@@ -1684,7 +1860,7 @@ class Account {
|
|
|
1684
1860
|
}
|
|
1685
1861
|
createMfaChallenge(paramsOrFirst) {
|
|
1686
1862
|
let params;
|
|
1687
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
|
|
1863
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
|
|
1688
1864
|
params = (paramsOrFirst || {});
|
|
1689
1865
|
}
|
|
1690
1866
|
else {
|
|
@@ -1709,7 +1885,7 @@ class Account {
|
|
|
1709
1885
|
}
|
|
1710
1886
|
createMFAChallenge(paramsOrFirst) {
|
|
1711
1887
|
let params;
|
|
1712
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
|
|
1888
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
|
|
1713
1889
|
params = (paramsOrFirst || {});
|
|
1714
1890
|
}
|
|
1715
1891
|
else {
|
|
@@ -2202,7 +2378,7 @@ class Account {
|
|
|
2202
2378
|
}
|
|
2203
2379
|
updatePrefs(paramsOrFirst) {
|
|
2204
2380
|
let params;
|
|
2205
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'prefs' in paramsOrFirst)) {
|
|
2381
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('prefs' in paramsOrFirst))) {
|
|
2206
2382
|
params = (paramsOrFirst || {});
|
|
2207
2383
|
}
|
|
2208
2384
|
else {
|
|
@@ -2410,7 +2586,7 @@ class Account {
|
|
|
2410
2586
|
}
|
|
2411
2587
|
createOAuth2Session(paramsOrFirst, ...rest) {
|
|
2412
2588
|
let params;
|
|
2413
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'provider' in paramsOrFirst)) {
|
|
2589
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('provider' in paramsOrFirst || 'success' in paramsOrFirst || 'failure' in paramsOrFirst || 'scopes' in paramsOrFirst))) {
|
|
2414
2590
|
params = (paramsOrFirst || {});
|
|
2415
2591
|
}
|
|
2416
2592
|
else {
|
|
@@ -2770,7 +2946,7 @@ class Account {
|
|
|
2770
2946
|
}
|
|
2771
2947
|
createOAuth2Token(paramsOrFirst, ...rest) {
|
|
2772
2948
|
let params;
|
|
2773
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'provider' in paramsOrFirst)) {
|
|
2949
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('provider' in paramsOrFirst || 'success' in paramsOrFirst || 'failure' in paramsOrFirst || 'scopes' in paramsOrFirst))) {
|
|
2774
2950
|
params = (paramsOrFirst || {});
|
|
2775
2951
|
}
|
|
2776
2952
|
else {
|
|
@@ -3017,7 +3193,7 @@ class Avatars {
|
|
|
3017
3193
|
}
|
|
3018
3194
|
getBrowser(paramsOrFirst, ...rest) {
|
|
3019
3195
|
let params;
|
|
3020
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
3196
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
3021
3197
|
params = (paramsOrFirst || {});
|
|
3022
3198
|
}
|
|
3023
3199
|
else {
|
|
@@ -3055,7 +3231,7 @@ class Avatars {
|
|
|
3055
3231
|
}
|
|
3056
3232
|
getCreditCard(paramsOrFirst, ...rest) {
|
|
3057
3233
|
let params;
|
|
3058
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
3234
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
3059
3235
|
params = (paramsOrFirst || {});
|
|
3060
3236
|
}
|
|
3061
3237
|
else {
|
|
@@ -3119,7 +3295,7 @@ class Avatars {
|
|
|
3119
3295
|
}
|
|
3120
3296
|
getFlag(paramsOrFirst, ...rest) {
|
|
3121
3297
|
let params;
|
|
3122
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
3298
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
3123
3299
|
params = (paramsOrFirst || {});
|
|
3124
3300
|
}
|
|
3125
3301
|
else {
|
|
@@ -3419,7 +3595,7 @@ class Backups {
|
|
|
3419
3595
|
}
|
|
3420
3596
|
createArchive(paramsOrFirst, ...rest) {
|
|
3421
3597
|
let params;
|
|
3422
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3598
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('services' in paramsOrFirst || 'resourceId' in paramsOrFirst))) {
|
|
3423
3599
|
params = (paramsOrFirst || {});
|
|
3424
3600
|
}
|
|
3425
3601
|
else {
|
|
@@ -3819,7 +3995,7 @@ class Console {
|
|
|
3819
3995
|
}
|
|
3820
3996
|
getPlans(paramsOrFirst) {
|
|
3821
3997
|
let params;
|
|
3822
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'platform' in paramsOrFirst)) {
|
|
3998
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('platform' in paramsOrFirst))) {
|
|
3823
3999
|
params = (paramsOrFirst || {});
|
|
3824
4000
|
}
|
|
3825
4001
|
else {
|
|
@@ -3899,25 +4075,15 @@ class Console {
|
|
|
3899
4075
|
};
|
|
3900
4076
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
3901
4077
|
}
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
organizationId: paramsOrFirst
|
|
3910
|
-
};
|
|
3911
|
-
}
|
|
3912
|
-
const organizationId = params.organizationId;
|
|
3913
|
-
if (typeof organizationId === 'undefined') {
|
|
3914
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
3915
|
-
}
|
|
4078
|
+
/**
|
|
4079
|
+
* Get all available regions for the console.
|
|
4080
|
+
*
|
|
4081
|
+
* @throws {AppwriteException}
|
|
4082
|
+
* @returns {Promise<Models.ConsoleRegionList>}
|
|
4083
|
+
*/
|
|
4084
|
+
listRegions() {
|
|
3916
4085
|
const apiPath = '/console/regions';
|
|
3917
4086
|
const payload = {};
|
|
3918
|
-
if (typeof organizationId !== 'undefined') {
|
|
3919
|
-
payload['organizationId'] = organizationId;
|
|
3920
|
-
}
|
|
3921
4087
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3922
4088
|
const apiHeaders = {};
|
|
3923
4089
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
@@ -4314,7 +4480,7 @@ class Databases {
|
|
|
4314
4480
|
}
|
|
4315
4481
|
listUsage(paramsOrFirst) {
|
|
4316
4482
|
let params;
|
|
4317
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
4483
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
4318
4484
|
params = (paramsOrFirst || {});
|
|
4319
4485
|
}
|
|
4320
4486
|
else {
|
|
@@ -4370,9 +4536,6 @@ class Databases {
|
|
|
4370
4536
|
if (typeof databaseId === 'undefined') {
|
|
4371
4537
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
4372
4538
|
}
|
|
4373
|
-
if (typeof name === 'undefined') {
|
|
4374
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
4375
|
-
}
|
|
4376
4539
|
const apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
|
|
4377
4540
|
const payload = {};
|
|
4378
4541
|
if (typeof name !== 'undefined') {
|
|
@@ -4559,9 +4722,6 @@ class Databases {
|
|
|
4559
4722
|
if (typeof collectionId === 'undefined') {
|
|
4560
4723
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
4561
4724
|
}
|
|
4562
|
-
if (typeof name === 'undefined') {
|
|
4563
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
4564
|
-
}
|
|
4565
4725
|
const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
4566
4726
|
const payload = {};
|
|
4567
4727
|
if (typeof name !== 'undefined') {
|
|
@@ -5540,7 +5700,7 @@ class Databases {
|
|
|
5540
5700
|
};
|
|
5541
5701
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
5542
5702
|
}
|
|
5543
|
-
|
|
5703
|
+
createLongtextAttribute(paramsOrFirst, ...rest) {
|
|
5544
5704
|
let params;
|
|
5545
5705
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5546
5706
|
params = (paramsOrFirst || {});
|
|
@@ -5551,7 +5711,8 @@ class Databases {
|
|
|
5551
5711
|
collectionId: rest[0],
|
|
5552
5712
|
key: rest[1],
|
|
5553
5713
|
required: rest[2],
|
|
5554
|
-
xdefault: rest[3]
|
|
5714
|
+
xdefault: rest[3],
|
|
5715
|
+
array: rest[4]
|
|
5555
5716
|
};
|
|
5556
5717
|
}
|
|
5557
5718
|
const databaseId = params.databaseId;
|
|
@@ -5559,6 +5720,7 @@ class Databases {
|
|
|
5559
5720
|
const key = params.key;
|
|
5560
5721
|
const required = params.required;
|
|
5561
5722
|
const xdefault = params.xdefault;
|
|
5723
|
+
const array = params.array;
|
|
5562
5724
|
if (typeof databaseId === 'undefined') {
|
|
5563
5725
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
5564
5726
|
}
|
|
@@ -5571,7 +5733,7 @@ class Databases {
|
|
|
5571
5733
|
if (typeof required === 'undefined') {
|
|
5572
5734
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
5573
5735
|
}
|
|
5574
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/
|
|
5736
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
5575
5737
|
const payload = {};
|
|
5576
5738
|
if (typeof key !== 'undefined') {
|
|
5577
5739
|
payload['key'] = key;
|
|
@@ -5582,13 +5744,16 @@ class Databases {
|
|
|
5582
5744
|
if (typeof xdefault !== 'undefined') {
|
|
5583
5745
|
payload['default'] = xdefault;
|
|
5584
5746
|
}
|
|
5747
|
+
if (typeof array !== 'undefined') {
|
|
5748
|
+
payload['array'] = array;
|
|
5749
|
+
}
|
|
5585
5750
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5586
5751
|
const apiHeaders = {
|
|
5587
5752
|
'content-type': 'application/json',
|
|
5588
5753
|
};
|
|
5589
5754
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
5590
5755
|
}
|
|
5591
|
-
|
|
5756
|
+
updateLongtextAttribute(paramsOrFirst, ...rest) {
|
|
5592
5757
|
let params;
|
|
5593
5758
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5594
5759
|
params = (paramsOrFirst || {});
|
|
@@ -5621,7 +5786,10 @@ class Databases {
|
|
|
5621
5786
|
if (typeof required === 'undefined') {
|
|
5622
5787
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
5623
5788
|
}
|
|
5624
|
-
|
|
5789
|
+
if (typeof xdefault === 'undefined') {
|
|
5790
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
5791
|
+
}
|
|
5792
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
5625
5793
|
const payload = {};
|
|
5626
5794
|
if (typeof required !== 'undefined') {
|
|
5627
5795
|
payload['required'] = required;
|
|
@@ -5638,7 +5806,7 @@ class Databases {
|
|
|
5638
5806
|
};
|
|
5639
5807
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
5640
5808
|
}
|
|
5641
|
-
|
|
5809
|
+
createMediumtextAttribute(paramsOrFirst, ...rest) {
|
|
5642
5810
|
let params;
|
|
5643
5811
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5644
5812
|
params = (paramsOrFirst || {});
|
|
@@ -5649,7 +5817,8 @@ class Databases {
|
|
|
5649
5817
|
collectionId: rest[0],
|
|
5650
5818
|
key: rest[1],
|
|
5651
5819
|
required: rest[2],
|
|
5652
|
-
xdefault: rest[3]
|
|
5820
|
+
xdefault: rest[3],
|
|
5821
|
+
array: rest[4]
|
|
5653
5822
|
};
|
|
5654
5823
|
}
|
|
5655
5824
|
const databaseId = params.databaseId;
|
|
@@ -5657,6 +5826,7 @@ class Databases {
|
|
|
5657
5826
|
const key = params.key;
|
|
5658
5827
|
const required = params.required;
|
|
5659
5828
|
const xdefault = params.xdefault;
|
|
5829
|
+
const array = params.array;
|
|
5660
5830
|
if (typeof databaseId === 'undefined') {
|
|
5661
5831
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
5662
5832
|
}
|
|
@@ -5669,7 +5839,7 @@ class Databases {
|
|
|
5669
5839
|
if (typeof required === 'undefined') {
|
|
5670
5840
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
5671
5841
|
}
|
|
5672
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/
|
|
5842
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
5673
5843
|
const payload = {};
|
|
5674
5844
|
if (typeof key !== 'undefined') {
|
|
5675
5845
|
payload['key'] = key;
|
|
@@ -5680,13 +5850,16 @@ class Databases {
|
|
|
5680
5850
|
if (typeof xdefault !== 'undefined') {
|
|
5681
5851
|
payload['default'] = xdefault;
|
|
5682
5852
|
}
|
|
5853
|
+
if (typeof array !== 'undefined') {
|
|
5854
|
+
payload['array'] = array;
|
|
5855
|
+
}
|
|
5683
5856
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5684
5857
|
const apiHeaders = {
|
|
5685
5858
|
'content-type': 'application/json',
|
|
5686
5859
|
};
|
|
5687
5860
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
5688
5861
|
}
|
|
5689
|
-
|
|
5862
|
+
updateMediumtextAttribute(paramsOrFirst, ...rest) {
|
|
5690
5863
|
let params;
|
|
5691
5864
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5692
5865
|
params = (paramsOrFirst || {});
|
|
@@ -5719,7 +5892,10 @@ class Databases {
|
|
|
5719
5892
|
if (typeof required === 'undefined') {
|
|
5720
5893
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
5721
5894
|
}
|
|
5722
|
-
|
|
5895
|
+
if (typeof xdefault === 'undefined') {
|
|
5896
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
5897
|
+
}
|
|
5898
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
5723
5899
|
const payload = {};
|
|
5724
5900
|
if (typeof required !== 'undefined') {
|
|
5725
5901
|
payload['required'] = required;
|
|
@@ -5736,7 +5912,7 @@ class Databases {
|
|
|
5736
5912
|
};
|
|
5737
5913
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
5738
5914
|
}
|
|
5739
|
-
|
|
5915
|
+
createPointAttribute(paramsOrFirst, ...rest) {
|
|
5740
5916
|
let params;
|
|
5741
5917
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5742
5918
|
params = (paramsOrFirst || {});
|
|
@@ -5745,53 +5921,38 @@ class Databases {
|
|
|
5745
5921
|
params = {
|
|
5746
5922
|
databaseId: paramsOrFirst,
|
|
5747
5923
|
collectionId: rest[0],
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
key: rest[4],
|
|
5752
|
-
twoWayKey: rest[5],
|
|
5753
|
-
onDelete: rest[6]
|
|
5924
|
+
key: rest[1],
|
|
5925
|
+
required: rest[2],
|
|
5926
|
+
xdefault: rest[3]
|
|
5754
5927
|
};
|
|
5755
5928
|
}
|
|
5756
5929
|
const databaseId = params.databaseId;
|
|
5757
5930
|
const collectionId = params.collectionId;
|
|
5758
|
-
const relatedCollectionId = params.relatedCollectionId;
|
|
5759
|
-
const type = params.type;
|
|
5760
|
-
const twoWay = params.twoWay;
|
|
5761
5931
|
const key = params.key;
|
|
5762
|
-
const
|
|
5763
|
-
const
|
|
5932
|
+
const required = params.required;
|
|
5933
|
+
const xdefault = params.xdefault;
|
|
5764
5934
|
if (typeof databaseId === 'undefined') {
|
|
5765
5935
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
5766
5936
|
}
|
|
5767
5937
|
if (typeof collectionId === 'undefined') {
|
|
5768
5938
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
5769
5939
|
}
|
|
5770
|
-
if (typeof
|
|
5771
|
-
throw new AppwriteException('Missing required parameter: "
|
|
5940
|
+
if (typeof key === 'undefined') {
|
|
5941
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
5772
5942
|
}
|
|
5773
|
-
if (typeof
|
|
5774
|
-
throw new AppwriteException('Missing required parameter: "
|
|
5943
|
+
if (typeof required === 'undefined') {
|
|
5944
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
5775
5945
|
}
|
|
5776
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/
|
|
5946
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
5777
5947
|
const payload = {};
|
|
5778
|
-
if (typeof relatedCollectionId !== 'undefined') {
|
|
5779
|
-
payload['relatedCollectionId'] = relatedCollectionId;
|
|
5780
|
-
}
|
|
5781
|
-
if (typeof type !== 'undefined') {
|
|
5782
|
-
payload['type'] = type;
|
|
5783
|
-
}
|
|
5784
|
-
if (typeof twoWay !== 'undefined') {
|
|
5785
|
-
payload['twoWay'] = twoWay;
|
|
5786
|
-
}
|
|
5787
5948
|
if (typeof key !== 'undefined') {
|
|
5788
5949
|
payload['key'] = key;
|
|
5789
5950
|
}
|
|
5790
|
-
if (typeof
|
|
5791
|
-
payload['
|
|
5951
|
+
if (typeof required !== 'undefined') {
|
|
5952
|
+
payload['required'] = required;
|
|
5792
5953
|
}
|
|
5793
|
-
if (typeof
|
|
5794
|
-
payload['
|
|
5954
|
+
if (typeof xdefault !== 'undefined') {
|
|
5955
|
+
payload['default'] = xdefault;
|
|
5795
5956
|
}
|
|
5796
5957
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5797
5958
|
const apiHeaders = {
|
|
@@ -5799,7 +5960,7 @@ class Databases {
|
|
|
5799
5960
|
};
|
|
5800
5961
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
5801
5962
|
}
|
|
5802
|
-
|
|
5963
|
+
updatePointAttribute(paramsOrFirst, ...rest) {
|
|
5803
5964
|
let params;
|
|
5804
5965
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5805
5966
|
params = (paramsOrFirst || {});
|
|
@@ -5809,21 +5970,17 @@ class Databases {
|
|
|
5809
5970
|
databaseId: paramsOrFirst,
|
|
5810
5971
|
collectionId: rest[0],
|
|
5811
5972
|
key: rest[1],
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
array: rest[5],
|
|
5816
|
-
encrypt: rest[6]
|
|
5973
|
+
required: rest[2],
|
|
5974
|
+
xdefault: rest[3],
|
|
5975
|
+
newKey: rest[4]
|
|
5817
5976
|
};
|
|
5818
5977
|
}
|
|
5819
5978
|
const databaseId = params.databaseId;
|
|
5820
5979
|
const collectionId = params.collectionId;
|
|
5821
5980
|
const key = params.key;
|
|
5822
|
-
const size = params.size;
|
|
5823
5981
|
const required = params.required;
|
|
5824
5982
|
const xdefault = params.xdefault;
|
|
5825
|
-
const
|
|
5826
|
-
const encrypt = params.encrypt;
|
|
5983
|
+
const newKey = params.newKey;
|
|
5827
5984
|
if (typeof databaseId === 'undefined') {
|
|
5828
5985
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
5829
5986
|
}
|
|
@@ -5833,39 +5990,75 @@ class Databases {
|
|
|
5833
5990
|
if (typeof key === 'undefined') {
|
|
5834
5991
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
5835
5992
|
}
|
|
5836
|
-
if (typeof
|
|
5837
|
-
throw new AppwriteException('Missing required parameter: "
|
|
5993
|
+
if (typeof required === 'undefined') {
|
|
5994
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
5995
|
+
}
|
|
5996
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
5997
|
+
const payload = {};
|
|
5998
|
+
if (typeof required !== 'undefined') {
|
|
5999
|
+
payload['required'] = required;
|
|
6000
|
+
}
|
|
6001
|
+
if (typeof xdefault !== 'undefined') {
|
|
6002
|
+
payload['default'] = xdefault;
|
|
6003
|
+
}
|
|
6004
|
+
if (typeof newKey !== 'undefined') {
|
|
6005
|
+
payload['newKey'] = newKey;
|
|
6006
|
+
}
|
|
6007
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6008
|
+
const apiHeaders = {
|
|
6009
|
+
'content-type': 'application/json',
|
|
6010
|
+
};
|
|
6011
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
6012
|
+
}
|
|
6013
|
+
createPolygonAttribute(paramsOrFirst, ...rest) {
|
|
6014
|
+
let params;
|
|
6015
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6016
|
+
params = (paramsOrFirst || {});
|
|
6017
|
+
}
|
|
6018
|
+
else {
|
|
6019
|
+
params = {
|
|
6020
|
+
databaseId: paramsOrFirst,
|
|
6021
|
+
collectionId: rest[0],
|
|
6022
|
+
key: rest[1],
|
|
6023
|
+
required: rest[2],
|
|
6024
|
+
xdefault: rest[3]
|
|
6025
|
+
};
|
|
6026
|
+
}
|
|
6027
|
+
const databaseId = params.databaseId;
|
|
6028
|
+
const collectionId = params.collectionId;
|
|
6029
|
+
const key = params.key;
|
|
6030
|
+
const required = params.required;
|
|
6031
|
+
const xdefault = params.xdefault;
|
|
6032
|
+
if (typeof databaseId === 'undefined') {
|
|
6033
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6034
|
+
}
|
|
6035
|
+
if (typeof collectionId === 'undefined') {
|
|
6036
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6037
|
+
}
|
|
6038
|
+
if (typeof key === 'undefined') {
|
|
6039
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
5838
6040
|
}
|
|
5839
6041
|
if (typeof required === 'undefined') {
|
|
5840
6042
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
5841
6043
|
}
|
|
5842
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/
|
|
6044
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
5843
6045
|
const payload = {};
|
|
5844
6046
|
if (typeof key !== 'undefined') {
|
|
5845
6047
|
payload['key'] = key;
|
|
5846
6048
|
}
|
|
5847
|
-
if (typeof size !== 'undefined') {
|
|
5848
|
-
payload['size'] = size;
|
|
5849
|
-
}
|
|
5850
6049
|
if (typeof required !== 'undefined') {
|
|
5851
6050
|
payload['required'] = required;
|
|
5852
6051
|
}
|
|
5853
6052
|
if (typeof xdefault !== 'undefined') {
|
|
5854
6053
|
payload['default'] = xdefault;
|
|
5855
6054
|
}
|
|
5856
|
-
if (typeof array !== 'undefined') {
|
|
5857
|
-
payload['array'] = array;
|
|
5858
|
-
}
|
|
5859
|
-
if (typeof encrypt !== 'undefined') {
|
|
5860
|
-
payload['encrypt'] = encrypt;
|
|
5861
|
-
}
|
|
5862
6055
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5863
6056
|
const apiHeaders = {
|
|
5864
6057
|
'content-type': 'application/json',
|
|
5865
6058
|
};
|
|
5866
6059
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
5867
6060
|
}
|
|
5868
|
-
|
|
6061
|
+
updatePolygonAttribute(paramsOrFirst, ...rest) {
|
|
5869
6062
|
let params;
|
|
5870
6063
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5871
6064
|
params = (paramsOrFirst || {});
|
|
@@ -5877,8 +6070,7 @@ class Databases {
|
|
|
5877
6070
|
key: rest[1],
|
|
5878
6071
|
required: rest[2],
|
|
5879
6072
|
xdefault: rest[3],
|
|
5880
|
-
|
|
5881
|
-
newKey: rest[5]
|
|
6073
|
+
newKey: rest[4]
|
|
5882
6074
|
};
|
|
5883
6075
|
}
|
|
5884
6076
|
const databaseId = params.databaseId;
|
|
@@ -5886,7 +6078,6 @@ class Databases {
|
|
|
5886
6078
|
const key = params.key;
|
|
5887
6079
|
const required = params.required;
|
|
5888
6080
|
const xdefault = params.xdefault;
|
|
5889
|
-
const size = params.size;
|
|
5890
6081
|
const newKey = params.newKey;
|
|
5891
6082
|
if (typeof databaseId === 'undefined') {
|
|
5892
6083
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -5900,10 +6091,7 @@ class Databases {
|
|
|
5900
6091
|
if (typeof required === 'undefined') {
|
|
5901
6092
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
5902
6093
|
}
|
|
5903
|
-
|
|
5904
|
-
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
5905
|
-
}
|
|
5906
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
6094
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
5907
6095
|
const payload = {};
|
|
5908
6096
|
if (typeof required !== 'undefined') {
|
|
5909
6097
|
payload['required'] = required;
|
|
@@ -5911,9 +6099,6 @@ class Databases {
|
|
|
5911
6099
|
if (typeof xdefault !== 'undefined') {
|
|
5912
6100
|
payload['default'] = xdefault;
|
|
5913
6101
|
}
|
|
5914
|
-
if (typeof size !== 'undefined') {
|
|
5915
|
-
payload['size'] = size;
|
|
5916
|
-
}
|
|
5917
6102
|
if (typeof newKey !== 'undefined') {
|
|
5918
6103
|
payload['newKey'] = newKey;
|
|
5919
6104
|
}
|
|
@@ -5923,7 +6108,70 @@ class Databases {
|
|
|
5923
6108
|
};
|
|
5924
6109
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
5925
6110
|
}
|
|
5926
|
-
|
|
6111
|
+
createRelationshipAttribute(paramsOrFirst, ...rest) {
|
|
6112
|
+
let params;
|
|
6113
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6114
|
+
params = (paramsOrFirst || {});
|
|
6115
|
+
}
|
|
6116
|
+
else {
|
|
6117
|
+
params = {
|
|
6118
|
+
databaseId: paramsOrFirst,
|
|
6119
|
+
collectionId: rest[0],
|
|
6120
|
+
relatedCollectionId: rest[1],
|
|
6121
|
+
type: rest[2],
|
|
6122
|
+
twoWay: rest[3],
|
|
6123
|
+
key: rest[4],
|
|
6124
|
+
twoWayKey: rest[5],
|
|
6125
|
+
onDelete: rest[6]
|
|
6126
|
+
};
|
|
6127
|
+
}
|
|
6128
|
+
const databaseId = params.databaseId;
|
|
6129
|
+
const collectionId = params.collectionId;
|
|
6130
|
+
const relatedCollectionId = params.relatedCollectionId;
|
|
6131
|
+
const type = params.type;
|
|
6132
|
+
const twoWay = params.twoWay;
|
|
6133
|
+
const key = params.key;
|
|
6134
|
+
const twoWayKey = params.twoWayKey;
|
|
6135
|
+
const onDelete = params.onDelete;
|
|
6136
|
+
if (typeof databaseId === 'undefined') {
|
|
6137
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6138
|
+
}
|
|
6139
|
+
if (typeof collectionId === 'undefined') {
|
|
6140
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6141
|
+
}
|
|
6142
|
+
if (typeof relatedCollectionId === 'undefined') {
|
|
6143
|
+
throw new AppwriteException('Missing required parameter: "relatedCollectionId"');
|
|
6144
|
+
}
|
|
6145
|
+
if (typeof type === 'undefined') {
|
|
6146
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
6147
|
+
}
|
|
6148
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
6149
|
+
const payload = {};
|
|
6150
|
+
if (typeof relatedCollectionId !== 'undefined') {
|
|
6151
|
+
payload['relatedCollectionId'] = relatedCollectionId;
|
|
6152
|
+
}
|
|
6153
|
+
if (typeof type !== 'undefined') {
|
|
6154
|
+
payload['type'] = type;
|
|
6155
|
+
}
|
|
6156
|
+
if (typeof twoWay !== 'undefined') {
|
|
6157
|
+
payload['twoWay'] = twoWay;
|
|
6158
|
+
}
|
|
6159
|
+
if (typeof key !== 'undefined') {
|
|
6160
|
+
payload['key'] = key;
|
|
6161
|
+
}
|
|
6162
|
+
if (typeof twoWayKey !== 'undefined') {
|
|
6163
|
+
payload['twoWayKey'] = twoWayKey;
|
|
6164
|
+
}
|
|
6165
|
+
if (typeof onDelete !== 'undefined') {
|
|
6166
|
+
payload['onDelete'] = onDelete;
|
|
6167
|
+
}
|
|
6168
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6169
|
+
const apiHeaders = {
|
|
6170
|
+
'content-type': 'application/json',
|
|
6171
|
+
};
|
|
6172
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
6173
|
+
}
|
|
6174
|
+
createStringAttribute(paramsOrFirst, ...rest) {
|
|
5927
6175
|
let params;
|
|
5928
6176
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5929
6177
|
params = (paramsOrFirst || {});
|
|
@@ -5933,17 +6181,21 @@ class Databases {
|
|
|
5933
6181
|
databaseId: paramsOrFirst,
|
|
5934
6182
|
collectionId: rest[0],
|
|
5935
6183
|
key: rest[1],
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
6184
|
+
size: rest[2],
|
|
6185
|
+
required: rest[3],
|
|
6186
|
+
xdefault: rest[4],
|
|
6187
|
+
array: rest[5],
|
|
6188
|
+
encrypt: rest[6]
|
|
5939
6189
|
};
|
|
5940
6190
|
}
|
|
5941
6191
|
const databaseId = params.databaseId;
|
|
5942
6192
|
const collectionId = params.collectionId;
|
|
5943
6193
|
const key = params.key;
|
|
6194
|
+
const size = params.size;
|
|
5944
6195
|
const required = params.required;
|
|
5945
6196
|
const xdefault = params.xdefault;
|
|
5946
6197
|
const array = params.array;
|
|
6198
|
+
const encrypt = params.encrypt;
|
|
5947
6199
|
if (typeof databaseId === 'undefined') {
|
|
5948
6200
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
5949
6201
|
}
|
|
@@ -5953,14 +6205,20 @@ class Databases {
|
|
|
5953
6205
|
if (typeof key === 'undefined') {
|
|
5954
6206
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
5955
6207
|
}
|
|
6208
|
+
if (typeof size === 'undefined') {
|
|
6209
|
+
throw new AppwriteException('Missing required parameter: "size"');
|
|
6210
|
+
}
|
|
5956
6211
|
if (typeof required === 'undefined') {
|
|
5957
6212
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
5958
6213
|
}
|
|
5959
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/
|
|
6214
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
5960
6215
|
const payload = {};
|
|
5961
6216
|
if (typeof key !== 'undefined') {
|
|
5962
6217
|
payload['key'] = key;
|
|
5963
6218
|
}
|
|
6219
|
+
if (typeof size !== 'undefined') {
|
|
6220
|
+
payload['size'] = size;
|
|
6221
|
+
}
|
|
5964
6222
|
if (typeof required !== 'undefined') {
|
|
5965
6223
|
payload['required'] = required;
|
|
5966
6224
|
}
|
|
@@ -5970,13 +6228,16 @@ class Databases {
|
|
|
5970
6228
|
if (typeof array !== 'undefined') {
|
|
5971
6229
|
payload['array'] = array;
|
|
5972
6230
|
}
|
|
6231
|
+
if (typeof encrypt !== 'undefined') {
|
|
6232
|
+
payload['encrypt'] = encrypt;
|
|
6233
|
+
}
|
|
5973
6234
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5974
6235
|
const apiHeaders = {
|
|
5975
6236
|
'content-type': 'application/json',
|
|
5976
6237
|
};
|
|
5977
6238
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
5978
6239
|
}
|
|
5979
|
-
|
|
6240
|
+
updateStringAttribute(paramsOrFirst, ...rest) {
|
|
5980
6241
|
let params;
|
|
5981
6242
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5982
6243
|
params = (paramsOrFirst || {});
|
|
@@ -5988,7 +6249,8 @@ class Databases {
|
|
|
5988
6249
|
key: rest[1],
|
|
5989
6250
|
required: rest[2],
|
|
5990
6251
|
xdefault: rest[3],
|
|
5991
|
-
|
|
6252
|
+
size: rest[4],
|
|
6253
|
+
newKey: rest[5]
|
|
5992
6254
|
};
|
|
5993
6255
|
}
|
|
5994
6256
|
const databaseId = params.databaseId;
|
|
@@ -5996,6 +6258,7 @@ class Databases {
|
|
|
5996
6258
|
const key = params.key;
|
|
5997
6259
|
const required = params.required;
|
|
5998
6260
|
const xdefault = params.xdefault;
|
|
6261
|
+
const size = params.size;
|
|
5999
6262
|
const newKey = params.newKey;
|
|
6000
6263
|
if (typeof databaseId === 'undefined') {
|
|
6001
6264
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -6012,7 +6275,7 @@ class Databases {
|
|
|
6012
6275
|
if (typeof xdefault === 'undefined') {
|
|
6013
6276
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
6014
6277
|
}
|
|
6015
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/
|
|
6278
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
6016
6279
|
const payload = {};
|
|
6017
6280
|
if (typeof required !== 'undefined') {
|
|
6018
6281
|
payload['required'] = required;
|
|
@@ -6020,6 +6283,9 @@ class Databases {
|
|
|
6020
6283
|
if (typeof xdefault !== 'undefined') {
|
|
6021
6284
|
payload['default'] = xdefault;
|
|
6022
6285
|
}
|
|
6286
|
+
if (typeof size !== 'undefined') {
|
|
6287
|
+
payload['size'] = size;
|
|
6288
|
+
}
|
|
6023
6289
|
if (typeof newKey !== 'undefined') {
|
|
6024
6290
|
payload['newKey'] = newKey;
|
|
6025
6291
|
}
|
|
@@ -6029,7 +6295,7 @@ class Databases {
|
|
|
6029
6295
|
};
|
|
6030
6296
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
6031
6297
|
}
|
|
6032
|
-
|
|
6298
|
+
createTextAttribute(paramsOrFirst, ...rest) {
|
|
6033
6299
|
let params;
|
|
6034
6300
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6035
6301
|
params = (paramsOrFirst || {});
|
|
@@ -6038,12 +6304,18 @@ class Databases {
|
|
|
6038
6304
|
params = {
|
|
6039
6305
|
databaseId: paramsOrFirst,
|
|
6040
6306
|
collectionId: rest[0],
|
|
6041
|
-
key: rest[1]
|
|
6307
|
+
key: rest[1],
|
|
6308
|
+
required: rest[2],
|
|
6309
|
+
xdefault: rest[3],
|
|
6310
|
+
array: rest[4]
|
|
6042
6311
|
};
|
|
6043
6312
|
}
|
|
6044
6313
|
const databaseId = params.databaseId;
|
|
6045
6314
|
const collectionId = params.collectionId;
|
|
6046
6315
|
const key = params.key;
|
|
6316
|
+
const required = params.required;
|
|
6317
|
+
const xdefault = params.xdefault;
|
|
6318
|
+
const array = params.array;
|
|
6047
6319
|
if (typeof databaseId === 'undefined') {
|
|
6048
6320
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6049
6321
|
}
|
|
@@ -6053,13 +6325,30 @@ class Databases {
|
|
|
6053
6325
|
if (typeof key === 'undefined') {
|
|
6054
6326
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
6055
6327
|
}
|
|
6056
|
-
|
|
6328
|
+
if (typeof required === 'undefined') {
|
|
6329
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
6330
|
+
}
|
|
6331
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
6057
6332
|
const payload = {};
|
|
6333
|
+
if (typeof key !== 'undefined') {
|
|
6334
|
+
payload['key'] = key;
|
|
6335
|
+
}
|
|
6336
|
+
if (typeof required !== 'undefined') {
|
|
6337
|
+
payload['required'] = required;
|
|
6338
|
+
}
|
|
6339
|
+
if (typeof xdefault !== 'undefined') {
|
|
6340
|
+
payload['default'] = xdefault;
|
|
6341
|
+
}
|
|
6342
|
+
if (typeof array !== 'undefined') {
|
|
6343
|
+
payload['array'] = array;
|
|
6344
|
+
}
|
|
6058
6345
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6059
|
-
const apiHeaders = {
|
|
6060
|
-
|
|
6346
|
+
const apiHeaders = {
|
|
6347
|
+
'content-type': 'application/json',
|
|
6348
|
+
};
|
|
6349
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
6061
6350
|
}
|
|
6062
|
-
|
|
6351
|
+
updateTextAttribute(paramsOrFirst, ...rest) {
|
|
6063
6352
|
let params;
|
|
6064
6353
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6065
6354
|
params = (paramsOrFirst || {});
|
|
@@ -6068,12 +6357,18 @@ class Databases {
|
|
|
6068
6357
|
params = {
|
|
6069
6358
|
databaseId: paramsOrFirst,
|
|
6070
6359
|
collectionId: rest[0],
|
|
6071
|
-
key: rest[1]
|
|
6360
|
+
key: rest[1],
|
|
6361
|
+
required: rest[2],
|
|
6362
|
+
xdefault: rest[3],
|
|
6363
|
+
newKey: rest[4]
|
|
6072
6364
|
};
|
|
6073
6365
|
}
|
|
6074
6366
|
const databaseId = params.databaseId;
|
|
6075
6367
|
const collectionId = params.collectionId;
|
|
6076
6368
|
const key = params.key;
|
|
6369
|
+
const required = params.required;
|
|
6370
|
+
const xdefault = params.xdefault;
|
|
6371
|
+
const newKey = params.newKey;
|
|
6077
6372
|
if (typeof databaseId === 'undefined') {
|
|
6078
6373
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6079
6374
|
}
|
|
@@ -6083,15 +6378,30 @@ class Databases {
|
|
|
6083
6378
|
if (typeof key === 'undefined') {
|
|
6084
6379
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
6085
6380
|
}
|
|
6086
|
-
|
|
6381
|
+
if (typeof required === 'undefined') {
|
|
6382
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
6383
|
+
}
|
|
6384
|
+
if (typeof xdefault === 'undefined') {
|
|
6385
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
6386
|
+
}
|
|
6387
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
6087
6388
|
const payload = {};
|
|
6389
|
+
if (typeof required !== 'undefined') {
|
|
6390
|
+
payload['required'] = required;
|
|
6391
|
+
}
|
|
6392
|
+
if (typeof xdefault !== 'undefined') {
|
|
6393
|
+
payload['default'] = xdefault;
|
|
6394
|
+
}
|
|
6395
|
+
if (typeof newKey !== 'undefined') {
|
|
6396
|
+
payload['newKey'] = newKey;
|
|
6397
|
+
}
|
|
6088
6398
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6089
6399
|
const apiHeaders = {
|
|
6090
6400
|
'content-type': 'application/json',
|
|
6091
6401
|
};
|
|
6092
|
-
return this.client.call('
|
|
6402
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
6093
6403
|
}
|
|
6094
|
-
|
|
6404
|
+
createUrlAttribute(paramsOrFirst, ...rest) {
|
|
6095
6405
|
let params;
|
|
6096
6406
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6097
6407
|
params = (paramsOrFirst || {});
|
|
@@ -6101,15 +6411,17 @@ class Databases {
|
|
|
6101
6411
|
databaseId: paramsOrFirst,
|
|
6102
6412
|
collectionId: rest[0],
|
|
6103
6413
|
key: rest[1],
|
|
6104
|
-
|
|
6105
|
-
|
|
6414
|
+
required: rest[2],
|
|
6415
|
+
xdefault: rest[3],
|
|
6416
|
+
array: rest[4]
|
|
6106
6417
|
};
|
|
6107
6418
|
}
|
|
6108
6419
|
const databaseId = params.databaseId;
|
|
6109
6420
|
const collectionId = params.collectionId;
|
|
6110
6421
|
const key = params.key;
|
|
6111
|
-
const
|
|
6112
|
-
const
|
|
6422
|
+
const required = params.required;
|
|
6423
|
+
const xdefault = params.xdefault;
|
|
6424
|
+
const array = params.array;
|
|
6113
6425
|
if (typeof databaseId === 'undefined') {
|
|
6114
6426
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6115
6427
|
}
|
|
@@ -6119,21 +6431,30 @@ class Databases {
|
|
|
6119
6431
|
if (typeof key === 'undefined') {
|
|
6120
6432
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
6121
6433
|
}
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
if (typeof onDelete !== 'undefined') {
|
|
6125
|
-
payload['onDelete'] = onDelete;
|
|
6434
|
+
if (typeof required === 'undefined') {
|
|
6435
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
6126
6436
|
}
|
|
6127
|
-
|
|
6128
|
-
|
|
6437
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
6438
|
+
const payload = {};
|
|
6439
|
+
if (typeof key !== 'undefined') {
|
|
6440
|
+
payload['key'] = key;
|
|
6441
|
+
}
|
|
6442
|
+
if (typeof required !== 'undefined') {
|
|
6443
|
+
payload['required'] = required;
|
|
6444
|
+
}
|
|
6445
|
+
if (typeof xdefault !== 'undefined') {
|
|
6446
|
+
payload['default'] = xdefault;
|
|
6447
|
+
}
|
|
6448
|
+
if (typeof array !== 'undefined') {
|
|
6449
|
+
payload['array'] = array;
|
|
6129
6450
|
}
|
|
6130
6451
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6131
6452
|
const apiHeaders = {
|
|
6132
6453
|
'content-type': 'application/json',
|
|
6133
6454
|
};
|
|
6134
|
-
return this.client.call('
|
|
6455
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
6135
6456
|
}
|
|
6136
|
-
|
|
6457
|
+
updateUrlAttribute(paramsOrFirst, ...rest) {
|
|
6137
6458
|
let params;
|
|
6138
6459
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6139
6460
|
params = (paramsOrFirst || {});
|
|
@@ -6142,38 +6463,51 @@ class Databases {
|
|
|
6142
6463
|
params = {
|
|
6143
6464
|
databaseId: paramsOrFirst,
|
|
6144
6465
|
collectionId: rest[0],
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6466
|
+
key: rest[1],
|
|
6467
|
+
required: rest[2],
|
|
6468
|
+
xdefault: rest[3],
|
|
6469
|
+
newKey: rest[4]
|
|
6148
6470
|
};
|
|
6149
6471
|
}
|
|
6150
6472
|
const databaseId = params.databaseId;
|
|
6151
6473
|
const collectionId = params.collectionId;
|
|
6152
|
-
const
|
|
6153
|
-
const
|
|
6154
|
-
const
|
|
6474
|
+
const key = params.key;
|
|
6475
|
+
const required = params.required;
|
|
6476
|
+
const xdefault = params.xdefault;
|
|
6477
|
+
const newKey = params.newKey;
|
|
6155
6478
|
if (typeof databaseId === 'undefined') {
|
|
6156
6479
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6157
6480
|
}
|
|
6158
6481
|
if (typeof collectionId === 'undefined') {
|
|
6159
6482
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6160
6483
|
}
|
|
6161
|
-
|
|
6484
|
+
if (typeof key === 'undefined') {
|
|
6485
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
6486
|
+
}
|
|
6487
|
+
if (typeof required === 'undefined') {
|
|
6488
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
6489
|
+
}
|
|
6490
|
+
if (typeof xdefault === 'undefined') {
|
|
6491
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
6492
|
+
}
|
|
6493
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
6162
6494
|
const payload = {};
|
|
6163
|
-
if (typeof
|
|
6164
|
-
payload['
|
|
6495
|
+
if (typeof required !== 'undefined') {
|
|
6496
|
+
payload['required'] = required;
|
|
6165
6497
|
}
|
|
6166
|
-
if (typeof
|
|
6167
|
-
payload['
|
|
6498
|
+
if (typeof xdefault !== 'undefined') {
|
|
6499
|
+
payload['default'] = xdefault;
|
|
6168
6500
|
}
|
|
6169
|
-
if (typeof
|
|
6170
|
-
payload['
|
|
6501
|
+
if (typeof newKey !== 'undefined') {
|
|
6502
|
+
payload['newKey'] = newKey;
|
|
6171
6503
|
}
|
|
6172
6504
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6173
|
-
const apiHeaders = {
|
|
6174
|
-
|
|
6505
|
+
const apiHeaders = {
|
|
6506
|
+
'content-type': 'application/json',
|
|
6507
|
+
};
|
|
6508
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
6175
6509
|
}
|
|
6176
|
-
|
|
6510
|
+
createVarcharAttribute(paramsOrFirst, ...rest) {
|
|
6177
6511
|
let params;
|
|
6178
6512
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6179
6513
|
params = (paramsOrFirst || {});
|
|
@@ -6182,43 +6516,51 @@ class Databases {
|
|
|
6182
6516
|
params = {
|
|
6183
6517
|
databaseId: paramsOrFirst,
|
|
6184
6518
|
collectionId: rest[0],
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6519
|
+
key: rest[1],
|
|
6520
|
+
size: rest[2],
|
|
6521
|
+
required: rest[3],
|
|
6522
|
+
xdefault: rest[4],
|
|
6523
|
+
array: rest[5]
|
|
6189
6524
|
};
|
|
6190
6525
|
}
|
|
6191
6526
|
const databaseId = params.databaseId;
|
|
6192
6527
|
const collectionId = params.collectionId;
|
|
6193
|
-
const
|
|
6194
|
-
const
|
|
6195
|
-
const
|
|
6196
|
-
const
|
|
6528
|
+
const key = params.key;
|
|
6529
|
+
const size = params.size;
|
|
6530
|
+
const required = params.required;
|
|
6531
|
+
const xdefault = params.xdefault;
|
|
6532
|
+
const array = params.array;
|
|
6197
6533
|
if (typeof databaseId === 'undefined') {
|
|
6198
6534
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6199
6535
|
}
|
|
6200
6536
|
if (typeof collectionId === 'undefined') {
|
|
6201
6537
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6202
6538
|
}
|
|
6203
|
-
if (typeof
|
|
6204
|
-
throw new AppwriteException('Missing required parameter: "
|
|
6539
|
+
if (typeof key === 'undefined') {
|
|
6540
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
6205
6541
|
}
|
|
6206
|
-
if (typeof
|
|
6207
|
-
throw new AppwriteException('Missing required parameter: "
|
|
6542
|
+
if (typeof size === 'undefined') {
|
|
6543
|
+
throw new AppwriteException('Missing required parameter: "size"');
|
|
6208
6544
|
}
|
|
6209
|
-
|
|
6545
|
+
if (typeof required === 'undefined') {
|
|
6546
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
6547
|
+
}
|
|
6548
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
6210
6549
|
const payload = {};
|
|
6211
|
-
if (typeof
|
|
6212
|
-
payload['
|
|
6550
|
+
if (typeof key !== 'undefined') {
|
|
6551
|
+
payload['key'] = key;
|
|
6213
6552
|
}
|
|
6214
|
-
if (typeof
|
|
6215
|
-
payload['
|
|
6553
|
+
if (typeof size !== 'undefined') {
|
|
6554
|
+
payload['size'] = size;
|
|
6216
6555
|
}
|
|
6217
|
-
if (typeof
|
|
6218
|
-
payload['
|
|
6556
|
+
if (typeof required !== 'undefined') {
|
|
6557
|
+
payload['required'] = required;
|
|
6219
6558
|
}
|
|
6220
|
-
if (typeof
|
|
6221
|
-
payload['
|
|
6559
|
+
if (typeof xdefault !== 'undefined') {
|
|
6560
|
+
payload['default'] = xdefault;
|
|
6561
|
+
}
|
|
6562
|
+
if (typeof array !== 'undefined') {
|
|
6563
|
+
payload['array'] = array;
|
|
6222
6564
|
}
|
|
6223
6565
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6224
6566
|
const apiHeaders = {
|
|
@@ -6226,7 +6568,7 @@ class Databases {
|
|
|
6226
6568
|
};
|
|
6227
6569
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
6228
6570
|
}
|
|
6229
|
-
|
|
6571
|
+
updateVarcharAttribute(paramsOrFirst, ...rest) {
|
|
6230
6572
|
let params;
|
|
6231
6573
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6232
6574
|
params = (paramsOrFirst || {});
|
|
@@ -6235,38 +6577,56 @@ class Databases {
|
|
|
6235
6577
|
params = {
|
|
6236
6578
|
databaseId: paramsOrFirst,
|
|
6237
6579
|
collectionId: rest[0],
|
|
6238
|
-
|
|
6239
|
-
|
|
6580
|
+
key: rest[1],
|
|
6581
|
+
required: rest[2],
|
|
6582
|
+
xdefault: rest[3],
|
|
6583
|
+
size: rest[4],
|
|
6584
|
+
newKey: rest[5]
|
|
6240
6585
|
};
|
|
6241
6586
|
}
|
|
6242
6587
|
const databaseId = params.databaseId;
|
|
6243
6588
|
const collectionId = params.collectionId;
|
|
6244
|
-
const
|
|
6245
|
-
const
|
|
6589
|
+
const key = params.key;
|
|
6590
|
+
const required = params.required;
|
|
6591
|
+
const xdefault = params.xdefault;
|
|
6592
|
+
const size = params.size;
|
|
6593
|
+
const newKey = params.newKey;
|
|
6246
6594
|
if (typeof databaseId === 'undefined') {
|
|
6247
6595
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6248
6596
|
}
|
|
6249
6597
|
if (typeof collectionId === 'undefined') {
|
|
6250
6598
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6251
6599
|
}
|
|
6252
|
-
if (typeof
|
|
6253
|
-
throw new AppwriteException('Missing required parameter: "
|
|
6600
|
+
if (typeof key === 'undefined') {
|
|
6601
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
6254
6602
|
}
|
|
6255
|
-
|
|
6603
|
+
if (typeof required === 'undefined') {
|
|
6604
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
6605
|
+
}
|
|
6606
|
+
if (typeof xdefault === 'undefined') {
|
|
6607
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
6608
|
+
}
|
|
6609
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
6256
6610
|
const payload = {};
|
|
6257
|
-
if (typeof
|
|
6258
|
-
payload['
|
|
6611
|
+
if (typeof required !== 'undefined') {
|
|
6612
|
+
payload['required'] = required;
|
|
6259
6613
|
}
|
|
6260
|
-
if (typeof
|
|
6261
|
-
payload['
|
|
6614
|
+
if (typeof xdefault !== 'undefined') {
|
|
6615
|
+
payload['default'] = xdefault;
|
|
6616
|
+
}
|
|
6617
|
+
if (typeof size !== 'undefined') {
|
|
6618
|
+
payload['size'] = size;
|
|
6619
|
+
}
|
|
6620
|
+
if (typeof newKey !== 'undefined') {
|
|
6621
|
+
payload['newKey'] = newKey;
|
|
6262
6622
|
}
|
|
6263
6623
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6264
6624
|
const apiHeaders = {
|
|
6265
6625
|
'content-type': 'application/json',
|
|
6266
6626
|
};
|
|
6267
|
-
return this.client.call('
|
|
6627
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
6268
6628
|
}
|
|
6269
|
-
|
|
6629
|
+
getAttribute(paramsOrFirst, ...rest) {
|
|
6270
6630
|
let params;
|
|
6271
6631
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6272
6632
|
params = (paramsOrFirst || {});
|
|
@@ -6275,38 +6635,28 @@ class Databases {
|
|
|
6275
6635
|
params = {
|
|
6276
6636
|
databaseId: paramsOrFirst,
|
|
6277
6637
|
collectionId: rest[0],
|
|
6278
|
-
|
|
6279
|
-
transactionId: rest[2]
|
|
6638
|
+
key: rest[1]
|
|
6280
6639
|
};
|
|
6281
6640
|
}
|
|
6282
6641
|
const databaseId = params.databaseId;
|
|
6283
6642
|
const collectionId = params.collectionId;
|
|
6284
|
-
const
|
|
6285
|
-
const transactionId = params.transactionId;
|
|
6643
|
+
const key = params.key;
|
|
6286
6644
|
if (typeof databaseId === 'undefined') {
|
|
6287
6645
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6288
6646
|
}
|
|
6289
6647
|
if (typeof collectionId === 'undefined') {
|
|
6290
6648
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6291
6649
|
}
|
|
6292
|
-
if (typeof
|
|
6293
|
-
throw new AppwriteException('Missing required parameter: "
|
|
6650
|
+
if (typeof key === 'undefined') {
|
|
6651
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
6294
6652
|
}
|
|
6295
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/
|
|
6653
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
6296
6654
|
const payload = {};
|
|
6297
|
-
if (typeof documents !== 'undefined') {
|
|
6298
|
-
payload['documents'] = documents;
|
|
6299
|
-
}
|
|
6300
|
-
if (typeof transactionId !== 'undefined') {
|
|
6301
|
-
payload['transactionId'] = transactionId;
|
|
6302
|
-
}
|
|
6303
6655
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6304
|
-
const apiHeaders = {
|
|
6305
|
-
|
|
6306
|
-
};
|
|
6307
|
-
return this.client.call('put', uri, apiHeaders, payload);
|
|
6656
|
+
const apiHeaders = {};
|
|
6657
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
6308
6658
|
}
|
|
6309
|
-
|
|
6659
|
+
deleteAttribute(paramsOrFirst, ...rest) {
|
|
6310
6660
|
let params;
|
|
6311
6661
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6312
6662
|
params = (paramsOrFirst || {});
|
|
@@ -6315,40 +6665,30 @@ class Databases {
|
|
|
6315
6665
|
params = {
|
|
6316
6666
|
databaseId: paramsOrFirst,
|
|
6317
6667
|
collectionId: rest[0],
|
|
6318
|
-
|
|
6319
|
-
queries: rest[2],
|
|
6320
|
-
transactionId: rest[3]
|
|
6668
|
+
key: rest[1]
|
|
6321
6669
|
};
|
|
6322
6670
|
}
|
|
6323
6671
|
const databaseId = params.databaseId;
|
|
6324
6672
|
const collectionId = params.collectionId;
|
|
6325
|
-
const
|
|
6326
|
-
const queries = params.queries;
|
|
6327
|
-
const transactionId = params.transactionId;
|
|
6673
|
+
const key = params.key;
|
|
6328
6674
|
if (typeof databaseId === 'undefined') {
|
|
6329
6675
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6330
6676
|
}
|
|
6331
6677
|
if (typeof collectionId === 'undefined') {
|
|
6332
6678
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6333
6679
|
}
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
if (typeof data !== 'undefined') {
|
|
6337
|
-
payload['data'] = data;
|
|
6338
|
-
}
|
|
6339
|
-
if (typeof queries !== 'undefined') {
|
|
6340
|
-
payload['queries'] = queries;
|
|
6341
|
-
}
|
|
6342
|
-
if (typeof transactionId !== 'undefined') {
|
|
6343
|
-
payload['transactionId'] = transactionId;
|
|
6680
|
+
if (typeof key === 'undefined') {
|
|
6681
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
6344
6682
|
}
|
|
6683
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
6684
|
+
const payload = {};
|
|
6345
6685
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6346
6686
|
const apiHeaders = {
|
|
6347
6687
|
'content-type': 'application/json',
|
|
6348
6688
|
};
|
|
6349
|
-
return this.client.call('
|
|
6689
|
+
return this.client.call('delete', uri, apiHeaders, payload);
|
|
6350
6690
|
}
|
|
6351
|
-
|
|
6691
|
+
updateRelationshipAttribute(paramsOrFirst, ...rest) {
|
|
6352
6692
|
let params;
|
|
6353
6693
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6354
6694
|
params = (paramsOrFirst || {});
|
|
@@ -6357,35 +6697,40 @@ class Databases {
|
|
|
6357
6697
|
params = {
|
|
6358
6698
|
databaseId: paramsOrFirst,
|
|
6359
6699
|
collectionId: rest[0],
|
|
6360
|
-
|
|
6361
|
-
|
|
6700
|
+
key: rest[1],
|
|
6701
|
+
onDelete: rest[2],
|
|
6702
|
+
newKey: rest[3]
|
|
6362
6703
|
};
|
|
6363
6704
|
}
|
|
6364
6705
|
const databaseId = params.databaseId;
|
|
6365
6706
|
const collectionId = params.collectionId;
|
|
6366
|
-
const
|
|
6367
|
-
const
|
|
6707
|
+
const key = params.key;
|
|
6708
|
+
const onDelete = params.onDelete;
|
|
6709
|
+
const newKey = params.newKey;
|
|
6368
6710
|
if (typeof databaseId === 'undefined') {
|
|
6369
6711
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6370
6712
|
}
|
|
6371
6713
|
if (typeof collectionId === 'undefined') {
|
|
6372
6714
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6373
6715
|
}
|
|
6374
|
-
|
|
6716
|
+
if (typeof key === 'undefined') {
|
|
6717
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
6718
|
+
}
|
|
6719
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
6375
6720
|
const payload = {};
|
|
6376
|
-
if (typeof
|
|
6377
|
-
payload['
|
|
6721
|
+
if (typeof onDelete !== 'undefined') {
|
|
6722
|
+
payload['onDelete'] = onDelete;
|
|
6378
6723
|
}
|
|
6379
|
-
if (typeof
|
|
6380
|
-
payload['
|
|
6724
|
+
if (typeof newKey !== 'undefined') {
|
|
6725
|
+
payload['newKey'] = newKey;
|
|
6381
6726
|
}
|
|
6382
6727
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6383
6728
|
const apiHeaders = {
|
|
6384
6729
|
'content-type': 'application/json',
|
|
6385
6730
|
};
|
|
6386
|
-
return this.client.call('
|
|
6731
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
6387
6732
|
}
|
|
6388
|
-
|
|
6733
|
+
listDocuments(paramsOrFirst, ...rest) {
|
|
6389
6734
|
let params;
|
|
6390
6735
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6391
6736
|
params = (paramsOrFirst || {});
|
|
@@ -6394,26 +6739,23 @@ class Databases {
|
|
|
6394
6739
|
params = {
|
|
6395
6740
|
databaseId: paramsOrFirst,
|
|
6396
6741
|
collectionId: rest[0],
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6742
|
+
queries: rest[1],
|
|
6743
|
+
transactionId: rest[2],
|
|
6744
|
+
total: rest[3]
|
|
6400
6745
|
};
|
|
6401
6746
|
}
|
|
6402
6747
|
const databaseId = params.databaseId;
|
|
6403
6748
|
const collectionId = params.collectionId;
|
|
6404
|
-
const documentId = params.documentId;
|
|
6405
6749
|
const queries = params.queries;
|
|
6406
6750
|
const transactionId = params.transactionId;
|
|
6751
|
+
const total = params.total;
|
|
6407
6752
|
if (typeof databaseId === 'undefined') {
|
|
6408
6753
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6409
6754
|
}
|
|
6410
6755
|
if (typeof collectionId === 'undefined') {
|
|
6411
6756
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6412
6757
|
}
|
|
6413
|
-
|
|
6414
|
-
throw new AppwriteException('Missing required parameter: "documentId"');
|
|
6415
|
-
}
|
|
6416
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
6758
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
6417
6759
|
const payload = {};
|
|
6418
6760
|
if (typeof queries !== 'undefined') {
|
|
6419
6761
|
payload['queries'] = queries;
|
|
@@ -6421,11 +6763,266 @@ class Databases {
|
|
|
6421
6763
|
if (typeof transactionId !== 'undefined') {
|
|
6422
6764
|
payload['transactionId'] = transactionId;
|
|
6423
6765
|
}
|
|
6766
|
+
if (typeof total !== 'undefined') {
|
|
6767
|
+
payload['total'] = total;
|
|
6768
|
+
}
|
|
6424
6769
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6425
6770
|
const apiHeaders = {};
|
|
6426
6771
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
6427
6772
|
}
|
|
6428
|
-
|
|
6773
|
+
createDocument(paramsOrFirst, ...rest) {
|
|
6774
|
+
let params;
|
|
6775
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6776
|
+
params = (paramsOrFirst || {});
|
|
6777
|
+
}
|
|
6778
|
+
else {
|
|
6779
|
+
params = {
|
|
6780
|
+
databaseId: paramsOrFirst,
|
|
6781
|
+
collectionId: rest[0],
|
|
6782
|
+
documentId: rest[1],
|
|
6783
|
+
data: rest[2],
|
|
6784
|
+
permissions: rest[3],
|
|
6785
|
+
transactionId: rest[4]
|
|
6786
|
+
};
|
|
6787
|
+
}
|
|
6788
|
+
const databaseId = params.databaseId;
|
|
6789
|
+
const collectionId = params.collectionId;
|
|
6790
|
+
const documentId = params.documentId;
|
|
6791
|
+
const data = params.data;
|
|
6792
|
+
const permissions = params.permissions;
|
|
6793
|
+
const transactionId = params.transactionId;
|
|
6794
|
+
if (typeof databaseId === 'undefined') {
|
|
6795
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6796
|
+
}
|
|
6797
|
+
if (typeof collectionId === 'undefined') {
|
|
6798
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6799
|
+
}
|
|
6800
|
+
if (typeof documentId === 'undefined') {
|
|
6801
|
+
throw new AppwriteException('Missing required parameter: "documentId"');
|
|
6802
|
+
}
|
|
6803
|
+
if (typeof data === 'undefined') {
|
|
6804
|
+
throw new AppwriteException('Missing required parameter: "data"');
|
|
6805
|
+
}
|
|
6806
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
6807
|
+
const payload = {};
|
|
6808
|
+
if (typeof documentId !== 'undefined') {
|
|
6809
|
+
payload['documentId'] = documentId;
|
|
6810
|
+
}
|
|
6811
|
+
if (typeof data !== 'undefined') {
|
|
6812
|
+
payload['data'] = data;
|
|
6813
|
+
}
|
|
6814
|
+
if (typeof permissions !== 'undefined') {
|
|
6815
|
+
payload['permissions'] = permissions;
|
|
6816
|
+
}
|
|
6817
|
+
if (typeof transactionId !== 'undefined') {
|
|
6818
|
+
payload['transactionId'] = transactionId;
|
|
6819
|
+
}
|
|
6820
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6821
|
+
const apiHeaders = {
|
|
6822
|
+
'content-type': 'application/json',
|
|
6823
|
+
};
|
|
6824
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
6825
|
+
}
|
|
6826
|
+
createDocuments(paramsOrFirst, ...rest) {
|
|
6827
|
+
let params;
|
|
6828
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6829
|
+
params = (paramsOrFirst || {});
|
|
6830
|
+
}
|
|
6831
|
+
else {
|
|
6832
|
+
params = {
|
|
6833
|
+
databaseId: paramsOrFirst,
|
|
6834
|
+
collectionId: rest[0],
|
|
6835
|
+
documents: rest[1],
|
|
6836
|
+
transactionId: rest[2]
|
|
6837
|
+
};
|
|
6838
|
+
}
|
|
6839
|
+
const databaseId = params.databaseId;
|
|
6840
|
+
const collectionId = params.collectionId;
|
|
6841
|
+
const documents = params.documents;
|
|
6842
|
+
const transactionId = params.transactionId;
|
|
6843
|
+
if (typeof databaseId === 'undefined') {
|
|
6844
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6845
|
+
}
|
|
6846
|
+
if (typeof collectionId === 'undefined') {
|
|
6847
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6848
|
+
}
|
|
6849
|
+
if (typeof documents === 'undefined') {
|
|
6850
|
+
throw new AppwriteException('Missing required parameter: "documents"');
|
|
6851
|
+
}
|
|
6852
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
6853
|
+
const payload = {};
|
|
6854
|
+
if (typeof documents !== 'undefined') {
|
|
6855
|
+
payload['documents'] = documents;
|
|
6856
|
+
}
|
|
6857
|
+
if (typeof transactionId !== 'undefined') {
|
|
6858
|
+
payload['transactionId'] = transactionId;
|
|
6859
|
+
}
|
|
6860
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6861
|
+
const apiHeaders = {
|
|
6862
|
+
'content-type': 'application/json',
|
|
6863
|
+
};
|
|
6864
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
6865
|
+
}
|
|
6866
|
+
upsertDocuments(paramsOrFirst, ...rest) {
|
|
6867
|
+
let params;
|
|
6868
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6869
|
+
params = (paramsOrFirst || {});
|
|
6870
|
+
}
|
|
6871
|
+
else {
|
|
6872
|
+
params = {
|
|
6873
|
+
databaseId: paramsOrFirst,
|
|
6874
|
+
collectionId: rest[0],
|
|
6875
|
+
documents: rest[1],
|
|
6876
|
+
transactionId: rest[2]
|
|
6877
|
+
};
|
|
6878
|
+
}
|
|
6879
|
+
const databaseId = params.databaseId;
|
|
6880
|
+
const collectionId = params.collectionId;
|
|
6881
|
+
const documents = params.documents;
|
|
6882
|
+
const transactionId = params.transactionId;
|
|
6883
|
+
if (typeof databaseId === 'undefined') {
|
|
6884
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6885
|
+
}
|
|
6886
|
+
if (typeof collectionId === 'undefined') {
|
|
6887
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6888
|
+
}
|
|
6889
|
+
if (typeof documents === 'undefined') {
|
|
6890
|
+
throw new AppwriteException('Missing required parameter: "documents"');
|
|
6891
|
+
}
|
|
6892
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
6893
|
+
const payload = {};
|
|
6894
|
+
if (typeof documents !== 'undefined') {
|
|
6895
|
+
payload['documents'] = documents;
|
|
6896
|
+
}
|
|
6897
|
+
if (typeof transactionId !== 'undefined') {
|
|
6898
|
+
payload['transactionId'] = transactionId;
|
|
6899
|
+
}
|
|
6900
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6901
|
+
const apiHeaders = {
|
|
6902
|
+
'content-type': 'application/json',
|
|
6903
|
+
};
|
|
6904
|
+
return this.client.call('put', uri, apiHeaders, payload);
|
|
6905
|
+
}
|
|
6906
|
+
updateDocuments(paramsOrFirst, ...rest) {
|
|
6907
|
+
let params;
|
|
6908
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6909
|
+
params = (paramsOrFirst || {});
|
|
6910
|
+
}
|
|
6911
|
+
else {
|
|
6912
|
+
params = {
|
|
6913
|
+
databaseId: paramsOrFirst,
|
|
6914
|
+
collectionId: rest[0],
|
|
6915
|
+
data: rest[1],
|
|
6916
|
+
queries: rest[2],
|
|
6917
|
+
transactionId: rest[3]
|
|
6918
|
+
};
|
|
6919
|
+
}
|
|
6920
|
+
const databaseId = params.databaseId;
|
|
6921
|
+
const collectionId = params.collectionId;
|
|
6922
|
+
const data = params.data;
|
|
6923
|
+
const queries = params.queries;
|
|
6924
|
+
const transactionId = params.transactionId;
|
|
6925
|
+
if (typeof databaseId === 'undefined') {
|
|
6926
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6927
|
+
}
|
|
6928
|
+
if (typeof collectionId === 'undefined') {
|
|
6929
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6930
|
+
}
|
|
6931
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
6932
|
+
const payload = {};
|
|
6933
|
+
if (typeof data !== 'undefined') {
|
|
6934
|
+
payload['data'] = data;
|
|
6935
|
+
}
|
|
6936
|
+
if (typeof queries !== 'undefined') {
|
|
6937
|
+
payload['queries'] = queries;
|
|
6938
|
+
}
|
|
6939
|
+
if (typeof transactionId !== 'undefined') {
|
|
6940
|
+
payload['transactionId'] = transactionId;
|
|
6941
|
+
}
|
|
6942
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6943
|
+
const apiHeaders = {
|
|
6944
|
+
'content-type': 'application/json',
|
|
6945
|
+
};
|
|
6946
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
6947
|
+
}
|
|
6948
|
+
deleteDocuments(paramsOrFirst, ...rest) {
|
|
6949
|
+
let params;
|
|
6950
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6951
|
+
params = (paramsOrFirst || {});
|
|
6952
|
+
}
|
|
6953
|
+
else {
|
|
6954
|
+
params = {
|
|
6955
|
+
databaseId: paramsOrFirst,
|
|
6956
|
+
collectionId: rest[0],
|
|
6957
|
+
queries: rest[1],
|
|
6958
|
+
transactionId: rest[2]
|
|
6959
|
+
};
|
|
6960
|
+
}
|
|
6961
|
+
const databaseId = params.databaseId;
|
|
6962
|
+
const collectionId = params.collectionId;
|
|
6963
|
+
const queries = params.queries;
|
|
6964
|
+
const transactionId = params.transactionId;
|
|
6965
|
+
if (typeof databaseId === 'undefined') {
|
|
6966
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6967
|
+
}
|
|
6968
|
+
if (typeof collectionId === 'undefined') {
|
|
6969
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6970
|
+
}
|
|
6971
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
6972
|
+
const payload = {};
|
|
6973
|
+
if (typeof queries !== 'undefined') {
|
|
6974
|
+
payload['queries'] = queries;
|
|
6975
|
+
}
|
|
6976
|
+
if (typeof transactionId !== 'undefined') {
|
|
6977
|
+
payload['transactionId'] = transactionId;
|
|
6978
|
+
}
|
|
6979
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6980
|
+
const apiHeaders = {
|
|
6981
|
+
'content-type': 'application/json',
|
|
6982
|
+
};
|
|
6983
|
+
return this.client.call('delete', uri, apiHeaders, payload);
|
|
6984
|
+
}
|
|
6985
|
+
getDocument(paramsOrFirst, ...rest) {
|
|
6986
|
+
let params;
|
|
6987
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6988
|
+
params = (paramsOrFirst || {});
|
|
6989
|
+
}
|
|
6990
|
+
else {
|
|
6991
|
+
params = {
|
|
6992
|
+
databaseId: paramsOrFirst,
|
|
6993
|
+
collectionId: rest[0],
|
|
6994
|
+
documentId: rest[1],
|
|
6995
|
+
queries: rest[2],
|
|
6996
|
+
transactionId: rest[3]
|
|
6997
|
+
};
|
|
6998
|
+
}
|
|
6999
|
+
const databaseId = params.databaseId;
|
|
7000
|
+
const collectionId = params.collectionId;
|
|
7001
|
+
const documentId = params.documentId;
|
|
7002
|
+
const queries = params.queries;
|
|
7003
|
+
const transactionId = params.transactionId;
|
|
7004
|
+
if (typeof databaseId === 'undefined') {
|
|
7005
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
7006
|
+
}
|
|
7007
|
+
if (typeof collectionId === 'undefined') {
|
|
7008
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
7009
|
+
}
|
|
7010
|
+
if (typeof documentId === 'undefined') {
|
|
7011
|
+
throw new AppwriteException('Missing required parameter: "documentId"');
|
|
7012
|
+
}
|
|
7013
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
7014
|
+
const payload = {};
|
|
7015
|
+
if (typeof queries !== 'undefined') {
|
|
7016
|
+
payload['queries'] = queries;
|
|
7017
|
+
}
|
|
7018
|
+
if (typeof transactionId !== 'undefined') {
|
|
7019
|
+
payload['transactionId'] = transactionId;
|
|
7020
|
+
}
|
|
7021
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
7022
|
+
const apiHeaders = {};
|
|
7023
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
7024
|
+
}
|
|
7025
|
+
upsertDocument(paramsOrFirst, ...rest) {
|
|
6429
7026
|
let params;
|
|
6430
7027
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6431
7028
|
params = (paramsOrFirst || {});
|
|
@@ -7027,16 +7624,49 @@ class Domains {
|
|
|
7027
7624
|
};
|
|
7028
7625
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
7029
7626
|
}
|
|
7030
|
-
|
|
7627
|
+
getPrice(paramsOrFirst, ...rest) {
|
|
7031
7628
|
let params;
|
|
7032
7629
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
7033
7630
|
params = (paramsOrFirst || {});
|
|
7034
7631
|
}
|
|
7035
7632
|
else {
|
|
7036
7633
|
params = {
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7634
|
+
domain: paramsOrFirst,
|
|
7635
|
+
periodYears: rest[0],
|
|
7636
|
+
registrationType: rest[1]
|
|
7637
|
+
};
|
|
7638
|
+
}
|
|
7639
|
+
const domain = params.domain;
|
|
7640
|
+
const periodYears = params.periodYears;
|
|
7641
|
+
const registrationType = params.registrationType;
|
|
7642
|
+
if (typeof domain === 'undefined') {
|
|
7643
|
+
throw new AppwriteException('Missing required parameter: "domain"');
|
|
7644
|
+
}
|
|
7645
|
+
const apiPath = '/domains/price';
|
|
7646
|
+
const payload = {};
|
|
7647
|
+
if (typeof domain !== 'undefined') {
|
|
7648
|
+
payload['domain'] = domain;
|
|
7649
|
+
}
|
|
7650
|
+
if (typeof periodYears !== 'undefined') {
|
|
7651
|
+
payload['periodYears'] = periodYears;
|
|
7652
|
+
}
|
|
7653
|
+
if (typeof registrationType !== 'undefined') {
|
|
7654
|
+
payload['registrationType'] = registrationType;
|
|
7655
|
+
}
|
|
7656
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
7657
|
+
const apiHeaders = {};
|
|
7658
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
7659
|
+
}
|
|
7660
|
+
listSuggestions(paramsOrFirst, ...rest) {
|
|
7661
|
+
let params;
|
|
7662
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
7663
|
+
params = (paramsOrFirst || {});
|
|
7664
|
+
}
|
|
7665
|
+
else {
|
|
7666
|
+
params = {
|
|
7667
|
+
query: paramsOrFirst,
|
|
7668
|
+
tlds: rest[0],
|
|
7669
|
+
limit: rest[1],
|
|
7040
7670
|
filterType: rest[2],
|
|
7041
7671
|
priceMax: rest[3],
|
|
7042
7672
|
priceMin: rest[4]
|
|
@@ -8859,7 +9489,7 @@ class Functions {
|
|
|
8859
9489
|
}
|
|
8860
9490
|
listTemplates(paramsOrFirst, ...rest) {
|
|
8861
9491
|
let params;
|
|
8862
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9492
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('runtimes' in paramsOrFirst || 'useCases' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst || 'total' in paramsOrFirst))) {
|
|
8863
9493
|
params = (paramsOrFirst || {});
|
|
8864
9494
|
}
|
|
8865
9495
|
else {
|
|
@@ -8919,7 +9549,7 @@ class Functions {
|
|
|
8919
9549
|
}
|
|
8920
9550
|
listUsage(paramsOrFirst) {
|
|
8921
9551
|
let params;
|
|
8922
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
9552
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
8923
9553
|
params = (paramsOrFirst || {});
|
|
8924
9554
|
}
|
|
8925
9555
|
else {
|
|
@@ -9789,7 +10419,7 @@ class Graphql {
|
|
|
9789
10419
|
}
|
|
9790
10420
|
query(paramsOrFirst) {
|
|
9791
10421
|
let params;
|
|
9792
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {
|
|
10422
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) {
|
|
9793
10423
|
params = (paramsOrFirst || {});
|
|
9794
10424
|
}
|
|
9795
10425
|
else {
|
|
@@ -9815,7 +10445,7 @@ class Graphql {
|
|
|
9815
10445
|
}
|
|
9816
10446
|
mutation(paramsOrFirst) {
|
|
9817
10447
|
let params;
|
|
9818
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {
|
|
10448
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) {
|
|
9819
10449
|
params = (paramsOrFirst || {});
|
|
9820
10450
|
}
|
|
9821
10451
|
else {
|
|
@@ -10097,7 +10727,7 @@ class Health {
|
|
|
10097
10727
|
}
|
|
10098
10728
|
getFailedJobs(paramsOrFirst, ...rest) {
|
|
10099
10729
|
let params;
|
|
10100
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'name' in paramsOrFirst)) {
|
|
10730
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('name' in paramsOrFirst || 'threshold' in paramsOrFirst))) {
|
|
10101
10731
|
params = (paramsOrFirst || {});
|
|
10102
10732
|
}
|
|
10103
10733
|
else {
|
|
@@ -13332,7 +13962,7 @@ class Migrations {
|
|
|
13332
13962
|
}
|
|
13333
13963
|
createAppwriteMigration(paramsOrFirst, ...rest) {
|
|
13334
13964
|
let params;
|
|
13335
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
13965
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'projectId' in paramsOrFirst || 'apiKey' in paramsOrFirst))) {
|
|
13336
13966
|
params = (paramsOrFirst || {});
|
|
13337
13967
|
}
|
|
13338
13968
|
else {
|
|
@@ -13381,7 +14011,7 @@ class Migrations {
|
|
|
13381
14011
|
}
|
|
13382
14012
|
getAppwriteReport(paramsOrFirst, ...rest) {
|
|
13383
14013
|
let params;
|
|
13384
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
14014
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'projectID' in paramsOrFirst || 'key' in paramsOrFirst))) {
|
|
13385
14015
|
params = (paramsOrFirst || {});
|
|
13386
14016
|
}
|
|
13387
14017
|
else {
|
|
@@ -13542,7 +14172,7 @@ class Migrations {
|
|
|
13542
14172
|
}
|
|
13543
14173
|
createFirebaseMigration(paramsOrFirst, ...rest) {
|
|
13544
14174
|
let params;
|
|
13545
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
14175
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'serviceAccount' in paramsOrFirst))) {
|
|
13546
14176
|
params = (paramsOrFirst || {});
|
|
13547
14177
|
}
|
|
13548
14178
|
else {
|
|
@@ -13575,7 +14205,7 @@ class Migrations {
|
|
|
13575
14205
|
}
|
|
13576
14206
|
getFirebaseReport(paramsOrFirst, ...rest) {
|
|
13577
14207
|
let params;
|
|
13578
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
14208
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'serviceAccount' in paramsOrFirst))) {
|
|
13579
14209
|
params = (paramsOrFirst || {});
|
|
13580
14210
|
}
|
|
13581
14211
|
else {
|
|
@@ -13606,7 +14236,7 @@ class Migrations {
|
|
|
13606
14236
|
}
|
|
13607
14237
|
createNHostMigration(paramsOrFirst, ...rest) {
|
|
13608
14238
|
let params;
|
|
13609
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
14239
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'subdomain' in paramsOrFirst || 'region' in paramsOrFirst || 'adminSecret' in paramsOrFirst || 'database' in paramsOrFirst || 'username' in paramsOrFirst || 'password' in paramsOrFirst || 'port' in paramsOrFirst))) {
|
|
13610
14240
|
params = (paramsOrFirst || {});
|
|
13611
14241
|
}
|
|
13612
14242
|
else {
|
|
@@ -13684,7 +14314,7 @@ class Migrations {
|
|
|
13684
14314
|
}
|
|
13685
14315
|
getNHostReport(paramsOrFirst, ...rest) {
|
|
13686
14316
|
let params;
|
|
13687
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
14317
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'subdomain' in paramsOrFirst || 'region' in paramsOrFirst || 'adminSecret' in paramsOrFirst || 'database' in paramsOrFirst || 'username' in paramsOrFirst || 'password' in paramsOrFirst || 'port' in paramsOrFirst))) {
|
|
13688
14318
|
params = (paramsOrFirst || {});
|
|
13689
14319
|
}
|
|
13690
14320
|
else {
|
|
@@ -13760,7 +14390,7 @@ class Migrations {
|
|
|
13760
14390
|
}
|
|
13761
14391
|
createSupabaseMigration(paramsOrFirst, ...rest) {
|
|
13762
14392
|
let params;
|
|
13763
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
14393
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'apiKey' in paramsOrFirst || 'databaseHost' in paramsOrFirst || 'username' in paramsOrFirst || 'password' in paramsOrFirst || 'port' in paramsOrFirst))) {
|
|
13764
14394
|
params = (paramsOrFirst || {});
|
|
13765
14395
|
}
|
|
13766
14396
|
else {
|
|
@@ -13830,7 +14460,7 @@ class Migrations {
|
|
|
13830
14460
|
}
|
|
13831
14461
|
getSupabaseReport(paramsOrFirst, ...rest) {
|
|
13832
14462
|
let params;
|
|
13833
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
14463
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'apiKey' in paramsOrFirst || 'databaseHost' in paramsOrFirst || 'username' in paramsOrFirst || 'password' in paramsOrFirst || 'port' in paramsOrFirst))) {
|
|
13834
14464
|
params = (paramsOrFirst || {});
|
|
13835
14465
|
}
|
|
13836
14466
|
else {
|
|
@@ -14069,7 +14699,7 @@ class Organizations {
|
|
|
14069
14699
|
}
|
|
14070
14700
|
estimationCreateOrganization(paramsOrFirst, ...rest) {
|
|
14071
14701
|
let params;
|
|
14072
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)
|
|
14702
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
14073
14703
|
params = (paramsOrFirst || {});
|
|
14074
14704
|
}
|
|
14075
14705
|
else {
|
|
@@ -14714,6 +15344,174 @@ class Organizations {
|
|
|
14714
15344
|
const apiHeaders = {};
|
|
14715
15345
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
14716
15346
|
}
|
|
15347
|
+
listKeys(paramsOrFirst, ...rest) {
|
|
15348
|
+
let params;
|
|
15349
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
15350
|
+
params = (paramsOrFirst || {});
|
|
15351
|
+
}
|
|
15352
|
+
else {
|
|
15353
|
+
params = {
|
|
15354
|
+
organizationId: paramsOrFirst,
|
|
15355
|
+
total: rest[0]
|
|
15356
|
+
};
|
|
15357
|
+
}
|
|
15358
|
+
const organizationId = params.organizationId;
|
|
15359
|
+
const total = params.total;
|
|
15360
|
+
if (typeof organizationId === 'undefined') {
|
|
15361
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
15362
|
+
}
|
|
15363
|
+
const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
|
|
15364
|
+
const payload = {};
|
|
15365
|
+
if (typeof total !== 'undefined') {
|
|
15366
|
+
payload['total'] = total;
|
|
15367
|
+
}
|
|
15368
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
15369
|
+
const apiHeaders = {};
|
|
15370
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
15371
|
+
}
|
|
15372
|
+
createKey(paramsOrFirst, ...rest) {
|
|
15373
|
+
let params;
|
|
15374
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
15375
|
+
params = (paramsOrFirst || {});
|
|
15376
|
+
}
|
|
15377
|
+
else {
|
|
15378
|
+
params = {
|
|
15379
|
+
organizationId: paramsOrFirst,
|
|
15380
|
+
name: rest[0],
|
|
15381
|
+
scopes: rest[1],
|
|
15382
|
+
expire: rest[2]
|
|
15383
|
+
};
|
|
15384
|
+
}
|
|
15385
|
+
const organizationId = params.organizationId;
|
|
15386
|
+
const name = params.name;
|
|
15387
|
+
const scopes = params.scopes;
|
|
15388
|
+
const expire = params.expire;
|
|
15389
|
+
if (typeof organizationId === 'undefined') {
|
|
15390
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
15391
|
+
}
|
|
15392
|
+
if (typeof name === 'undefined') {
|
|
15393
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
15394
|
+
}
|
|
15395
|
+
if (typeof scopes === 'undefined') {
|
|
15396
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
15397
|
+
}
|
|
15398
|
+
const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
|
|
15399
|
+
const payload = {};
|
|
15400
|
+
if (typeof name !== 'undefined') {
|
|
15401
|
+
payload['name'] = name;
|
|
15402
|
+
}
|
|
15403
|
+
if (typeof scopes !== 'undefined') {
|
|
15404
|
+
payload['scopes'] = scopes;
|
|
15405
|
+
}
|
|
15406
|
+
if (typeof expire !== 'undefined') {
|
|
15407
|
+
payload['expire'] = expire;
|
|
15408
|
+
}
|
|
15409
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
15410
|
+
const apiHeaders = {
|
|
15411
|
+
'content-type': 'application/json',
|
|
15412
|
+
};
|
|
15413
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
15414
|
+
}
|
|
15415
|
+
getKey(paramsOrFirst, ...rest) {
|
|
15416
|
+
let params;
|
|
15417
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
15418
|
+
params = (paramsOrFirst || {});
|
|
15419
|
+
}
|
|
15420
|
+
else {
|
|
15421
|
+
params = {
|
|
15422
|
+
organizationId: paramsOrFirst,
|
|
15423
|
+
keyId: rest[0]
|
|
15424
|
+
};
|
|
15425
|
+
}
|
|
15426
|
+
const organizationId = params.organizationId;
|
|
15427
|
+
const keyId = params.keyId;
|
|
15428
|
+
if (typeof organizationId === 'undefined') {
|
|
15429
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
15430
|
+
}
|
|
15431
|
+
if (typeof keyId === 'undefined') {
|
|
15432
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
15433
|
+
}
|
|
15434
|
+
const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
|
|
15435
|
+
const payload = {};
|
|
15436
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
15437
|
+
const apiHeaders = {};
|
|
15438
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
15439
|
+
}
|
|
15440
|
+
updateKey(paramsOrFirst, ...rest) {
|
|
15441
|
+
let params;
|
|
15442
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
15443
|
+
params = (paramsOrFirst || {});
|
|
15444
|
+
}
|
|
15445
|
+
else {
|
|
15446
|
+
params = {
|
|
15447
|
+
organizationId: paramsOrFirst,
|
|
15448
|
+
keyId: rest[0],
|
|
15449
|
+
name: rest[1],
|
|
15450
|
+
scopes: rest[2],
|
|
15451
|
+
expire: rest[3]
|
|
15452
|
+
};
|
|
15453
|
+
}
|
|
15454
|
+
const organizationId = params.organizationId;
|
|
15455
|
+
const keyId = params.keyId;
|
|
15456
|
+
const name = params.name;
|
|
15457
|
+
const scopes = params.scopes;
|
|
15458
|
+
const expire = params.expire;
|
|
15459
|
+
if (typeof organizationId === 'undefined') {
|
|
15460
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
15461
|
+
}
|
|
15462
|
+
if (typeof keyId === 'undefined') {
|
|
15463
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
15464
|
+
}
|
|
15465
|
+
if (typeof name === 'undefined') {
|
|
15466
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
15467
|
+
}
|
|
15468
|
+
if (typeof scopes === 'undefined') {
|
|
15469
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
15470
|
+
}
|
|
15471
|
+
const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
|
|
15472
|
+
const payload = {};
|
|
15473
|
+
if (typeof name !== 'undefined') {
|
|
15474
|
+
payload['name'] = name;
|
|
15475
|
+
}
|
|
15476
|
+
if (typeof scopes !== 'undefined') {
|
|
15477
|
+
payload['scopes'] = scopes;
|
|
15478
|
+
}
|
|
15479
|
+
if (typeof expire !== 'undefined') {
|
|
15480
|
+
payload['expire'] = expire;
|
|
15481
|
+
}
|
|
15482
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
15483
|
+
const apiHeaders = {
|
|
15484
|
+
'content-type': 'application/json',
|
|
15485
|
+
};
|
|
15486
|
+
return this.client.call('put', uri, apiHeaders, payload);
|
|
15487
|
+
}
|
|
15488
|
+
deleteKey(paramsOrFirst, ...rest) {
|
|
15489
|
+
let params;
|
|
15490
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
15491
|
+
params = (paramsOrFirst || {});
|
|
15492
|
+
}
|
|
15493
|
+
else {
|
|
15494
|
+
params = {
|
|
15495
|
+
organizationId: paramsOrFirst,
|
|
15496
|
+
keyId: rest[0]
|
|
15497
|
+
};
|
|
15498
|
+
}
|
|
15499
|
+
const organizationId = params.organizationId;
|
|
15500
|
+
const keyId = params.keyId;
|
|
15501
|
+
if (typeof organizationId === 'undefined') {
|
|
15502
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
15503
|
+
}
|
|
15504
|
+
if (typeof keyId === 'undefined') {
|
|
15505
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
15506
|
+
}
|
|
15507
|
+
const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
|
|
15508
|
+
const payload = {};
|
|
15509
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
15510
|
+
const apiHeaders = {
|
|
15511
|
+
'content-type': 'application/json',
|
|
15512
|
+
};
|
|
15513
|
+
return this.client.call('delete', uri, apiHeaders, payload);
|
|
15514
|
+
}
|
|
14717
15515
|
setDefaultPaymentMethod(paramsOrFirst, ...rest) {
|
|
14718
15516
|
let params;
|
|
14719
15517
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -14945,32 +15743,25 @@ class Organizations {
|
|
|
14945
15743
|
};
|
|
14946
15744
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
14947
15745
|
}
|
|
14948
|
-
|
|
15746
|
+
listRegions(paramsOrFirst) {
|
|
14949
15747
|
let params;
|
|
14950
15748
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
14951
15749
|
params = (paramsOrFirst || {});
|
|
14952
15750
|
}
|
|
14953
15751
|
else {
|
|
14954
15752
|
params = {
|
|
14955
|
-
organizationId: paramsOrFirst
|
|
14956
|
-
projects: rest[0]
|
|
15753
|
+
organizationId: paramsOrFirst
|
|
14957
15754
|
};
|
|
14958
15755
|
}
|
|
14959
15756
|
const organizationId = params.organizationId;
|
|
14960
|
-
const projects = params.projects;
|
|
14961
15757
|
if (typeof organizationId === 'undefined') {
|
|
14962
15758
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
14963
15759
|
}
|
|
14964
|
-
const apiPath = '/organizations/{organizationId}/
|
|
15760
|
+
const apiPath = '/organizations/{organizationId}/regions'.replace('{organizationId}', organizationId);
|
|
14965
15761
|
const payload = {};
|
|
14966
|
-
if (typeof projects !== 'undefined') {
|
|
14967
|
-
payload['projects'] = projects;
|
|
14968
|
-
}
|
|
14969
15762
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14970
|
-
const apiHeaders = {
|
|
14971
|
-
|
|
14972
|
-
};
|
|
14973
|
-
return this.client.call('patch', uri, apiHeaders, payload);
|
|
15763
|
+
const apiHeaders = {};
|
|
15764
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
14974
15765
|
}
|
|
14975
15766
|
getScopes(paramsOrFirst) {
|
|
14976
15767
|
let params;
|
|
@@ -16186,16 +16977,21 @@ class Projects {
|
|
|
16186
16977
|
else {
|
|
16187
16978
|
params = {
|
|
16188
16979
|
projectId: paramsOrFirst,
|
|
16189
|
-
|
|
16980
|
+
queries: rest[0],
|
|
16981
|
+
total: rest[1]
|
|
16190
16982
|
};
|
|
16191
16983
|
}
|
|
16192
16984
|
const projectId = params.projectId;
|
|
16985
|
+
const queries = params.queries;
|
|
16193
16986
|
const total = params.total;
|
|
16194
16987
|
if (typeof projectId === 'undefined') {
|
|
16195
16988
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
16196
16989
|
}
|
|
16197
16990
|
const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
16198
16991
|
const payload = {};
|
|
16992
|
+
if (typeof queries !== 'undefined') {
|
|
16993
|
+
payload['queries'] = queries;
|
|
16994
|
+
}
|
|
16199
16995
|
if (typeof total !== 'undefined') {
|
|
16200
16996
|
payload['total'] = total;
|
|
16201
16997
|
}
|
|
@@ -16213,12 +17009,14 @@ class Projects {
|
|
|
16213
17009
|
projectId: paramsOrFirst,
|
|
16214
17010
|
name: rest[0],
|
|
16215
17011
|
scopes: rest[1],
|
|
16216
|
-
|
|
17012
|
+
keyId: rest[2],
|
|
17013
|
+
expire: rest[3]
|
|
16217
17014
|
};
|
|
16218
17015
|
}
|
|
16219
17016
|
const projectId = params.projectId;
|
|
16220
17017
|
const name = params.name;
|
|
16221
17018
|
const scopes = params.scopes;
|
|
17019
|
+
const keyId = params.keyId;
|
|
16222
17020
|
const expire = params.expire;
|
|
16223
17021
|
if (typeof projectId === 'undefined') {
|
|
16224
17022
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
@@ -16231,6 +17029,9 @@ class Projects {
|
|
|
16231
17029
|
}
|
|
16232
17030
|
const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
16233
17031
|
const payload = {};
|
|
17032
|
+
if (typeof keyId !== 'undefined') {
|
|
17033
|
+
payload['keyId'] = keyId;
|
|
17034
|
+
}
|
|
16234
17035
|
if (typeof name !== 'undefined') {
|
|
16235
17036
|
payload['name'] = name;
|
|
16236
17037
|
}
|
|
@@ -16967,36 +17768,6 @@ class Projects {
|
|
|
16967
17768
|
};
|
|
16968
17769
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
16969
17770
|
}
|
|
16970
|
-
updateStatus(paramsOrFirst, ...rest) {
|
|
16971
|
-
let params;
|
|
16972
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
16973
|
-
params = (paramsOrFirst || {});
|
|
16974
|
-
}
|
|
16975
|
-
else {
|
|
16976
|
-
params = {
|
|
16977
|
-
projectId: paramsOrFirst,
|
|
16978
|
-
status: rest[0]
|
|
16979
|
-
};
|
|
16980
|
-
}
|
|
16981
|
-
const projectId = params.projectId;
|
|
16982
|
-
const status = params.status;
|
|
16983
|
-
if (typeof projectId === 'undefined') {
|
|
16984
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
16985
|
-
}
|
|
16986
|
-
if (typeof status === 'undefined') {
|
|
16987
|
-
throw new AppwriteException('Missing required parameter: "status"');
|
|
16988
|
-
}
|
|
16989
|
-
const apiPath = '/projects/{projectId}/status'.replace('{projectId}', projectId);
|
|
16990
|
-
const payload = {};
|
|
16991
|
-
if (typeof status !== 'undefined') {
|
|
16992
|
-
payload['status'] = status;
|
|
16993
|
-
}
|
|
16994
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
16995
|
-
const apiHeaders = {
|
|
16996
|
-
'content-type': 'application/json',
|
|
16997
|
-
};
|
|
16998
|
-
return this.client.call('patch', uri, apiHeaders, payload);
|
|
16999
|
-
}
|
|
17000
17771
|
updateTeam(paramsOrFirst, ...rest) {
|
|
17001
17772
|
let params;
|
|
17002
17773
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -18044,7 +18815,7 @@ class Sites {
|
|
|
18044
18815
|
}
|
|
18045
18816
|
listTemplates(paramsOrFirst, ...rest) {
|
|
18046
18817
|
let params;
|
|
18047
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
18818
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('frameworks' in paramsOrFirst || 'useCases' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst))) {
|
|
18048
18819
|
params = (paramsOrFirst || {});
|
|
18049
18820
|
}
|
|
18050
18821
|
else {
|
|
@@ -18099,7 +18870,7 @@ class Sites {
|
|
|
18099
18870
|
}
|
|
18100
18871
|
listUsage(paramsOrFirst) {
|
|
18101
18872
|
let params;
|
|
18102
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
18873
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
18103
18874
|
params = (paramsOrFirst || {});
|
|
18104
18875
|
}
|
|
18105
18876
|
else {
|
|
@@ -19469,7 +20240,7 @@ class Storage {
|
|
|
19469
20240
|
}
|
|
19470
20241
|
getUsage(paramsOrFirst) {
|
|
19471
20242
|
let params;
|
|
19472
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
20243
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
19473
20244
|
params = (paramsOrFirst || {});
|
|
19474
20245
|
}
|
|
19475
20246
|
else {
|
|
@@ -19731,7 +20502,7 @@ class TablesDB {
|
|
|
19731
20502
|
}
|
|
19732
20503
|
listUsage(paramsOrFirst) {
|
|
19733
20504
|
let params;
|
|
19734
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
20505
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
19735
20506
|
params = (paramsOrFirst || {});
|
|
19736
20507
|
}
|
|
19737
20508
|
else {
|
|
@@ -19787,9 +20558,6 @@ class TablesDB {
|
|
|
19787
20558
|
if (typeof databaseId === 'undefined') {
|
|
19788
20559
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
19789
20560
|
}
|
|
19790
|
-
if (typeof name === 'undefined') {
|
|
19791
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
19792
|
-
}
|
|
19793
20561
|
const apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId);
|
|
19794
20562
|
const payload = {};
|
|
19795
20563
|
if (typeof name !== 'undefined') {
|
|
@@ -19976,9 +20744,6 @@ class TablesDB {
|
|
|
19976
20744
|
if (typeof tableId === 'undefined') {
|
|
19977
20745
|
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
19978
20746
|
}
|
|
19979
|
-
if (typeof name === 'undefined') {
|
|
19980
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
19981
|
-
}
|
|
19982
20747
|
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
19983
20748
|
const payload = {};
|
|
19984
20749
|
if (typeof name !== 'undefined') {
|
|
@@ -20061,7 +20826,447 @@ class TablesDB {
|
|
|
20061
20826
|
const apiHeaders = {};
|
|
20062
20827
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
20063
20828
|
}
|
|
20064
|
-
createBooleanColumn(paramsOrFirst, ...rest) {
|
|
20829
|
+
createBooleanColumn(paramsOrFirst, ...rest) {
|
|
20830
|
+
let params;
|
|
20831
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20832
|
+
params = (paramsOrFirst || {});
|
|
20833
|
+
}
|
|
20834
|
+
else {
|
|
20835
|
+
params = {
|
|
20836
|
+
databaseId: paramsOrFirst,
|
|
20837
|
+
tableId: rest[0],
|
|
20838
|
+
key: rest[1],
|
|
20839
|
+
required: rest[2],
|
|
20840
|
+
xdefault: rest[3],
|
|
20841
|
+
array: rest[4]
|
|
20842
|
+
};
|
|
20843
|
+
}
|
|
20844
|
+
const databaseId = params.databaseId;
|
|
20845
|
+
const tableId = params.tableId;
|
|
20846
|
+
const key = params.key;
|
|
20847
|
+
const required = params.required;
|
|
20848
|
+
const xdefault = params.xdefault;
|
|
20849
|
+
const array = params.array;
|
|
20850
|
+
if (typeof databaseId === 'undefined') {
|
|
20851
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
20852
|
+
}
|
|
20853
|
+
if (typeof tableId === 'undefined') {
|
|
20854
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
20855
|
+
}
|
|
20856
|
+
if (typeof key === 'undefined') {
|
|
20857
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
20858
|
+
}
|
|
20859
|
+
if (typeof required === 'undefined') {
|
|
20860
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
20861
|
+
}
|
|
20862
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
20863
|
+
const payload = {};
|
|
20864
|
+
if (typeof key !== 'undefined') {
|
|
20865
|
+
payload['key'] = key;
|
|
20866
|
+
}
|
|
20867
|
+
if (typeof required !== 'undefined') {
|
|
20868
|
+
payload['required'] = required;
|
|
20869
|
+
}
|
|
20870
|
+
if (typeof xdefault !== 'undefined') {
|
|
20871
|
+
payload['default'] = xdefault;
|
|
20872
|
+
}
|
|
20873
|
+
if (typeof array !== 'undefined') {
|
|
20874
|
+
payload['array'] = array;
|
|
20875
|
+
}
|
|
20876
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20877
|
+
const apiHeaders = {
|
|
20878
|
+
'content-type': 'application/json',
|
|
20879
|
+
};
|
|
20880
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
20881
|
+
}
|
|
20882
|
+
updateBooleanColumn(paramsOrFirst, ...rest) {
|
|
20883
|
+
let params;
|
|
20884
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20885
|
+
params = (paramsOrFirst || {});
|
|
20886
|
+
}
|
|
20887
|
+
else {
|
|
20888
|
+
params = {
|
|
20889
|
+
databaseId: paramsOrFirst,
|
|
20890
|
+
tableId: rest[0],
|
|
20891
|
+
key: rest[1],
|
|
20892
|
+
required: rest[2],
|
|
20893
|
+
xdefault: rest[3],
|
|
20894
|
+
newKey: rest[4]
|
|
20895
|
+
};
|
|
20896
|
+
}
|
|
20897
|
+
const databaseId = params.databaseId;
|
|
20898
|
+
const tableId = params.tableId;
|
|
20899
|
+
const key = params.key;
|
|
20900
|
+
const required = params.required;
|
|
20901
|
+
const xdefault = params.xdefault;
|
|
20902
|
+
const newKey = params.newKey;
|
|
20903
|
+
if (typeof databaseId === 'undefined') {
|
|
20904
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
20905
|
+
}
|
|
20906
|
+
if (typeof tableId === 'undefined') {
|
|
20907
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
20908
|
+
}
|
|
20909
|
+
if (typeof key === 'undefined') {
|
|
20910
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
20911
|
+
}
|
|
20912
|
+
if (typeof required === 'undefined') {
|
|
20913
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
20914
|
+
}
|
|
20915
|
+
if (typeof xdefault === 'undefined') {
|
|
20916
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
20917
|
+
}
|
|
20918
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
20919
|
+
const payload = {};
|
|
20920
|
+
if (typeof required !== 'undefined') {
|
|
20921
|
+
payload['required'] = required;
|
|
20922
|
+
}
|
|
20923
|
+
if (typeof xdefault !== 'undefined') {
|
|
20924
|
+
payload['default'] = xdefault;
|
|
20925
|
+
}
|
|
20926
|
+
if (typeof newKey !== 'undefined') {
|
|
20927
|
+
payload['newKey'] = newKey;
|
|
20928
|
+
}
|
|
20929
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20930
|
+
const apiHeaders = {
|
|
20931
|
+
'content-type': 'application/json',
|
|
20932
|
+
};
|
|
20933
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
20934
|
+
}
|
|
20935
|
+
createDatetimeColumn(paramsOrFirst, ...rest) {
|
|
20936
|
+
let params;
|
|
20937
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20938
|
+
params = (paramsOrFirst || {});
|
|
20939
|
+
}
|
|
20940
|
+
else {
|
|
20941
|
+
params = {
|
|
20942
|
+
databaseId: paramsOrFirst,
|
|
20943
|
+
tableId: rest[0],
|
|
20944
|
+
key: rest[1],
|
|
20945
|
+
required: rest[2],
|
|
20946
|
+
xdefault: rest[3],
|
|
20947
|
+
array: rest[4]
|
|
20948
|
+
};
|
|
20949
|
+
}
|
|
20950
|
+
const databaseId = params.databaseId;
|
|
20951
|
+
const tableId = params.tableId;
|
|
20952
|
+
const key = params.key;
|
|
20953
|
+
const required = params.required;
|
|
20954
|
+
const xdefault = params.xdefault;
|
|
20955
|
+
const array = params.array;
|
|
20956
|
+
if (typeof databaseId === 'undefined') {
|
|
20957
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
20958
|
+
}
|
|
20959
|
+
if (typeof tableId === 'undefined') {
|
|
20960
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
20961
|
+
}
|
|
20962
|
+
if (typeof key === 'undefined') {
|
|
20963
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
20964
|
+
}
|
|
20965
|
+
if (typeof required === 'undefined') {
|
|
20966
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
20967
|
+
}
|
|
20968
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
20969
|
+
const payload = {};
|
|
20970
|
+
if (typeof key !== 'undefined') {
|
|
20971
|
+
payload['key'] = key;
|
|
20972
|
+
}
|
|
20973
|
+
if (typeof required !== 'undefined') {
|
|
20974
|
+
payload['required'] = required;
|
|
20975
|
+
}
|
|
20976
|
+
if (typeof xdefault !== 'undefined') {
|
|
20977
|
+
payload['default'] = xdefault;
|
|
20978
|
+
}
|
|
20979
|
+
if (typeof array !== 'undefined') {
|
|
20980
|
+
payload['array'] = array;
|
|
20981
|
+
}
|
|
20982
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20983
|
+
const apiHeaders = {
|
|
20984
|
+
'content-type': 'application/json',
|
|
20985
|
+
};
|
|
20986
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
20987
|
+
}
|
|
20988
|
+
updateDatetimeColumn(paramsOrFirst, ...rest) {
|
|
20989
|
+
let params;
|
|
20990
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20991
|
+
params = (paramsOrFirst || {});
|
|
20992
|
+
}
|
|
20993
|
+
else {
|
|
20994
|
+
params = {
|
|
20995
|
+
databaseId: paramsOrFirst,
|
|
20996
|
+
tableId: rest[0],
|
|
20997
|
+
key: rest[1],
|
|
20998
|
+
required: rest[2],
|
|
20999
|
+
xdefault: rest[3],
|
|
21000
|
+
newKey: rest[4]
|
|
21001
|
+
};
|
|
21002
|
+
}
|
|
21003
|
+
const databaseId = params.databaseId;
|
|
21004
|
+
const tableId = params.tableId;
|
|
21005
|
+
const key = params.key;
|
|
21006
|
+
const required = params.required;
|
|
21007
|
+
const xdefault = params.xdefault;
|
|
21008
|
+
const newKey = params.newKey;
|
|
21009
|
+
if (typeof databaseId === 'undefined') {
|
|
21010
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
21011
|
+
}
|
|
21012
|
+
if (typeof tableId === 'undefined') {
|
|
21013
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
21014
|
+
}
|
|
21015
|
+
if (typeof key === 'undefined') {
|
|
21016
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
21017
|
+
}
|
|
21018
|
+
if (typeof required === 'undefined') {
|
|
21019
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
21020
|
+
}
|
|
21021
|
+
if (typeof xdefault === 'undefined') {
|
|
21022
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
21023
|
+
}
|
|
21024
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
21025
|
+
const payload = {};
|
|
21026
|
+
if (typeof required !== 'undefined') {
|
|
21027
|
+
payload['required'] = required;
|
|
21028
|
+
}
|
|
21029
|
+
if (typeof xdefault !== 'undefined') {
|
|
21030
|
+
payload['default'] = xdefault;
|
|
21031
|
+
}
|
|
21032
|
+
if (typeof newKey !== 'undefined') {
|
|
21033
|
+
payload['newKey'] = newKey;
|
|
21034
|
+
}
|
|
21035
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21036
|
+
const apiHeaders = {
|
|
21037
|
+
'content-type': 'application/json',
|
|
21038
|
+
};
|
|
21039
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
21040
|
+
}
|
|
21041
|
+
createEmailColumn(paramsOrFirst, ...rest) {
|
|
21042
|
+
let params;
|
|
21043
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21044
|
+
params = (paramsOrFirst || {});
|
|
21045
|
+
}
|
|
21046
|
+
else {
|
|
21047
|
+
params = {
|
|
21048
|
+
databaseId: paramsOrFirst,
|
|
21049
|
+
tableId: rest[0],
|
|
21050
|
+
key: rest[1],
|
|
21051
|
+
required: rest[2],
|
|
21052
|
+
xdefault: rest[3],
|
|
21053
|
+
array: rest[4]
|
|
21054
|
+
};
|
|
21055
|
+
}
|
|
21056
|
+
const databaseId = params.databaseId;
|
|
21057
|
+
const tableId = params.tableId;
|
|
21058
|
+
const key = params.key;
|
|
21059
|
+
const required = params.required;
|
|
21060
|
+
const xdefault = params.xdefault;
|
|
21061
|
+
const array = params.array;
|
|
21062
|
+
if (typeof databaseId === 'undefined') {
|
|
21063
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
21064
|
+
}
|
|
21065
|
+
if (typeof tableId === 'undefined') {
|
|
21066
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
21067
|
+
}
|
|
21068
|
+
if (typeof key === 'undefined') {
|
|
21069
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
21070
|
+
}
|
|
21071
|
+
if (typeof required === 'undefined') {
|
|
21072
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
21073
|
+
}
|
|
21074
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
21075
|
+
const payload = {};
|
|
21076
|
+
if (typeof key !== 'undefined') {
|
|
21077
|
+
payload['key'] = key;
|
|
21078
|
+
}
|
|
21079
|
+
if (typeof required !== 'undefined') {
|
|
21080
|
+
payload['required'] = required;
|
|
21081
|
+
}
|
|
21082
|
+
if (typeof xdefault !== 'undefined') {
|
|
21083
|
+
payload['default'] = xdefault;
|
|
21084
|
+
}
|
|
21085
|
+
if (typeof array !== 'undefined') {
|
|
21086
|
+
payload['array'] = array;
|
|
21087
|
+
}
|
|
21088
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21089
|
+
const apiHeaders = {
|
|
21090
|
+
'content-type': 'application/json',
|
|
21091
|
+
};
|
|
21092
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
21093
|
+
}
|
|
21094
|
+
updateEmailColumn(paramsOrFirst, ...rest) {
|
|
21095
|
+
let params;
|
|
21096
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21097
|
+
params = (paramsOrFirst || {});
|
|
21098
|
+
}
|
|
21099
|
+
else {
|
|
21100
|
+
params = {
|
|
21101
|
+
databaseId: paramsOrFirst,
|
|
21102
|
+
tableId: rest[0],
|
|
21103
|
+
key: rest[1],
|
|
21104
|
+
required: rest[2],
|
|
21105
|
+
xdefault: rest[3],
|
|
21106
|
+
newKey: rest[4]
|
|
21107
|
+
};
|
|
21108
|
+
}
|
|
21109
|
+
const databaseId = params.databaseId;
|
|
21110
|
+
const tableId = params.tableId;
|
|
21111
|
+
const key = params.key;
|
|
21112
|
+
const required = params.required;
|
|
21113
|
+
const xdefault = params.xdefault;
|
|
21114
|
+
const newKey = params.newKey;
|
|
21115
|
+
if (typeof databaseId === 'undefined') {
|
|
21116
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
21117
|
+
}
|
|
21118
|
+
if (typeof tableId === 'undefined') {
|
|
21119
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
21120
|
+
}
|
|
21121
|
+
if (typeof key === 'undefined') {
|
|
21122
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
21123
|
+
}
|
|
21124
|
+
if (typeof required === 'undefined') {
|
|
21125
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
21126
|
+
}
|
|
21127
|
+
if (typeof xdefault === 'undefined') {
|
|
21128
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
21129
|
+
}
|
|
21130
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
21131
|
+
const payload = {};
|
|
21132
|
+
if (typeof required !== 'undefined') {
|
|
21133
|
+
payload['required'] = required;
|
|
21134
|
+
}
|
|
21135
|
+
if (typeof xdefault !== 'undefined') {
|
|
21136
|
+
payload['default'] = xdefault;
|
|
21137
|
+
}
|
|
21138
|
+
if (typeof newKey !== 'undefined') {
|
|
21139
|
+
payload['newKey'] = newKey;
|
|
21140
|
+
}
|
|
21141
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21142
|
+
const apiHeaders = {
|
|
21143
|
+
'content-type': 'application/json',
|
|
21144
|
+
};
|
|
21145
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
21146
|
+
}
|
|
21147
|
+
createEnumColumn(paramsOrFirst, ...rest) {
|
|
21148
|
+
let params;
|
|
21149
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21150
|
+
params = (paramsOrFirst || {});
|
|
21151
|
+
}
|
|
21152
|
+
else {
|
|
21153
|
+
params = {
|
|
21154
|
+
databaseId: paramsOrFirst,
|
|
21155
|
+
tableId: rest[0],
|
|
21156
|
+
key: rest[1],
|
|
21157
|
+
elements: rest[2],
|
|
21158
|
+
required: rest[3],
|
|
21159
|
+
xdefault: rest[4],
|
|
21160
|
+
array: rest[5]
|
|
21161
|
+
};
|
|
21162
|
+
}
|
|
21163
|
+
const databaseId = params.databaseId;
|
|
21164
|
+
const tableId = params.tableId;
|
|
21165
|
+
const key = params.key;
|
|
21166
|
+
const elements = params.elements;
|
|
21167
|
+
const required = params.required;
|
|
21168
|
+
const xdefault = params.xdefault;
|
|
21169
|
+
const array = params.array;
|
|
21170
|
+
if (typeof databaseId === 'undefined') {
|
|
21171
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
21172
|
+
}
|
|
21173
|
+
if (typeof tableId === 'undefined') {
|
|
21174
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
21175
|
+
}
|
|
21176
|
+
if (typeof key === 'undefined') {
|
|
21177
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
21178
|
+
}
|
|
21179
|
+
if (typeof elements === 'undefined') {
|
|
21180
|
+
throw new AppwriteException('Missing required parameter: "elements"');
|
|
21181
|
+
}
|
|
21182
|
+
if (typeof required === 'undefined') {
|
|
21183
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
21184
|
+
}
|
|
21185
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
21186
|
+
const payload = {};
|
|
21187
|
+
if (typeof key !== 'undefined') {
|
|
21188
|
+
payload['key'] = key;
|
|
21189
|
+
}
|
|
21190
|
+
if (typeof elements !== 'undefined') {
|
|
21191
|
+
payload['elements'] = elements;
|
|
21192
|
+
}
|
|
21193
|
+
if (typeof required !== 'undefined') {
|
|
21194
|
+
payload['required'] = required;
|
|
21195
|
+
}
|
|
21196
|
+
if (typeof xdefault !== 'undefined') {
|
|
21197
|
+
payload['default'] = xdefault;
|
|
21198
|
+
}
|
|
21199
|
+
if (typeof array !== 'undefined') {
|
|
21200
|
+
payload['array'] = array;
|
|
21201
|
+
}
|
|
21202
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21203
|
+
const apiHeaders = {
|
|
21204
|
+
'content-type': 'application/json',
|
|
21205
|
+
};
|
|
21206
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
21207
|
+
}
|
|
21208
|
+
updateEnumColumn(paramsOrFirst, ...rest) {
|
|
21209
|
+
let params;
|
|
21210
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21211
|
+
params = (paramsOrFirst || {});
|
|
21212
|
+
}
|
|
21213
|
+
else {
|
|
21214
|
+
params = {
|
|
21215
|
+
databaseId: paramsOrFirst,
|
|
21216
|
+
tableId: rest[0],
|
|
21217
|
+
key: rest[1],
|
|
21218
|
+
elements: rest[2],
|
|
21219
|
+
required: rest[3],
|
|
21220
|
+
xdefault: rest[4],
|
|
21221
|
+
newKey: rest[5]
|
|
21222
|
+
};
|
|
21223
|
+
}
|
|
21224
|
+
const databaseId = params.databaseId;
|
|
21225
|
+
const tableId = params.tableId;
|
|
21226
|
+
const key = params.key;
|
|
21227
|
+
const elements = params.elements;
|
|
21228
|
+
const required = params.required;
|
|
21229
|
+
const xdefault = params.xdefault;
|
|
21230
|
+
const newKey = params.newKey;
|
|
21231
|
+
if (typeof databaseId === 'undefined') {
|
|
21232
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
21233
|
+
}
|
|
21234
|
+
if (typeof tableId === 'undefined') {
|
|
21235
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
21236
|
+
}
|
|
21237
|
+
if (typeof key === 'undefined') {
|
|
21238
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
21239
|
+
}
|
|
21240
|
+
if (typeof elements === 'undefined') {
|
|
21241
|
+
throw new AppwriteException('Missing required parameter: "elements"');
|
|
21242
|
+
}
|
|
21243
|
+
if (typeof required === 'undefined') {
|
|
21244
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
21245
|
+
}
|
|
21246
|
+
if (typeof xdefault === 'undefined') {
|
|
21247
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
21248
|
+
}
|
|
21249
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
21250
|
+
const payload = {};
|
|
21251
|
+
if (typeof elements !== 'undefined') {
|
|
21252
|
+
payload['elements'] = elements;
|
|
21253
|
+
}
|
|
21254
|
+
if (typeof required !== 'undefined') {
|
|
21255
|
+
payload['required'] = required;
|
|
21256
|
+
}
|
|
21257
|
+
if (typeof xdefault !== 'undefined') {
|
|
21258
|
+
payload['default'] = xdefault;
|
|
21259
|
+
}
|
|
21260
|
+
if (typeof newKey !== 'undefined') {
|
|
21261
|
+
payload['newKey'] = newKey;
|
|
21262
|
+
}
|
|
21263
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21264
|
+
const apiHeaders = {
|
|
21265
|
+
'content-type': 'application/json',
|
|
21266
|
+
};
|
|
21267
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
21268
|
+
}
|
|
21269
|
+
createFloatColumn(paramsOrFirst, ...rest) {
|
|
20065
21270
|
let params;
|
|
20066
21271
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20067
21272
|
params = (paramsOrFirst || {});
|
|
@@ -20072,14 +21277,18 @@ class TablesDB {
|
|
|
20072
21277
|
tableId: rest[0],
|
|
20073
21278
|
key: rest[1],
|
|
20074
21279
|
required: rest[2],
|
|
20075
|
-
|
|
20076
|
-
|
|
21280
|
+
min: rest[3],
|
|
21281
|
+
max: rest[4],
|
|
21282
|
+
xdefault: rest[5],
|
|
21283
|
+
array: rest[6]
|
|
20077
21284
|
};
|
|
20078
21285
|
}
|
|
20079
21286
|
const databaseId = params.databaseId;
|
|
20080
21287
|
const tableId = params.tableId;
|
|
20081
21288
|
const key = params.key;
|
|
20082
21289
|
const required = params.required;
|
|
21290
|
+
const min = params.min;
|
|
21291
|
+
const max = params.max;
|
|
20083
21292
|
const xdefault = params.xdefault;
|
|
20084
21293
|
const array = params.array;
|
|
20085
21294
|
if (typeof databaseId === 'undefined') {
|
|
@@ -20094,7 +21303,7 @@ class TablesDB {
|
|
|
20094
21303
|
if (typeof required === 'undefined') {
|
|
20095
21304
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
20096
21305
|
}
|
|
20097
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
21306
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
20098
21307
|
const payload = {};
|
|
20099
21308
|
if (typeof key !== 'undefined') {
|
|
20100
21309
|
payload['key'] = key;
|
|
@@ -20102,6 +21311,12 @@ class TablesDB {
|
|
|
20102
21311
|
if (typeof required !== 'undefined') {
|
|
20103
21312
|
payload['required'] = required;
|
|
20104
21313
|
}
|
|
21314
|
+
if (typeof min !== 'undefined') {
|
|
21315
|
+
payload['min'] = min;
|
|
21316
|
+
}
|
|
21317
|
+
if (typeof max !== 'undefined') {
|
|
21318
|
+
payload['max'] = max;
|
|
21319
|
+
}
|
|
20105
21320
|
if (typeof xdefault !== 'undefined') {
|
|
20106
21321
|
payload['default'] = xdefault;
|
|
20107
21322
|
}
|
|
@@ -20114,7 +21329,7 @@ class TablesDB {
|
|
|
20114
21329
|
};
|
|
20115
21330
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
20116
21331
|
}
|
|
20117
|
-
|
|
21332
|
+
updateFloatColumn(paramsOrFirst, ...rest) {
|
|
20118
21333
|
let params;
|
|
20119
21334
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20120
21335
|
params = (paramsOrFirst || {});
|
|
@@ -20126,7 +21341,9 @@ class TablesDB {
|
|
|
20126
21341
|
key: rest[1],
|
|
20127
21342
|
required: rest[2],
|
|
20128
21343
|
xdefault: rest[3],
|
|
20129
|
-
|
|
21344
|
+
min: rest[4],
|
|
21345
|
+
max: rest[5],
|
|
21346
|
+
newKey: rest[6]
|
|
20130
21347
|
};
|
|
20131
21348
|
}
|
|
20132
21349
|
const databaseId = params.databaseId;
|
|
@@ -20134,6 +21351,8 @@ class TablesDB {
|
|
|
20134
21351
|
const key = params.key;
|
|
20135
21352
|
const required = params.required;
|
|
20136
21353
|
const xdefault = params.xdefault;
|
|
21354
|
+
const min = params.min;
|
|
21355
|
+
const max = params.max;
|
|
20137
21356
|
const newKey = params.newKey;
|
|
20138
21357
|
if (typeof databaseId === 'undefined') {
|
|
20139
21358
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -20150,11 +21369,17 @@ class TablesDB {
|
|
|
20150
21369
|
if (typeof xdefault === 'undefined') {
|
|
20151
21370
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
20152
21371
|
}
|
|
20153
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
21372
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
20154
21373
|
const payload = {};
|
|
20155
21374
|
if (typeof required !== 'undefined') {
|
|
20156
21375
|
payload['required'] = required;
|
|
20157
21376
|
}
|
|
21377
|
+
if (typeof min !== 'undefined') {
|
|
21378
|
+
payload['min'] = min;
|
|
21379
|
+
}
|
|
21380
|
+
if (typeof max !== 'undefined') {
|
|
21381
|
+
payload['max'] = max;
|
|
21382
|
+
}
|
|
20158
21383
|
if (typeof xdefault !== 'undefined') {
|
|
20159
21384
|
payload['default'] = xdefault;
|
|
20160
21385
|
}
|
|
@@ -20167,7 +21392,7 @@ class TablesDB {
|
|
|
20167
21392
|
};
|
|
20168
21393
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
20169
21394
|
}
|
|
20170
|
-
|
|
21395
|
+
createIntegerColumn(paramsOrFirst, ...rest) {
|
|
20171
21396
|
let params;
|
|
20172
21397
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20173
21398
|
params = (paramsOrFirst || {});
|
|
@@ -20178,14 +21403,18 @@ class TablesDB {
|
|
|
20178
21403
|
tableId: rest[0],
|
|
20179
21404
|
key: rest[1],
|
|
20180
21405
|
required: rest[2],
|
|
20181
|
-
|
|
20182
|
-
|
|
21406
|
+
min: rest[3],
|
|
21407
|
+
max: rest[4],
|
|
21408
|
+
xdefault: rest[5],
|
|
21409
|
+
array: rest[6]
|
|
20183
21410
|
};
|
|
20184
21411
|
}
|
|
20185
21412
|
const databaseId = params.databaseId;
|
|
20186
21413
|
const tableId = params.tableId;
|
|
20187
21414
|
const key = params.key;
|
|
20188
21415
|
const required = params.required;
|
|
21416
|
+
const min = params.min;
|
|
21417
|
+
const max = params.max;
|
|
20189
21418
|
const xdefault = params.xdefault;
|
|
20190
21419
|
const array = params.array;
|
|
20191
21420
|
if (typeof databaseId === 'undefined') {
|
|
@@ -20200,7 +21429,7 @@ class TablesDB {
|
|
|
20200
21429
|
if (typeof required === 'undefined') {
|
|
20201
21430
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
20202
21431
|
}
|
|
20203
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
21432
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
20204
21433
|
const payload = {};
|
|
20205
21434
|
if (typeof key !== 'undefined') {
|
|
20206
21435
|
payload['key'] = key;
|
|
@@ -20208,6 +21437,12 @@ class TablesDB {
|
|
|
20208
21437
|
if (typeof required !== 'undefined') {
|
|
20209
21438
|
payload['required'] = required;
|
|
20210
21439
|
}
|
|
21440
|
+
if (typeof min !== 'undefined') {
|
|
21441
|
+
payload['min'] = min;
|
|
21442
|
+
}
|
|
21443
|
+
if (typeof max !== 'undefined') {
|
|
21444
|
+
payload['max'] = max;
|
|
21445
|
+
}
|
|
20211
21446
|
if (typeof xdefault !== 'undefined') {
|
|
20212
21447
|
payload['default'] = xdefault;
|
|
20213
21448
|
}
|
|
@@ -20220,7 +21455,7 @@ class TablesDB {
|
|
|
20220
21455
|
};
|
|
20221
21456
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
20222
21457
|
}
|
|
20223
|
-
|
|
21458
|
+
updateIntegerColumn(paramsOrFirst, ...rest) {
|
|
20224
21459
|
let params;
|
|
20225
21460
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20226
21461
|
params = (paramsOrFirst || {});
|
|
@@ -20232,7 +21467,9 @@ class TablesDB {
|
|
|
20232
21467
|
key: rest[1],
|
|
20233
21468
|
required: rest[2],
|
|
20234
21469
|
xdefault: rest[3],
|
|
20235
|
-
|
|
21470
|
+
min: rest[4],
|
|
21471
|
+
max: rest[5],
|
|
21472
|
+
newKey: rest[6]
|
|
20236
21473
|
};
|
|
20237
21474
|
}
|
|
20238
21475
|
const databaseId = params.databaseId;
|
|
@@ -20240,6 +21477,8 @@ class TablesDB {
|
|
|
20240
21477
|
const key = params.key;
|
|
20241
21478
|
const required = params.required;
|
|
20242
21479
|
const xdefault = params.xdefault;
|
|
21480
|
+
const min = params.min;
|
|
21481
|
+
const max = params.max;
|
|
20243
21482
|
const newKey = params.newKey;
|
|
20244
21483
|
if (typeof databaseId === 'undefined') {
|
|
20245
21484
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -20256,11 +21495,17 @@ class TablesDB {
|
|
|
20256
21495
|
if (typeof xdefault === 'undefined') {
|
|
20257
21496
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
20258
21497
|
}
|
|
20259
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
21498
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
20260
21499
|
const payload = {};
|
|
20261
21500
|
if (typeof required !== 'undefined') {
|
|
20262
21501
|
payload['required'] = required;
|
|
20263
21502
|
}
|
|
21503
|
+
if (typeof min !== 'undefined') {
|
|
21504
|
+
payload['min'] = min;
|
|
21505
|
+
}
|
|
21506
|
+
if (typeof max !== 'undefined') {
|
|
21507
|
+
payload['max'] = max;
|
|
21508
|
+
}
|
|
20264
21509
|
if (typeof xdefault !== 'undefined') {
|
|
20265
21510
|
payload['default'] = xdefault;
|
|
20266
21511
|
}
|
|
@@ -20273,7 +21518,7 @@ class TablesDB {
|
|
|
20273
21518
|
};
|
|
20274
21519
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
20275
21520
|
}
|
|
20276
|
-
|
|
21521
|
+
createIpColumn(paramsOrFirst, ...rest) {
|
|
20277
21522
|
let params;
|
|
20278
21523
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20279
21524
|
params = (paramsOrFirst || {});
|
|
@@ -20306,7 +21551,7 @@ class TablesDB {
|
|
|
20306
21551
|
if (typeof required === 'undefined') {
|
|
20307
21552
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
20308
21553
|
}
|
|
20309
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
21554
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
20310
21555
|
const payload = {};
|
|
20311
21556
|
if (typeof key !== 'undefined') {
|
|
20312
21557
|
payload['key'] = key;
|
|
@@ -20326,7 +21571,7 @@ class TablesDB {
|
|
|
20326
21571
|
};
|
|
20327
21572
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
20328
21573
|
}
|
|
20329
|
-
|
|
21574
|
+
updateIpColumn(paramsOrFirst, ...rest) {
|
|
20330
21575
|
let params;
|
|
20331
21576
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20332
21577
|
params = (paramsOrFirst || {});
|
|
@@ -20362,7 +21607,7 @@ class TablesDB {
|
|
|
20362
21607
|
if (typeof xdefault === 'undefined') {
|
|
20363
21608
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
20364
21609
|
}
|
|
20365
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
21610
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
20366
21611
|
const payload = {};
|
|
20367
21612
|
if (typeof required !== 'undefined') {
|
|
20368
21613
|
payload['required'] = required;
|
|
@@ -20379,7 +21624,7 @@ class TablesDB {
|
|
|
20379
21624
|
};
|
|
20380
21625
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
20381
21626
|
}
|
|
20382
|
-
|
|
21627
|
+
createLineColumn(paramsOrFirst, ...rest) {
|
|
20383
21628
|
let params;
|
|
20384
21629
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20385
21630
|
params = (paramsOrFirst || {});
|
|
@@ -20389,19 +21634,15 @@ class TablesDB {
|
|
|
20389
21634
|
databaseId: paramsOrFirst,
|
|
20390
21635
|
tableId: rest[0],
|
|
20391
21636
|
key: rest[1],
|
|
20392
|
-
|
|
20393
|
-
|
|
20394
|
-
xdefault: rest[4],
|
|
20395
|
-
array: rest[5]
|
|
21637
|
+
required: rest[2],
|
|
21638
|
+
xdefault: rest[3]
|
|
20396
21639
|
};
|
|
20397
21640
|
}
|
|
20398
21641
|
const databaseId = params.databaseId;
|
|
20399
21642
|
const tableId = params.tableId;
|
|
20400
21643
|
const key = params.key;
|
|
20401
|
-
const elements = params.elements;
|
|
20402
21644
|
const required = params.required;
|
|
20403
21645
|
const xdefault = params.xdefault;
|
|
20404
|
-
const array = params.array;
|
|
20405
21646
|
if (typeof databaseId === 'undefined') {
|
|
20406
21647
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
20407
21648
|
}
|
|
@@ -20411,36 +21652,27 @@ class TablesDB {
|
|
|
20411
21652
|
if (typeof key === 'undefined') {
|
|
20412
21653
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
20413
21654
|
}
|
|
20414
|
-
if (typeof elements === 'undefined') {
|
|
20415
|
-
throw new AppwriteException('Missing required parameter: "elements"');
|
|
20416
|
-
}
|
|
20417
21655
|
if (typeof required === 'undefined') {
|
|
20418
21656
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
20419
21657
|
}
|
|
20420
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
21658
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
20421
21659
|
const payload = {};
|
|
20422
21660
|
if (typeof key !== 'undefined') {
|
|
20423
21661
|
payload['key'] = key;
|
|
20424
21662
|
}
|
|
20425
|
-
if (typeof elements !== 'undefined') {
|
|
20426
|
-
payload['elements'] = elements;
|
|
20427
|
-
}
|
|
20428
21663
|
if (typeof required !== 'undefined') {
|
|
20429
21664
|
payload['required'] = required;
|
|
20430
21665
|
}
|
|
20431
21666
|
if (typeof xdefault !== 'undefined') {
|
|
20432
21667
|
payload['default'] = xdefault;
|
|
20433
21668
|
}
|
|
20434
|
-
if (typeof array !== 'undefined') {
|
|
20435
|
-
payload['array'] = array;
|
|
20436
|
-
}
|
|
20437
21669
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20438
21670
|
const apiHeaders = {
|
|
20439
21671
|
'content-type': 'application/json',
|
|
20440
21672
|
};
|
|
20441
21673
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
20442
21674
|
}
|
|
20443
|
-
|
|
21675
|
+
updateLineColumn(paramsOrFirst, ...rest) {
|
|
20444
21676
|
let params;
|
|
20445
21677
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20446
21678
|
params = (paramsOrFirst || {});
|
|
@@ -20450,16 +21682,14 @@ class TablesDB {
|
|
|
20450
21682
|
databaseId: paramsOrFirst,
|
|
20451
21683
|
tableId: rest[0],
|
|
20452
21684
|
key: rest[1],
|
|
20453
|
-
|
|
20454
|
-
|
|
20455
|
-
|
|
20456
|
-
newKey: rest[5]
|
|
21685
|
+
required: rest[2],
|
|
21686
|
+
xdefault: rest[3],
|
|
21687
|
+
newKey: rest[4]
|
|
20457
21688
|
};
|
|
20458
21689
|
}
|
|
20459
21690
|
const databaseId = params.databaseId;
|
|
20460
21691
|
const tableId = params.tableId;
|
|
20461
21692
|
const key = params.key;
|
|
20462
|
-
const elements = params.elements;
|
|
20463
21693
|
const required = params.required;
|
|
20464
21694
|
const xdefault = params.xdefault;
|
|
20465
21695
|
const newKey = params.newKey;
|
|
@@ -20472,20 +21702,11 @@ class TablesDB {
|
|
|
20472
21702
|
if (typeof key === 'undefined') {
|
|
20473
21703
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
20474
21704
|
}
|
|
20475
|
-
if (typeof elements === 'undefined') {
|
|
20476
|
-
throw new AppwriteException('Missing required parameter: "elements"');
|
|
20477
|
-
}
|
|
20478
21705
|
if (typeof required === 'undefined') {
|
|
20479
21706
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
20480
21707
|
}
|
|
20481
|
-
|
|
20482
|
-
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
20483
|
-
}
|
|
20484
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
21708
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
20485
21709
|
const payload = {};
|
|
20486
|
-
if (typeof elements !== 'undefined') {
|
|
20487
|
-
payload['elements'] = elements;
|
|
20488
|
-
}
|
|
20489
21710
|
if (typeof required !== 'undefined') {
|
|
20490
21711
|
payload['required'] = required;
|
|
20491
21712
|
}
|
|
@@ -20501,7 +21722,7 @@ class TablesDB {
|
|
|
20501
21722
|
};
|
|
20502
21723
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
20503
21724
|
}
|
|
20504
|
-
|
|
21725
|
+
createLongtextColumn(paramsOrFirst, ...rest) {
|
|
20505
21726
|
let params;
|
|
20506
21727
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20507
21728
|
params = (paramsOrFirst || {});
|
|
@@ -20512,18 +21733,14 @@ class TablesDB {
|
|
|
20512
21733
|
tableId: rest[0],
|
|
20513
21734
|
key: rest[1],
|
|
20514
21735
|
required: rest[2],
|
|
20515
|
-
|
|
20516
|
-
|
|
20517
|
-
xdefault: rest[5],
|
|
20518
|
-
array: rest[6]
|
|
21736
|
+
xdefault: rest[3],
|
|
21737
|
+
array: rest[4]
|
|
20519
21738
|
};
|
|
20520
21739
|
}
|
|
20521
21740
|
const databaseId = params.databaseId;
|
|
20522
21741
|
const tableId = params.tableId;
|
|
20523
21742
|
const key = params.key;
|
|
20524
21743
|
const required = params.required;
|
|
20525
|
-
const min = params.min;
|
|
20526
|
-
const max = params.max;
|
|
20527
21744
|
const xdefault = params.xdefault;
|
|
20528
21745
|
const array = params.array;
|
|
20529
21746
|
if (typeof databaseId === 'undefined') {
|
|
@@ -20538,7 +21755,7 @@ class TablesDB {
|
|
|
20538
21755
|
if (typeof required === 'undefined') {
|
|
20539
21756
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
20540
21757
|
}
|
|
20541
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
21758
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
20542
21759
|
const payload = {};
|
|
20543
21760
|
if (typeof key !== 'undefined') {
|
|
20544
21761
|
payload['key'] = key;
|
|
@@ -20546,12 +21763,6 @@ class TablesDB {
|
|
|
20546
21763
|
if (typeof required !== 'undefined') {
|
|
20547
21764
|
payload['required'] = required;
|
|
20548
21765
|
}
|
|
20549
|
-
if (typeof min !== 'undefined') {
|
|
20550
|
-
payload['min'] = min;
|
|
20551
|
-
}
|
|
20552
|
-
if (typeof max !== 'undefined') {
|
|
20553
|
-
payload['max'] = max;
|
|
20554
|
-
}
|
|
20555
21766
|
if (typeof xdefault !== 'undefined') {
|
|
20556
21767
|
payload['default'] = xdefault;
|
|
20557
21768
|
}
|
|
@@ -20564,7 +21775,7 @@ class TablesDB {
|
|
|
20564
21775
|
};
|
|
20565
21776
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
20566
21777
|
}
|
|
20567
|
-
|
|
21778
|
+
updateLongtextColumn(paramsOrFirst, ...rest) {
|
|
20568
21779
|
let params;
|
|
20569
21780
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20570
21781
|
params = (paramsOrFirst || {});
|
|
@@ -20576,9 +21787,7 @@ class TablesDB {
|
|
|
20576
21787
|
key: rest[1],
|
|
20577
21788
|
required: rest[2],
|
|
20578
21789
|
xdefault: rest[3],
|
|
20579
|
-
|
|
20580
|
-
max: rest[5],
|
|
20581
|
-
newKey: rest[6]
|
|
21790
|
+
newKey: rest[4]
|
|
20582
21791
|
};
|
|
20583
21792
|
}
|
|
20584
21793
|
const databaseId = params.databaseId;
|
|
@@ -20586,8 +21795,6 @@ class TablesDB {
|
|
|
20586
21795
|
const key = params.key;
|
|
20587
21796
|
const required = params.required;
|
|
20588
21797
|
const xdefault = params.xdefault;
|
|
20589
|
-
const min = params.min;
|
|
20590
|
-
const max = params.max;
|
|
20591
21798
|
const newKey = params.newKey;
|
|
20592
21799
|
if (typeof databaseId === 'undefined') {
|
|
20593
21800
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -20604,17 +21811,11 @@ class TablesDB {
|
|
|
20604
21811
|
if (typeof xdefault === 'undefined') {
|
|
20605
21812
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
20606
21813
|
}
|
|
20607
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
21814
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
20608
21815
|
const payload = {};
|
|
20609
21816
|
if (typeof required !== 'undefined') {
|
|
20610
21817
|
payload['required'] = required;
|
|
20611
21818
|
}
|
|
20612
|
-
if (typeof min !== 'undefined') {
|
|
20613
|
-
payload['min'] = min;
|
|
20614
|
-
}
|
|
20615
|
-
if (typeof max !== 'undefined') {
|
|
20616
|
-
payload['max'] = max;
|
|
20617
|
-
}
|
|
20618
21819
|
if (typeof xdefault !== 'undefined') {
|
|
20619
21820
|
payload['default'] = xdefault;
|
|
20620
21821
|
}
|
|
@@ -20627,7 +21828,7 @@ class TablesDB {
|
|
|
20627
21828
|
};
|
|
20628
21829
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
20629
21830
|
}
|
|
20630
|
-
|
|
21831
|
+
createMediumtextColumn(paramsOrFirst, ...rest) {
|
|
20631
21832
|
let params;
|
|
20632
21833
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20633
21834
|
params = (paramsOrFirst || {});
|
|
@@ -20638,18 +21839,14 @@ class TablesDB {
|
|
|
20638
21839
|
tableId: rest[0],
|
|
20639
21840
|
key: rest[1],
|
|
20640
21841
|
required: rest[2],
|
|
20641
|
-
|
|
20642
|
-
|
|
20643
|
-
xdefault: rest[5],
|
|
20644
|
-
array: rest[6]
|
|
21842
|
+
xdefault: rest[3],
|
|
21843
|
+
array: rest[4]
|
|
20645
21844
|
};
|
|
20646
21845
|
}
|
|
20647
21846
|
const databaseId = params.databaseId;
|
|
20648
21847
|
const tableId = params.tableId;
|
|
20649
21848
|
const key = params.key;
|
|
20650
21849
|
const required = params.required;
|
|
20651
|
-
const min = params.min;
|
|
20652
|
-
const max = params.max;
|
|
20653
21850
|
const xdefault = params.xdefault;
|
|
20654
21851
|
const array = params.array;
|
|
20655
21852
|
if (typeof databaseId === 'undefined') {
|
|
@@ -20664,7 +21861,7 @@ class TablesDB {
|
|
|
20664
21861
|
if (typeof required === 'undefined') {
|
|
20665
21862
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
20666
21863
|
}
|
|
20667
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
21864
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
20668
21865
|
const payload = {};
|
|
20669
21866
|
if (typeof key !== 'undefined') {
|
|
20670
21867
|
payload['key'] = key;
|
|
@@ -20672,12 +21869,6 @@ class TablesDB {
|
|
|
20672
21869
|
if (typeof required !== 'undefined') {
|
|
20673
21870
|
payload['required'] = required;
|
|
20674
21871
|
}
|
|
20675
|
-
if (typeof min !== 'undefined') {
|
|
20676
|
-
payload['min'] = min;
|
|
20677
|
-
}
|
|
20678
|
-
if (typeof max !== 'undefined') {
|
|
20679
|
-
payload['max'] = max;
|
|
20680
|
-
}
|
|
20681
21872
|
if (typeof xdefault !== 'undefined') {
|
|
20682
21873
|
payload['default'] = xdefault;
|
|
20683
21874
|
}
|
|
@@ -20690,7 +21881,7 @@ class TablesDB {
|
|
|
20690
21881
|
};
|
|
20691
21882
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
20692
21883
|
}
|
|
20693
|
-
|
|
21884
|
+
updateMediumtextColumn(paramsOrFirst, ...rest) {
|
|
20694
21885
|
let params;
|
|
20695
21886
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20696
21887
|
params = (paramsOrFirst || {});
|
|
@@ -20702,9 +21893,7 @@ class TablesDB {
|
|
|
20702
21893
|
key: rest[1],
|
|
20703
21894
|
required: rest[2],
|
|
20704
21895
|
xdefault: rest[3],
|
|
20705
|
-
|
|
20706
|
-
max: rest[5],
|
|
20707
|
-
newKey: rest[6]
|
|
21896
|
+
newKey: rest[4]
|
|
20708
21897
|
};
|
|
20709
21898
|
}
|
|
20710
21899
|
const databaseId = params.databaseId;
|
|
@@ -20712,8 +21901,6 @@ class TablesDB {
|
|
|
20712
21901
|
const key = params.key;
|
|
20713
21902
|
const required = params.required;
|
|
20714
21903
|
const xdefault = params.xdefault;
|
|
20715
|
-
const min = params.min;
|
|
20716
|
-
const max = params.max;
|
|
20717
21904
|
const newKey = params.newKey;
|
|
20718
21905
|
if (typeof databaseId === 'undefined') {
|
|
20719
21906
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -20730,17 +21917,11 @@ class TablesDB {
|
|
|
20730
21917
|
if (typeof xdefault === 'undefined') {
|
|
20731
21918
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
20732
21919
|
}
|
|
20733
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
21920
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
20734
21921
|
const payload = {};
|
|
20735
21922
|
if (typeof required !== 'undefined') {
|
|
20736
21923
|
payload['required'] = required;
|
|
20737
21924
|
}
|
|
20738
|
-
if (typeof min !== 'undefined') {
|
|
20739
|
-
payload['min'] = min;
|
|
20740
|
-
}
|
|
20741
|
-
if (typeof max !== 'undefined') {
|
|
20742
|
-
payload['max'] = max;
|
|
20743
|
-
}
|
|
20744
21925
|
if (typeof xdefault !== 'undefined') {
|
|
20745
21926
|
payload['default'] = xdefault;
|
|
20746
21927
|
}
|
|
@@ -20753,7 +21934,7 @@ class TablesDB {
|
|
|
20753
21934
|
};
|
|
20754
21935
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
20755
21936
|
}
|
|
20756
|
-
|
|
21937
|
+
createPointColumn(paramsOrFirst, ...rest) {
|
|
20757
21938
|
let params;
|
|
20758
21939
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20759
21940
|
params = (paramsOrFirst || {});
|
|
@@ -20764,8 +21945,7 @@ class TablesDB {
|
|
|
20764
21945
|
tableId: rest[0],
|
|
20765
21946
|
key: rest[1],
|
|
20766
21947
|
required: rest[2],
|
|
20767
|
-
xdefault: rest[3]
|
|
20768
|
-
array: rest[4]
|
|
21948
|
+
xdefault: rest[3]
|
|
20769
21949
|
};
|
|
20770
21950
|
}
|
|
20771
21951
|
const databaseId = params.databaseId;
|
|
@@ -20773,7 +21953,6 @@ class TablesDB {
|
|
|
20773
21953
|
const key = params.key;
|
|
20774
21954
|
const required = params.required;
|
|
20775
21955
|
const xdefault = params.xdefault;
|
|
20776
|
-
const array = params.array;
|
|
20777
21956
|
if (typeof databaseId === 'undefined') {
|
|
20778
21957
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
20779
21958
|
}
|
|
@@ -20786,7 +21965,7 @@ class TablesDB {
|
|
|
20786
21965
|
if (typeof required === 'undefined') {
|
|
20787
21966
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
20788
21967
|
}
|
|
20789
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
21968
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
20790
21969
|
const payload = {};
|
|
20791
21970
|
if (typeof key !== 'undefined') {
|
|
20792
21971
|
payload['key'] = key;
|
|
@@ -20797,16 +21976,13 @@ class TablesDB {
|
|
|
20797
21976
|
if (typeof xdefault !== 'undefined') {
|
|
20798
21977
|
payload['default'] = xdefault;
|
|
20799
21978
|
}
|
|
20800
|
-
if (typeof array !== 'undefined') {
|
|
20801
|
-
payload['array'] = array;
|
|
20802
|
-
}
|
|
20803
21979
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20804
21980
|
const apiHeaders = {
|
|
20805
21981
|
'content-type': 'application/json',
|
|
20806
21982
|
};
|
|
20807
21983
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
20808
21984
|
}
|
|
20809
|
-
|
|
21985
|
+
updatePointColumn(paramsOrFirst, ...rest) {
|
|
20810
21986
|
let params;
|
|
20811
21987
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20812
21988
|
params = (paramsOrFirst || {});
|
|
@@ -20839,10 +22015,7 @@ class TablesDB {
|
|
|
20839
22015
|
if (typeof required === 'undefined') {
|
|
20840
22016
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
20841
22017
|
}
|
|
20842
|
-
|
|
20843
|
-
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
20844
|
-
}
|
|
20845
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
22018
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
20846
22019
|
const payload = {};
|
|
20847
22020
|
if (typeof required !== 'undefined') {
|
|
20848
22021
|
payload['required'] = required;
|
|
@@ -20859,7 +22032,7 @@ class TablesDB {
|
|
|
20859
22032
|
};
|
|
20860
22033
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
20861
22034
|
}
|
|
20862
|
-
|
|
22035
|
+
createPolygonColumn(paramsOrFirst, ...rest) {
|
|
20863
22036
|
let params;
|
|
20864
22037
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20865
22038
|
params = (paramsOrFirst || {});
|
|
@@ -20890,7 +22063,7 @@ class TablesDB {
|
|
|
20890
22063
|
if (typeof required === 'undefined') {
|
|
20891
22064
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
20892
22065
|
}
|
|
20893
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
22066
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
20894
22067
|
const payload = {};
|
|
20895
22068
|
if (typeof key !== 'undefined') {
|
|
20896
22069
|
payload['key'] = key;
|
|
@@ -20907,7 +22080,7 @@ class TablesDB {
|
|
|
20907
22080
|
};
|
|
20908
22081
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
20909
22082
|
}
|
|
20910
|
-
|
|
22083
|
+
updatePolygonColumn(paramsOrFirst, ...rest) {
|
|
20911
22084
|
let params;
|
|
20912
22085
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20913
22086
|
params = (paramsOrFirst || {});
|
|
@@ -20934,30 +22107,93 @@ class TablesDB {
|
|
|
20934
22107
|
if (typeof tableId === 'undefined') {
|
|
20935
22108
|
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
20936
22109
|
}
|
|
20937
|
-
if (typeof key === 'undefined') {
|
|
20938
|
-
throw new AppwriteException('Missing required parameter: "key"');
|
|
22110
|
+
if (typeof key === 'undefined') {
|
|
22111
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
22112
|
+
}
|
|
22113
|
+
if (typeof required === 'undefined') {
|
|
22114
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
22115
|
+
}
|
|
22116
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
22117
|
+
const payload = {};
|
|
22118
|
+
if (typeof required !== 'undefined') {
|
|
22119
|
+
payload['required'] = required;
|
|
22120
|
+
}
|
|
22121
|
+
if (typeof xdefault !== 'undefined') {
|
|
22122
|
+
payload['default'] = xdefault;
|
|
22123
|
+
}
|
|
22124
|
+
if (typeof newKey !== 'undefined') {
|
|
22125
|
+
payload['newKey'] = newKey;
|
|
22126
|
+
}
|
|
22127
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
22128
|
+
const apiHeaders = {
|
|
22129
|
+
'content-type': 'application/json',
|
|
22130
|
+
};
|
|
22131
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
22132
|
+
}
|
|
22133
|
+
createRelationshipColumn(paramsOrFirst, ...rest) {
|
|
22134
|
+
let params;
|
|
22135
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
22136
|
+
params = (paramsOrFirst || {});
|
|
22137
|
+
}
|
|
22138
|
+
else {
|
|
22139
|
+
params = {
|
|
22140
|
+
databaseId: paramsOrFirst,
|
|
22141
|
+
tableId: rest[0],
|
|
22142
|
+
relatedTableId: rest[1],
|
|
22143
|
+
type: rest[2],
|
|
22144
|
+
twoWay: rest[3],
|
|
22145
|
+
key: rest[4],
|
|
22146
|
+
twoWayKey: rest[5],
|
|
22147
|
+
onDelete: rest[6]
|
|
22148
|
+
};
|
|
22149
|
+
}
|
|
22150
|
+
const databaseId = params.databaseId;
|
|
22151
|
+
const tableId = params.tableId;
|
|
22152
|
+
const relatedTableId = params.relatedTableId;
|
|
22153
|
+
const type = params.type;
|
|
22154
|
+
const twoWay = params.twoWay;
|
|
22155
|
+
const key = params.key;
|
|
22156
|
+
const twoWayKey = params.twoWayKey;
|
|
22157
|
+
const onDelete = params.onDelete;
|
|
22158
|
+
if (typeof databaseId === 'undefined') {
|
|
22159
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
22160
|
+
}
|
|
22161
|
+
if (typeof tableId === 'undefined') {
|
|
22162
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
22163
|
+
}
|
|
22164
|
+
if (typeof relatedTableId === 'undefined') {
|
|
22165
|
+
throw new AppwriteException('Missing required parameter: "relatedTableId"');
|
|
20939
22166
|
}
|
|
20940
|
-
if (typeof
|
|
20941
|
-
throw new AppwriteException('Missing required parameter: "
|
|
22167
|
+
if (typeof type === 'undefined') {
|
|
22168
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
20942
22169
|
}
|
|
20943
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
22170
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
20944
22171
|
const payload = {};
|
|
20945
|
-
if (typeof
|
|
20946
|
-
payload['
|
|
22172
|
+
if (typeof relatedTableId !== 'undefined') {
|
|
22173
|
+
payload['relatedTableId'] = relatedTableId;
|
|
20947
22174
|
}
|
|
20948
|
-
if (typeof
|
|
20949
|
-
payload['
|
|
22175
|
+
if (typeof type !== 'undefined') {
|
|
22176
|
+
payload['type'] = type;
|
|
20950
22177
|
}
|
|
20951
|
-
if (typeof
|
|
20952
|
-
payload['
|
|
22178
|
+
if (typeof twoWay !== 'undefined') {
|
|
22179
|
+
payload['twoWay'] = twoWay;
|
|
22180
|
+
}
|
|
22181
|
+
if (typeof key !== 'undefined') {
|
|
22182
|
+
payload['key'] = key;
|
|
22183
|
+
}
|
|
22184
|
+
if (typeof twoWayKey !== 'undefined') {
|
|
22185
|
+
payload['twoWayKey'] = twoWayKey;
|
|
22186
|
+
}
|
|
22187
|
+
if (typeof onDelete !== 'undefined') {
|
|
22188
|
+
payload['onDelete'] = onDelete;
|
|
20953
22189
|
}
|
|
20954
22190
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20955
22191
|
const apiHeaders = {
|
|
20956
22192
|
'content-type': 'application/json',
|
|
20957
22193
|
};
|
|
20958
|
-
return this.client.call('
|
|
22194
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
20959
22195
|
}
|
|
20960
|
-
|
|
22196
|
+
createStringColumn(paramsOrFirst, ...rest) {
|
|
20961
22197
|
let params;
|
|
20962
22198
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20963
22199
|
params = (paramsOrFirst || {});
|
|
@@ -20967,15 +22203,21 @@ class TablesDB {
|
|
|
20967
22203
|
databaseId: paramsOrFirst,
|
|
20968
22204
|
tableId: rest[0],
|
|
20969
22205
|
key: rest[1],
|
|
20970
|
-
|
|
20971
|
-
|
|
22206
|
+
size: rest[2],
|
|
22207
|
+
required: rest[3],
|
|
22208
|
+
xdefault: rest[4],
|
|
22209
|
+
array: rest[5],
|
|
22210
|
+
encrypt: rest[6]
|
|
20972
22211
|
};
|
|
20973
22212
|
}
|
|
20974
22213
|
const databaseId = params.databaseId;
|
|
20975
22214
|
const tableId = params.tableId;
|
|
20976
22215
|
const key = params.key;
|
|
22216
|
+
const size = params.size;
|
|
20977
22217
|
const required = params.required;
|
|
20978
22218
|
const xdefault = params.xdefault;
|
|
22219
|
+
const array = params.array;
|
|
22220
|
+
const encrypt = params.encrypt;
|
|
20979
22221
|
if (typeof databaseId === 'undefined') {
|
|
20980
22222
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
20981
22223
|
}
|
|
@@ -20985,27 +22227,39 @@ class TablesDB {
|
|
|
20985
22227
|
if (typeof key === 'undefined') {
|
|
20986
22228
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
20987
22229
|
}
|
|
22230
|
+
if (typeof size === 'undefined') {
|
|
22231
|
+
throw new AppwriteException('Missing required parameter: "size"');
|
|
22232
|
+
}
|
|
20988
22233
|
if (typeof required === 'undefined') {
|
|
20989
22234
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
20990
22235
|
}
|
|
20991
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
22236
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
20992
22237
|
const payload = {};
|
|
20993
22238
|
if (typeof key !== 'undefined') {
|
|
20994
22239
|
payload['key'] = key;
|
|
20995
22240
|
}
|
|
22241
|
+
if (typeof size !== 'undefined') {
|
|
22242
|
+
payload['size'] = size;
|
|
22243
|
+
}
|
|
20996
22244
|
if (typeof required !== 'undefined') {
|
|
20997
22245
|
payload['required'] = required;
|
|
20998
22246
|
}
|
|
20999
22247
|
if (typeof xdefault !== 'undefined') {
|
|
21000
22248
|
payload['default'] = xdefault;
|
|
21001
22249
|
}
|
|
22250
|
+
if (typeof array !== 'undefined') {
|
|
22251
|
+
payload['array'] = array;
|
|
22252
|
+
}
|
|
22253
|
+
if (typeof encrypt !== 'undefined') {
|
|
22254
|
+
payload['encrypt'] = encrypt;
|
|
22255
|
+
}
|
|
21002
22256
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21003
22257
|
const apiHeaders = {
|
|
21004
22258
|
'content-type': 'application/json',
|
|
21005
22259
|
};
|
|
21006
22260
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
21007
22261
|
}
|
|
21008
|
-
|
|
22262
|
+
updateStringColumn(paramsOrFirst, ...rest) {
|
|
21009
22263
|
let params;
|
|
21010
22264
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21011
22265
|
params = (paramsOrFirst || {});
|
|
@@ -21017,7 +22271,8 @@ class TablesDB {
|
|
|
21017
22271
|
key: rest[1],
|
|
21018
22272
|
required: rest[2],
|
|
21019
22273
|
xdefault: rest[3],
|
|
21020
|
-
|
|
22274
|
+
size: rest[4],
|
|
22275
|
+
newKey: rest[5]
|
|
21021
22276
|
};
|
|
21022
22277
|
}
|
|
21023
22278
|
const databaseId = params.databaseId;
|
|
@@ -21025,6 +22280,7 @@ class TablesDB {
|
|
|
21025
22280
|
const key = params.key;
|
|
21026
22281
|
const required = params.required;
|
|
21027
22282
|
const xdefault = params.xdefault;
|
|
22283
|
+
const size = params.size;
|
|
21028
22284
|
const newKey = params.newKey;
|
|
21029
22285
|
if (typeof databaseId === 'undefined') {
|
|
21030
22286
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -21038,7 +22294,10 @@ class TablesDB {
|
|
|
21038
22294
|
if (typeof required === 'undefined') {
|
|
21039
22295
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
21040
22296
|
}
|
|
21041
|
-
|
|
22297
|
+
if (typeof xdefault === 'undefined') {
|
|
22298
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
22299
|
+
}
|
|
22300
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
21042
22301
|
const payload = {};
|
|
21043
22302
|
if (typeof required !== 'undefined') {
|
|
21044
22303
|
payload['required'] = required;
|
|
@@ -21046,6 +22305,9 @@ class TablesDB {
|
|
|
21046
22305
|
if (typeof xdefault !== 'undefined') {
|
|
21047
22306
|
payload['default'] = xdefault;
|
|
21048
22307
|
}
|
|
22308
|
+
if (typeof size !== 'undefined') {
|
|
22309
|
+
payload['size'] = size;
|
|
22310
|
+
}
|
|
21049
22311
|
if (typeof newKey !== 'undefined') {
|
|
21050
22312
|
payload['newKey'] = newKey;
|
|
21051
22313
|
}
|
|
@@ -21055,7 +22317,7 @@ class TablesDB {
|
|
|
21055
22317
|
};
|
|
21056
22318
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
21057
22319
|
}
|
|
21058
|
-
|
|
22320
|
+
createTextColumn(paramsOrFirst, ...rest) {
|
|
21059
22321
|
let params;
|
|
21060
22322
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21061
22323
|
params = (paramsOrFirst || {});
|
|
@@ -21066,7 +22328,8 @@ class TablesDB {
|
|
|
21066
22328
|
tableId: rest[0],
|
|
21067
22329
|
key: rest[1],
|
|
21068
22330
|
required: rest[2],
|
|
21069
|
-
xdefault: rest[3]
|
|
22331
|
+
xdefault: rest[3],
|
|
22332
|
+
array: rest[4]
|
|
21070
22333
|
};
|
|
21071
22334
|
}
|
|
21072
22335
|
const databaseId = params.databaseId;
|
|
@@ -21074,6 +22337,7 @@ class TablesDB {
|
|
|
21074
22337
|
const key = params.key;
|
|
21075
22338
|
const required = params.required;
|
|
21076
22339
|
const xdefault = params.xdefault;
|
|
22340
|
+
const array = params.array;
|
|
21077
22341
|
if (typeof databaseId === 'undefined') {
|
|
21078
22342
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
21079
22343
|
}
|
|
@@ -21086,7 +22350,7 @@ class TablesDB {
|
|
|
21086
22350
|
if (typeof required === 'undefined') {
|
|
21087
22351
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
21088
22352
|
}
|
|
21089
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
22353
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
21090
22354
|
const payload = {};
|
|
21091
22355
|
if (typeof key !== 'undefined') {
|
|
21092
22356
|
payload['key'] = key;
|
|
@@ -21097,13 +22361,16 @@ class TablesDB {
|
|
|
21097
22361
|
if (typeof xdefault !== 'undefined') {
|
|
21098
22362
|
payload['default'] = xdefault;
|
|
21099
22363
|
}
|
|
22364
|
+
if (typeof array !== 'undefined') {
|
|
22365
|
+
payload['array'] = array;
|
|
22366
|
+
}
|
|
21100
22367
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21101
22368
|
const apiHeaders = {
|
|
21102
22369
|
'content-type': 'application/json',
|
|
21103
22370
|
};
|
|
21104
22371
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
21105
22372
|
}
|
|
21106
|
-
|
|
22373
|
+
updateTextColumn(paramsOrFirst, ...rest) {
|
|
21107
22374
|
let params;
|
|
21108
22375
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21109
22376
|
params = (paramsOrFirst || {});
|
|
@@ -21136,7 +22403,10 @@ class TablesDB {
|
|
|
21136
22403
|
if (typeof required === 'undefined') {
|
|
21137
22404
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
21138
22405
|
}
|
|
21139
|
-
|
|
22406
|
+
if (typeof xdefault === 'undefined') {
|
|
22407
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
22408
|
+
}
|
|
22409
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
21140
22410
|
const payload = {};
|
|
21141
22411
|
if (typeof required !== 'undefined') {
|
|
21142
22412
|
payload['required'] = required;
|
|
@@ -21153,70 +22423,7 @@ class TablesDB {
|
|
|
21153
22423
|
};
|
|
21154
22424
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
21155
22425
|
}
|
|
21156
|
-
|
|
21157
|
-
let params;
|
|
21158
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21159
|
-
params = (paramsOrFirst || {});
|
|
21160
|
-
}
|
|
21161
|
-
else {
|
|
21162
|
-
params = {
|
|
21163
|
-
databaseId: paramsOrFirst,
|
|
21164
|
-
tableId: rest[0],
|
|
21165
|
-
relatedTableId: rest[1],
|
|
21166
|
-
type: rest[2],
|
|
21167
|
-
twoWay: rest[3],
|
|
21168
|
-
key: rest[4],
|
|
21169
|
-
twoWayKey: rest[5],
|
|
21170
|
-
onDelete: rest[6]
|
|
21171
|
-
};
|
|
21172
|
-
}
|
|
21173
|
-
const databaseId = params.databaseId;
|
|
21174
|
-
const tableId = params.tableId;
|
|
21175
|
-
const relatedTableId = params.relatedTableId;
|
|
21176
|
-
const type = params.type;
|
|
21177
|
-
const twoWay = params.twoWay;
|
|
21178
|
-
const key = params.key;
|
|
21179
|
-
const twoWayKey = params.twoWayKey;
|
|
21180
|
-
const onDelete = params.onDelete;
|
|
21181
|
-
if (typeof databaseId === 'undefined') {
|
|
21182
|
-
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
21183
|
-
}
|
|
21184
|
-
if (typeof tableId === 'undefined') {
|
|
21185
|
-
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
21186
|
-
}
|
|
21187
|
-
if (typeof relatedTableId === 'undefined') {
|
|
21188
|
-
throw new AppwriteException('Missing required parameter: "relatedTableId"');
|
|
21189
|
-
}
|
|
21190
|
-
if (typeof type === 'undefined') {
|
|
21191
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
21192
|
-
}
|
|
21193
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
21194
|
-
const payload = {};
|
|
21195
|
-
if (typeof relatedTableId !== 'undefined') {
|
|
21196
|
-
payload['relatedTableId'] = relatedTableId;
|
|
21197
|
-
}
|
|
21198
|
-
if (typeof type !== 'undefined') {
|
|
21199
|
-
payload['type'] = type;
|
|
21200
|
-
}
|
|
21201
|
-
if (typeof twoWay !== 'undefined') {
|
|
21202
|
-
payload['twoWay'] = twoWay;
|
|
21203
|
-
}
|
|
21204
|
-
if (typeof key !== 'undefined') {
|
|
21205
|
-
payload['key'] = key;
|
|
21206
|
-
}
|
|
21207
|
-
if (typeof twoWayKey !== 'undefined') {
|
|
21208
|
-
payload['twoWayKey'] = twoWayKey;
|
|
21209
|
-
}
|
|
21210
|
-
if (typeof onDelete !== 'undefined') {
|
|
21211
|
-
payload['onDelete'] = onDelete;
|
|
21212
|
-
}
|
|
21213
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21214
|
-
const apiHeaders = {
|
|
21215
|
-
'content-type': 'application/json',
|
|
21216
|
-
};
|
|
21217
|
-
return this.client.call('post', uri, apiHeaders, payload);
|
|
21218
|
-
}
|
|
21219
|
-
createStringColumn(paramsOrFirst, ...rest) {
|
|
22426
|
+
createUrlColumn(paramsOrFirst, ...rest) {
|
|
21220
22427
|
let params;
|
|
21221
22428
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21222
22429
|
params = (paramsOrFirst || {});
|
|
@@ -21226,21 +22433,17 @@ class TablesDB {
|
|
|
21226
22433
|
databaseId: paramsOrFirst,
|
|
21227
22434
|
tableId: rest[0],
|
|
21228
22435
|
key: rest[1],
|
|
21229
|
-
|
|
21230
|
-
|
|
21231
|
-
|
|
21232
|
-
array: rest[5],
|
|
21233
|
-
encrypt: rest[6]
|
|
22436
|
+
required: rest[2],
|
|
22437
|
+
xdefault: rest[3],
|
|
22438
|
+
array: rest[4]
|
|
21234
22439
|
};
|
|
21235
22440
|
}
|
|
21236
22441
|
const databaseId = params.databaseId;
|
|
21237
22442
|
const tableId = params.tableId;
|
|
21238
22443
|
const key = params.key;
|
|
21239
|
-
const size = params.size;
|
|
21240
22444
|
const required = params.required;
|
|
21241
22445
|
const xdefault = params.xdefault;
|
|
21242
22446
|
const array = params.array;
|
|
21243
|
-
const encrypt = params.encrypt;
|
|
21244
22447
|
if (typeof databaseId === 'undefined') {
|
|
21245
22448
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
21246
22449
|
}
|
|
@@ -21250,20 +22453,14 @@ class TablesDB {
|
|
|
21250
22453
|
if (typeof key === 'undefined') {
|
|
21251
22454
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
21252
22455
|
}
|
|
21253
|
-
if (typeof size === 'undefined') {
|
|
21254
|
-
throw new AppwriteException('Missing required parameter: "size"');
|
|
21255
|
-
}
|
|
21256
22456
|
if (typeof required === 'undefined') {
|
|
21257
22457
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
21258
22458
|
}
|
|
21259
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
22459
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
21260
22460
|
const payload = {};
|
|
21261
22461
|
if (typeof key !== 'undefined') {
|
|
21262
22462
|
payload['key'] = key;
|
|
21263
22463
|
}
|
|
21264
|
-
if (typeof size !== 'undefined') {
|
|
21265
|
-
payload['size'] = size;
|
|
21266
|
-
}
|
|
21267
22464
|
if (typeof required !== 'undefined') {
|
|
21268
22465
|
payload['required'] = required;
|
|
21269
22466
|
}
|
|
@@ -21273,16 +22470,13 @@ class TablesDB {
|
|
|
21273
22470
|
if (typeof array !== 'undefined') {
|
|
21274
22471
|
payload['array'] = array;
|
|
21275
22472
|
}
|
|
21276
|
-
if (typeof encrypt !== 'undefined') {
|
|
21277
|
-
payload['encrypt'] = encrypt;
|
|
21278
|
-
}
|
|
21279
22473
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21280
22474
|
const apiHeaders = {
|
|
21281
22475
|
'content-type': 'application/json',
|
|
21282
22476
|
};
|
|
21283
22477
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
21284
22478
|
}
|
|
21285
|
-
|
|
22479
|
+
updateUrlColumn(paramsOrFirst, ...rest) {
|
|
21286
22480
|
let params;
|
|
21287
22481
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21288
22482
|
params = (paramsOrFirst || {});
|
|
@@ -21294,8 +22488,7 @@ class TablesDB {
|
|
|
21294
22488
|
key: rest[1],
|
|
21295
22489
|
required: rest[2],
|
|
21296
22490
|
xdefault: rest[3],
|
|
21297
|
-
|
|
21298
|
-
newKey: rest[5]
|
|
22491
|
+
newKey: rest[4]
|
|
21299
22492
|
};
|
|
21300
22493
|
}
|
|
21301
22494
|
const databaseId = params.databaseId;
|
|
@@ -21303,7 +22496,6 @@ class TablesDB {
|
|
|
21303
22496
|
const key = params.key;
|
|
21304
22497
|
const required = params.required;
|
|
21305
22498
|
const xdefault = params.xdefault;
|
|
21306
|
-
const size = params.size;
|
|
21307
22499
|
const newKey = params.newKey;
|
|
21308
22500
|
if (typeof databaseId === 'undefined') {
|
|
21309
22501
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -21320,7 +22512,7 @@ class TablesDB {
|
|
|
21320
22512
|
if (typeof xdefault === 'undefined') {
|
|
21321
22513
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
21322
22514
|
}
|
|
21323
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
22515
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
21324
22516
|
const payload = {};
|
|
21325
22517
|
if (typeof required !== 'undefined') {
|
|
21326
22518
|
payload['required'] = required;
|
|
@@ -21328,9 +22520,6 @@ class TablesDB {
|
|
|
21328
22520
|
if (typeof xdefault !== 'undefined') {
|
|
21329
22521
|
payload['default'] = xdefault;
|
|
21330
22522
|
}
|
|
21331
|
-
if (typeof size !== 'undefined') {
|
|
21332
|
-
payload['size'] = size;
|
|
21333
|
-
}
|
|
21334
22523
|
if (typeof newKey !== 'undefined') {
|
|
21335
22524
|
payload['newKey'] = newKey;
|
|
21336
22525
|
}
|
|
@@ -21340,7 +22529,7 @@ class TablesDB {
|
|
|
21340
22529
|
};
|
|
21341
22530
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
21342
22531
|
}
|
|
21343
|
-
|
|
22532
|
+
createVarcharColumn(paramsOrFirst, ...rest) {
|
|
21344
22533
|
let params;
|
|
21345
22534
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21346
22535
|
params = (paramsOrFirst || {});
|
|
@@ -21350,14 +22539,16 @@ class TablesDB {
|
|
|
21350
22539
|
databaseId: paramsOrFirst,
|
|
21351
22540
|
tableId: rest[0],
|
|
21352
22541
|
key: rest[1],
|
|
21353
|
-
|
|
21354
|
-
|
|
21355
|
-
|
|
22542
|
+
size: rest[2],
|
|
22543
|
+
required: rest[3],
|
|
22544
|
+
xdefault: rest[4],
|
|
22545
|
+
array: rest[5]
|
|
21356
22546
|
};
|
|
21357
22547
|
}
|
|
21358
22548
|
const databaseId = params.databaseId;
|
|
21359
22549
|
const tableId = params.tableId;
|
|
21360
22550
|
const key = params.key;
|
|
22551
|
+
const size = params.size;
|
|
21361
22552
|
const required = params.required;
|
|
21362
22553
|
const xdefault = params.xdefault;
|
|
21363
22554
|
const array = params.array;
|
|
@@ -21370,14 +22561,20 @@ class TablesDB {
|
|
|
21370
22561
|
if (typeof key === 'undefined') {
|
|
21371
22562
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
21372
22563
|
}
|
|
22564
|
+
if (typeof size === 'undefined') {
|
|
22565
|
+
throw new AppwriteException('Missing required parameter: "size"');
|
|
22566
|
+
}
|
|
21373
22567
|
if (typeof required === 'undefined') {
|
|
21374
22568
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
21375
22569
|
}
|
|
21376
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
22570
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
21377
22571
|
const payload = {};
|
|
21378
22572
|
if (typeof key !== 'undefined') {
|
|
21379
22573
|
payload['key'] = key;
|
|
21380
22574
|
}
|
|
22575
|
+
if (typeof size !== 'undefined') {
|
|
22576
|
+
payload['size'] = size;
|
|
22577
|
+
}
|
|
21381
22578
|
if (typeof required !== 'undefined') {
|
|
21382
22579
|
payload['required'] = required;
|
|
21383
22580
|
}
|
|
@@ -21393,7 +22590,7 @@ class TablesDB {
|
|
|
21393
22590
|
};
|
|
21394
22591
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
21395
22592
|
}
|
|
21396
|
-
|
|
22593
|
+
updateVarcharColumn(paramsOrFirst, ...rest) {
|
|
21397
22594
|
let params;
|
|
21398
22595
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21399
22596
|
params = (paramsOrFirst || {});
|
|
@@ -21405,7 +22602,8 @@ class TablesDB {
|
|
|
21405
22602
|
key: rest[1],
|
|
21406
22603
|
required: rest[2],
|
|
21407
22604
|
xdefault: rest[3],
|
|
21408
|
-
|
|
22605
|
+
size: rest[4],
|
|
22606
|
+
newKey: rest[5]
|
|
21409
22607
|
};
|
|
21410
22608
|
}
|
|
21411
22609
|
const databaseId = params.databaseId;
|
|
@@ -21413,6 +22611,7 @@ class TablesDB {
|
|
|
21413
22611
|
const key = params.key;
|
|
21414
22612
|
const required = params.required;
|
|
21415
22613
|
const xdefault = params.xdefault;
|
|
22614
|
+
const size = params.size;
|
|
21416
22615
|
const newKey = params.newKey;
|
|
21417
22616
|
if (typeof databaseId === 'undefined') {
|
|
21418
22617
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -21429,7 +22628,7 @@ class TablesDB {
|
|
|
21429
22628
|
if (typeof xdefault === 'undefined') {
|
|
21430
22629
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
21431
22630
|
}
|
|
21432
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
22631
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
21433
22632
|
const payload = {};
|
|
21434
22633
|
if (typeof required !== 'undefined') {
|
|
21435
22634
|
payload['required'] = required;
|
|
@@ -21437,6 +22636,9 @@ class TablesDB {
|
|
|
21437
22636
|
if (typeof xdefault !== 'undefined') {
|
|
21438
22637
|
payload['default'] = xdefault;
|
|
21439
22638
|
}
|
|
22639
|
+
if (typeof size !== 'undefined') {
|
|
22640
|
+
payload['size'] = size;
|
|
22641
|
+
}
|
|
21440
22642
|
if (typeof newKey !== 'undefined') {
|
|
21441
22643
|
payload['newKey'] = newKey;
|
|
21442
22644
|
}
|
|
@@ -23469,7 +24671,7 @@ class Users {
|
|
|
23469
24671
|
}
|
|
23470
24672
|
getUsage(paramsOrFirst) {
|
|
23471
24673
|
let params;
|
|
23472
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
24674
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
23473
24675
|
params = (paramsOrFirst || {});
|
|
23474
24676
|
}
|
|
23475
24677
|
else {
|
|
@@ -24839,11 +26041,16 @@ class Realtime {
|
|
|
24839
26041
|
this.TYPE_CONNECTED = 'connected';
|
|
24840
26042
|
this.DEBOUNCE_MS = 1;
|
|
24841
26043
|
this.HEARTBEAT_INTERVAL = 20000; // 20 seconds in milliseconds
|
|
24842
|
-
|
|
26044
|
+
// Slot-centric state: Map<slot, { channels: Set<string>, queries: string[], callback: Function }>
|
|
24843
26045
|
this.activeSubscriptions = new Map();
|
|
26046
|
+
// Map slot index -> subscriptionId (from backend)
|
|
26047
|
+
this.slotToSubscriptionId = new Map();
|
|
26048
|
+
// Inverse map: subscriptionId -> slot index (for O(1) lookup)
|
|
26049
|
+
this.subscriptionIdToSlot = new Map();
|
|
24844
26050
|
this.subCallDepth = 0;
|
|
24845
26051
|
this.reconnectAttempts = 0;
|
|
24846
26052
|
this.subscriptionsCounter = 0;
|
|
26053
|
+
this.connectionId = 0;
|
|
24847
26054
|
this.reconnect = true;
|
|
24848
26055
|
this.onErrorCallbacks = [];
|
|
24849
26056
|
this.onCloseCallbacks = [];
|
|
@@ -24893,7 +26100,7 @@ class Realtime {
|
|
|
24893
26100
|
}
|
|
24894
26101
|
createSocket() {
|
|
24895
26102
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24896
|
-
if (this.
|
|
26103
|
+
if (this.activeSubscriptions.size === 0) {
|
|
24897
26104
|
this.reconnect = false;
|
|
24898
26105
|
yield this.closeSocket();
|
|
24899
26106
|
return;
|
|
@@ -24902,10 +26109,36 @@ class Realtime {
|
|
|
24902
26109
|
if (!projectId) {
|
|
24903
26110
|
throw new AppwriteException('Missing project ID');
|
|
24904
26111
|
}
|
|
26112
|
+
// Collect all unique channels from all slots
|
|
26113
|
+
const allChannels = new Set();
|
|
26114
|
+
for (const subscription of this.activeSubscriptions.values()) {
|
|
26115
|
+
for (const channel of subscription.channels) {
|
|
26116
|
+
allChannels.add(channel);
|
|
26117
|
+
}
|
|
26118
|
+
}
|
|
24905
26119
|
let queryParams = `project=${projectId}`;
|
|
24906
|
-
for (const channel of
|
|
26120
|
+
for (const channel of allChannels) {
|
|
24907
26121
|
queryParams += `&channels[]=${encodeURIComponent(channel)}`;
|
|
24908
26122
|
}
|
|
26123
|
+
// Build query string from slots → channels → queries
|
|
26124
|
+
// Format: channel[slot][]=query
|
|
26125
|
+
// For each slot, repeat its queries under each channel it subscribes to
|
|
26126
|
+
// Example: slot 1 → channels [tests, prod], queries [q1, q2]
|
|
26127
|
+
// Produces: tests[1][]=q1&tests[1][]=q2&prod[1][]=q1&prod[1][]=q2
|
|
26128
|
+
const selectAllQuery = Query.select(['*']).toString();
|
|
26129
|
+
for (const [slot, subscription] of this.activeSubscriptions) {
|
|
26130
|
+
// queries is string[] - iterate over each query string
|
|
26131
|
+
const queries = subscription.queries.length === 0
|
|
26132
|
+
? [selectAllQuery]
|
|
26133
|
+
: subscription.queries;
|
|
26134
|
+
// Repeat this slot's queries under each channel it subscribes to
|
|
26135
|
+
// Each query is sent as a separate parameter: channel[slot][]=q1&channel[slot][]=q2
|
|
26136
|
+
for (const channel of subscription.channels) {
|
|
26137
|
+
for (const query of queries) {
|
|
26138
|
+
queryParams += `&${encodeURIComponent(channel)}[${slot}][]=${encodeURIComponent(query)}`;
|
|
26139
|
+
}
|
|
26140
|
+
}
|
|
26141
|
+
}
|
|
24909
26142
|
const endpoint = this.client.config.endpointRealtime !== ''
|
|
24910
26143
|
? this.client.config.endpointRealtime
|
|
24911
26144
|
: this.client.config.endpoint || '';
|
|
@@ -24915,18 +26148,29 @@ class Realtime {
|
|
|
24915
26148
|
const url = `${realtimeEndpoint}/realtime?${queryParams}`;
|
|
24916
26149
|
if (this.socket) {
|
|
24917
26150
|
this.reconnect = false;
|
|
24918
|
-
|
|
26151
|
+
if (this.socket.readyState < WebSocket.CLOSING) {
|
|
26152
|
+
yield this.closeSocket();
|
|
26153
|
+
}
|
|
26154
|
+
// Ensure reconnect isn't stuck false if close event was missed.
|
|
26155
|
+
this.reconnect = true;
|
|
24919
26156
|
}
|
|
24920
26157
|
return new Promise((resolve, reject) => {
|
|
24921
26158
|
try {
|
|
24922
|
-
|
|
24923
|
-
this.socket
|
|
26159
|
+
const connectionId = ++this.connectionId;
|
|
26160
|
+
const socket = (this.socket = new WebSocket(url));
|
|
26161
|
+
socket.addEventListener('open', () => {
|
|
26162
|
+
if (connectionId !== this.connectionId) {
|
|
26163
|
+
return;
|
|
26164
|
+
}
|
|
24924
26165
|
this.reconnectAttempts = 0;
|
|
24925
26166
|
this.onOpenCallbacks.forEach(callback => callback());
|
|
24926
26167
|
this.startHeartbeat();
|
|
24927
26168
|
resolve();
|
|
24928
26169
|
});
|
|
24929
|
-
|
|
26170
|
+
socket.addEventListener('message', (event) => {
|
|
26171
|
+
if (connectionId !== this.connectionId) {
|
|
26172
|
+
return;
|
|
26173
|
+
}
|
|
24930
26174
|
try {
|
|
24931
26175
|
const message = JSON.parse(event.data);
|
|
24932
26176
|
this.handleMessage(message);
|
|
@@ -24935,7 +26179,10 @@ class Realtime {
|
|
|
24935
26179
|
console.error('Failed to parse message:', error);
|
|
24936
26180
|
}
|
|
24937
26181
|
});
|
|
24938
|
-
|
|
26182
|
+
socket.addEventListener('close', (event) => __awaiter(this, void 0, void 0, function* () {
|
|
26183
|
+
if (connectionId !== this.connectionId || socket !== this.socket) {
|
|
26184
|
+
return;
|
|
26185
|
+
}
|
|
24939
26186
|
this.stopHeartbeat();
|
|
24940
26187
|
this.onCloseCallbacks.forEach(callback => callback());
|
|
24941
26188
|
if (!this.reconnect || event.code === RealtimeCode.POLICY_VIOLATION) {
|
|
@@ -24953,7 +26200,10 @@ class Realtime {
|
|
|
24953
26200
|
console.error('Failed to reconnect:', error);
|
|
24954
26201
|
}
|
|
24955
26202
|
}));
|
|
24956
|
-
|
|
26203
|
+
socket.addEventListener('error', (event) => {
|
|
26204
|
+
if (connectionId !== this.connectionId || socket !== this.socket) {
|
|
26205
|
+
return;
|
|
26206
|
+
}
|
|
24957
26207
|
this.stopHeartbeat();
|
|
24958
26208
|
const error = new Error('WebSocket error');
|
|
24959
26209
|
console.error('WebSocket error:', error.message);
|
|
@@ -25024,7 +26274,7 @@ class Realtime {
|
|
|
25024
26274
|
}
|
|
25025
26275
|
return String(channel);
|
|
25026
26276
|
}
|
|
25027
|
-
subscribe(channelsOrChannel, callback) {
|
|
26277
|
+
subscribe(channelsOrChannel, callback, queries = []) {
|
|
25028
26278
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25029
26279
|
const channelArray = Array.isArray(channelsOrChannel)
|
|
25030
26280
|
? channelsOrChannel
|
|
@@ -25032,13 +26282,29 @@ class Realtime {
|
|
|
25032
26282
|
// Convert all channels to strings
|
|
25033
26283
|
const channelStrings = channelArray.map(ch => this.channelToString(ch));
|
|
25034
26284
|
const channels = new Set(channelStrings);
|
|
25035
|
-
|
|
25036
|
-
|
|
25037
|
-
|
|
25038
|
-
|
|
26285
|
+
// Convert queries to array of strings
|
|
26286
|
+
// Ensure each query is a separate string in the array
|
|
26287
|
+
const queryStrings = [];
|
|
26288
|
+
for (const q of (queries !== null && queries !== void 0 ? queries : [])) {
|
|
26289
|
+
if (Array.isArray(q)) {
|
|
26290
|
+
// Handle nested arrays: [[q1, q2]] -> [q1, q2]
|
|
26291
|
+
for (const inner of q) {
|
|
26292
|
+
queryStrings.push(typeof inner === 'string' ? inner : inner.toString());
|
|
26293
|
+
}
|
|
26294
|
+
}
|
|
26295
|
+
else {
|
|
26296
|
+
queryStrings.push(typeof q === 'string' ? q : q.toString());
|
|
26297
|
+
}
|
|
25039
26298
|
}
|
|
25040
|
-
|
|
26299
|
+
// Allocate a new slot index
|
|
26300
|
+
this.subscriptionsCounter++;
|
|
26301
|
+
const slot = this.subscriptionsCounter;
|
|
26302
|
+
// Store slot-centric data: channels, queries, and callback belong to the slot
|
|
26303
|
+
// queries is stored as string[] (array of query strings)
|
|
26304
|
+
// No channel mutation occurs here - channels are derived from slots in createSocket()
|
|
26305
|
+
this.activeSubscriptions.set(slot, {
|
|
25041
26306
|
channels,
|
|
26307
|
+
queries: queryStrings,
|
|
25042
26308
|
callback
|
|
25043
26309
|
});
|
|
25044
26310
|
this.subCallDepth++;
|
|
@@ -25049,23 +26315,19 @@ class Realtime {
|
|
|
25049
26315
|
this.subCallDepth--;
|
|
25050
26316
|
return {
|
|
25051
26317
|
close: () => __awaiter(this, void 0, void 0, function* () {
|
|
25052
|
-
this.
|
|
25053
|
-
this.
|
|
26318
|
+
const subscriptionId = this.slotToSubscriptionId.get(slot);
|
|
26319
|
+
this.activeSubscriptions.delete(slot);
|
|
26320
|
+
this.slotToSubscriptionId.delete(slot);
|
|
26321
|
+
if (subscriptionId) {
|
|
26322
|
+
this.subscriptionIdToSlot.delete(subscriptionId);
|
|
26323
|
+
}
|
|
25054
26324
|
yield this.createSocket();
|
|
25055
26325
|
})
|
|
25056
26326
|
};
|
|
25057
26327
|
});
|
|
25058
26328
|
}
|
|
25059
|
-
cleanUp(
|
|
25060
|
-
|
|
25061
|
-
if (!channels.has(channel)) {
|
|
25062
|
-
return true;
|
|
25063
|
-
}
|
|
25064
|
-
const subsWithChannel = Array.from(this.activeSubscriptions.values())
|
|
25065
|
-
.filter(sub => sub.channels.has(channel));
|
|
25066
|
-
return subsWithChannel.length > 0;
|
|
25067
|
-
}));
|
|
25068
|
-
}
|
|
26329
|
+
// cleanUp is no longer needed - slots are removed directly in subscribe().close()
|
|
26330
|
+
// Channels are automatically rebuilt from remaining slots in createSocket()
|
|
25069
26331
|
handleMessage(message) {
|
|
25070
26332
|
if (!message.type) {
|
|
25071
26333
|
return;
|
|
@@ -25091,6 +26353,19 @@ class Realtime {
|
|
|
25091
26353
|
return;
|
|
25092
26354
|
}
|
|
25093
26355
|
const messageData = message.data;
|
|
26356
|
+
// Store subscription ID mappings from backend
|
|
26357
|
+
// Format: { "0": "sub_a1f9", "1": "sub_b83c", ... }
|
|
26358
|
+
if (messageData.subscriptions) {
|
|
26359
|
+
this.slotToSubscriptionId.clear();
|
|
26360
|
+
this.subscriptionIdToSlot.clear();
|
|
26361
|
+
for (const [slotStr, subscriptionId] of Object.entries(messageData.subscriptions)) {
|
|
26362
|
+
const slot = Number(slotStr);
|
|
26363
|
+
if (!isNaN(slot)) {
|
|
26364
|
+
this.slotToSubscriptionId.set(slot, subscriptionId);
|
|
26365
|
+
this.subscriptionIdToSlot.set(subscriptionId, slot);
|
|
26366
|
+
}
|
|
26367
|
+
}
|
|
26368
|
+
}
|
|
25094
26369
|
let session = this.client.config.session;
|
|
25095
26370
|
if (!session) {
|
|
25096
26371
|
try {
|
|
@@ -25125,23 +26400,26 @@ class Realtime {
|
|
|
25125
26400
|
const events = data.events;
|
|
25126
26401
|
const payload = data.payload;
|
|
25127
26402
|
const timestamp = data.timestamp;
|
|
25128
|
-
|
|
25129
|
-
|
|
25130
|
-
}
|
|
25131
|
-
const hasActiveChannel = channels.some(channel => this.activeChannels.has(channel));
|
|
25132
|
-
if (!hasActiveChannel) {
|
|
26403
|
+
const subscriptions = data.subscriptions;
|
|
26404
|
+
if (!channels || !events || !payload || !subscriptions || subscriptions.length === 0) {
|
|
25133
26405
|
return;
|
|
25134
26406
|
}
|
|
25135
|
-
|
|
25136
|
-
|
|
25137
|
-
|
|
25138
|
-
|
|
25139
|
-
|
|
25140
|
-
|
|
25141
|
-
|
|
25142
|
-
|
|
25143
|
-
|
|
25144
|
-
|
|
26407
|
+
// Iterate over all matching subscriptionIds and call callback for each
|
|
26408
|
+
for (const subscriptionId of subscriptions) {
|
|
26409
|
+
// O(1) lookup using subscriptionId
|
|
26410
|
+
const slot = this.subscriptionIdToSlot.get(subscriptionId);
|
|
26411
|
+
if (slot !== undefined) {
|
|
26412
|
+
const subscription = this.activeSubscriptions.get(slot);
|
|
26413
|
+
if (subscription) {
|
|
26414
|
+
const response = {
|
|
26415
|
+
events,
|
|
26416
|
+
channels,
|
|
26417
|
+
timestamp,
|
|
26418
|
+
payload,
|
|
26419
|
+
subscriptions
|
|
26420
|
+
};
|
|
26421
|
+
subscription.callback(response);
|
|
26422
|
+
}
|
|
25145
26423
|
}
|
|
25146
26424
|
}
|
|
25147
26425
|
}
|
|
@@ -25343,8 +26621,11 @@ class Channel {
|
|
|
25343
26621
|
constructor(segments) {
|
|
25344
26622
|
this.segments = segments;
|
|
25345
26623
|
}
|
|
25346
|
-
next(segment, id
|
|
25347
|
-
|
|
26624
|
+
next(segment, id) {
|
|
26625
|
+
const segments = id === undefined
|
|
26626
|
+
? [...this.segments, segment]
|
|
26627
|
+
: [...this.segments, segment, normalize(id)];
|
|
26628
|
+
return new Channel(segments);
|
|
25348
26629
|
}
|
|
25349
26630
|
resolve(action) {
|
|
25350
26631
|
return new Channel([...this.segments, action]);
|
|
@@ -25354,28 +26635,29 @@ class Channel {
|
|
|
25354
26635
|
}
|
|
25355
26636
|
// --- DATABASE ROUTE ---
|
|
25356
26637
|
// Only available on Channel<Database>
|
|
25357
|
-
collection(id
|
|
25358
|
-
|
|
26638
|
+
collection(id) {
|
|
26639
|
+
// Default: wildcard collection ID
|
|
26640
|
+
return this.next("collections", id !== null && id !== void 0 ? id : "*");
|
|
25359
26641
|
}
|
|
25360
26642
|
// Only available on Channel<Collection>
|
|
25361
|
-
document(id
|
|
26643
|
+
document(id) {
|
|
26644
|
+
// Default: no document ID segment
|
|
25362
26645
|
return this.next("documents", id);
|
|
25363
26646
|
}
|
|
25364
26647
|
// --- TABLESDB ROUTE ---
|
|
25365
|
-
table(id
|
|
25366
|
-
|
|
26648
|
+
table(id) {
|
|
26649
|
+
// Default: wildcard table ID
|
|
26650
|
+
return this.next("tables", id !== null && id !== void 0 ? id : "*");
|
|
25367
26651
|
}
|
|
25368
|
-
row(id
|
|
26652
|
+
row(id) {
|
|
26653
|
+
// Default: no row ID segment
|
|
25369
26654
|
return this.next("rows", id);
|
|
25370
26655
|
}
|
|
25371
26656
|
// --- BUCKET ROUTE ---
|
|
25372
|
-
file(id
|
|
26657
|
+
file(id) {
|
|
26658
|
+
// Default: no file ID segment
|
|
25373
26659
|
return this.next("files", id);
|
|
25374
26660
|
}
|
|
25375
|
-
// --- FUNCTION ROUTE ---
|
|
25376
|
-
execution(id = "*") {
|
|
25377
|
-
return this.next("executions", id);
|
|
25378
|
-
}
|
|
25379
26661
|
// --- TERMINAL ACTIONS ---
|
|
25380
26662
|
// Restricted to the Actionable union
|
|
25381
26663
|
create() {
|
|
@@ -25391,6 +26673,9 @@ class Channel {
|
|
|
25391
26673
|
static database(id = "*") {
|
|
25392
26674
|
return new Channel(["databases", normalize(id)]);
|
|
25393
26675
|
}
|
|
26676
|
+
static execution(id = "*") {
|
|
26677
|
+
return new Channel(["executions", normalize(id)]);
|
|
26678
|
+
}
|
|
25394
26679
|
static tablesdb(id = "*") {
|
|
25395
26680
|
return new Channel(["tablesdb", normalize(id)]);
|
|
25396
26681
|
}
|
|
@@ -25406,23 +26691,28 @@ class Channel {
|
|
|
25406
26691
|
static membership(id = "*") {
|
|
25407
26692
|
return new Channel(["memberships", normalize(id)]);
|
|
25408
26693
|
}
|
|
25409
|
-
static account(
|
|
25410
|
-
|
|
25411
|
-
return id === "*" ? "account" : `account.${id}`;
|
|
26694
|
+
static account() {
|
|
26695
|
+
return "account";
|
|
25412
26696
|
}
|
|
25413
26697
|
// Global events
|
|
25414
|
-
static
|
|
26698
|
+
static documents() {
|
|
25415
26699
|
return "documents";
|
|
25416
26700
|
}
|
|
25417
|
-
static
|
|
26701
|
+
static rows() {
|
|
25418
26702
|
return "rows";
|
|
25419
26703
|
}
|
|
25420
|
-
static
|
|
26704
|
+
static files() {
|
|
25421
26705
|
return "files";
|
|
25422
26706
|
}
|
|
25423
|
-
static
|
|
26707
|
+
static executions() {
|
|
25424
26708
|
return "executions";
|
|
25425
26709
|
}
|
|
26710
|
+
static teams() {
|
|
26711
|
+
return "teams";
|
|
26712
|
+
}
|
|
26713
|
+
static memberships() {
|
|
26714
|
+
return "memberships";
|
|
26715
|
+
}
|
|
25426
26716
|
}
|
|
25427
26717
|
|
|
25428
26718
|
var Condition;
|
|
@@ -25690,6 +26980,74 @@ Operator.dateSubDays = (days) => new Operator("dateSubDays", [days]).toString();
|
|
|
25690
26980
|
*/
|
|
25691
26981
|
Operator.dateSetNow = () => new Operator("dateSetNow", []).toString();
|
|
25692
26982
|
|
|
26983
|
+
var Scopes;
|
|
26984
|
+
(function (Scopes) {
|
|
26985
|
+
Scopes["SessionsWrite"] = "sessions.write";
|
|
26986
|
+
Scopes["UsersRead"] = "users.read";
|
|
26987
|
+
Scopes["UsersWrite"] = "users.write";
|
|
26988
|
+
Scopes["TeamsRead"] = "teams.read";
|
|
26989
|
+
Scopes["TeamsWrite"] = "teams.write";
|
|
26990
|
+
Scopes["DatabasesRead"] = "databases.read";
|
|
26991
|
+
Scopes["DatabasesWrite"] = "databases.write";
|
|
26992
|
+
Scopes["CollectionsRead"] = "collections.read";
|
|
26993
|
+
Scopes["CollectionsWrite"] = "collections.write";
|
|
26994
|
+
Scopes["TablesRead"] = "tables.read";
|
|
26995
|
+
Scopes["TablesWrite"] = "tables.write";
|
|
26996
|
+
Scopes["AttributesRead"] = "attributes.read";
|
|
26997
|
+
Scopes["AttributesWrite"] = "attributes.write";
|
|
26998
|
+
Scopes["ColumnsRead"] = "columns.read";
|
|
26999
|
+
Scopes["ColumnsWrite"] = "columns.write";
|
|
27000
|
+
Scopes["IndexesRead"] = "indexes.read";
|
|
27001
|
+
Scopes["IndexesWrite"] = "indexes.write";
|
|
27002
|
+
Scopes["DocumentsRead"] = "documents.read";
|
|
27003
|
+
Scopes["DocumentsWrite"] = "documents.write";
|
|
27004
|
+
Scopes["RowsRead"] = "rows.read";
|
|
27005
|
+
Scopes["RowsWrite"] = "rows.write";
|
|
27006
|
+
Scopes["FilesRead"] = "files.read";
|
|
27007
|
+
Scopes["FilesWrite"] = "files.write";
|
|
27008
|
+
Scopes["BucketsRead"] = "buckets.read";
|
|
27009
|
+
Scopes["BucketsWrite"] = "buckets.write";
|
|
27010
|
+
Scopes["FunctionsRead"] = "functions.read";
|
|
27011
|
+
Scopes["FunctionsWrite"] = "functions.write";
|
|
27012
|
+
Scopes["SitesRead"] = "sites.read";
|
|
27013
|
+
Scopes["SitesWrite"] = "sites.write";
|
|
27014
|
+
Scopes["LogRead"] = "log.read";
|
|
27015
|
+
Scopes["LogWrite"] = "log.write";
|
|
27016
|
+
Scopes["ExecutionRead"] = "execution.read";
|
|
27017
|
+
Scopes["ExecutionWrite"] = "execution.write";
|
|
27018
|
+
Scopes["LocaleRead"] = "locale.read";
|
|
27019
|
+
Scopes["AvatarsRead"] = "avatars.read";
|
|
27020
|
+
Scopes["HealthRead"] = "health.read";
|
|
27021
|
+
Scopes["ProvidersRead"] = "providers.read";
|
|
27022
|
+
Scopes["ProvidersWrite"] = "providers.write";
|
|
27023
|
+
Scopes["MessagesRead"] = "messages.read";
|
|
27024
|
+
Scopes["MessagesWrite"] = "messages.write";
|
|
27025
|
+
Scopes["TopicsRead"] = "topics.read";
|
|
27026
|
+
Scopes["TopicsWrite"] = "topics.write";
|
|
27027
|
+
Scopes["SubscribersRead"] = "subscribers.read";
|
|
27028
|
+
Scopes["SubscribersWrite"] = "subscribers.write";
|
|
27029
|
+
Scopes["TargetsRead"] = "targets.read";
|
|
27030
|
+
Scopes["TargetsWrite"] = "targets.write";
|
|
27031
|
+
Scopes["RulesRead"] = "rules.read";
|
|
27032
|
+
Scopes["RulesWrite"] = "rules.write";
|
|
27033
|
+
Scopes["MigrationsRead"] = "migrations.read";
|
|
27034
|
+
Scopes["MigrationsWrite"] = "migrations.write";
|
|
27035
|
+
Scopes["VcsRead"] = "vcs.read";
|
|
27036
|
+
Scopes["VcsWrite"] = "vcs.write";
|
|
27037
|
+
Scopes["AssistantRead"] = "assistant.read";
|
|
27038
|
+
Scopes["TokensRead"] = "tokens.read";
|
|
27039
|
+
Scopes["TokensWrite"] = "tokens.write";
|
|
27040
|
+
Scopes["PoliciesWrite"] = "policies.write";
|
|
27041
|
+
Scopes["PoliciesRead"] = "policies.read";
|
|
27042
|
+
Scopes["ArchivesRead"] = "archives.read";
|
|
27043
|
+
Scopes["ArchivesWrite"] = "archives.write";
|
|
27044
|
+
Scopes["RestorationsRead"] = "restorations.read";
|
|
27045
|
+
Scopes["RestorationsWrite"] = "restorations.write";
|
|
27046
|
+
Scopes["DomainsRead"] = "domains.read";
|
|
27047
|
+
Scopes["DomainsWrite"] = "domains.write";
|
|
27048
|
+
Scopes["EventsRead"] = "events.read";
|
|
27049
|
+
})(Scopes || (Scopes = {}));
|
|
27050
|
+
|
|
25693
27051
|
var AuthenticatorType;
|
|
25694
27052
|
(function (AuthenticatorType) {
|
|
25695
27053
|
AuthenticatorType["Totp"] = "totp";
|
|
@@ -26415,6 +27773,30 @@ var Timezone;
|
|
|
26415
27773
|
Timezone["Utc"] = "utc";
|
|
26416
27774
|
})(Timezone || (Timezone = {}));
|
|
26417
27775
|
|
|
27776
|
+
var BrowserPermission;
|
|
27777
|
+
(function (BrowserPermission) {
|
|
27778
|
+
BrowserPermission["Geolocation"] = "geolocation";
|
|
27779
|
+
BrowserPermission["Camera"] = "camera";
|
|
27780
|
+
BrowserPermission["Microphone"] = "microphone";
|
|
27781
|
+
BrowserPermission["Notifications"] = "notifications";
|
|
27782
|
+
BrowserPermission["Midi"] = "midi";
|
|
27783
|
+
BrowserPermission["Push"] = "push";
|
|
27784
|
+
BrowserPermission["Clipboardread"] = "clipboard-read";
|
|
27785
|
+
BrowserPermission["Clipboardwrite"] = "clipboard-write";
|
|
27786
|
+
BrowserPermission["Paymenthandler"] = "payment-handler";
|
|
27787
|
+
BrowserPermission["Usb"] = "usb";
|
|
27788
|
+
BrowserPermission["Bluetooth"] = "bluetooth";
|
|
27789
|
+
BrowserPermission["Accelerometer"] = "accelerometer";
|
|
27790
|
+
BrowserPermission["Gyroscope"] = "gyroscope";
|
|
27791
|
+
BrowserPermission["Magnetometer"] = "magnetometer";
|
|
27792
|
+
BrowserPermission["Ambientlightsensor"] = "ambient-light-sensor";
|
|
27793
|
+
BrowserPermission["Backgroundsync"] = "background-sync";
|
|
27794
|
+
BrowserPermission["Persistentstorage"] = "persistent-storage";
|
|
27795
|
+
BrowserPermission["Screenwakelock"] = "screen-wake-lock";
|
|
27796
|
+
BrowserPermission["Webshare"] = "web-share";
|
|
27797
|
+
BrowserPermission["Xrspatialtracking"] = "xr-spatial-tracking";
|
|
27798
|
+
})(BrowserPermission || (BrowserPermission = {}));
|
|
27799
|
+
|
|
26418
27800
|
var ImageFormat;
|
|
26419
27801
|
(function (ImageFormat) {
|
|
26420
27802
|
ImageFormat["Jpg"] = "jpg";
|
|
@@ -26426,6 +27808,13 @@ var ImageFormat;
|
|
|
26426
27808
|
ImageFormat["Gif"] = "gif";
|
|
26427
27809
|
})(ImageFormat || (ImageFormat = {}));
|
|
26428
27810
|
|
|
27811
|
+
var BackupServices;
|
|
27812
|
+
(function (BackupServices) {
|
|
27813
|
+
BackupServices["Databases"] = "databases";
|
|
27814
|
+
BackupServices["Functions"] = "functions";
|
|
27815
|
+
BackupServices["Storage"] = "storage";
|
|
27816
|
+
})(BackupServices || (BackupServices = {}));
|
|
27817
|
+
|
|
26429
27818
|
var Platform;
|
|
26430
27819
|
(function (Platform) {
|
|
26431
27820
|
Platform["Appwrite"] = "appwrite";
|
|
@@ -26467,6 +27856,20 @@ var IndexType;
|
|
|
26467
27856
|
IndexType["Spatial"] = "spatial";
|
|
26468
27857
|
})(IndexType || (IndexType = {}));
|
|
26469
27858
|
|
|
27859
|
+
var OrderBy;
|
|
27860
|
+
(function (OrderBy) {
|
|
27861
|
+
OrderBy["Asc"] = "asc";
|
|
27862
|
+
OrderBy["Desc"] = "desc";
|
|
27863
|
+
})(OrderBy || (OrderBy = {}));
|
|
27864
|
+
|
|
27865
|
+
var RegistrationType;
|
|
27866
|
+
(function (RegistrationType) {
|
|
27867
|
+
RegistrationType["New"] = "new";
|
|
27868
|
+
RegistrationType["Transfer"] = "transfer";
|
|
27869
|
+
RegistrationType["Renewal"] = "renewal";
|
|
27870
|
+
RegistrationType["Trade"] = "trade";
|
|
27871
|
+
})(RegistrationType || (RegistrationType = {}));
|
|
27872
|
+
|
|
26470
27873
|
var FilterType;
|
|
26471
27874
|
(function (FilterType) {
|
|
26472
27875
|
FilterType["Premium"] = "premium";
|
|
@@ -26497,6 +27900,9 @@ var Runtime;
|
|
|
26497
27900
|
Runtime["Python312"] = "python-3.12";
|
|
26498
27901
|
Runtime["Pythonml311"] = "python-ml-3.11";
|
|
26499
27902
|
Runtime["Pythonml312"] = "python-ml-3.12";
|
|
27903
|
+
Runtime["Deno121"] = "deno-1.21";
|
|
27904
|
+
Runtime["Deno124"] = "deno-1.24";
|
|
27905
|
+
Runtime["Deno135"] = "deno-1.35";
|
|
26500
27906
|
Runtime["Deno140"] = "deno-1.40";
|
|
26501
27907
|
Runtime["Deno146"] = "deno-1.46";
|
|
26502
27908
|
Runtime["Deno20"] = "deno-2.0";
|
|
@@ -26511,6 +27917,7 @@ var Runtime;
|
|
|
26511
27917
|
Runtime["Dart35"] = "dart-3.5";
|
|
26512
27918
|
Runtime["Dart38"] = "dart-3.8";
|
|
26513
27919
|
Runtime["Dart39"] = "dart-3.9";
|
|
27920
|
+
Runtime["Dart310"] = "dart-3.10";
|
|
26514
27921
|
Runtime["Dotnet60"] = "dotnet-6.0";
|
|
26515
27922
|
Runtime["Dotnet70"] = "dotnet-7.0";
|
|
26516
27923
|
Runtime["Dotnet80"] = "dotnet-8.0";
|
|
@@ -26539,8 +27946,95 @@ var Runtime;
|
|
|
26539
27946
|
Runtime["Flutter329"] = "flutter-3.29";
|
|
26540
27947
|
Runtime["Flutter332"] = "flutter-3.32";
|
|
26541
27948
|
Runtime["Flutter335"] = "flutter-3.35";
|
|
27949
|
+
Runtime["Flutter338"] = "flutter-3.38";
|
|
26542
27950
|
})(Runtime || (Runtime = {}));
|
|
26543
27951
|
|
|
27952
|
+
var Runtimes;
|
|
27953
|
+
(function (Runtimes) {
|
|
27954
|
+
Runtimes["Node145"] = "node-14.5";
|
|
27955
|
+
Runtimes["Node160"] = "node-16.0";
|
|
27956
|
+
Runtimes["Node180"] = "node-18.0";
|
|
27957
|
+
Runtimes["Node190"] = "node-19.0";
|
|
27958
|
+
Runtimes["Node200"] = "node-20.0";
|
|
27959
|
+
Runtimes["Node210"] = "node-21.0";
|
|
27960
|
+
Runtimes["Node22"] = "node-22";
|
|
27961
|
+
Runtimes["Php80"] = "php-8.0";
|
|
27962
|
+
Runtimes["Php81"] = "php-8.1";
|
|
27963
|
+
Runtimes["Php82"] = "php-8.2";
|
|
27964
|
+
Runtimes["Php83"] = "php-8.3";
|
|
27965
|
+
Runtimes["Ruby30"] = "ruby-3.0";
|
|
27966
|
+
Runtimes["Ruby31"] = "ruby-3.1";
|
|
27967
|
+
Runtimes["Ruby32"] = "ruby-3.2";
|
|
27968
|
+
Runtimes["Ruby33"] = "ruby-3.3";
|
|
27969
|
+
Runtimes["Python38"] = "python-3.8";
|
|
27970
|
+
Runtimes["Python39"] = "python-3.9";
|
|
27971
|
+
Runtimes["Python310"] = "python-3.10";
|
|
27972
|
+
Runtimes["Python311"] = "python-3.11";
|
|
27973
|
+
Runtimes["Python312"] = "python-3.12";
|
|
27974
|
+
Runtimes["Pythonml311"] = "python-ml-3.11";
|
|
27975
|
+
Runtimes["Pythonml312"] = "python-ml-3.12";
|
|
27976
|
+
Runtimes["Deno121"] = "deno-1.21";
|
|
27977
|
+
Runtimes["Deno124"] = "deno-1.24";
|
|
27978
|
+
Runtimes["Deno135"] = "deno-1.35";
|
|
27979
|
+
Runtimes["Deno140"] = "deno-1.40";
|
|
27980
|
+
Runtimes["Deno146"] = "deno-1.46";
|
|
27981
|
+
Runtimes["Deno20"] = "deno-2.0";
|
|
27982
|
+
Runtimes["Dart215"] = "dart-2.15";
|
|
27983
|
+
Runtimes["Dart216"] = "dart-2.16";
|
|
27984
|
+
Runtimes["Dart217"] = "dart-2.17";
|
|
27985
|
+
Runtimes["Dart218"] = "dart-2.18";
|
|
27986
|
+
Runtimes["Dart219"] = "dart-2.19";
|
|
27987
|
+
Runtimes["Dart30"] = "dart-3.0";
|
|
27988
|
+
Runtimes["Dart31"] = "dart-3.1";
|
|
27989
|
+
Runtimes["Dart33"] = "dart-3.3";
|
|
27990
|
+
Runtimes["Dart35"] = "dart-3.5";
|
|
27991
|
+
Runtimes["Dart38"] = "dart-3.8";
|
|
27992
|
+
Runtimes["Dart39"] = "dart-3.9";
|
|
27993
|
+
Runtimes["Dart310"] = "dart-3.10";
|
|
27994
|
+
Runtimes["Dotnet60"] = "dotnet-6.0";
|
|
27995
|
+
Runtimes["Dotnet70"] = "dotnet-7.0";
|
|
27996
|
+
Runtimes["Dotnet80"] = "dotnet-8.0";
|
|
27997
|
+
Runtimes["Java80"] = "java-8.0";
|
|
27998
|
+
Runtimes["Java110"] = "java-11.0";
|
|
27999
|
+
Runtimes["Java170"] = "java-17.0";
|
|
28000
|
+
Runtimes["Java180"] = "java-18.0";
|
|
28001
|
+
Runtimes["Java210"] = "java-21.0";
|
|
28002
|
+
Runtimes["Java22"] = "java-22";
|
|
28003
|
+
Runtimes["Swift55"] = "swift-5.5";
|
|
28004
|
+
Runtimes["Swift58"] = "swift-5.8";
|
|
28005
|
+
Runtimes["Swift59"] = "swift-5.9";
|
|
28006
|
+
Runtimes["Swift510"] = "swift-5.10";
|
|
28007
|
+
Runtimes["Kotlin16"] = "kotlin-1.6";
|
|
28008
|
+
Runtimes["Kotlin18"] = "kotlin-1.8";
|
|
28009
|
+
Runtimes["Kotlin19"] = "kotlin-1.9";
|
|
28010
|
+
Runtimes["Kotlin20"] = "kotlin-2.0";
|
|
28011
|
+
Runtimes["Cpp17"] = "cpp-17";
|
|
28012
|
+
Runtimes["Cpp20"] = "cpp-20";
|
|
28013
|
+
Runtimes["Bun10"] = "bun-1.0";
|
|
28014
|
+
Runtimes["Bun11"] = "bun-1.1";
|
|
28015
|
+
Runtimes["Go123"] = "go-1.23";
|
|
28016
|
+
Runtimes["Static1"] = "static-1";
|
|
28017
|
+
Runtimes["Flutter324"] = "flutter-3.24";
|
|
28018
|
+
Runtimes["Flutter327"] = "flutter-3.27";
|
|
28019
|
+
Runtimes["Flutter329"] = "flutter-3.29";
|
|
28020
|
+
Runtimes["Flutter332"] = "flutter-3.32";
|
|
28021
|
+
Runtimes["Flutter335"] = "flutter-3.35";
|
|
28022
|
+
Runtimes["Flutter338"] = "flutter-3.38";
|
|
28023
|
+
})(Runtimes || (Runtimes = {}));
|
|
28024
|
+
|
|
28025
|
+
var UseCases;
|
|
28026
|
+
(function (UseCases) {
|
|
28027
|
+
UseCases["Portfolio"] = "portfolio";
|
|
28028
|
+
UseCases["Starter"] = "starter";
|
|
28029
|
+
UseCases["Events"] = "events";
|
|
28030
|
+
UseCases["Ecommerce"] = "ecommerce";
|
|
28031
|
+
UseCases["Documentation"] = "documentation";
|
|
28032
|
+
UseCases["Blog"] = "blog";
|
|
28033
|
+
UseCases["Ai"] = "ai";
|
|
28034
|
+
UseCases["Forms"] = "forms";
|
|
28035
|
+
UseCases["Dashboard"] = "dashboard";
|
|
28036
|
+
})(UseCases || (UseCases = {}));
|
|
28037
|
+
|
|
26544
28038
|
var TemplateReferenceType;
|
|
26545
28039
|
(function (TemplateReferenceType) {
|
|
26546
28040
|
TemplateReferenceType["Branch"] = "branch";
|
|
@@ -26602,24 +28096,20 @@ var SmtpEncryption;
|
|
|
26602
28096
|
SmtpEncryption["Tls"] = "tls";
|
|
26603
28097
|
})(SmtpEncryption || (SmtpEncryption = {}));
|
|
26604
28098
|
|
|
26605
|
-
var
|
|
26606
|
-
(function (
|
|
26607
|
-
|
|
26608
|
-
|
|
26609
|
-
|
|
26610
|
-
|
|
26611
|
-
|
|
26612
|
-
|
|
26613
|
-
|
|
26614
|
-
|
|
26615
|
-
|
|
26616
|
-
|
|
26617
|
-
|
|
26618
|
-
|
|
26619
|
-
BillingPlan["Imaginetier11100"] = "imagine-tier-1-1100";
|
|
26620
|
-
BillingPlan["Imaginetier11650"] = "imagine-tier-1-1650";
|
|
26621
|
-
BillingPlan["Imaginetier12200"] = "imagine-tier-1-2200";
|
|
26622
|
-
})(BillingPlan || (BillingPlan = {}));
|
|
28099
|
+
var Resources;
|
|
28100
|
+
(function (Resources) {
|
|
28101
|
+
Resources["User"] = "user";
|
|
28102
|
+
Resources["Database"] = "database";
|
|
28103
|
+
Resources["Table"] = "table";
|
|
28104
|
+
Resources["Column"] = "column";
|
|
28105
|
+
Resources["Index"] = "index";
|
|
28106
|
+
Resources["Row"] = "row";
|
|
28107
|
+
Resources["Document"] = "document";
|
|
28108
|
+
Resources["Attribute"] = "attribute";
|
|
28109
|
+
Resources["Collection"] = "collection";
|
|
28110
|
+
Resources["Bucket"] = "bucket";
|
|
28111
|
+
Resources["File"] = "file";
|
|
28112
|
+
})(Resources || (Resources = {}));
|
|
26623
28113
|
|
|
26624
28114
|
var ProjectUsageRange;
|
|
26625
28115
|
(function (ProjectUsageRange) {
|
|
@@ -26697,12 +28187,6 @@ var SMTPSecure;
|
|
|
26697
28187
|
SMTPSecure["Ssl"] = "ssl";
|
|
26698
28188
|
})(SMTPSecure || (SMTPSecure = {}));
|
|
26699
28189
|
|
|
26700
|
-
var Status;
|
|
26701
|
-
(function (Status) {
|
|
26702
|
-
Status["Active"] = "active";
|
|
26703
|
-
Status["Archived"] = "archived";
|
|
26704
|
-
})(Status || (Status = {}));
|
|
26705
|
-
|
|
26706
28190
|
var EmailTemplateType;
|
|
26707
28191
|
(function (EmailTemplateType) {
|
|
26708
28192
|
EmailTemplateType["Verification"] = "verification";
|
|
@@ -27049,6 +28533,9 @@ var BuildRuntime;
|
|
|
27049
28533
|
BuildRuntime["Python312"] = "python-3.12";
|
|
27050
28534
|
BuildRuntime["Pythonml311"] = "python-ml-3.11";
|
|
27051
28535
|
BuildRuntime["Pythonml312"] = "python-ml-3.12";
|
|
28536
|
+
BuildRuntime["Deno121"] = "deno-1.21";
|
|
28537
|
+
BuildRuntime["Deno124"] = "deno-1.24";
|
|
28538
|
+
BuildRuntime["Deno135"] = "deno-1.35";
|
|
27052
28539
|
BuildRuntime["Deno140"] = "deno-1.40";
|
|
27053
28540
|
BuildRuntime["Deno146"] = "deno-1.46";
|
|
27054
28541
|
BuildRuntime["Deno20"] = "deno-2.0";
|
|
@@ -27063,6 +28550,7 @@ var BuildRuntime;
|
|
|
27063
28550
|
BuildRuntime["Dart35"] = "dart-3.5";
|
|
27064
28551
|
BuildRuntime["Dart38"] = "dart-3.8";
|
|
27065
28552
|
BuildRuntime["Dart39"] = "dart-3.9";
|
|
28553
|
+
BuildRuntime["Dart310"] = "dart-3.10";
|
|
27066
28554
|
BuildRuntime["Dotnet60"] = "dotnet-6.0";
|
|
27067
28555
|
BuildRuntime["Dotnet70"] = "dotnet-7.0";
|
|
27068
28556
|
BuildRuntime["Dotnet80"] = "dotnet-8.0";
|
|
@@ -27091,6 +28579,7 @@ var BuildRuntime;
|
|
|
27091
28579
|
BuildRuntime["Flutter329"] = "flutter-3.29";
|
|
27092
28580
|
BuildRuntime["Flutter332"] = "flutter-3.32";
|
|
27093
28581
|
BuildRuntime["Flutter335"] = "flutter-3.35";
|
|
28582
|
+
BuildRuntime["Flutter338"] = "flutter-3.38";
|
|
27094
28583
|
})(BuildRuntime || (BuildRuntime = {}));
|
|
27095
28584
|
|
|
27096
28585
|
var Adapter;
|
|
@@ -27099,6 +28588,25 @@ var Adapter;
|
|
|
27099
28588
|
Adapter["Ssr"] = "ssr";
|
|
27100
28589
|
})(Adapter || (Adapter = {}));
|
|
27101
28590
|
|
|
28591
|
+
var Frameworks;
|
|
28592
|
+
(function (Frameworks) {
|
|
28593
|
+
Frameworks["Analog"] = "analog";
|
|
28594
|
+
Frameworks["Angular"] = "angular";
|
|
28595
|
+
Frameworks["Nextjs"] = "nextjs";
|
|
28596
|
+
Frameworks["React"] = "react";
|
|
28597
|
+
Frameworks["Nuxt"] = "nuxt";
|
|
28598
|
+
Frameworks["Vue"] = "vue";
|
|
28599
|
+
Frameworks["Sveltekit"] = "sveltekit";
|
|
28600
|
+
Frameworks["Astro"] = "astro";
|
|
28601
|
+
Frameworks["Tanstackstart"] = "tanstack-start";
|
|
28602
|
+
Frameworks["Remix"] = "remix";
|
|
28603
|
+
Frameworks["Lynx"] = "lynx";
|
|
28604
|
+
Frameworks["Flutter"] = "flutter";
|
|
28605
|
+
Frameworks["Reactnative"] = "react-native";
|
|
28606
|
+
Frameworks["Vite"] = "vite";
|
|
28607
|
+
Frameworks["Other"] = "other";
|
|
28608
|
+
})(Frameworks || (Frameworks = {}));
|
|
28609
|
+
|
|
27102
28610
|
var Compression;
|
|
27103
28611
|
(function (Compression) {
|
|
27104
28612
|
Compression["None"] = "none";
|
|
@@ -27186,6 +28694,7 @@ var DeploymentStatus;
|
|
|
27186
28694
|
DeploymentStatus["Processing"] = "processing";
|
|
27187
28695
|
DeploymentStatus["Building"] = "building";
|
|
27188
28696
|
DeploymentStatus["Ready"] = "ready";
|
|
28697
|
+
DeploymentStatus["Canceled"] = "canceled";
|
|
27189
28698
|
DeploymentStatus["Failed"] = "failed";
|
|
27190
28699
|
})(DeploymentStatus || (DeploymentStatus = {}));
|
|
27191
28700
|
|
|
@@ -27248,5 +28757,5 @@ var BillingPlanGroup;
|
|
|
27248
28757
|
BillingPlanGroup["Scale"] = "scale";
|
|
27249
28758
|
})(BillingPlanGroup || (BillingPlanGroup = {}));
|
|
27250
28759
|
|
|
27251
|
-
export { Account, Adapter, Api, ApiService, AppwriteException, Assistant, AttributeStatus, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars,
|
|
28760
|
+
export { Account, Adapter, Api, ApiService, AppwriteException, Assistant, AttributeStatus, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars, BackupServices, Backups, BillingPlanGroup, Browser, BrowserPermission, BuildRuntime, Channel, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, CreditCard, DatabaseType, Databases, DeploymentDownloadType, DeploymentStatus, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, ExecutionStatus, ExecutionTrigger, FilterType, Flag, Framework, Frameworks, Functions, Graphql, Health, HealthAntivirusStatus, HealthCheckStatus, ID, ImageFormat, ImageGravity, IndexStatus, IndexType, Locale, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, Name, OAuthProvider, Operator, OrderBy, Organizations, PasswordHash, Permission, Platform, PlatformType, Project, ProjectUsageRange, Projects, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Query, Realtime, Region, RegistrationType, RelationMutate, RelationshipType, Resources, Role, Runtime, Runtimes, SMTPSecure, Scopes, Sites, SmsTemplateLocale, SmsTemplateType, SmtpEncryption, StatusCode, Storage, TablesDB, Teams, TemplateReferenceType, Theme, Timezone, Tokens, UsageRange, UseCases, Users, VCSDetectionType, VCSReferenceType, Vcs };
|
|
27252
28761
|
//# sourceMappingURL=sdk.js.map
|