@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/iife/sdk.js
CHANGED
|
@@ -4210,20 +4210,9 @@
|
|
|
4210
4210
|
|
|
4211
4211
|
const JSONbigParser = jsonBigint.exports({ storeAsString: false });
|
|
4212
4212
|
const JSONbigSerializer = jsonBigint.exports({ useNativeBigInt: true });
|
|
4213
|
-
/**
|
|
4214
|
-
* Converts BigNumber objects from json-bigint to native types.
|
|
4215
|
-
* - Integer BigNumbers → BigInt (if unsafe) or number (if safe)
|
|
4216
|
-
* - Float BigNumbers → number
|
|
4217
|
-
* - Strings remain strings (never converted to BigNumber by json-bigint)
|
|
4218
|
-
*/
|
|
4219
4213
|
const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
|
|
4220
4214
|
const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
|
|
4221
|
-
function
|
|
4222
|
-
if (value === null || value === undefined)
|
|
4223
|
-
return value;
|
|
4224
|
-
if (Array.isArray(value)) {
|
|
4225
|
-
return value.map(convertBigNumbers);
|
|
4226
|
-
}
|
|
4215
|
+
function reviver(_key, value) {
|
|
4227
4216
|
if (BigNumber$1.isBigNumber(value)) {
|
|
4228
4217
|
if (value.isInteger()) {
|
|
4229
4218
|
const str = value.toFixed();
|
|
@@ -4233,20 +4222,12 @@
|
|
|
4233
4222
|
}
|
|
4234
4223
|
return bi;
|
|
4235
4224
|
}
|
|
4236
|
-
// float
|
|
4237
4225
|
return value.toNumber();
|
|
4238
4226
|
}
|
|
4239
|
-
if (typeof value === 'object') {
|
|
4240
|
-
const result = {};
|
|
4241
|
-
for (const [k, v] of Object.entries(value)) {
|
|
4242
|
-
result[k] = convertBigNumbers(v);
|
|
4243
|
-
}
|
|
4244
|
-
return result;
|
|
4245
|
-
}
|
|
4246
4227
|
return value;
|
|
4247
4228
|
}
|
|
4248
4229
|
const JSONbig = {
|
|
4249
|
-
parse: (text) =>
|
|
4230
|
+
parse: (text) => JSONbigParser.parse(text, reviver),
|
|
4250
4231
|
stringify: JSONbigSerializer.stringify
|
|
4251
4232
|
};
|
|
4252
4233
|
/**
|
|
@@ -4298,7 +4279,7 @@
|
|
|
4298
4279
|
'x-sdk-name': 'Console',
|
|
4299
4280
|
'x-sdk-platform': 'console',
|
|
4300
4281
|
'x-sdk-language': 'web',
|
|
4301
|
-
'x-sdk-version': '2.
|
|
4282
|
+
'x-sdk-version': '2.3.0',
|
|
4302
4283
|
'X-Appwrite-Response-Format': '1.8.0',
|
|
4303
4284
|
};
|
|
4304
4285
|
this.realtime = {
|
|
@@ -4307,7 +4288,10 @@
|
|
|
4307
4288
|
heartbeat: undefined,
|
|
4308
4289
|
url: '',
|
|
4309
4290
|
channels: new Set(),
|
|
4291
|
+
queries: new Set(),
|
|
4310
4292
|
subscriptions: new Map(),
|
|
4293
|
+
slotToSubscriptionId: new Map(),
|
|
4294
|
+
subscriptionIdToSlot: new Map(),
|
|
4311
4295
|
subscriptionsCounter: 0,
|
|
4312
4296
|
reconnect: true,
|
|
4313
4297
|
reconnectAttempts: 0,
|
|
@@ -4342,26 +4326,34 @@
|
|
|
4342
4326
|
}, 20000);
|
|
4343
4327
|
},
|
|
4344
4328
|
createSocket: () => {
|
|
4345
|
-
var _a, _b, _c;
|
|
4346
|
-
if (this.realtime.
|
|
4329
|
+
var _a, _b, _c, _d;
|
|
4330
|
+
if (this.realtime.subscriptions.size < 1) {
|
|
4347
4331
|
this.realtime.reconnect = false;
|
|
4348
4332
|
(_a = this.realtime.socket) === null || _a === void 0 ? void 0 : _a.close();
|
|
4349
4333
|
return;
|
|
4350
4334
|
}
|
|
4351
|
-
const
|
|
4352
|
-
|
|
4353
|
-
channels.set('project', this.config.project);
|
|
4354
|
-
}
|
|
4335
|
+
const encodedProject = encodeURIComponent((_b = this.config.project) !== null && _b !== void 0 ? _b : '');
|
|
4336
|
+
let queryParams = 'project=' + encodedProject;
|
|
4355
4337
|
this.realtime.channels.forEach(channel => {
|
|
4356
|
-
|
|
4338
|
+
queryParams += '&channels[]=' + encodeURIComponent(channel);
|
|
4339
|
+
});
|
|
4340
|
+
// Per-subscription queries: channel[slot][]=query so server can route events by subscription
|
|
4341
|
+
const selectAllQuery = Query.select(['*']).toString();
|
|
4342
|
+
this.realtime.subscriptions.forEach((sub, slot) => {
|
|
4343
|
+
const queries = sub.queries.length > 0 ? sub.queries : [selectAllQuery];
|
|
4344
|
+
sub.channels.forEach(channel => {
|
|
4345
|
+
queries.forEach(query => {
|
|
4346
|
+
queryParams += '&' + encodeURIComponent(channel) + '[' + slot + '][]=' + encodeURIComponent(query);
|
|
4347
|
+
});
|
|
4348
|
+
});
|
|
4357
4349
|
});
|
|
4358
|
-
const url = this.config.endpointRealtime + '/realtime?' +
|
|
4350
|
+
const url = this.config.endpointRealtime + '/realtime?' + queryParams;
|
|
4359
4351
|
if (url !== this.realtime.url || // Check if URL is present
|
|
4360
4352
|
!this.realtime.socket || // Check if WebSocket has not been created
|
|
4361
|
-
((
|
|
4353
|
+
((_c = this.realtime.socket) === null || _c === void 0 ? void 0 : _c.readyState) > WebSocket.OPEN // Check if WebSocket is CLOSING (3) or CLOSED (4)
|
|
4362
4354
|
) {
|
|
4363
4355
|
if (this.realtime.socket &&
|
|
4364
|
-
((
|
|
4356
|
+
((_d = this.realtime.socket) === null || _d === void 0 ? void 0 : _d.readyState) < WebSocket.CLOSING // Close WebSocket if it is CONNECTING (0) or OPEN (1)
|
|
4365
4357
|
) {
|
|
4366
4358
|
this.realtime.reconnect = false;
|
|
4367
4359
|
this.realtime.socket.close();
|
|
@@ -4397,14 +4389,25 @@
|
|
|
4397
4389
|
const message = JSONbig.parse(event.data);
|
|
4398
4390
|
this.realtime.lastMessage = message;
|
|
4399
4391
|
switch (message.type) {
|
|
4400
|
-
case 'connected':
|
|
4392
|
+
case 'connected': {
|
|
4393
|
+
const messageData = message.data;
|
|
4394
|
+
if (messageData === null || messageData === void 0 ? void 0 : messageData.subscriptions) {
|
|
4395
|
+
this.realtime.slotToSubscriptionId.clear();
|
|
4396
|
+
this.realtime.subscriptionIdToSlot.clear();
|
|
4397
|
+
for (const [slotStr, subscriptionId] of Object.entries(messageData.subscriptions)) {
|
|
4398
|
+
const slot = Number(slotStr);
|
|
4399
|
+
if (!isNaN(slot) && typeof subscriptionId === 'string') {
|
|
4400
|
+
this.realtime.slotToSubscriptionId.set(slot, subscriptionId);
|
|
4401
|
+
this.realtime.subscriptionIdToSlot.set(subscriptionId, slot);
|
|
4402
|
+
}
|
|
4403
|
+
}
|
|
4404
|
+
}
|
|
4401
4405
|
let session = this.config.session;
|
|
4402
4406
|
if (!session) {
|
|
4403
4407
|
const cookie = JSONbig.parse((_a = window.localStorage.getItem('cookieFallback')) !== null && _a !== void 0 ? _a : '{}');
|
|
4404
4408
|
session = cookie === null || cookie === void 0 ? void 0 : cookie[`a_session_${this.config.project}`];
|
|
4405
4409
|
}
|
|
4406
|
-
|
|
4407
|
-
if (session && !messageData.user) {
|
|
4410
|
+
if (session && !(messageData === null || messageData === void 0 ? void 0 : messageData.user)) {
|
|
4408
4411
|
(_b = this.realtime.socket) === null || _b === void 0 ? void 0 : _b.send(JSONbig.stringify({
|
|
4409
4412
|
type: 'authentication',
|
|
4410
4413
|
data: {
|
|
@@ -4413,12 +4416,27 @@
|
|
|
4413
4416
|
}));
|
|
4414
4417
|
}
|
|
4415
4418
|
break;
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
+
}
|
|
4420
|
+
case 'event': {
|
|
4421
|
+
const data = message.data;
|
|
4422
|
+
if (!(data === null || data === void 0 ? void 0 : data.channels))
|
|
4423
|
+
break;
|
|
4424
|
+
const eventSubIds = data.subscriptions;
|
|
4425
|
+
if (eventSubIds && eventSubIds.length > 0) {
|
|
4426
|
+
for (const subscriptionId of eventSubIds) {
|
|
4427
|
+
const slot = this.realtime.subscriptionIdToSlot.get(subscriptionId);
|
|
4428
|
+
if (slot !== undefined) {
|
|
4429
|
+
const subscription = this.realtime.subscriptions.get(slot);
|
|
4430
|
+
if (subscription) {
|
|
4431
|
+
setTimeout(() => subscription.callback(data));
|
|
4432
|
+
}
|
|
4433
|
+
}
|
|
4434
|
+
}
|
|
4435
|
+
}
|
|
4436
|
+
else {
|
|
4419
4437
|
const isSubscribed = data.channels.some(channel => this.realtime.channels.has(channel));
|
|
4420
4438
|
if (!isSubscribed)
|
|
4421
|
-
|
|
4439
|
+
break;
|
|
4422
4440
|
this.realtime.subscriptions.forEach(subscription => {
|
|
4423
4441
|
if (data.channels.some(channel => subscription.channels.includes(channel))) {
|
|
4424
4442
|
setTimeout(() => subscription.callback(data));
|
|
@@ -4426,6 +4444,7 @@
|
|
|
4426
4444
|
});
|
|
4427
4445
|
}
|
|
4428
4446
|
break;
|
|
4447
|
+
}
|
|
4429
4448
|
case 'pong':
|
|
4430
4449
|
break; // Handle pong response if needed
|
|
4431
4450
|
case 'error':
|
|
@@ -4438,7 +4457,7 @@
|
|
|
4438
4457
|
console.error(e);
|
|
4439
4458
|
}
|
|
4440
4459
|
},
|
|
4441
|
-
cleanUp: channels => {
|
|
4460
|
+
cleanUp: (channels, queries) => {
|
|
4442
4461
|
this.realtime.channels.forEach(channel => {
|
|
4443
4462
|
if (channels.includes(channel)) {
|
|
4444
4463
|
let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
|
|
@@ -4449,6 +4468,17 @@
|
|
|
4449
4468
|
}
|
|
4450
4469
|
}
|
|
4451
4470
|
});
|
|
4471
|
+
this.realtime.queries.forEach(query => {
|
|
4472
|
+
if (queries.includes(query)) {
|
|
4473
|
+
let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
|
|
4474
|
+
var _a;
|
|
4475
|
+
return (_a = subscription.queries) === null || _a === void 0 ? void 0 : _a.includes(query);
|
|
4476
|
+
});
|
|
4477
|
+
if (!found) {
|
|
4478
|
+
this.realtime.queries.delete(query);
|
|
4479
|
+
}
|
|
4480
|
+
}
|
|
4481
|
+
});
|
|
4452
4482
|
}
|
|
4453
4483
|
};
|
|
4454
4484
|
}
|
|
@@ -4629,7 +4659,7 @@
|
|
|
4629
4659
|
* @param {(payload: RealtimeMessage) => void} callback Is called on every realtime update.
|
|
4630
4660
|
* @returns {() => void} Unsubscribes from events.
|
|
4631
4661
|
*/
|
|
4632
|
-
subscribe(channels, callback) {
|
|
4662
|
+
subscribe(channels, callback, queries = []) {
|
|
4633
4663
|
const channelArray = Array.isArray(channels) ? channels : [channels];
|
|
4634
4664
|
// Convert Channel instances to strings
|
|
4635
4665
|
const channelStrings = channelArray.map(ch => {
|
|
@@ -4644,15 +4674,18 @@
|
|
|
4644
4674
|
return String(ch);
|
|
4645
4675
|
});
|
|
4646
4676
|
channelStrings.forEach(channel => this.realtime.channels.add(channel));
|
|
4677
|
+
const queryStrings = (queries !== null && queries !== void 0 ? queries : []).map(q => typeof q === 'string' ? q : q.toString());
|
|
4678
|
+
queryStrings.forEach(query => this.realtime.queries.add(query));
|
|
4647
4679
|
const counter = this.realtime.subscriptionsCounter++;
|
|
4648
4680
|
this.realtime.subscriptions.set(counter, {
|
|
4649
4681
|
channels: channelStrings,
|
|
4682
|
+
queries: queryStrings,
|
|
4650
4683
|
callback
|
|
4651
4684
|
});
|
|
4652
4685
|
this.realtime.connect();
|
|
4653
4686
|
return () => {
|
|
4654
4687
|
this.realtime.subscriptions.delete(counter);
|
|
4655
|
-
this.realtime.cleanUp(channelStrings);
|
|
4688
|
+
this.realtime.cleanUp(channelStrings, queryStrings);
|
|
4656
4689
|
this.realtime.connect();
|
|
4657
4690
|
};
|
|
4658
4691
|
}
|
|
@@ -5229,6 +5262,149 @@
|
|
|
5229
5262
|
};
|
|
5230
5263
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
5231
5264
|
}
|
|
5265
|
+
listKeys(paramsOrFirst) {
|
|
5266
|
+
let params;
|
|
5267
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5268
|
+
params = (paramsOrFirst || {});
|
|
5269
|
+
}
|
|
5270
|
+
else {
|
|
5271
|
+
params = {
|
|
5272
|
+
total: paramsOrFirst
|
|
5273
|
+
};
|
|
5274
|
+
}
|
|
5275
|
+
const total = params.total;
|
|
5276
|
+
const apiPath = '/account/keys';
|
|
5277
|
+
const payload = {};
|
|
5278
|
+
if (typeof total !== 'undefined') {
|
|
5279
|
+
payload['total'] = total;
|
|
5280
|
+
}
|
|
5281
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5282
|
+
const apiHeaders = {};
|
|
5283
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
5284
|
+
}
|
|
5285
|
+
createKey(paramsOrFirst, ...rest) {
|
|
5286
|
+
let params;
|
|
5287
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5288
|
+
params = (paramsOrFirst || {});
|
|
5289
|
+
}
|
|
5290
|
+
else {
|
|
5291
|
+
params = {
|
|
5292
|
+
name: paramsOrFirst,
|
|
5293
|
+
scopes: rest[0],
|
|
5294
|
+
expire: rest[1]
|
|
5295
|
+
};
|
|
5296
|
+
}
|
|
5297
|
+
const name = params.name;
|
|
5298
|
+
const scopes = params.scopes;
|
|
5299
|
+
const expire = params.expire;
|
|
5300
|
+
if (typeof name === 'undefined') {
|
|
5301
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
5302
|
+
}
|
|
5303
|
+
if (typeof scopes === 'undefined') {
|
|
5304
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
5305
|
+
}
|
|
5306
|
+
const apiPath = '/account/keys';
|
|
5307
|
+
const payload = {};
|
|
5308
|
+
if (typeof name !== 'undefined') {
|
|
5309
|
+
payload['name'] = name;
|
|
5310
|
+
}
|
|
5311
|
+
if (typeof scopes !== 'undefined') {
|
|
5312
|
+
payload['scopes'] = scopes;
|
|
5313
|
+
}
|
|
5314
|
+
if (typeof expire !== 'undefined') {
|
|
5315
|
+
payload['expire'] = expire;
|
|
5316
|
+
}
|
|
5317
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5318
|
+
const apiHeaders = {
|
|
5319
|
+
'content-type': 'application/json',
|
|
5320
|
+
};
|
|
5321
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
5322
|
+
}
|
|
5323
|
+
getKey(paramsOrFirst) {
|
|
5324
|
+
let params;
|
|
5325
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5326
|
+
params = (paramsOrFirst || {});
|
|
5327
|
+
}
|
|
5328
|
+
else {
|
|
5329
|
+
params = {
|
|
5330
|
+
keyId: paramsOrFirst
|
|
5331
|
+
};
|
|
5332
|
+
}
|
|
5333
|
+
const keyId = params.keyId;
|
|
5334
|
+
if (typeof keyId === 'undefined') {
|
|
5335
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
5336
|
+
}
|
|
5337
|
+
const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
|
|
5338
|
+
const payload = {};
|
|
5339
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5340
|
+
const apiHeaders = {};
|
|
5341
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
5342
|
+
}
|
|
5343
|
+
updateKey(paramsOrFirst, ...rest) {
|
|
5344
|
+
let params;
|
|
5345
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5346
|
+
params = (paramsOrFirst || {});
|
|
5347
|
+
}
|
|
5348
|
+
else {
|
|
5349
|
+
params = {
|
|
5350
|
+
keyId: paramsOrFirst,
|
|
5351
|
+
name: rest[0],
|
|
5352
|
+
scopes: rest[1],
|
|
5353
|
+
expire: rest[2]
|
|
5354
|
+
};
|
|
5355
|
+
}
|
|
5356
|
+
const keyId = params.keyId;
|
|
5357
|
+
const name = params.name;
|
|
5358
|
+
const scopes = params.scopes;
|
|
5359
|
+
const expire = params.expire;
|
|
5360
|
+
if (typeof keyId === 'undefined') {
|
|
5361
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
5362
|
+
}
|
|
5363
|
+
if (typeof name === 'undefined') {
|
|
5364
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
5365
|
+
}
|
|
5366
|
+
if (typeof scopes === 'undefined') {
|
|
5367
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
5368
|
+
}
|
|
5369
|
+
const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
|
|
5370
|
+
const payload = {};
|
|
5371
|
+
if (typeof name !== 'undefined') {
|
|
5372
|
+
payload['name'] = name;
|
|
5373
|
+
}
|
|
5374
|
+
if (typeof scopes !== 'undefined') {
|
|
5375
|
+
payload['scopes'] = scopes;
|
|
5376
|
+
}
|
|
5377
|
+
if (typeof expire !== 'undefined') {
|
|
5378
|
+
payload['expire'] = expire;
|
|
5379
|
+
}
|
|
5380
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5381
|
+
const apiHeaders = {
|
|
5382
|
+
'content-type': 'application/json',
|
|
5383
|
+
};
|
|
5384
|
+
return this.client.call('put', uri, apiHeaders, payload);
|
|
5385
|
+
}
|
|
5386
|
+
deleteKey(paramsOrFirst) {
|
|
5387
|
+
let params;
|
|
5388
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5389
|
+
params = (paramsOrFirst || {});
|
|
5390
|
+
}
|
|
5391
|
+
else {
|
|
5392
|
+
params = {
|
|
5393
|
+
keyId: paramsOrFirst
|
|
5394
|
+
};
|
|
5395
|
+
}
|
|
5396
|
+
const keyId = params.keyId;
|
|
5397
|
+
if (typeof keyId === 'undefined') {
|
|
5398
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
5399
|
+
}
|
|
5400
|
+
const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
|
|
5401
|
+
const payload = {};
|
|
5402
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5403
|
+
const apiHeaders = {
|
|
5404
|
+
'content-type': 'application/json',
|
|
5405
|
+
};
|
|
5406
|
+
return this.client.call('delete', uri, apiHeaders, payload);
|
|
5407
|
+
}
|
|
5232
5408
|
listLogs(paramsOrFirst, ...rest) {
|
|
5233
5409
|
let params;
|
|
5234
5410
|
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -5281,7 +5457,7 @@
|
|
|
5281
5457
|
}
|
|
5282
5458
|
createMfaAuthenticator(paramsOrFirst) {
|
|
5283
5459
|
let params;
|
|
5284
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
5460
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
5285
5461
|
params = (paramsOrFirst || {});
|
|
5286
5462
|
}
|
|
5287
5463
|
else {
|
|
@@ -5303,7 +5479,7 @@
|
|
|
5303
5479
|
}
|
|
5304
5480
|
createMFAAuthenticator(paramsOrFirst) {
|
|
5305
5481
|
let params;
|
|
5306
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
5482
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
5307
5483
|
params = (paramsOrFirst || {});
|
|
5308
5484
|
}
|
|
5309
5485
|
else {
|
|
@@ -5325,7 +5501,7 @@
|
|
|
5325
5501
|
}
|
|
5326
5502
|
updateMfaAuthenticator(paramsOrFirst, ...rest) {
|
|
5327
5503
|
let params;
|
|
5328
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
5504
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst || 'otp' in paramsOrFirst))) {
|
|
5329
5505
|
params = (paramsOrFirst || {});
|
|
5330
5506
|
}
|
|
5331
5507
|
else {
|
|
@@ -5355,7 +5531,7 @@
|
|
|
5355
5531
|
}
|
|
5356
5532
|
updateMFAAuthenticator(paramsOrFirst, ...rest) {
|
|
5357
5533
|
let params;
|
|
5358
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
5534
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst || 'otp' in paramsOrFirst))) {
|
|
5359
5535
|
params = (paramsOrFirst || {});
|
|
5360
5536
|
}
|
|
5361
5537
|
else {
|
|
@@ -5385,7 +5561,7 @@
|
|
|
5385
5561
|
}
|
|
5386
5562
|
deleteMfaAuthenticator(paramsOrFirst) {
|
|
5387
5563
|
let params;
|
|
5388
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
5564
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
5389
5565
|
params = (paramsOrFirst || {});
|
|
5390
5566
|
}
|
|
5391
5567
|
else {
|
|
@@ -5407,7 +5583,7 @@
|
|
|
5407
5583
|
}
|
|
5408
5584
|
deleteMFAAuthenticator(paramsOrFirst) {
|
|
5409
5585
|
let params;
|
|
5410
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
5586
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
5411
5587
|
params = (paramsOrFirst || {});
|
|
5412
5588
|
}
|
|
5413
5589
|
else {
|
|
@@ -5429,7 +5605,7 @@
|
|
|
5429
5605
|
}
|
|
5430
5606
|
createMfaChallenge(paramsOrFirst) {
|
|
5431
5607
|
let params;
|
|
5432
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
|
|
5608
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
|
|
5433
5609
|
params = (paramsOrFirst || {});
|
|
5434
5610
|
}
|
|
5435
5611
|
else {
|
|
@@ -5454,7 +5630,7 @@
|
|
|
5454
5630
|
}
|
|
5455
5631
|
createMFAChallenge(paramsOrFirst) {
|
|
5456
5632
|
let params;
|
|
5457
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
|
|
5633
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
|
|
5458
5634
|
params = (paramsOrFirst || {});
|
|
5459
5635
|
}
|
|
5460
5636
|
else {
|
|
@@ -5947,7 +6123,7 @@
|
|
|
5947
6123
|
}
|
|
5948
6124
|
updatePrefs(paramsOrFirst) {
|
|
5949
6125
|
let params;
|
|
5950
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'prefs' in paramsOrFirst)) {
|
|
6126
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('prefs' in paramsOrFirst))) {
|
|
5951
6127
|
params = (paramsOrFirst || {});
|
|
5952
6128
|
}
|
|
5953
6129
|
else {
|
|
@@ -6155,7 +6331,7 @@
|
|
|
6155
6331
|
}
|
|
6156
6332
|
createOAuth2Session(paramsOrFirst, ...rest) {
|
|
6157
6333
|
let params;
|
|
6158
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'provider' in paramsOrFirst)) {
|
|
6334
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('provider' in paramsOrFirst || 'success' in paramsOrFirst || 'failure' in paramsOrFirst || 'scopes' in paramsOrFirst))) {
|
|
6159
6335
|
params = (paramsOrFirst || {});
|
|
6160
6336
|
}
|
|
6161
6337
|
else {
|
|
@@ -6515,7 +6691,7 @@
|
|
|
6515
6691
|
}
|
|
6516
6692
|
createOAuth2Token(paramsOrFirst, ...rest) {
|
|
6517
6693
|
let params;
|
|
6518
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'provider' in paramsOrFirst)) {
|
|
6694
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('provider' in paramsOrFirst || 'success' in paramsOrFirst || 'failure' in paramsOrFirst || 'scopes' in paramsOrFirst))) {
|
|
6519
6695
|
params = (paramsOrFirst || {});
|
|
6520
6696
|
}
|
|
6521
6697
|
else {
|
|
@@ -6762,7 +6938,7 @@
|
|
|
6762
6938
|
}
|
|
6763
6939
|
getBrowser(paramsOrFirst, ...rest) {
|
|
6764
6940
|
let params;
|
|
6765
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
6941
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
6766
6942
|
params = (paramsOrFirst || {});
|
|
6767
6943
|
}
|
|
6768
6944
|
else {
|
|
@@ -6800,7 +6976,7 @@
|
|
|
6800
6976
|
}
|
|
6801
6977
|
getCreditCard(paramsOrFirst, ...rest) {
|
|
6802
6978
|
let params;
|
|
6803
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
6979
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
6804
6980
|
params = (paramsOrFirst || {});
|
|
6805
6981
|
}
|
|
6806
6982
|
else {
|
|
@@ -6864,7 +7040,7 @@
|
|
|
6864
7040
|
}
|
|
6865
7041
|
getFlag(paramsOrFirst, ...rest) {
|
|
6866
7042
|
let params;
|
|
6867
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
7043
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
6868
7044
|
params = (paramsOrFirst || {});
|
|
6869
7045
|
}
|
|
6870
7046
|
else {
|
|
@@ -7164,7 +7340,7 @@
|
|
|
7164
7340
|
}
|
|
7165
7341
|
createArchive(paramsOrFirst, ...rest) {
|
|
7166
7342
|
let params;
|
|
7167
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
7343
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('services' in paramsOrFirst || 'resourceId' in paramsOrFirst))) {
|
|
7168
7344
|
params = (paramsOrFirst || {});
|
|
7169
7345
|
}
|
|
7170
7346
|
else {
|
|
@@ -7564,7 +7740,7 @@
|
|
|
7564
7740
|
}
|
|
7565
7741
|
getPlans(paramsOrFirst) {
|
|
7566
7742
|
let params;
|
|
7567
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'platform' in paramsOrFirst)) {
|
|
7743
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('platform' in paramsOrFirst))) {
|
|
7568
7744
|
params = (paramsOrFirst || {});
|
|
7569
7745
|
}
|
|
7570
7746
|
else {
|
|
@@ -7644,25 +7820,15 @@
|
|
|
7644
7820
|
};
|
|
7645
7821
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
7646
7822
|
}
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
organizationId: paramsOrFirst
|
|
7655
|
-
};
|
|
7656
|
-
}
|
|
7657
|
-
const organizationId = params.organizationId;
|
|
7658
|
-
if (typeof organizationId === 'undefined') {
|
|
7659
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
7660
|
-
}
|
|
7823
|
+
/**
|
|
7824
|
+
* Get all available regions for the console.
|
|
7825
|
+
*
|
|
7826
|
+
* @throws {AppwriteException}
|
|
7827
|
+
* @returns {Promise<Models.ConsoleRegionList>}
|
|
7828
|
+
*/
|
|
7829
|
+
listRegions() {
|
|
7661
7830
|
const apiPath = '/console/regions';
|
|
7662
7831
|
const payload = {};
|
|
7663
|
-
if (typeof organizationId !== 'undefined') {
|
|
7664
|
-
payload['organizationId'] = organizationId;
|
|
7665
|
-
}
|
|
7666
7832
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
7667
7833
|
const apiHeaders = {};
|
|
7668
7834
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
@@ -8059,7 +8225,7 @@
|
|
|
8059
8225
|
}
|
|
8060
8226
|
listUsage(paramsOrFirst) {
|
|
8061
8227
|
let params;
|
|
8062
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
8228
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
8063
8229
|
params = (paramsOrFirst || {});
|
|
8064
8230
|
}
|
|
8065
8231
|
else {
|
|
@@ -8115,9 +8281,6 @@
|
|
|
8115
8281
|
if (typeof databaseId === 'undefined') {
|
|
8116
8282
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
8117
8283
|
}
|
|
8118
|
-
if (typeof name === 'undefined') {
|
|
8119
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
8120
|
-
}
|
|
8121
8284
|
const apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
|
|
8122
8285
|
const payload = {};
|
|
8123
8286
|
if (typeof name !== 'undefined') {
|
|
@@ -8304,9 +8467,6 @@
|
|
|
8304
8467
|
if (typeof collectionId === 'undefined') {
|
|
8305
8468
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
8306
8469
|
}
|
|
8307
|
-
if (typeof name === 'undefined') {
|
|
8308
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
8309
|
-
}
|
|
8310
8470
|
const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
8311
8471
|
const payload = {};
|
|
8312
8472
|
if (typeof name !== 'undefined') {
|
|
@@ -9285,7 +9445,7 @@
|
|
|
9285
9445
|
};
|
|
9286
9446
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
9287
9447
|
}
|
|
9288
|
-
|
|
9448
|
+
createLongtextAttribute(paramsOrFirst, ...rest) {
|
|
9289
9449
|
let params;
|
|
9290
9450
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9291
9451
|
params = (paramsOrFirst || {});
|
|
@@ -9296,7 +9456,8 @@
|
|
|
9296
9456
|
collectionId: rest[0],
|
|
9297
9457
|
key: rest[1],
|
|
9298
9458
|
required: rest[2],
|
|
9299
|
-
xdefault: rest[3]
|
|
9459
|
+
xdefault: rest[3],
|
|
9460
|
+
array: rest[4]
|
|
9300
9461
|
};
|
|
9301
9462
|
}
|
|
9302
9463
|
const databaseId = params.databaseId;
|
|
@@ -9304,6 +9465,7 @@
|
|
|
9304
9465
|
const key = params.key;
|
|
9305
9466
|
const required = params.required;
|
|
9306
9467
|
const xdefault = params.xdefault;
|
|
9468
|
+
const array = params.array;
|
|
9307
9469
|
if (typeof databaseId === 'undefined') {
|
|
9308
9470
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9309
9471
|
}
|
|
@@ -9316,7 +9478,7 @@
|
|
|
9316
9478
|
if (typeof required === 'undefined') {
|
|
9317
9479
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
9318
9480
|
}
|
|
9319
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/
|
|
9481
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
9320
9482
|
const payload = {};
|
|
9321
9483
|
if (typeof key !== 'undefined') {
|
|
9322
9484
|
payload['key'] = key;
|
|
@@ -9327,13 +9489,16 @@
|
|
|
9327
9489
|
if (typeof xdefault !== 'undefined') {
|
|
9328
9490
|
payload['default'] = xdefault;
|
|
9329
9491
|
}
|
|
9492
|
+
if (typeof array !== 'undefined') {
|
|
9493
|
+
payload['array'] = array;
|
|
9494
|
+
}
|
|
9330
9495
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9331
9496
|
const apiHeaders = {
|
|
9332
9497
|
'content-type': 'application/json',
|
|
9333
9498
|
};
|
|
9334
9499
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
9335
9500
|
}
|
|
9336
|
-
|
|
9501
|
+
updateLongtextAttribute(paramsOrFirst, ...rest) {
|
|
9337
9502
|
let params;
|
|
9338
9503
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9339
9504
|
params = (paramsOrFirst || {});
|
|
@@ -9366,7 +9531,10 @@
|
|
|
9366
9531
|
if (typeof required === 'undefined') {
|
|
9367
9532
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
9368
9533
|
}
|
|
9369
|
-
|
|
9534
|
+
if (typeof xdefault === 'undefined') {
|
|
9535
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
9536
|
+
}
|
|
9537
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
9370
9538
|
const payload = {};
|
|
9371
9539
|
if (typeof required !== 'undefined') {
|
|
9372
9540
|
payload['required'] = required;
|
|
@@ -9383,7 +9551,7 @@
|
|
|
9383
9551
|
};
|
|
9384
9552
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
9385
9553
|
}
|
|
9386
|
-
|
|
9554
|
+
createMediumtextAttribute(paramsOrFirst, ...rest) {
|
|
9387
9555
|
let params;
|
|
9388
9556
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9389
9557
|
params = (paramsOrFirst || {});
|
|
@@ -9394,7 +9562,8 @@
|
|
|
9394
9562
|
collectionId: rest[0],
|
|
9395
9563
|
key: rest[1],
|
|
9396
9564
|
required: rest[2],
|
|
9397
|
-
xdefault: rest[3]
|
|
9565
|
+
xdefault: rest[3],
|
|
9566
|
+
array: rest[4]
|
|
9398
9567
|
};
|
|
9399
9568
|
}
|
|
9400
9569
|
const databaseId = params.databaseId;
|
|
@@ -9402,6 +9571,7 @@
|
|
|
9402
9571
|
const key = params.key;
|
|
9403
9572
|
const required = params.required;
|
|
9404
9573
|
const xdefault = params.xdefault;
|
|
9574
|
+
const array = params.array;
|
|
9405
9575
|
if (typeof databaseId === 'undefined') {
|
|
9406
9576
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9407
9577
|
}
|
|
@@ -9414,7 +9584,7 @@
|
|
|
9414
9584
|
if (typeof required === 'undefined') {
|
|
9415
9585
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
9416
9586
|
}
|
|
9417
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/
|
|
9587
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
9418
9588
|
const payload = {};
|
|
9419
9589
|
if (typeof key !== 'undefined') {
|
|
9420
9590
|
payload['key'] = key;
|
|
@@ -9425,13 +9595,16 @@
|
|
|
9425
9595
|
if (typeof xdefault !== 'undefined') {
|
|
9426
9596
|
payload['default'] = xdefault;
|
|
9427
9597
|
}
|
|
9598
|
+
if (typeof array !== 'undefined') {
|
|
9599
|
+
payload['array'] = array;
|
|
9600
|
+
}
|
|
9428
9601
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9429
9602
|
const apiHeaders = {
|
|
9430
9603
|
'content-type': 'application/json',
|
|
9431
9604
|
};
|
|
9432
9605
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
9433
9606
|
}
|
|
9434
|
-
|
|
9607
|
+
updateMediumtextAttribute(paramsOrFirst, ...rest) {
|
|
9435
9608
|
let params;
|
|
9436
9609
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9437
9610
|
params = (paramsOrFirst || {});
|
|
@@ -9464,7 +9637,10 @@
|
|
|
9464
9637
|
if (typeof required === 'undefined') {
|
|
9465
9638
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
9466
9639
|
}
|
|
9467
|
-
|
|
9640
|
+
if (typeof xdefault === 'undefined') {
|
|
9641
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
9642
|
+
}
|
|
9643
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
9468
9644
|
const payload = {};
|
|
9469
9645
|
if (typeof required !== 'undefined') {
|
|
9470
9646
|
payload['required'] = required;
|
|
@@ -9481,7 +9657,7 @@
|
|
|
9481
9657
|
};
|
|
9482
9658
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
9483
9659
|
}
|
|
9484
|
-
|
|
9660
|
+
createPointAttribute(paramsOrFirst, ...rest) {
|
|
9485
9661
|
let params;
|
|
9486
9662
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9487
9663
|
params = (paramsOrFirst || {});
|
|
@@ -9490,53 +9666,38 @@
|
|
|
9490
9666
|
params = {
|
|
9491
9667
|
databaseId: paramsOrFirst,
|
|
9492
9668
|
collectionId: rest[0],
|
|
9493
|
-
|
|
9494
|
-
|
|
9495
|
-
|
|
9496
|
-
key: rest[4],
|
|
9497
|
-
twoWayKey: rest[5],
|
|
9498
|
-
onDelete: rest[6]
|
|
9669
|
+
key: rest[1],
|
|
9670
|
+
required: rest[2],
|
|
9671
|
+
xdefault: rest[3]
|
|
9499
9672
|
};
|
|
9500
9673
|
}
|
|
9501
9674
|
const databaseId = params.databaseId;
|
|
9502
9675
|
const collectionId = params.collectionId;
|
|
9503
|
-
const relatedCollectionId = params.relatedCollectionId;
|
|
9504
|
-
const type = params.type;
|
|
9505
|
-
const twoWay = params.twoWay;
|
|
9506
9676
|
const key = params.key;
|
|
9507
|
-
const
|
|
9508
|
-
const
|
|
9677
|
+
const required = params.required;
|
|
9678
|
+
const xdefault = params.xdefault;
|
|
9509
9679
|
if (typeof databaseId === 'undefined') {
|
|
9510
9680
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9511
9681
|
}
|
|
9512
9682
|
if (typeof collectionId === 'undefined') {
|
|
9513
9683
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
9514
9684
|
}
|
|
9515
|
-
if (typeof
|
|
9516
|
-
throw new AppwriteException('Missing required parameter: "
|
|
9685
|
+
if (typeof key === 'undefined') {
|
|
9686
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
9517
9687
|
}
|
|
9518
|
-
if (typeof
|
|
9519
|
-
throw new AppwriteException('Missing required parameter: "
|
|
9688
|
+
if (typeof required === 'undefined') {
|
|
9689
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
9520
9690
|
}
|
|
9521
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/
|
|
9691
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
9522
9692
|
const payload = {};
|
|
9523
|
-
if (typeof relatedCollectionId !== 'undefined') {
|
|
9524
|
-
payload['relatedCollectionId'] = relatedCollectionId;
|
|
9525
|
-
}
|
|
9526
|
-
if (typeof type !== 'undefined') {
|
|
9527
|
-
payload['type'] = type;
|
|
9528
|
-
}
|
|
9529
|
-
if (typeof twoWay !== 'undefined') {
|
|
9530
|
-
payload['twoWay'] = twoWay;
|
|
9531
|
-
}
|
|
9532
9693
|
if (typeof key !== 'undefined') {
|
|
9533
9694
|
payload['key'] = key;
|
|
9534
9695
|
}
|
|
9535
|
-
if (typeof
|
|
9536
|
-
payload['
|
|
9696
|
+
if (typeof required !== 'undefined') {
|
|
9697
|
+
payload['required'] = required;
|
|
9537
9698
|
}
|
|
9538
|
-
if (typeof
|
|
9539
|
-
payload['
|
|
9699
|
+
if (typeof xdefault !== 'undefined') {
|
|
9700
|
+
payload['default'] = xdefault;
|
|
9540
9701
|
}
|
|
9541
9702
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9542
9703
|
const apiHeaders = {
|
|
@@ -9544,7 +9705,7 @@
|
|
|
9544
9705
|
};
|
|
9545
9706
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
9546
9707
|
}
|
|
9547
|
-
|
|
9708
|
+
updatePointAttribute(paramsOrFirst, ...rest) {
|
|
9548
9709
|
let params;
|
|
9549
9710
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9550
9711
|
params = (paramsOrFirst || {});
|
|
@@ -9554,21 +9715,17 @@
|
|
|
9554
9715
|
databaseId: paramsOrFirst,
|
|
9555
9716
|
collectionId: rest[0],
|
|
9556
9717
|
key: rest[1],
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
array: rest[5],
|
|
9561
|
-
encrypt: rest[6]
|
|
9718
|
+
required: rest[2],
|
|
9719
|
+
xdefault: rest[3],
|
|
9720
|
+
newKey: rest[4]
|
|
9562
9721
|
};
|
|
9563
9722
|
}
|
|
9564
9723
|
const databaseId = params.databaseId;
|
|
9565
9724
|
const collectionId = params.collectionId;
|
|
9566
9725
|
const key = params.key;
|
|
9567
|
-
const size = params.size;
|
|
9568
9726
|
const required = params.required;
|
|
9569
9727
|
const xdefault = params.xdefault;
|
|
9570
|
-
const
|
|
9571
|
-
const encrypt = params.encrypt;
|
|
9728
|
+
const newKey = params.newKey;
|
|
9572
9729
|
if (typeof databaseId === 'undefined') {
|
|
9573
9730
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9574
9731
|
}
|
|
@@ -9578,39 +9735,75 @@
|
|
|
9578
9735
|
if (typeof key === 'undefined') {
|
|
9579
9736
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
9580
9737
|
}
|
|
9581
|
-
if (typeof
|
|
9582
|
-
throw new AppwriteException('Missing required parameter: "
|
|
9738
|
+
if (typeof required === 'undefined') {
|
|
9739
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
9740
|
+
}
|
|
9741
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
9742
|
+
const payload = {};
|
|
9743
|
+
if (typeof required !== 'undefined') {
|
|
9744
|
+
payload['required'] = required;
|
|
9745
|
+
}
|
|
9746
|
+
if (typeof xdefault !== 'undefined') {
|
|
9747
|
+
payload['default'] = xdefault;
|
|
9748
|
+
}
|
|
9749
|
+
if (typeof newKey !== 'undefined') {
|
|
9750
|
+
payload['newKey'] = newKey;
|
|
9751
|
+
}
|
|
9752
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9753
|
+
const apiHeaders = {
|
|
9754
|
+
'content-type': 'application/json',
|
|
9755
|
+
};
|
|
9756
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
9757
|
+
}
|
|
9758
|
+
createPolygonAttribute(paramsOrFirst, ...rest) {
|
|
9759
|
+
let params;
|
|
9760
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9761
|
+
params = (paramsOrFirst || {});
|
|
9762
|
+
}
|
|
9763
|
+
else {
|
|
9764
|
+
params = {
|
|
9765
|
+
databaseId: paramsOrFirst,
|
|
9766
|
+
collectionId: rest[0],
|
|
9767
|
+
key: rest[1],
|
|
9768
|
+
required: rest[2],
|
|
9769
|
+
xdefault: rest[3]
|
|
9770
|
+
};
|
|
9771
|
+
}
|
|
9772
|
+
const databaseId = params.databaseId;
|
|
9773
|
+
const collectionId = params.collectionId;
|
|
9774
|
+
const key = params.key;
|
|
9775
|
+
const required = params.required;
|
|
9776
|
+
const xdefault = params.xdefault;
|
|
9777
|
+
if (typeof databaseId === 'undefined') {
|
|
9778
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9779
|
+
}
|
|
9780
|
+
if (typeof collectionId === 'undefined') {
|
|
9781
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
9782
|
+
}
|
|
9783
|
+
if (typeof key === 'undefined') {
|
|
9784
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
9583
9785
|
}
|
|
9584
9786
|
if (typeof required === 'undefined') {
|
|
9585
9787
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
9586
9788
|
}
|
|
9587
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/
|
|
9789
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
9588
9790
|
const payload = {};
|
|
9589
9791
|
if (typeof key !== 'undefined') {
|
|
9590
9792
|
payload['key'] = key;
|
|
9591
9793
|
}
|
|
9592
|
-
if (typeof size !== 'undefined') {
|
|
9593
|
-
payload['size'] = size;
|
|
9594
|
-
}
|
|
9595
9794
|
if (typeof required !== 'undefined') {
|
|
9596
9795
|
payload['required'] = required;
|
|
9597
9796
|
}
|
|
9598
9797
|
if (typeof xdefault !== 'undefined') {
|
|
9599
9798
|
payload['default'] = xdefault;
|
|
9600
9799
|
}
|
|
9601
|
-
if (typeof array !== 'undefined') {
|
|
9602
|
-
payload['array'] = array;
|
|
9603
|
-
}
|
|
9604
|
-
if (typeof encrypt !== 'undefined') {
|
|
9605
|
-
payload['encrypt'] = encrypt;
|
|
9606
|
-
}
|
|
9607
9800
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9608
9801
|
const apiHeaders = {
|
|
9609
9802
|
'content-type': 'application/json',
|
|
9610
9803
|
};
|
|
9611
9804
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
9612
9805
|
}
|
|
9613
|
-
|
|
9806
|
+
updatePolygonAttribute(paramsOrFirst, ...rest) {
|
|
9614
9807
|
let params;
|
|
9615
9808
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9616
9809
|
params = (paramsOrFirst || {});
|
|
@@ -9622,8 +9815,7 @@
|
|
|
9622
9815
|
key: rest[1],
|
|
9623
9816
|
required: rest[2],
|
|
9624
9817
|
xdefault: rest[3],
|
|
9625
|
-
|
|
9626
|
-
newKey: rest[5]
|
|
9818
|
+
newKey: rest[4]
|
|
9627
9819
|
};
|
|
9628
9820
|
}
|
|
9629
9821
|
const databaseId = params.databaseId;
|
|
@@ -9631,7 +9823,6 @@
|
|
|
9631
9823
|
const key = params.key;
|
|
9632
9824
|
const required = params.required;
|
|
9633
9825
|
const xdefault = params.xdefault;
|
|
9634
|
-
const size = params.size;
|
|
9635
9826
|
const newKey = params.newKey;
|
|
9636
9827
|
if (typeof databaseId === 'undefined') {
|
|
9637
9828
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -9645,10 +9836,7 @@
|
|
|
9645
9836
|
if (typeof required === 'undefined') {
|
|
9646
9837
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
9647
9838
|
}
|
|
9648
|
-
|
|
9649
|
-
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
9650
|
-
}
|
|
9651
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
9839
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
9652
9840
|
const payload = {};
|
|
9653
9841
|
if (typeof required !== 'undefined') {
|
|
9654
9842
|
payload['required'] = required;
|
|
@@ -9656,9 +9844,6 @@
|
|
|
9656
9844
|
if (typeof xdefault !== 'undefined') {
|
|
9657
9845
|
payload['default'] = xdefault;
|
|
9658
9846
|
}
|
|
9659
|
-
if (typeof size !== 'undefined') {
|
|
9660
|
-
payload['size'] = size;
|
|
9661
|
-
}
|
|
9662
9847
|
if (typeof newKey !== 'undefined') {
|
|
9663
9848
|
payload['newKey'] = newKey;
|
|
9664
9849
|
}
|
|
@@ -9668,7 +9853,70 @@
|
|
|
9668
9853
|
};
|
|
9669
9854
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
9670
9855
|
}
|
|
9671
|
-
|
|
9856
|
+
createRelationshipAttribute(paramsOrFirst, ...rest) {
|
|
9857
|
+
let params;
|
|
9858
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9859
|
+
params = (paramsOrFirst || {});
|
|
9860
|
+
}
|
|
9861
|
+
else {
|
|
9862
|
+
params = {
|
|
9863
|
+
databaseId: paramsOrFirst,
|
|
9864
|
+
collectionId: rest[0],
|
|
9865
|
+
relatedCollectionId: rest[1],
|
|
9866
|
+
type: rest[2],
|
|
9867
|
+
twoWay: rest[3],
|
|
9868
|
+
key: rest[4],
|
|
9869
|
+
twoWayKey: rest[5],
|
|
9870
|
+
onDelete: rest[6]
|
|
9871
|
+
};
|
|
9872
|
+
}
|
|
9873
|
+
const databaseId = params.databaseId;
|
|
9874
|
+
const collectionId = params.collectionId;
|
|
9875
|
+
const relatedCollectionId = params.relatedCollectionId;
|
|
9876
|
+
const type = params.type;
|
|
9877
|
+
const twoWay = params.twoWay;
|
|
9878
|
+
const key = params.key;
|
|
9879
|
+
const twoWayKey = params.twoWayKey;
|
|
9880
|
+
const onDelete = params.onDelete;
|
|
9881
|
+
if (typeof databaseId === 'undefined') {
|
|
9882
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9883
|
+
}
|
|
9884
|
+
if (typeof collectionId === 'undefined') {
|
|
9885
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
9886
|
+
}
|
|
9887
|
+
if (typeof relatedCollectionId === 'undefined') {
|
|
9888
|
+
throw new AppwriteException('Missing required parameter: "relatedCollectionId"');
|
|
9889
|
+
}
|
|
9890
|
+
if (typeof type === 'undefined') {
|
|
9891
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
9892
|
+
}
|
|
9893
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
9894
|
+
const payload = {};
|
|
9895
|
+
if (typeof relatedCollectionId !== 'undefined') {
|
|
9896
|
+
payload['relatedCollectionId'] = relatedCollectionId;
|
|
9897
|
+
}
|
|
9898
|
+
if (typeof type !== 'undefined') {
|
|
9899
|
+
payload['type'] = type;
|
|
9900
|
+
}
|
|
9901
|
+
if (typeof twoWay !== 'undefined') {
|
|
9902
|
+
payload['twoWay'] = twoWay;
|
|
9903
|
+
}
|
|
9904
|
+
if (typeof key !== 'undefined') {
|
|
9905
|
+
payload['key'] = key;
|
|
9906
|
+
}
|
|
9907
|
+
if (typeof twoWayKey !== 'undefined') {
|
|
9908
|
+
payload['twoWayKey'] = twoWayKey;
|
|
9909
|
+
}
|
|
9910
|
+
if (typeof onDelete !== 'undefined') {
|
|
9911
|
+
payload['onDelete'] = onDelete;
|
|
9912
|
+
}
|
|
9913
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9914
|
+
const apiHeaders = {
|
|
9915
|
+
'content-type': 'application/json',
|
|
9916
|
+
};
|
|
9917
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
9918
|
+
}
|
|
9919
|
+
createStringAttribute(paramsOrFirst, ...rest) {
|
|
9672
9920
|
let params;
|
|
9673
9921
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9674
9922
|
params = (paramsOrFirst || {});
|
|
@@ -9678,17 +9926,21 @@
|
|
|
9678
9926
|
databaseId: paramsOrFirst,
|
|
9679
9927
|
collectionId: rest[0],
|
|
9680
9928
|
key: rest[1],
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9929
|
+
size: rest[2],
|
|
9930
|
+
required: rest[3],
|
|
9931
|
+
xdefault: rest[4],
|
|
9932
|
+
array: rest[5],
|
|
9933
|
+
encrypt: rest[6]
|
|
9684
9934
|
};
|
|
9685
9935
|
}
|
|
9686
9936
|
const databaseId = params.databaseId;
|
|
9687
9937
|
const collectionId = params.collectionId;
|
|
9688
9938
|
const key = params.key;
|
|
9939
|
+
const size = params.size;
|
|
9689
9940
|
const required = params.required;
|
|
9690
9941
|
const xdefault = params.xdefault;
|
|
9691
9942
|
const array = params.array;
|
|
9943
|
+
const encrypt = params.encrypt;
|
|
9692
9944
|
if (typeof databaseId === 'undefined') {
|
|
9693
9945
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9694
9946
|
}
|
|
@@ -9698,14 +9950,20 @@
|
|
|
9698
9950
|
if (typeof key === 'undefined') {
|
|
9699
9951
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
9700
9952
|
}
|
|
9953
|
+
if (typeof size === 'undefined') {
|
|
9954
|
+
throw new AppwriteException('Missing required parameter: "size"');
|
|
9955
|
+
}
|
|
9701
9956
|
if (typeof required === 'undefined') {
|
|
9702
9957
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
9703
9958
|
}
|
|
9704
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/
|
|
9959
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
9705
9960
|
const payload = {};
|
|
9706
9961
|
if (typeof key !== 'undefined') {
|
|
9707
9962
|
payload['key'] = key;
|
|
9708
9963
|
}
|
|
9964
|
+
if (typeof size !== 'undefined') {
|
|
9965
|
+
payload['size'] = size;
|
|
9966
|
+
}
|
|
9709
9967
|
if (typeof required !== 'undefined') {
|
|
9710
9968
|
payload['required'] = required;
|
|
9711
9969
|
}
|
|
@@ -9715,13 +9973,16 @@
|
|
|
9715
9973
|
if (typeof array !== 'undefined') {
|
|
9716
9974
|
payload['array'] = array;
|
|
9717
9975
|
}
|
|
9976
|
+
if (typeof encrypt !== 'undefined') {
|
|
9977
|
+
payload['encrypt'] = encrypt;
|
|
9978
|
+
}
|
|
9718
9979
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9719
9980
|
const apiHeaders = {
|
|
9720
9981
|
'content-type': 'application/json',
|
|
9721
9982
|
};
|
|
9722
9983
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
9723
9984
|
}
|
|
9724
|
-
|
|
9985
|
+
updateStringAttribute(paramsOrFirst, ...rest) {
|
|
9725
9986
|
let params;
|
|
9726
9987
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9727
9988
|
params = (paramsOrFirst || {});
|
|
@@ -9733,7 +9994,8 @@
|
|
|
9733
9994
|
key: rest[1],
|
|
9734
9995
|
required: rest[2],
|
|
9735
9996
|
xdefault: rest[3],
|
|
9736
|
-
|
|
9997
|
+
size: rest[4],
|
|
9998
|
+
newKey: rest[5]
|
|
9737
9999
|
};
|
|
9738
10000
|
}
|
|
9739
10001
|
const databaseId = params.databaseId;
|
|
@@ -9741,6 +10003,7 @@
|
|
|
9741
10003
|
const key = params.key;
|
|
9742
10004
|
const required = params.required;
|
|
9743
10005
|
const xdefault = params.xdefault;
|
|
10006
|
+
const size = params.size;
|
|
9744
10007
|
const newKey = params.newKey;
|
|
9745
10008
|
if (typeof databaseId === 'undefined') {
|
|
9746
10009
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -9757,7 +10020,7 @@
|
|
|
9757
10020
|
if (typeof xdefault === 'undefined') {
|
|
9758
10021
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
9759
10022
|
}
|
|
9760
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/
|
|
10023
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
9761
10024
|
const payload = {};
|
|
9762
10025
|
if (typeof required !== 'undefined') {
|
|
9763
10026
|
payload['required'] = required;
|
|
@@ -9765,6 +10028,9 @@
|
|
|
9765
10028
|
if (typeof xdefault !== 'undefined') {
|
|
9766
10029
|
payload['default'] = xdefault;
|
|
9767
10030
|
}
|
|
10031
|
+
if (typeof size !== 'undefined') {
|
|
10032
|
+
payload['size'] = size;
|
|
10033
|
+
}
|
|
9768
10034
|
if (typeof newKey !== 'undefined') {
|
|
9769
10035
|
payload['newKey'] = newKey;
|
|
9770
10036
|
}
|
|
@@ -9774,7 +10040,7 @@
|
|
|
9774
10040
|
};
|
|
9775
10041
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
9776
10042
|
}
|
|
9777
|
-
|
|
10043
|
+
createTextAttribute(paramsOrFirst, ...rest) {
|
|
9778
10044
|
let params;
|
|
9779
10045
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9780
10046
|
params = (paramsOrFirst || {});
|
|
@@ -9783,12 +10049,18 @@
|
|
|
9783
10049
|
params = {
|
|
9784
10050
|
databaseId: paramsOrFirst,
|
|
9785
10051
|
collectionId: rest[0],
|
|
9786
|
-
key: rest[1]
|
|
10052
|
+
key: rest[1],
|
|
10053
|
+
required: rest[2],
|
|
10054
|
+
xdefault: rest[3],
|
|
10055
|
+
array: rest[4]
|
|
9787
10056
|
};
|
|
9788
10057
|
}
|
|
9789
10058
|
const databaseId = params.databaseId;
|
|
9790
10059
|
const collectionId = params.collectionId;
|
|
9791
10060
|
const key = params.key;
|
|
10061
|
+
const required = params.required;
|
|
10062
|
+
const xdefault = params.xdefault;
|
|
10063
|
+
const array = params.array;
|
|
9792
10064
|
if (typeof databaseId === 'undefined') {
|
|
9793
10065
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9794
10066
|
}
|
|
@@ -9798,13 +10070,30 @@
|
|
|
9798
10070
|
if (typeof key === 'undefined') {
|
|
9799
10071
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
9800
10072
|
}
|
|
9801
|
-
|
|
10073
|
+
if (typeof required === 'undefined') {
|
|
10074
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
10075
|
+
}
|
|
10076
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
9802
10077
|
const payload = {};
|
|
10078
|
+
if (typeof key !== 'undefined') {
|
|
10079
|
+
payload['key'] = key;
|
|
10080
|
+
}
|
|
10081
|
+
if (typeof required !== 'undefined') {
|
|
10082
|
+
payload['required'] = required;
|
|
10083
|
+
}
|
|
10084
|
+
if (typeof xdefault !== 'undefined') {
|
|
10085
|
+
payload['default'] = xdefault;
|
|
10086
|
+
}
|
|
10087
|
+
if (typeof array !== 'undefined') {
|
|
10088
|
+
payload['array'] = array;
|
|
10089
|
+
}
|
|
9803
10090
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9804
|
-
const apiHeaders = {
|
|
9805
|
-
|
|
10091
|
+
const apiHeaders = {
|
|
10092
|
+
'content-type': 'application/json',
|
|
10093
|
+
};
|
|
10094
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
9806
10095
|
}
|
|
9807
|
-
|
|
10096
|
+
updateTextAttribute(paramsOrFirst, ...rest) {
|
|
9808
10097
|
let params;
|
|
9809
10098
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9810
10099
|
params = (paramsOrFirst || {});
|
|
@@ -9813,12 +10102,18 @@
|
|
|
9813
10102
|
params = {
|
|
9814
10103
|
databaseId: paramsOrFirst,
|
|
9815
10104
|
collectionId: rest[0],
|
|
9816
|
-
key: rest[1]
|
|
10105
|
+
key: rest[1],
|
|
10106
|
+
required: rest[2],
|
|
10107
|
+
xdefault: rest[3],
|
|
10108
|
+
newKey: rest[4]
|
|
9817
10109
|
};
|
|
9818
10110
|
}
|
|
9819
10111
|
const databaseId = params.databaseId;
|
|
9820
10112
|
const collectionId = params.collectionId;
|
|
9821
10113
|
const key = params.key;
|
|
10114
|
+
const required = params.required;
|
|
10115
|
+
const xdefault = params.xdefault;
|
|
10116
|
+
const newKey = params.newKey;
|
|
9822
10117
|
if (typeof databaseId === 'undefined') {
|
|
9823
10118
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9824
10119
|
}
|
|
@@ -9828,15 +10123,30 @@
|
|
|
9828
10123
|
if (typeof key === 'undefined') {
|
|
9829
10124
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
9830
10125
|
}
|
|
9831
|
-
|
|
10126
|
+
if (typeof required === 'undefined') {
|
|
10127
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
10128
|
+
}
|
|
10129
|
+
if (typeof xdefault === 'undefined') {
|
|
10130
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
10131
|
+
}
|
|
10132
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
9832
10133
|
const payload = {};
|
|
10134
|
+
if (typeof required !== 'undefined') {
|
|
10135
|
+
payload['required'] = required;
|
|
10136
|
+
}
|
|
10137
|
+
if (typeof xdefault !== 'undefined') {
|
|
10138
|
+
payload['default'] = xdefault;
|
|
10139
|
+
}
|
|
10140
|
+
if (typeof newKey !== 'undefined') {
|
|
10141
|
+
payload['newKey'] = newKey;
|
|
10142
|
+
}
|
|
9833
10143
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9834
10144
|
const apiHeaders = {
|
|
9835
10145
|
'content-type': 'application/json',
|
|
9836
10146
|
};
|
|
9837
|
-
return this.client.call('
|
|
10147
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
9838
10148
|
}
|
|
9839
|
-
|
|
10149
|
+
createUrlAttribute(paramsOrFirst, ...rest) {
|
|
9840
10150
|
let params;
|
|
9841
10151
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9842
10152
|
params = (paramsOrFirst || {});
|
|
@@ -9846,15 +10156,17 @@
|
|
|
9846
10156
|
databaseId: paramsOrFirst,
|
|
9847
10157
|
collectionId: rest[0],
|
|
9848
10158
|
key: rest[1],
|
|
9849
|
-
|
|
9850
|
-
|
|
10159
|
+
required: rest[2],
|
|
10160
|
+
xdefault: rest[3],
|
|
10161
|
+
array: rest[4]
|
|
9851
10162
|
};
|
|
9852
10163
|
}
|
|
9853
10164
|
const databaseId = params.databaseId;
|
|
9854
10165
|
const collectionId = params.collectionId;
|
|
9855
10166
|
const key = params.key;
|
|
9856
|
-
const
|
|
9857
|
-
const
|
|
10167
|
+
const required = params.required;
|
|
10168
|
+
const xdefault = params.xdefault;
|
|
10169
|
+
const array = params.array;
|
|
9858
10170
|
if (typeof databaseId === 'undefined') {
|
|
9859
10171
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9860
10172
|
}
|
|
@@ -9864,21 +10176,30 @@
|
|
|
9864
10176
|
if (typeof key === 'undefined') {
|
|
9865
10177
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
9866
10178
|
}
|
|
9867
|
-
|
|
9868
|
-
|
|
9869
|
-
if (typeof onDelete !== 'undefined') {
|
|
9870
|
-
payload['onDelete'] = onDelete;
|
|
10179
|
+
if (typeof required === 'undefined') {
|
|
10180
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
9871
10181
|
}
|
|
9872
|
-
|
|
9873
|
-
|
|
10182
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
10183
|
+
const payload = {};
|
|
10184
|
+
if (typeof key !== 'undefined') {
|
|
10185
|
+
payload['key'] = key;
|
|
10186
|
+
}
|
|
10187
|
+
if (typeof required !== 'undefined') {
|
|
10188
|
+
payload['required'] = required;
|
|
10189
|
+
}
|
|
10190
|
+
if (typeof xdefault !== 'undefined') {
|
|
10191
|
+
payload['default'] = xdefault;
|
|
10192
|
+
}
|
|
10193
|
+
if (typeof array !== 'undefined') {
|
|
10194
|
+
payload['array'] = array;
|
|
9874
10195
|
}
|
|
9875
10196
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9876
10197
|
const apiHeaders = {
|
|
9877
10198
|
'content-type': 'application/json',
|
|
9878
10199
|
};
|
|
9879
|
-
return this.client.call('
|
|
10200
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
9880
10201
|
}
|
|
9881
|
-
|
|
10202
|
+
updateUrlAttribute(paramsOrFirst, ...rest) {
|
|
9882
10203
|
let params;
|
|
9883
10204
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9884
10205
|
params = (paramsOrFirst || {});
|
|
@@ -9887,38 +10208,51 @@
|
|
|
9887
10208
|
params = {
|
|
9888
10209
|
databaseId: paramsOrFirst,
|
|
9889
10210
|
collectionId: rest[0],
|
|
9890
|
-
|
|
9891
|
-
|
|
9892
|
-
|
|
10211
|
+
key: rest[1],
|
|
10212
|
+
required: rest[2],
|
|
10213
|
+
xdefault: rest[3],
|
|
10214
|
+
newKey: rest[4]
|
|
9893
10215
|
};
|
|
9894
10216
|
}
|
|
9895
10217
|
const databaseId = params.databaseId;
|
|
9896
10218
|
const collectionId = params.collectionId;
|
|
9897
|
-
const
|
|
9898
|
-
const
|
|
9899
|
-
const
|
|
10219
|
+
const key = params.key;
|
|
10220
|
+
const required = params.required;
|
|
10221
|
+
const xdefault = params.xdefault;
|
|
10222
|
+
const newKey = params.newKey;
|
|
9900
10223
|
if (typeof databaseId === 'undefined') {
|
|
9901
10224
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9902
10225
|
}
|
|
9903
10226
|
if (typeof collectionId === 'undefined') {
|
|
9904
10227
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
9905
10228
|
}
|
|
9906
|
-
|
|
10229
|
+
if (typeof key === 'undefined') {
|
|
10230
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
10231
|
+
}
|
|
10232
|
+
if (typeof required === 'undefined') {
|
|
10233
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
10234
|
+
}
|
|
10235
|
+
if (typeof xdefault === 'undefined') {
|
|
10236
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
10237
|
+
}
|
|
10238
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
9907
10239
|
const payload = {};
|
|
9908
|
-
if (typeof
|
|
9909
|
-
payload['
|
|
10240
|
+
if (typeof required !== 'undefined') {
|
|
10241
|
+
payload['required'] = required;
|
|
9910
10242
|
}
|
|
9911
|
-
if (typeof
|
|
9912
|
-
payload['
|
|
10243
|
+
if (typeof xdefault !== 'undefined') {
|
|
10244
|
+
payload['default'] = xdefault;
|
|
9913
10245
|
}
|
|
9914
|
-
if (typeof
|
|
9915
|
-
payload['
|
|
10246
|
+
if (typeof newKey !== 'undefined') {
|
|
10247
|
+
payload['newKey'] = newKey;
|
|
9916
10248
|
}
|
|
9917
10249
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9918
|
-
const apiHeaders = {
|
|
9919
|
-
|
|
10250
|
+
const apiHeaders = {
|
|
10251
|
+
'content-type': 'application/json',
|
|
10252
|
+
};
|
|
10253
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
9920
10254
|
}
|
|
9921
|
-
|
|
10255
|
+
createVarcharAttribute(paramsOrFirst, ...rest) {
|
|
9922
10256
|
let params;
|
|
9923
10257
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9924
10258
|
params = (paramsOrFirst || {});
|
|
@@ -9927,43 +10261,51 @@
|
|
|
9927
10261
|
params = {
|
|
9928
10262
|
databaseId: paramsOrFirst,
|
|
9929
10263
|
collectionId: rest[0],
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
10264
|
+
key: rest[1],
|
|
10265
|
+
size: rest[2],
|
|
10266
|
+
required: rest[3],
|
|
10267
|
+
xdefault: rest[4],
|
|
10268
|
+
array: rest[5]
|
|
9934
10269
|
};
|
|
9935
10270
|
}
|
|
9936
10271
|
const databaseId = params.databaseId;
|
|
9937
10272
|
const collectionId = params.collectionId;
|
|
9938
|
-
const
|
|
9939
|
-
const
|
|
9940
|
-
const
|
|
9941
|
-
const
|
|
10273
|
+
const key = params.key;
|
|
10274
|
+
const size = params.size;
|
|
10275
|
+
const required = params.required;
|
|
10276
|
+
const xdefault = params.xdefault;
|
|
10277
|
+
const array = params.array;
|
|
9942
10278
|
if (typeof databaseId === 'undefined') {
|
|
9943
10279
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9944
10280
|
}
|
|
9945
10281
|
if (typeof collectionId === 'undefined') {
|
|
9946
10282
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
9947
10283
|
}
|
|
9948
|
-
if (typeof
|
|
9949
|
-
throw new AppwriteException('Missing required parameter: "
|
|
10284
|
+
if (typeof key === 'undefined') {
|
|
10285
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
9950
10286
|
}
|
|
9951
|
-
if (typeof
|
|
9952
|
-
throw new AppwriteException('Missing required parameter: "
|
|
10287
|
+
if (typeof size === 'undefined') {
|
|
10288
|
+
throw new AppwriteException('Missing required parameter: "size"');
|
|
9953
10289
|
}
|
|
9954
|
-
|
|
10290
|
+
if (typeof required === 'undefined') {
|
|
10291
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
10292
|
+
}
|
|
10293
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
9955
10294
|
const payload = {};
|
|
9956
|
-
if (typeof
|
|
9957
|
-
payload['
|
|
10295
|
+
if (typeof key !== 'undefined') {
|
|
10296
|
+
payload['key'] = key;
|
|
9958
10297
|
}
|
|
9959
|
-
if (typeof
|
|
9960
|
-
payload['
|
|
10298
|
+
if (typeof size !== 'undefined') {
|
|
10299
|
+
payload['size'] = size;
|
|
9961
10300
|
}
|
|
9962
|
-
if (typeof
|
|
9963
|
-
payload['
|
|
10301
|
+
if (typeof required !== 'undefined') {
|
|
10302
|
+
payload['required'] = required;
|
|
9964
10303
|
}
|
|
9965
|
-
if (typeof
|
|
9966
|
-
payload['
|
|
10304
|
+
if (typeof xdefault !== 'undefined') {
|
|
10305
|
+
payload['default'] = xdefault;
|
|
10306
|
+
}
|
|
10307
|
+
if (typeof array !== 'undefined') {
|
|
10308
|
+
payload['array'] = array;
|
|
9967
10309
|
}
|
|
9968
10310
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9969
10311
|
const apiHeaders = {
|
|
@@ -9971,7 +10313,7 @@
|
|
|
9971
10313
|
};
|
|
9972
10314
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
9973
10315
|
}
|
|
9974
|
-
|
|
10316
|
+
updateVarcharAttribute(paramsOrFirst, ...rest) {
|
|
9975
10317
|
let params;
|
|
9976
10318
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9977
10319
|
params = (paramsOrFirst || {});
|
|
@@ -9980,38 +10322,56 @@
|
|
|
9980
10322
|
params = {
|
|
9981
10323
|
databaseId: paramsOrFirst,
|
|
9982
10324
|
collectionId: rest[0],
|
|
9983
|
-
|
|
9984
|
-
|
|
10325
|
+
key: rest[1],
|
|
10326
|
+
required: rest[2],
|
|
10327
|
+
xdefault: rest[3],
|
|
10328
|
+
size: rest[4],
|
|
10329
|
+
newKey: rest[5]
|
|
9985
10330
|
};
|
|
9986
10331
|
}
|
|
9987
10332
|
const databaseId = params.databaseId;
|
|
9988
10333
|
const collectionId = params.collectionId;
|
|
9989
|
-
const
|
|
9990
|
-
const
|
|
10334
|
+
const key = params.key;
|
|
10335
|
+
const required = params.required;
|
|
10336
|
+
const xdefault = params.xdefault;
|
|
10337
|
+
const size = params.size;
|
|
10338
|
+
const newKey = params.newKey;
|
|
9991
10339
|
if (typeof databaseId === 'undefined') {
|
|
9992
10340
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9993
10341
|
}
|
|
9994
10342
|
if (typeof collectionId === 'undefined') {
|
|
9995
10343
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
9996
10344
|
}
|
|
9997
|
-
if (typeof
|
|
9998
|
-
throw new AppwriteException('Missing required parameter: "
|
|
10345
|
+
if (typeof key === 'undefined') {
|
|
10346
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
9999
10347
|
}
|
|
10000
|
-
|
|
10348
|
+
if (typeof required === 'undefined') {
|
|
10349
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
10350
|
+
}
|
|
10351
|
+
if (typeof xdefault === 'undefined') {
|
|
10352
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
10353
|
+
}
|
|
10354
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
10001
10355
|
const payload = {};
|
|
10002
|
-
if (typeof
|
|
10003
|
-
payload['
|
|
10356
|
+
if (typeof required !== 'undefined') {
|
|
10357
|
+
payload['required'] = required;
|
|
10004
10358
|
}
|
|
10005
|
-
if (typeof
|
|
10006
|
-
payload['
|
|
10359
|
+
if (typeof xdefault !== 'undefined') {
|
|
10360
|
+
payload['default'] = xdefault;
|
|
10361
|
+
}
|
|
10362
|
+
if (typeof size !== 'undefined') {
|
|
10363
|
+
payload['size'] = size;
|
|
10364
|
+
}
|
|
10365
|
+
if (typeof newKey !== 'undefined') {
|
|
10366
|
+
payload['newKey'] = newKey;
|
|
10007
10367
|
}
|
|
10008
10368
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10009
10369
|
const apiHeaders = {
|
|
10010
10370
|
'content-type': 'application/json',
|
|
10011
10371
|
};
|
|
10012
|
-
return this.client.call('
|
|
10372
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10013
10373
|
}
|
|
10014
|
-
|
|
10374
|
+
getAttribute(paramsOrFirst, ...rest) {
|
|
10015
10375
|
let params;
|
|
10016
10376
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10017
10377
|
params = (paramsOrFirst || {});
|
|
@@ -10020,38 +10380,28 @@
|
|
|
10020
10380
|
params = {
|
|
10021
10381
|
databaseId: paramsOrFirst,
|
|
10022
10382
|
collectionId: rest[0],
|
|
10023
|
-
|
|
10024
|
-
transactionId: rest[2]
|
|
10383
|
+
key: rest[1]
|
|
10025
10384
|
};
|
|
10026
10385
|
}
|
|
10027
10386
|
const databaseId = params.databaseId;
|
|
10028
10387
|
const collectionId = params.collectionId;
|
|
10029
|
-
const
|
|
10030
|
-
const transactionId = params.transactionId;
|
|
10388
|
+
const key = params.key;
|
|
10031
10389
|
if (typeof databaseId === 'undefined') {
|
|
10032
10390
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10033
10391
|
}
|
|
10034
10392
|
if (typeof collectionId === 'undefined') {
|
|
10035
10393
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
10036
10394
|
}
|
|
10037
|
-
if (typeof
|
|
10038
|
-
throw new AppwriteException('Missing required parameter: "
|
|
10395
|
+
if (typeof key === 'undefined') {
|
|
10396
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
10039
10397
|
}
|
|
10040
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/
|
|
10398
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
10041
10399
|
const payload = {};
|
|
10042
|
-
if (typeof documents !== 'undefined') {
|
|
10043
|
-
payload['documents'] = documents;
|
|
10044
|
-
}
|
|
10045
|
-
if (typeof transactionId !== 'undefined') {
|
|
10046
|
-
payload['transactionId'] = transactionId;
|
|
10047
|
-
}
|
|
10048
10400
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10049
|
-
const apiHeaders = {
|
|
10050
|
-
|
|
10051
|
-
};
|
|
10052
|
-
return this.client.call('put', uri, apiHeaders, payload);
|
|
10401
|
+
const apiHeaders = {};
|
|
10402
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
10053
10403
|
}
|
|
10054
|
-
|
|
10404
|
+
deleteAttribute(paramsOrFirst, ...rest) {
|
|
10055
10405
|
let params;
|
|
10056
10406
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10057
10407
|
params = (paramsOrFirst || {});
|
|
@@ -10060,40 +10410,30 @@
|
|
|
10060
10410
|
params = {
|
|
10061
10411
|
databaseId: paramsOrFirst,
|
|
10062
10412
|
collectionId: rest[0],
|
|
10063
|
-
|
|
10064
|
-
queries: rest[2],
|
|
10065
|
-
transactionId: rest[3]
|
|
10413
|
+
key: rest[1]
|
|
10066
10414
|
};
|
|
10067
10415
|
}
|
|
10068
10416
|
const databaseId = params.databaseId;
|
|
10069
10417
|
const collectionId = params.collectionId;
|
|
10070
|
-
const
|
|
10071
|
-
const queries = params.queries;
|
|
10072
|
-
const transactionId = params.transactionId;
|
|
10418
|
+
const key = params.key;
|
|
10073
10419
|
if (typeof databaseId === 'undefined') {
|
|
10074
10420
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10075
10421
|
}
|
|
10076
10422
|
if (typeof collectionId === 'undefined') {
|
|
10077
10423
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
10078
10424
|
}
|
|
10079
|
-
|
|
10080
|
-
|
|
10081
|
-
if (typeof data !== 'undefined') {
|
|
10082
|
-
payload['data'] = data;
|
|
10083
|
-
}
|
|
10084
|
-
if (typeof queries !== 'undefined') {
|
|
10085
|
-
payload['queries'] = queries;
|
|
10086
|
-
}
|
|
10087
|
-
if (typeof transactionId !== 'undefined') {
|
|
10088
|
-
payload['transactionId'] = transactionId;
|
|
10425
|
+
if (typeof key === 'undefined') {
|
|
10426
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
10089
10427
|
}
|
|
10428
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
10429
|
+
const payload = {};
|
|
10090
10430
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10091
10431
|
const apiHeaders = {
|
|
10092
10432
|
'content-type': 'application/json',
|
|
10093
10433
|
};
|
|
10094
|
-
return this.client.call('
|
|
10434
|
+
return this.client.call('delete', uri, apiHeaders, payload);
|
|
10095
10435
|
}
|
|
10096
|
-
|
|
10436
|
+
updateRelationshipAttribute(paramsOrFirst, ...rest) {
|
|
10097
10437
|
let params;
|
|
10098
10438
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10099
10439
|
params = (paramsOrFirst || {});
|
|
@@ -10102,35 +10442,40 @@
|
|
|
10102
10442
|
params = {
|
|
10103
10443
|
databaseId: paramsOrFirst,
|
|
10104
10444
|
collectionId: rest[0],
|
|
10105
|
-
|
|
10106
|
-
|
|
10445
|
+
key: rest[1],
|
|
10446
|
+
onDelete: rest[2],
|
|
10447
|
+
newKey: rest[3]
|
|
10107
10448
|
};
|
|
10108
10449
|
}
|
|
10109
10450
|
const databaseId = params.databaseId;
|
|
10110
10451
|
const collectionId = params.collectionId;
|
|
10111
|
-
const
|
|
10112
|
-
const
|
|
10452
|
+
const key = params.key;
|
|
10453
|
+
const onDelete = params.onDelete;
|
|
10454
|
+
const newKey = params.newKey;
|
|
10113
10455
|
if (typeof databaseId === 'undefined') {
|
|
10114
10456
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10115
10457
|
}
|
|
10116
10458
|
if (typeof collectionId === 'undefined') {
|
|
10117
10459
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
10118
10460
|
}
|
|
10119
|
-
|
|
10461
|
+
if (typeof key === 'undefined') {
|
|
10462
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
10463
|
+
}
|
|
10464
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
10120
10465
|
const payload = {};
|
|
10121
|
-
if (typeof
|
|
10122
|
-
payload['
|
|
10466
|
+
if (typeof onDelete !== 'undefined') {
|
|
10467
|
+
payload['onDelete'] = onDelete;
|
|
10123
10468
|
}
|
|
10124
|
-
if (typeof
|
|
10125
|
-
payload['
|
|
10469
|
+
if (typeof newKey !== 'undefined') {
|
|
10470
|
+
payload['newKey'] = newKey;
|
|
10126
10471
|
}
|
|
10127
10472
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10128
10473
|
const apiHeaders = {
|
|
10129
10474
|
'content-type': 'application/json',
|
|
10130
10475
|
};
|
|
10131
|
-
return this.client.call('
|
|
10476
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10132
10477
|
}
|
|
10133
|
-
|
|
10478
|
+
listDocuments(paramsOrFirst, ...rest) {
|
|
10134
10479
|
let params;
|
|
10135
10480
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10136
10481
|
params = (paramsOrFirst || {});
|
|
@@ -10139,26 +10484,23 @@
|
|
|
10139
10484
|
params = {
|
|
10140
10485
|
databaseId: paramsOrFirst,
|
|
10141
10486
|
collectionId: rest[0],
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10487
|
+
queries: rest[1],
|
|
10488
|
+
transactionId: rest[2],
|
|
10489
|
+
total: rest[3]
|
|
10145
10490
|
};
|
|
10146
10491
|
}
|
|
10147
10492
|
const databaseId = params.databaseId;
|
|
10148
10493
|
const collectionId = params.collectionId;
|
|
10149
|
-
const documentId = params.documentId;
|
|
10150
10494
|
const queries = params.queries;
|
|
10151
10495
|
const transactionId = params.transactionId;
|
|
10496
|
+
const total = params.total;
|
|
10152
10497
|
if (typeof databaseId === 'undefined') {
|
|
10153
10498
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10154
10499
|
}
|
|
10155
10500
|
if (typeof collectionId === 'undefined') {
|
|
10156
10501
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
10157
10502
|
}
|
|
10158
|
-
|
|
10159
|
-
throw new AppwriteException('Missing required parameter: "documentId"');
|
|
10160
|
-
}
|
|
10161
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
10503
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
10162
10504
|
const payload = {};
|
|
10163
10505
|
if (typeof queries !== 'undefined') {
|
|
10164
10506
|
payload['queries'] = queries;
|
|
@@ -10166,11 +10508,266 @@
|
|
|
10166
10508
|
if (typeof transactionId !== 'undefined') {
|
|
10167
10509
|
payload['transactionId'] = transactionId;
|
|
10168
10510
|
}
|
|
10511
|
+
if (typeof total !== 'undefined') {
|
|
10512
|
+
payload['total'] = total;
|
|
10513
|
+
}
|
|
10169
10514
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10170
10515
|
const apiHeaders = {};
|
|
10171
10516
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
10172
10517
|
}
|
|
10173
|
-
|
|
10518
|
+
createDocument(paramsOrFirst, ...rest) {
|
|
10519
|
+
let params;
|
|
10520
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10521
|
+
params = (paramsOrFirst || {});
|
|
10522
|
+
}
|
|
10523
|
+
else {
|
|
10524
|
+
params = {
|
|
10525
|
+
databaseId: paramsOrFirst,
|
|
10526
|
+
collectionId: rest[0],
|
|
10527
|
+
documentId: rest[1],
|
|
10528
|
+
data: rest[2],
|
|
10529
|
+
permissions: rest[3],
|
|
10530
|
+
transactionId: rest[4]
|
|
10531
|
+
};
|
|
10532
|
+
}
|
|
10533
|
+
const databaseId = params.databaseId;
|
|
10534
|
+
const collectionId = params.collectionId;
|
|
10535
|
+
const documentId = params.documentId;
|
|
10536
|
+
const data = params.data;
|
|
10537
|
+
const permissions = params.permissions;
|
|
10538
|
+
const transactionId = params.transactionId;
|
|
10539
|
+
if (typeof databaseId === 'undefined') {
|
|
10540
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10541
|
+
}
|
|
10542
|
+
if (typeof collectionId === 'undefined') {
|
|
10543
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
10544
|
+
}
|
|
10545
|
+
if (typeof documentId === 'undefined') {
|
|
10546
|
+
throw new AppwriteException('Missing required parameter: "documentId"');
|
|
10547
|
+
}
|
|
10548
|
+
if (typeof data === 'undefined') {
|
|
10549
|
+
throw new AppwriteException('Missing required parameter: "data"');
|
|
10550
|
+
}
|
|
10551
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
10552
|
+
const payload = {};
|
|
10553
|
+
if (typeof documentId !== 'undefined') {
|
|
10554
|
+
payload['documentId'] = documentId;
|
|
10555
|
+
}
|
|
10556
|
+
if (typeof data !== 'undefined') {
|
|
10557
|
+
payload['data'] = data;
|
|
10558
|
+
}
|
|
10559
|
+
if (typeof permissions !== 'undefined') {
|
|
10560
|
+
payload['permissions'] = permissions;
|
|
10561
|
+
}
|
|
10562
|
+
if (typeof transactionId !== 'undefined') {
|
|
10563
|
+
payload['transactionId'] = transactionId;
|
|
10564
|
+
}
|
|
10565
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10566
|
+
const apiHeaders = {
|
|
10567
|
+
'content-type': 'application/json',
|
|
10568
|
+
};
|
|
10569
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
10570
|
+
}
|
|
10571
|
+
createDocuments(paramsOrFirst, ...rest) {
|
|
10572
|
+
let params;
|
|
10573
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10574
|
+
params = (paramsOrFirst || {});
|
|
10575
|
+
}
|
|
10576
|
+
else {
|
|
10577
|
+
params = {
|
|
10578
|
+
databaseId: paramsOrFirst,
|
|
10579
|
+
collectionId: rest[0],
|
|
10580
|
+
documents: rest[1],
|
|
10581
|
+
transactionId: rest[2]
|
|
10582
|
+
};
|
|
10583
|
+
}
|
|
10584
|
+
const databaseId = params.databaseId;
|
|
10585
|
+
const collectionId = params.collectionId;
|
|
10586
|
+
const documents = params.documents;
|
|
10587
|
+
const transactionId = params.transactionId;
|
|
10588
|
+
if (typeof databaseId === 'undefined') {
|
|
10589
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10590
|
+
}
|
|
10591
|
+
if (typeof collectionId === 'undefined') {
|
|
10592
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
10593
|
+
}
|
|
10594
|
+
if (typeof documents === 'undefined') {
|
|
10595
|
+
throw new AppwriteException('Missing required parameter: "documents"');
|
|
10596
|
+
}
|
|
10597
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
10598
|
+
const payload = {};
|
|
10599
|
+
if (typeof documents !== 'undefined') {
|
|
10600
|
+
payload['documents'] = documents;
|
|
10601
|
+
}
|
|
10602
|
+
if (typeof transactionId !== 'undefined') {
|
|
10603
|
+
payload['transactionId'] = transactionId;
|
|
10604
|
+
}
|
|
10605
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10606
|
+
const apiHeaders = {
|
|
10607
|
+
'content-type': 'application/json',
|
|
10608
|
+
};
|
|
10609
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
10610
|
+
}
|
|
10611
|
+
upsertDocuments(paramsOrFirst, ...rest) {
|
|
10612
|
+
let params;
|
|
10613
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10614
|
+
params = (paramsOrFirst || {});
|
|
10615
|
+
}
|
|
10616
|
+
else {
|
|
10617
|
+
params = {
|
|
10618
|
+
databaseId: paramsOrFirst,
|
|
10619
|
+
collectionId: rest[0],
|
|
10620
|
+
documents: rest[1],
|
|
10621
|
+
transactionId: rest[2]
|
|
10622
|
+
};
|
|
10623
|
+
}
|
|
10624
|
+
const databaseId = params.databaseId;
|
|
10625
|
+
const collectionId = params.collectionId;
|
|
10626
|
+
const documents = params.documents;
|
|
10627
|
+
const transactionId = params.transactionId;
|
|
10628
|
+
if (typeof databaseId === 'undefined') {
|
|
10629
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10630
|
+
}
|
|
10631
|
+
if (typeof collectionId === 'undefined') {
|
|
10632
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
10633
|
+
}
|
|
10634
|
+
if (typeof documents === 'undefined') {
|
|
10635
|
+
throw new AppwriteException('Missing required parameter: "documents"');
|
|
10636
|
+
}
|
|
10637
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
10638
|
+
const payload = {};
|
|
10639
|
+
if (typeof documents !== 'undefined') {
|
|
10640
|
+
payload['documents'] = documents;
|
|
10641
|
+
}
|
|
10642
|
+
if (typeof transactionId !== 'undefined') {
|
|
10643
|
+
payload['transactionId'] = transactionId;
|
|
10644
|
+
}
|
|
10645
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10646
|
+
const apiHeaders = {
|
|
10647
|
+
'content-type': 'application/json',
|
|
10648
|
+
};
|
|
10649
|
+
return this.client.call('put', uri, apiHeaders, payload);
|
|
10650
|
+
}
|
|
10651
|
+
updateDocuments(paramsOrFirst, ...rest) {
|
|
10652
|
+
let params;
|
|
10653
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10654
|
+
params = (paramsOrFirst || {});
|
|
10655
|
+
}
|
|
10656
|
+
else {
|
|
10657
|
+
params = {
|
|
10658
|
+
databaseId: paramsOrFirst,
|
|
10659
|
+
collectionId: rest[0],
|
|
10660
|
+
data: rest[1],
|
|
10661
|
+
queries: rest[2],
|
|
10662
|
+
transactionId: rest[3]
|
|
10663
|
+
};
|
|
10664
|
+
}
|
|
10665
|
+
const databaseId = params.databaseId;
|
|
10666
|
+
const collectionId = params.collectionId;
|
|
10667
|
+
const data = params.data;
|
|
10668
|
+
const queries = params.queries;
|
|
10669
|
+
const transactionId = params.transactionId;
|
|
10670
|
+
if (typeof databaseId === 'undefined') {
|
|
10671
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10672
|
+
}
|
|
10673
|
+
if (typeof collectionId === 'undefined') {
|
|
10674
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
10675
|
+
}
|
|
10676
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
10677
|
+
const payload = {};
|
|
10678
|
+
if (typeof data !== 'undefined') {
|
|
10679
|
+
payload['data'] = data;
|
|
10680
|
+
}
|
|
10681
|
+
if (typeof queries !== 'undefined') {
|
|
10682
|
+
payload['queries'] = queries;
|
|
10683
|
+
}
|
|
10684
|
+
if (typeof transactionId !== 'undefined') {
|
|
10685
|
+
payload['transactionId'] = transactionId;
|
|
10686
|
+
}
|
|
10687
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10688
|
+
const apiHeaders = {
|
|
10689
|
+
'content-type': 'application/json',
|
|
10690
|
+
};
|
|
10691
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10692
|
+
}
|
|
10693
|
+
deleteDocuments(paramsOrFirst, ...rest) {
|
|
10694
|
+
let params;
|
|
10695
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10696
|
+
params = (paramsOrFirst || {});
|
|
10697
|
+
}
|
|
10698
|
+
else {
|
|
10699
|
+
params = {
|
|
10700
|
+
databaseId: paramsOrFirst,
|
|
10701
|
+
collectionId: rest[0],
|
|
10702
|
+
queries: rest[1],
|
|
10703
|
+
transactionId: rest[2]
|
|
10704
|
+
};
|
|
10705
|
+
}
|
|
10706
|
+
const databaseId = params.databaseId;
|
|
10707
|
+
const collectionId = params.collectionId;
|
|
10708
|
+
const queries = params.queries;
|
|
10709
|
+
const transactionId = params.transactionId;
|
|
10710
|
+
if (typeof databaseId === 'undefined') {
|
|
10711
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10712
|
+
}
|
|
10713
|
+
if (typeof collectionId === 'undefined') {
|
|
10714
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
10715
|
+
}
|
|
10716
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
10717
|
+
const payload = {};
|
|
10718
|
+
if (typeof queries !== 'undefined') {
|
|
10719
|
+
payload['queries'] = queries;
|
|
10720
|
+
}
|
|
10721
|
+
if (typeof transactionId !== 'undefined') {
|
|
10722
|
+
payload['transactionId'] = transactionId;
|
|
10723
|
+
}
|
|
10724
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10725
|
+
const apiHeaders = {
|
|
10726
|
+
'content-type': 'application/json',
|
|
10727
|
+
};
|
|
10728
|
+
return this.client.call('delete', uri, apiHeaders, payload);
|
|
10729
|
+
}
|
|
10730
|
+
getDocument(paramsOrFirst, ...rest) {
|
|
10731
|
+
let params;
|
|
10732
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10733
|
+
params = (paramsOrFirst || {});
|
|
10734
|
+
}
|
|
10735
|
+
else {
|
|
10736
|
+
params = {
|
|
10737
|
+
databaseId: paramsOrFirst,
|
|
10738
|
+
collectionId: rest[0],
|
|
10739
|
+
documentId: rest[1],
|
|
10740
|
+
queries: rest[2],
|
|
10741
|
+
transactionId: rest[3]
|
|
10742
|
+
};
|
|
10743
|
+
}
|
|
10744
|
+
const databaseId = params.databaseId;
|
|
10745
|
+
const collectionId = params.collectionId;
|
|
10746
|
+
const documentId = params.documentId;
|
|
10747
|
+
const queries = params.queries;
|
|
10748
|
+
const transactionId = params.transactionId;
|
|
10749
|
+
if (typeof databaseId === 'undefined') {
|
|
10750
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10751
|
+
}
|
|
10752
|
+
if (typeof collectionId === 'undefined') {
|
|
10753
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
10754
|
+
}
|
|
10755
|
+
if (typeof documentId === 'undefined') {
|
|
10756
|
+
throw new AppwriteException('Missing required parameter: "documentId"');
|
|
10757
|
+
}
|
|
10758
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
10759
|
+
const payload = {};
|
|
10760
|
+
if (typeof queries !== 'undefined') {
|
|
10761
|
+
payload['queries'] = queries;
|
|
10762
|
+
}
|
|
10763
|
+
if (typeof transactionId !== 'undefined') {
|
|
10764
|
+
payload['transactionId'] = transactionId;
|
|
10765
|
+
}
|
|
10766
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10767
|
+
const apiHeaders = {};
|
|
10768
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
10769
|
+
}
|
|
10770
|
+
upsertDocument(paramsOrFirst, ...rest) {
|
|
10174
10771
|
let params;
|
|
10175
10772
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10176
10773
|
params = (paramsOrFirst || {});
|
|
@@ -10772,16 +11369,49 @@
|
|
|
10772
11369
|
};
|
|
10773
11370
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
10774
11371
|
}
|
|
10775
|
-
|
|
11372
|
+
getPrice(paramsOrFirst, ...rest) {
|
|
10776
11373
|
let params;
|
|
10777
11374
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10778
11375
|
params = (paramsOrFirst || {});
|
|
10779
11376
|
}
|
|
10780
11377
|
else {
|
|
10781
11378
|
params = {
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
11379
|
+
domain: paramsOrFirst,
|
|
11380
|
+
periodYears: rest[0],
|
|
11381
|
+
registrationType: rest[1]
|
|
11382
|
+
};
|
|
11383
|
+
}
|
|
11384
|
+
const domain = params.domain;
|
|
11385
|
+
const periodYears = params.periodYears;
|
|
11386
|
+
const registrationType = params.registrationType;
|
|
11387
|
+
if (typeof domain === 'undefined') {
|
|
11388
|
+
throw new AppwriteException('Missing required parameter: "domain"');
|
|
11389
|
+
}
|
|
11390
|
+
const apiPath = '/domains/price';
|
|
11391
|
+
const payload = {};
|
|
11392
|
+
if (typeof domain !== 'undefined') {
|
|
11393
|
+
payload['domain'] = domain;
|
|
11394
|
+
}
|
|
11395
|
+
if (typeof periodYears !== 'undefined') {
|
|
11396
|
+
payload['periodYears'] = periodYears;
|
|
11397
|
+
}
|
|
11398
|
+
if (typeof registrationType !== 'undefined') {
|
|
11399
|
+
payload['registrationType'] = registrationType;
|
|
11400
|
+
}
|
|
11401
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11402
|
+
const apiHeaders = {};
|
|
11403
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
11404
|
+
}
|
|
11405
|
+
listSuggestions(paramsOrFirst, ...rest) {
|
|
11406
|
+
let params;
|
|
11407
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
11408
|
+
params = (paramsOrFirst || {});
|
|
11409
|
+
}
|
|
11410
|
+
else {
|
|
11411
|
+
params = {
|
|
11412
|
+
query: paramsOrFirst,
|
|
11413
|
+
tlds: rest[0],
|
|
11414
|
+
limit: rest[1],
|
|
10785
11415
|
filterType: rest[2],
|
|
10786
11416
|
priceMax: rest[3],
|
|
10787
11417
|
priceMin: rest[4]
|
|
@@ -12604,7 +13234,7 @@
|
|
|
12604
13234
|
}
|
|
12605
13235
|
listTemplates(paramsOrFirst, ...rest) {
|
|
12606
13236
|
let params;
|
|
12607
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
13237
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('runtimes' in paramsOrFirst || 'useCases' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst || 'total' in paramsOrFirst))) {
|
|
12608
13238
|
params = (paramsOrFirst || {});
|
|
12609
13239
|
}
|
|
12610
13240
|
else {
|
|
@@ -12664,7 +13294,7 @@
|
|
|
12664
13294
|
}
|
|
12665
13295
|
listUsage(paramsOrFirst) {
|
|
12666
13296
|
let params;
|
|
12667
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
13297
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
12668
13298
|
params = (paramsOrFirst || {});
|
|
12669
13299
|
}
|
|
12670
13300
|
else {
|
|
@@ -13534,7 +14164,7 @@
|
|
|
13534
14164
|
}
|
|
13535
14165
|
query(paramsOrFirst) {
|
|
13536
14166
|
let params;
|
|
13537
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {
|
|
14167
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) {
|
|
13538
14168
|
params = (paramsOrFirst || {});
|
|
13539
14169
|
}
|
|
13540
14170
|
else {
|
|
@@ -13560,7 +14190,7 @@
|
|
|
13560
14190
|
}
|
|
13561
14191
|
mutation(paramsOrFirst) {
|
|
13562
14192
|
let params;
|
|
13563
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {
|
|
14193
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) {
|
|
13564
14194
|
params = (paramsOrFirst || {});
|
|
13565
14195
|
}
|
|
13566
14196
|
else {
|
|
@@ -13842,7 +14472,7 @@
|
|
|
13842
14472
|
}
|
|
13843
14473
|
getFailedJobs(paramsOrFirst, ...rest) {
|
|
13844
14474
|
let params;
|
|
13845
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'name' in paramsOrFirst)) {
|
|
14475
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('name' in paramsOrFirst || 'threshold' in paramsOrFirst))) {
|
|
13846
14476
|
params = (paramsOrFirst || {});
|
|
13847
14477
|
}
|
|
13848
14478
|
else {
|
|
@@ -17077,7 +17707,7 @@
|
|
|
17077
17707
|
}
|
|
17078
17708
|
createAppwriteMigration(paramsOrFirst, ...rest) {
|
|
17079
17709
|
let params;
|
|
17080
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
17710
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'projectId' in paramsOrFirst || 'apiKey' in paramsOrFirst))) {
|
|
17081
17711
|
params = (paramsOrFirst || {});
|
|
17082
17712
|
}
|
|
17083
17713
|
else {
|
|
@@ -17126,7 +17756,7 @@
|
|
|
17126
17756
|
}
|
|
17127
17757
|
getAppwriteReport(paramsOrFirst, ...rest) {
|
|
17128
17758
|
let params;
|
|
17129
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
17759
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'projectID' in paramsOrFirst || 'key' in paramsOrFirst))) {
|
|
17130
17760
|
params = (paramsOrFirst || {});
|
|
17131
17761
|
}
|
|
17132
17762
|
else {
|
|
@@ -17287,7 +17917,7 @@
|
|
|
17287
17917
|
}
|
|
17288
17918
|
createFirebaseMigration(paramsOrFirst, ...rest) {
|
|
17289
17919
|
let params;
|
|
17290
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
17920
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'serviceAccount' in paramsOrFirst))) {
|
|
17291
17921
|
params = (paramsOrFirst || {});
|
|
17292
17922
|
}
|
|
17293
17923
|
else {
|
|
@@ -17320,7 +17950,7 @@
|
|
|
17320
17950
|
}
|
|
17321
17951
|
getFirebaseReport(paramsOrFirst, ...rest) {
|
|
17322
17952
|
let params;
|
|
17323
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
17953
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'serviceAccount' in paramsOrFirst))) {
|
|
17324
17954
|
params = (paramsOrFirst || {});
|
|
17325
17955
|
}
|
|
17326
17956
|
else {
|
|
@@ -17351,7 +17981,7 @@
|
|
|
17351
17981
|
}
|
|
17352
17982
|
createNHostMigration(paramsOrFirst, ...rest) {
|
|
17353
17983
|
let params;
|
|
17354
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
17984
|
+
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))) {
|
|
17355
17985
|
params = (paramsOrFirst || {});
|
|
17356
17986
|
}
|
|
17357
17987
|
else {
|
|
@@ -17429,7 +18059,7 @@
|
|
|
17429
18059
|
}
|
|
17430
18060
|
getNHostReport(paramsOrFirst, ...rest) {
|
|
17431
18061
|
let params;
|
|
17432
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
18062
|
+
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))) {
|
|
17433
18063
|
params = (paramsOrFirst || {});
|
|
17434
18064
|
}
|
|
17435
18065
|
else {
|
|
@@ -17505,7 +18135,7 @@
|
|
|
17505
18135
|
}
|
|
17506
18136
|
createSupabaseMigration(paramsOrFirst, ...rest) {
|
|
17507
18137
|
let params;
|
|
17508
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
18138
|
+
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))) {
|
|
17509
18139
|
params = (paramsOrFirst || {});
|
|
17510
18140
|
}
|
|
17511
18141
|
else {
|
|
@@ -17575,7 +18205,7 @@
|
|
|
17575
18205
|
}
|
|
17576
18206
|
getSupabaseReport(paramsOrFirst, ...rest) {
|
|
17577
18207
|
let params;
|
|
17578
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
18208
|
+
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))) {
|
|
17579
18209
|
params = (paramsOrFirst || {});
|
|
17580
18210
|
}
|
|
17581
18211
|
else {
|
|
@@ -17814,7 +18444,7 @@
|
|
|
17814
18444
|
}
|
|
17815
18445
|
estimationCreateOrganization(paramsOrFirst, ...rest) {
|
|
17816
18446
|
let params;
|
|
17817
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)
|
|
18447
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
17818
18448
|
params = (paramsOrFirst || {});
|
|
17819
18449
|
}
|
|
17820
18450
|
else {
|
|
@@ -18459,6 +19089,174 @@
|
|
|
18459
19089
|
const apiHeaders = {};
|
|
18460
19090
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
18461
19091
|
}
|
|
19092
|
+
listKeys(paramsOrFirst, ...rest) {
|
|
19093
|
+
let params;
|
|
19094
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
19095
|
+
params = (paramsOrFirst || {});
|
|
19096
|
+
}
|
|
19097
|
+
else {
|
|
19098
|
+
params = {
|
|
19099
|
+
organizationId: paramsOrFirst,
|
|
19100
|
+
total: rest[0]
|
|
19101
|
+
};
|
|
19102
|
+
}
|
|
19103
|
+
const organizationId = params.organizationId;
|
|
19104
|
+
const total = params.total;
|
|
19105
|
+
if (typeof organizationId === 'undefined') {
|
|
19106
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
19107
|
+
}
|
|
19108
|
+
const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
|
|
19109
|
+
const payload = {};
|
|
19110
|
+
if (typeof total !== 'undefined') {
|
|
19111
|
+
payload['total'] = total;
|
|
19112
|
+
}
|
|
19113
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19114
|
+
const apiHeaders = {};
|
|
19115
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
19116
|
+
}
|
|
19117
|
+
createKey(paramsOrFirst, ...rest) {
|
|
19118
|
+
let params;
|
|
19119
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
19120
|
+
params = (paramsOrFirst || {});
|
|
19121
|
+
}
|
|
19122
|
+
else {
|
|
19123
|
+
params = {
|
|
19124
|
+
organizationId: paramsOrFirst,
|
|
19125
|
+
name: rest[0],
|
|
19126
|
+
scopes: rest[1],
|
|
19127
|
+
expire: rest[2]
|
|
19128
|
+
};
|
|
19129
|
+
}
|
|
19130
|
+
const organizationId = params.organizationId;
|
|
19131
|
+
const name = params.name;
|
|
19132
|
+
const scopes = params.scopes;
|
|
19133
|
+
const expire = params.expire;
|
|
19134
|
+
if (typeof organizationId === 'undefined') {
|
|
19135
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
19136
|
+
}
|
|
19137
|
+
if (typeof name === 'undefined') {
|
|
19138
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
19139
|
+
}
|
|
19140
|
+
if (typeof scopes === 'undefined') {
|
|
19141
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
19142
|
+
}
|
|
19143
|
+
const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
|
|
19144
|
+
const payload = {};
|
|
19145
|
+
if (typeof name !== 'undefined') {
|
|
19146
|
+
payload['name'] = name;
|
|
19147
|
+
}
|
|
19148
|
+
if (typeof scopes !== 'undefined') {
|
|
19149
|
+
payload['scopes'] = scopes;
|
|
19150
|
+
}
|
|
19151
|
+
if (typeof expire !== 'undefined') {
|
|
19152
|
+
payload['expire'] = expire;
|
|
19153
|
+
}
|
|
19154
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19155
|
+
const apiHeaders = {
|
|
19156
|
+
'content-type': 'application/json',
|
|
19157
|
+
};
|
|
19158
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
19159
|
+
}
|
|
19160
|
+
getKey(paramsOrFirst, ...rest) {
|
|
19161
|
+
let params;
|
|
19162
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
19163
|
+
params = (paramsOrFirst || {});
|
|
19164
|
+
}
|
|
19165
|
+
else {
|
|
19166
|
+
params = {
|
|
19167
|
+
organizationId: paramsOrFirst,
|
|
19168
|
+
keyId: rest[0]
|
|
19169
|
+
};
|
|
19170
|
+
}
|
|
19171
|
+
const organizationId = params.organizationId;
|
|
19172
|
+
const keyId = params.keyId;
|
|
19173
|
+
if (typeof organizationId === 'undefined') {
|
|
19174
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
19175
|
+
}
|
|
19176
|
+
if (typeof keyId === 'undefined') {
|
|
19177
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
19178
|
+
}
|
|
19179
|
+
const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
|
|
19180
|
+
const payload = {};
|
|
19181
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19182
|
+
const apiHeaders = {};
|
|
19183
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
19184
|
+
}
|
|
19185
|
+
updateKey(paramsOrFirst, ...rest) {
|
|
19186
|
+
let params;
|
|
19187
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
19188
|
+
params = (paramsOrFirst || {});
|
|
19189
|
+
}
|
|
19190
|
+
else {
|
|
19191
|
+
params = {
|
|
19192
|
+
organizationId: paramsOrFirst,
|
|
19193
|
+
keyId: rest[0],
|
|
19194
|
+
name: rest[1],
|
|
19195
|
+
scopes: rest[2],
|
|
19196
|
+
expire: rest[3]
|
|
19197
|
+
};
|
|
19198
|
+
}
|
|
19199
|
+
const organizationId = params.organizationId;
|
|
19200
|
+
const keyId = params.keyId;
|
|
19201
|
+
const name = params.name;
|
|
19202
|
+
const scopes = params.scopes;
|
|
19203
|
+
const expire = params.expire;
|
|
19204
|
+
if (typeof organizationId === 'undefined') {
|
|
19205
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
19206
|
+
}
|
|
19207
|
+
if (typeof keyId === 'undefined') {
|
|
19208
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
19209
|
+
}
|
|
19210
|
+
if (typeof name === 'undefined') {
|
|
19211
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
19212
|
+
}
|
|
19213
|
+
if (typeof scopes === 'undefined') {
|
|
19214
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
19215
|
+
}
|
|
19216
|
+
const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
|
|
19217
|
+
const payload = {};
|
|
19218
|
+
if (typeof name !== 'undefined') {
|
|
19219
|
+
payload['name'] = name;
|
|
19220
|
+
}
|
|
19221
|
+
if (typeof scopes !== 'undefined') {
|
|
19222
|
+
payload['scopes'] = scopes;
|
|
19223
|
+
}
|
|
19224
|
+
if (typeof expire !== 'undefined') {
|
|
19225
|
+
payload['expire'] = expire;
|
|
19226
|
+
}
|
|
19227
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19228
|
+
const apiHeaders = {
|
|
19229
|
+
'content-type': 'application/json',
|
|
19230
|
+
};
|
|
19231
|
+
return this.client.call('put', uri, apiHeaders, payload);
|
|
19232
|
+
}
|
|
19233
|
+
deleteKey(paramsOrFirst, ...rest) {
|
|
19234
|
+
let params;
|
|
19235
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
19236
|
+
params = (paramsOrFirst || {});
|
|
19237
|
+
}
|
|
19238
|
+
else {
|
|
19239
|
+
params = {
|
|
19240
|
+
organizationId: paramsOrFirst,
|
|
19241
|
+
keyId: rest[0]
|
|
19242
|
+
};
|
|
19243
|
+
}
|
|
19244
|
+
const organizationId = params.organizationId;
|
|
19245
|
+
const keyId = params.keyId;
|
|
19246
|
+
if (typeof organizationId === 'undefined') {
|
|
19247
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
19248
|
+
}
|
|
19249
|
+
if (typeof keyId === 'undefined') {
|
|
19250
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
19251
|
+
}
|
|
19252
|
+
const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
|
|
19253
|
+
const payload = {};
|
|
19254
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19255
|
+
const apiHeaders = {
|
|
19256
|
+
'content-type': 'application/json',
|
|
19257
|
+
};
|
|
19258
|
+
return this.client.call('delete', uri, apiHeaders, payload);
|
|
19259
|
+
}
|
|
18462
19260
|
setDefaultPaymentMethod(paramsOrFirst, ...rest) {
|
|
18463
19261
|
let params;
|
|
18464
19262
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -18690,32 +19488,25 @@
|
|
|
18690
19488
|
};
|
|
18691
19489
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
18692
19490
|
}
|
|
18693
|
-
|
|
19491
|
+
listRegions(paramsOrFirst) {
|
|
18694
19492
|
let params;
|
|
18695
19493
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
18696
19494
|
params = (paramsOrFirst || {});
|
|
18697
19495
|
}
|
|
18698
19496
|
else {
|
|
18699
19497
|
params = {
|
|
18700
|
-
organizationId: paramsOrFirst
|
|
18701
|
-
projects: rest[0]
|
|
19498
|
+
organizationId: paramsOrFirst
|
|
18702
19499
|
};
|
|
18703
19500
|
}
|
|
18704
19501
|
const organizationId = params.organizationId;
|
|
18705
|
-
const projects = params.projects;
|
|
18706
19502
|
if (typeof organizationId === 'undefined') {
|
|
18707
19503
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
18708
19504
|
}
|
|
18709
|
-
const apiPath = '/organizations/{organizationId}/
|
|
19505
|
+
const apiPath = '/organizations/{organizationId}/regions'.replace('{organizationId}', organizationId);
|
|
18710
19506
|
const payload = {};
|
|
18711
|
-
if (typeof projects !== 'undefined') {
|
|
18712
|
-
payload['projects'] = projects;
|
|
18713
|
-
}
|
|
18714
19507
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
18715
|
-
const apiHeaders = {
|
|
18716
|
-
|
|
18717
|
-
};
|
|
18718
|
-
return this.client.call('patch', uri, apiHeaders, payload);
|
|
19508
|
+
const apiHeaders = {};
|
|
19509
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
18719
19510
|
}
|
|
18720
19511
|
getScopes(paramsOrFirst) {
|
|
18721
19512
|
let params;
|
|
@@ -19931,16 +20722,21 @@
|
|
|
19931
20722
|
else {
|
|
19932
20723
|
params = {
|
|
19933
20724
|
projectId: paramsOrFirst,
|
|
19934
|
-
|
|
20725
|
+
queries: rest[0],
|
|
20726
|
+
total: rest[1]
|
|
19935
20727
|
};
|
|
19936
20728
|
}
|
|
19937
20729
|
const projectId = params.projectId;
|
|
20730
|
+
const queries = params.queries;
|
|
19938
20731
|
const total = params.total;
|
|
19939
20732
|
if (typeof projectId === 'undefined') {
|
|
19940
20733
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
19941
20734
|
}
|
|
19942
20735
|
const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
19943
20736
|
const payload = {};
|
|
20737
|
+
if (typeof queries !== 'undefined') {
|
|
20738
|
+
payload['queries'] = queries;
|
|
20739
|
+
}
|
|
19944
20740
|
if (typeof total !== 'undefined') {
|
|
19945
20741
|
payload['total'] = total;
|
|
19946
20742
|
}
|
|
@@ -19958,12 +20754,14 @@
|
|
|
19958
20754
|
projectId: paramsOrFirst,
|
|
19959
20755
|
name: rest[0],
|
|
19960
20756
|
scopes: rest[1],
|
|
19961
|
-
|
|
20757
|
+
keyId: rest[2],
|
|
20758
|
+
expire: rest[3]
|
|
19962
20759
|
};
|
|
19963
20760
|
}
|
|
19964
20761
|
const projectId = params.projectId;
|
|
19965
20762
|
const name = params.name;
|
|
19966
20763
|
const scopes = params.scopes;
|
|
20764
|
+
const keyId = params.keyId;
|
|
19967
20765
|
const expire = params.expire;
|
|
19968
20766
|
if (typeof projectId === 'undefined') {
|
|
19969
20767
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
@@ -19976,6 +20774,9 @@
|
|
|
19976
20774
|
}
|
|
19977
20775
|
const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
19978
20776
|
const payload = {};
|
|
20777
|
+
if (typeof keyId !== 'undefined') {
|
|
20778
|
+
payload['keyId'] = keyId;
|
|
20779
|
+
}
|
|
19979
20780
|
if (typeof name !== 'undefined') {
|
|
19980
20781
|
payload['name'] = name;
|
|
19981
20782
|
}
|
|
@@ -20712,36 +21513,6 @@
|
|
|
20712
21513
|
};
|
|
20713
21514
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
20714
21515
|
}
|
|
20715
|
-
updateStatus(paramsOrFirst, ...rest) {
|
|
20716
|
-
let params;
|
|
20717
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20718
|
-
params = (paramsOrFirst || {});
|
|
20719
|
-
}
|
|
20720
|
-
else {
|
|
20721
|
-
params = {
|
|
20722
|
-
projectId: paramsOrFirst,
|
|
20723
|
-
status: rest[0]
|
|
20724
|
-
};
|
|
20725
|
-
}
|
|
20726
|
-
const projectId = params.projectId;
|
|
20727
|
-
const status = params.status;
|
|
20728
|
-
if (typeof projectId === 'undefined') {
|
|
20729
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
20730
|
-
}
|
|
20731
|
-
if (typeof status === 'undefined') {
|
|
20732
|
-
throw new AppwriteException('Missing required parameter: "status"');
|
|
20733
|
-
}
|
|
20734
|
-
const apiPath = '/projects/{projectId}/status'.replace('{projectId}', projectId);
|
|
20735
|
-
const payload = {};
|
|
20736
|
-
if (typeof status !== 'undefined') {
|
|
20737
|
-
payload['status'] = status;
|
|
20738
|
-
}
|
|
20739
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20740
|
-
const apiHeaders = {
|
|
20741
|
-
'content-type': 'application/json',
|
|
20742
|
-
};
|
|
20743
|
-
return this.client.call('patch', uri, apiHeaders, payload);
|
|
20744
|
-
}
|
|
20745
21516
|
updateTeam(paramsOrFirst, ...rest) {
|
|
20746
21517
|
let params;
|
|
20747
21518
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -21789,7 +22560,7 @@
|
|
|
21789
22560
|
}
|
|
21790
22561
|
listTemplates(paramsOrFirst, ...rest) {
|
|
21791
22562
|
let params;
|
|
21792
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
22563
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('frameworks' in paramsOrFirst || 'useCases' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst))) {
|
|
21793
22564
|
params = (paramsOrFirst || {});
|
|
21794
22565
|
}
|
|
21795
22566
|
else {
|
|
@@ -21844,7 +22615,7 @@
|
|
|
21844
22615
|
}
|
|
21845
22616
|
listUsage(paramsOrFirst) {
|
|
21846
22617
|
let params;
|
|
21847
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
22618
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
21848
22619
|
params = (paramsOrFirst || {});
|
|
21849
22620
|
}
|
|
21850
22621
|
else {
|
|
@@ -23214,7 +23985,7 @@
|
|
|
23214
23985
|
}
|
|
23215
23986
|
getUsage(paramsOrFirst) {
|
|
23216
23987
|
let params;
|
|
23217
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
23988
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
23218
23989
|
params = (paramsOrFirst || {});
|
|
23219
23990
|
}
|
|
23220
23991
|
else {
|
|
@@ -23476,7 +24247,7 @@
|
|
|
23476
24247
|
}
|
|
23477
24248
|
listUsage(paramsOrFirst) {
|
|
23478
24249
|
let params;
|
|
23479
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
24250
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
23480
24251
|
params = (paramsOrFirst || {});
|
|
23481
24252
|
}
|
|
23482
24253
|
else {
|
|
@@ -23532,9 +24303,6 @@
|
|
|
23532
24303
|
if (typeof databaseId === 'undefined') {
|
|
23533
24304
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
23534
24305
|
}
|
|
23535
|
-
if (typeof name === 'undefined') {
|
|
23536
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
23537
|
-
}
|
|
23538
24306
|
const apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId);
|
|
23539
24307
|
const payload = {};
|
|
23540
24308
|
if (typeof name !== 'undefined') {
|
|
@@ -23721,9 +24489,6 @@
|
|
|
23721
24489
|
if (typeof tableId === 'undefined') {
|
|
23722
24490
|
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
23723
24491
|
}
|
|
23724
|
-
if (typeof name === 'undefined') {
|
|
23725
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
23726
|
-
}
|
|
23727
24492
|
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
23728
24493
|
const payload = {};
|
|
23729
24494
|
if (typeof name !== 'undefined') {
|
|
@@ -23806,7 +24571,447 @@
|
|
|
23806
24571
|
const apiHeaders = {};
|
|
23807
24572
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
23808
24573
|
}
|
|
23809
|
-
createBooleanColumn(paramsOrFirst, ...rest) {
|
|
24574
|
+
createBooleanColumn(paramsOrFirst, ...rest) {
|
|
24575
|
+
let params;
|
|
24576
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24577
|
+
params = (paramsOrFirst || {});
|
|
24578
|
+
}
|
|
24579
|
+
else {
|
|
24580
|
+
params = {
|
|
24581
|
+
databaseId: paramsOrFirst,
|
|
24582
|
+
tableId: rest[0],
|
|
24583
|
+
key: rest[1],
|
|
24584
|
+
required: rest[2],
|
|
24585
|
+
xdefault: rest[3],
|
|
24586
|
+
array: rest[4]
|
|
24587
|
+
};
|
|
24588
|
+
}
|
|
24589
|
+
const databaseId = params.databaseId;
|
|
24590
|
+
const tableId = params.tableId;
|
|
24591
|
+
const key = params.key;
|
|
24592
|
+
const required = params.required;
|
|
24593
|
+
const xdefault = params.xdefault;
|
|
24594
|
+
const array = params.array;
|
|
24595
|
+
if (typeof databaseId === 'undefined') {
|
|
24596
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24597
|
+
}
|
|
24598
|
+
if (typeof tableId === 'undefined') {
|
|
24599
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
24600
|
+
}
|
|
24601
|
+
if (typeof key === 'undefined') {
|
|
24602
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
24603
|
+
}
|
|
24604
|
+
if (typeof required === 'undefined') {
|
|
24605
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
24606
|
+
}
|
|
24607
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24608
|
+
const payload = {};
|
|
24609
|
+
if (typeof key !== 'undefined') {
|
|
24610
|
+
payload['key'] = key;
|
|
24611
|
+
}
|
|
24612
|
+
if (typeof required !== 'undefined') {
|
|
24613
|
+
payload['required'] = required;
|
|
24614
|
+
}
|
|
24615
|
+
if (typeof xdefault !== 'undefined') {
|
|
24616
|
+
payload['default'] = xdefault;
|
|
24617
|
+
}
|
|
24618
|
+
if (typeof array !== 'undefined') {
|
|
24619
|
+
payload['array'] = array;
|
|
24620
|
+
}
|
|
24621
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24622
|
+
const apiHeaders = {
|
|
24623
|
+
'content-type': 'application/json',
|
|
24624
|
+
};
|
|
24625
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
24626
|
+
}
|
|
24627
|
+
updateBooleanColumn(paramsOrFirst, ...rest) {
|
|
24628
|
+
let params;
|
|
24629
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24630
|
+
params = (paramsOrFirst || {});
|
|
24631
|
+
}
|
|
24632
|
+
else {
|
|
24633
|
+
params = {
|
|
24634
|
+
databaseId: paramsOrFirst,
|
|
24635
|
+
tableId: rest[0],
|
|
24636
|
+
key: rest[1],
|
|
24637
|
+
required: rest[2],
|
|
24638
|
+
xdefault: rest[3],
|
|
24639
|
+
newKey: rest[4]
|
|
24640
|
+
};
|
|
24641
|
+
}
|
|
24642
|
+
const databaseId = params.databaseId;
|
|
24643
|
+
const tableId = params.tableId;
|
|
24644
|
+
const key = params.key;
|
|
24645
|
+
const required = params.required;
|
|
24646
|
+
const xdefault = params.xdefault;
|
|
24647
|
+
const newKey = params.newKey;
|
|
24648
|
+
if (typeof databaseId === 'undefined') {
|
|
24649
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24650
|
+
}
|
|
24651
|
+
if (typeof tableId === 'undefined') {
|
|
24652
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
24653
|
+
}
|
|
24654
|
+
if (typeof key === 'undefined') {
|
|
24655
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
24656
|
+
}
|
|
24657
|
+
if (typeof required === 'undefined') {
|
|
24658
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
24659
|
+
}
|
|
24660
|
+
if (typeof xdefault === 'undefined') {
|
|
24661
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
24662
|
+
}
|
|
24663
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
24664
|
+
const payload = {};
|
|
24665
|
+
if (typeof required !== 'undefined') {
|
|
24666
|
+
payload['required'] = required;
|
|
24667
|
+
}
|
|
24668
|
+
if (typeof xdefault !== 'undefined') {
|
|
24669
|
+
payload['default'] = xdefault;
|
|
24670
|
+
}
|
|
24671
|
+
if (typeof newKey !== 'undefined') {
|
|
24672
|
+
payload['newKey'] = newKey;
|
|
24673
|
+
}
|
|
24674
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24675
|
+
const apiHeaders = {
|
|
24676
|
+
'content-type': 'application/json',
|
|
24677
|
+
};
|
|
24678
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
24679
|
+
}
|
|
24680
|
+
createDatetimeColumn(paramsOrFirst, ...rest) {
|
|
24681
|
+
let params;
|
|
24682
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24683
|
+
params = (paramsOrFirst || {});
|
|
24684
|
+
}
|
|
24685
|
+
else {
|
|
24686
|
+
params = {
|
|
24687
|
+
databaseId: paramsOrFirst,
|
|
24688
|
+
tableId: rest[0],
|
|
24689
|
+
key: rest[1],
|
|
24690
|
+
required: rest[2],
|
|
24691
|
+
xdefault: rest[3],
|
|
24692
|
+
array: rest[4]
|
|
24693
|
+
};
|
|
24694
|
+
}
|
|
24695
|
+
const databaseId = params.databaseId;
|
|
24696
|
+
const tableId = params.tableId;
|
|
24697
|
+
const key = params.key;
|
|
24698
|
+
const required = params.required;
|
|
24699
|
+
const xdefault = params.xdefault;
|
|
24700
|
+
const array = params.array;
|
|
24701
|
+
if (typeof databaseId === 'undefined') {
|
|
24702
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24703
|
+
}
|
|
24704
|
+
if (typeof tableId === 'undefined') {
|
|
24705
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
24706
|
+
}
|
|
24707
|
+
if (typeof key === 'undefined') {
|
|
24708
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
24709
|
+
}
|
|
24710
|
+
if (typeof required === 'undefined') {
|
|
24711
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
24712
|
+
}
|
|
24713
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24714
|
+
const payload = {};
|
|
24715
|
+
if (typeof key !== 'undefined') {
|
|
24716
|
+
payload['key'] = key;
|
|
24717
|
+
}
|
|
24718
|
+
if (typeof required !== 'undefined') {
|
|
24719
|
+
payload['required'] = required;
|
|
24720
|
+
}
|
|
24721
|
+
if (typeof xdefault !== 'undefined') {
|
|
24722
|
+
payload['default'] = xdefault;
|
|
24723
|
+
}
|
|
24724
|
+
if (typeof array !== 'undefined') {
|
|
24725
|
+
payload['array'] = array;
|
|
24726
|
+
}
|
|
24727
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24728
|
+
const apiHeaders = {
|
|
24729
|
+
'content-type': 'application/json',
|
|
24730
|
+
};
|
|
24731
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
24732
|
+
}
|
|
24733
|
+
updateDatetimeColumn(paramsOrFirst, ...rest) {
|
|
24734
|
+
let params;
|
|
24735
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24736
|
+
params = (paramsOrFirst || {});
|
|
24737
|
+
}
|
|
24738
|
+
else {
|
|
24739
|
+
params = {
|
|
24740
|
+
databaseId: paramsOrFirst,
|
|
24741
|
+
tableId: rest[0],
|
|
24742
|
+
key: rest[1],
|
|
24743
|
+
required: rest[2],
|
|
24744
|
+
xdefault: rest[3],
|
|
24745
|
+
newKey: rest[4]
|
|
24746
|
+
};
|
|
24747
|
+
}
|
|
24748
|
+
const databaseId = params.databaseId;
|
|
24749
|
+
const tableId = params.tableId;
|
|
24750
|
+
const key = params.key;
|
|
24751
|
+
const required = params.required;
|
|
24752
|
+
const xdefault = params.xdefault;
|
|
24753
|
+
const newKey = params.newKey;
|
|
24754
|
+
if (typeof databaseId === 'undefined') {
|
|
24755
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24756
|
+
}
|
|
24757
|
+
if (typeof tableId === 'undefined') {
|
|
24758
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
24759
|
+
}
|
|
24760
|
+
if (typeof key === 'undefined') {
|
|
24761
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
24762
|
+
}
|
|
24763
|
+
if (typeof required === 'undefined') {
|
|
24764
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
24765
|
+
}
|
|
24766
|
+
if (typeof xdefault === 'undefined') {
|
|
24767
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
24768
|
+
}
|
|
24769
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
24770
|
+
const payload = {};
|
|
24771
|
+
if (typeof required !== 'undefined') {
|
|
24772
|
+
payload['required'] = required;
|
|
24773
|
+
}
|
|
24774
|
+
if (typeof xdefault !== 'undefined') {
|
|
24775
|
+
payload['default'] = xdefault;
|
|
24776
|
+
}
|
|
24777
|
+
if (typeof newKey !== 'undefined') {
|
|
24778
|
+
payload['newKey'] = newKey;
|
|
24779
|
+
}
|
|
24780
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24781
|
+
const apiHeaders = {
|
|
24782
|
+
'content-type': 'application/json',
|
|
24783
|
+
};
|
|
24784
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
24785
|
+
}
|
|
24786
|
+
createEmailColumn(paramsOrFirst, ...rest) {
|
|
24787
|
+
let params;
|
|
24788
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24789
|
+
params = (paramsOrFirst || {});
|
|
24790
|
+
}
|
|
24791
|
+
else {
|
|
24792
|
+
params = {
|
|
24793
|
+
databaseId: paramsOrFirst,
|
|
24794
|
+
tableId: rest[0],
|
|
24795
|
+
key: rest[1],
|
|
24796
|
+
required: rest[2],
|
|
24797
|
+
xdefault: rest[3],
|
|
24798
|
+
array: rest[4]
|
|
24799
|
+
};
|
|
24800
|
+
}
|
|
24801
|
+
const databaseId = params.databaseId;
|
|
24802
|
+
const tableId = params.tableId;
|
|
24803
|
+
const key = params.key;
|
|
24804
|
+
const required = params.required;
|
|
24805
|
+
const xdefault = params.xdefault;
|
|
24806
|
+
const array = params.array;
|
|
24807
|
+
if (typeof databaseId === 'undefined') {
|
|
24808
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24809
|
+
}
|
|
24810
|
+
if (typeof tableId === 'undefined') {
|
|
24811
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
24812
|
+
}
|
|
24813
|
+
if (typeof key === 'undefined') {
|
|
24814
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
24815
|
+
}
|
|
24816
|
+
if (typeof required === 'undefined') {
|
|
24817
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
24818
|
+
}
|
|
24819
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24820
|
+
const payload = {};
|
|
24821
|
+
if (typeof key !== 'undefined') {
|
|
24822
|
+
payload['key'] = key;
|
|
24823
|
+
}
|
|
24824
|
+
if (typeof required !== 'undefined') {
|
|
24825
|
+
payload['required'] = required;
|
|
24826
|
+
}
|
|
24827
|
+
if (typeof xdefault !== 'undefined') {
|
|
24828
|
+
payload['default'] = xdefault;
|
|
24829
|
+
}
|
|
24830
|
+
if (typeof array !== 'undefined') {
|
|
24831
|
+
payload['array'] = array;
|
|
24832
|
+
}
|
|
24833
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24834
|
+
const apiHeaders = {
|
|
24835
|
+
'content-type': 'application/json',
|
|
24836
|
+
};
|
|
24837
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
24838
|
+
}
|
|
24839
|
+
updateEmailColumn(paramsOrFirst, ...rest) {
|
|
24840
|
+
let params;
|
|
24841
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24842
|
+
params = (paramsOrFirst || {});
|
|
24843
|
+
}
|
|
24844
|
+
else {
|
|
24845
|
+
params = {
|
|
24846
|
+
databaseId: paramsOrFirst,
|
|
24847
|
+
tableId: rest[0],
|
|
24848
|
+
key: rest[1],
|
|
24849
|
+
required: rest[2],
|
|
24850
|
+
xdefault: rest[3],
|
|
24851
|
+
newKey: rest[4]
|
|
24852
|
+
};
|
|
24853
|
+
}
|
|
24854
|
+
const databaseId = params.databaseId;
|
|
24855
|
+
const tableId = params.tableId;
|
|
24856
|
+
const key = params.key;
|
|
24857
|
+
const required = params.required;
|
|
24858
|
+
const xdefault = params.xdefault;
|
|
24859
|
+
const newKey = params.newKey;
|
|
24860
|
+
if (typeof databaseId === 'undefined') {
|
|
24861
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24862
|
+
}
|
|
24863
|
+
if (typeof tableId === 'undefined') {
|
|
24864
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
24865
|
+
}
|
|
24866
|
+
if (typeof key === 'undefined') {
|
|
24867
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
24868
|
+
}
|
|
24869
|
+
if (typeof required === 'undefined') {
|
|
24870
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
24871
|
+
}
|
|
24872
|
+
if (typeof xdefault === 'undefined') {
|
|
24873
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
24874
|
+
}
|
|
24875
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
24876
|
+
const payload = {};
|
|
24877
|
+
if (typeof required !== 'undefined') {
|
|
24878
|
+
payload['required'] = required;
|
|
24879
|
+
}
|
|
24880
|
+
if (typeof xdefault !== 'undefined') {
|
|
24881
|
+
payload['default'] = xdefault;
|
|
24882
|
+
}
|
|
24883
|
+
if (typeof newKey !== 'undefined') {
|
|
24884
|
+
payload['newKey'] = newKey;
|
|
24885
|
+
}
|
|
24886
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24887
|
+
const apiHeaders = {
|
|
24888
|
+
'content-type': 'application/json',
|
|
24889
|
+
};
|
|
24890
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
24891
|
+
}
|
|
24892
|
+
createEnumColumn(paramsOrFirst, ...rest) {
|
|
24893
|
+
let params;
|
|
24894
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24895
|
+
params = (paramsOrFirst || {});
|
|
24896
|
+
}
|
|
24897
|
+
else {
|
|
24898
|
+
params = {
|
|
24899
|
+
databaseId: paramsOrFirst,
|
|
24900
|
+
tableId: rest[0],
|
|
24901
|
+
key: rest[1],
|
|
24902
|
+
elements: rest[2],
|
|
24903
|
+
required: rest[3],
|
|
24904
|
+
xdefault: rest[4],
|
|
24905
|
+
array: rest[5]
|
|
24906
|
+
};
|
|
24907
|
+
}
|
|
24908
|
+
const databaseId = params.databaseId;
|
|
24909
|
+
const tableId = params.tableId;
|
|
24910
|
+
const key = params.key;
|
|
24911
|
+
const elements = params.elements;
|
|
24912
|
+
const required = params.required;
|
|
24913
|
+
const xdefault = params.xdefault;
|
|
24914
|
+
const array = params.array;
|
|
24915
|
+
if (typeof databaseId === 'undefined') {
|
|
24916
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24917
|
+
}
|
|
24918
|
+
if (typeof tableId === 'undefined') {
|
|
24919
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
24920
|
+
}
|
|
24921
|
+
if (typeof key === 'undefined') {
|
|
24922
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
24923
|
+
}
|
|
24924
|
+
if (typeof elements === 'undefined') {
|
|
24925
|
+
throw new AppwriteException('Missing required parameter: "elements"');
|
|
24926
|
+
}
|
|
24927
|
+
if (typeof required === 'undefined') {
|
|
24928
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
24929
|
+
}
|
|
24930
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24931
|
+
const payload = {};
|
|
24932
|
+
if (typeof key !== 'undefined') {
|
|
24933
|
+
payload['key'] = key;
|
|
24934
|
+
}
|
|
24935
|
+
if (typeof elements !== 'undefined') {
|
|
24936
|
+
payload['elements'] = elements;
|
|
24937
|
+
}
|
|
24938
|
+
if (typeof required !== 'undefined') {
|
|
24939
|
+
payload['required'] = required;
|
|
24940
|
+
}
|
|
24941
|
+
if (typeof xdefault !== 'undefined') {
|
|
24942
|
+
payload['default'] = xdefault;
|
|
24943
|
+
}
|
|
24944
|
+
if (typeof array !== 'undefined') {
|
|
24945
|
+
payload['array'] = array;
|
|
24946
|
+
}
|
|
24947
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24948
|
+
const apiHeaders = {
|
|
24949
|
+
'content-type': 'application/json',
|
|
24950
|
+
};
|
|
24951
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
24952
|
+
}
|
|
24953
|
+
updateEnumColumn(paramsOrFirst, ...rest) {
|
|
24954
|
+
let params;
|
|
24955
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24956
|
+
params = (paramsOrFirst || {});
|
|
24957
|
+
}
|
|
24958
|
+
else {
|
|
24959
|
+
params = {
|
|
24960
|
+
databaseId: paramsOrFirst,
|
|
24961
|
+
tableId: rest[0],
|
|
24962
|
+
key: rest[1],
|
|
24963
|
+
elements: rest[2],
|
|
24964
|
+
required: rest[3],
|
|
24965
|
+
xdefault: rest[4],
|
|
24966
|
+
newKey: rest[5]
|
|
24967
|
+
};
|
|
24968
|
+
}
|
|
24969
|
+
const databaseId = params.databaseId;
|
|
24970
|
+
const tableId = params.tableId;
|
|
24971
|
+
const key = params.key;
|
|
24972
|
+
const elements = params.elements;
|
|
24973
|
+
const required = params.required;
|
|
24974
|
+
const xdefault = params.xdefault;
|
|
24975
|
+
const newKey = params.newKey;
|
|
24976
|
+
if (typeof databaseId === 'undefined') {
|
|
24977
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24978
|
+
}
|
|
24979
|
+
if (typeof tableId === 'undefined') {
|
|
24980
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
24981
|
+
}
|
|
24982
|
+
if (typeof key === 'undefined') {
|
|
24983
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
24984
|
+
}
|
|
24985
|
+
if (typeof elements === 'undefined') {
|
|
24986
|
+
throw new AppwriteException('Missing required parameter: "elements"');
|
|
24987
|
+
}
|
|
24988
|
+
if (typeof required === 'undefined') {
|
|
24989
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
24990
|
+
}
|
|
24991
|
+
if (typeof xdefault === 'undefined') {
|
|
24992
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
24993
|
+
}
|
|
24994
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
24995
|
+
const payload = {};
|
|
24996
|
+
if (typeof elements !== 'undefined') {
|
|
24997
|
+
payload['elements'] = elements;
|
|
24998
|
+
}
|
|
24999
|
+
if (typeof required !== 'undefined') {
|
|
25000
|
+
payload['required'] = required;
|
|
25001
|
+
}
|
|
25002
|
+
if (typeof xdefault !== 'undefined') {
|
|
25003
|
+
payload['default'] = xdefault;
|
|
25004
|
+
}
|
|
25005
|
+
if (typeof newKey !== 'undefined') {
|
|
25006
|
+
payload['newKey'] = newKey;
|
|
25007
|
+
}
|
|
25008
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
25009
|
+
const apiHeaders = {
|
|
25010
|
+
'content-type': 'application/json',
|
|
25011
|
+
};
|
|
25012
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
25013
|
+
}
|
|
25014
|
+
createFloatColumn(paramsOrFirst, ...rest) {
|
|
23810
25015
|
let params;
|
|
23811
25016
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
23812
25017
|
params = (paramsOrFirst || {});
|
|
@@ -23817,14 +25022,18 @@
|
|
|
23817
25022
|
tableId: rest[0],
|
|
23818
25023
|
key: rest[1],
|
|
23819
25024
|
required: rest[2],
|
|
23820
|
-
|
|
23821
|
-
|
|
25025
|
+
min: rest[3],
|
|
25026
|
+
max: rest[4],
|
|
25027
|
+
xdefault: rest[5],
|
|
25028
|
+
array: rest[6]
|
|
23822
25029
|
};
|
|
23823
25030
|
}
|
|
23824
25031
|
const databaseId = params.databaseId;
|
|
23825
25032
|
const tableId = params.tableId;
|
|
23826
25033
|
const key = params.key;
|
|
23827
25034
|
const required = params.required;
|
|
25035
|
+
const min = params.min;
|
|
25036
|
+
const max = params.max;
|
|
23828
25037
|
const xdefault = params.xdefault;
|
|
23829
25038
|
const array = params.array;
|
|
23830
25039
|
if (typeof databaseId === 'undefined') {
|
|
@@ -23839,7 +25048,7 @@
|
|
|
23839
25048
|
if (typeof required === 'undefined') {
|
|
23840
25049
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
23841
25050
|
}
|
|
23842
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25051
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
23843
25052
|
const payload = {};
|
|
23844
25053
|
if (typeof key !== 'undefined') {
|
|
23845
25054
|
payload['key'] = key;
|
|
@@ -23847,6 +25056,12 @@
|
|
|
23847
25056
|
if (typeof required !== 'undefined') {
|
|
23848
25057
|
payload['required'] = required;
|
|
23849
25058
|
}
|
|
25059
|
+
if (typeof min !== 'undefined') {
|
|
25060
|
+
payload['min'] = min;
|
|
25061
|
+
}
|
|
25062
|
+
if (typeof max !== 'undefined') {
|
|
25063
|
+
payload['max'] = max;
|
|
25064
|
+
}
|
|
23850
25065
|
if (typeof xdefault !== 'undefined') {
|
|
23851
25066
|
payload['default'] = xdefault;
|
|
23852
25067
|
}
|
|
@@ -23859,7 +25074,7 @@
|
|
|
23859
25074
|
};
|
|
23860
25075
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
23861
25076
|
}
|
|
23862
|
-
|
|
25077
|
+
updateFloatColumn(paramsOrFirst, ...rest) {
|
|
23863
25078
|
let params;
|
|
23864
25079
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
23865
25080
|
params = (paramsOrFirst || {});
|
|
@@ -23871,7 +25086,9 @@
|
|
|
23871
25086
|
key: rest[1],
|
|
23872
25087
|
required: rest[2],
|
|
23873
25088
|
xdefault: rest[3],
|
|
23874
|
-
|
|
25089
|
+
min: rest[4],
|
|
25090
|
+
max: rest[5],
|
|
25091
|
+
newKey: rest[6]
|
|
23875
25092
|
};
|
|
23876
25093
|
}
|
|
23877
25094
|
const databaseId = params.databaseId;
|
|
@@ -23879,6 +25096,8 @@
|
|
|
23879
25096
|
const key = params.key;
|
|
23880
25097
|
const required = params.required;
|
|
23881
25098
|
const xdefault = params.xdefault;
|
|
25099
|
+
const min = params.min;
|
|
25100
|
+
const max = params.max;
|
|
23882
25101
|
const newKey = params.newKey;
|
|
23883
25102
|
if (typeof databaseId === 'undefined') {
|
|
23884
25103
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -23895,11 +25114,17 @@
|
|
|
23895
25114
|
if (typeof xdefault === 'undefined') {
|
|
23896
25115
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
23897
25116
|
}
|
|
23898
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25117
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
23899
25118
|
const payload = {};
|
|
23900
25119
|
if (typeof required !== 'undefined') {
|
|
23901
25120
|
payload['required'] = required;
|
|
23902
25121
|
}
|
|
25122
|
+
if (typeof min !== 'undefined') {
|
|
25123
|
+
payload['min'] = min;
|
|
25124
|
+
}
|
|
25125
|
+
if (typeof max !== 'undefined') {
|
|
25126
|
+
payload['max'] = max;
|
|
25127
|
+
}
|
|
23903
25128
|
if (typeof xdefault !== 'undefined') {
|
|
23904
25129
|
payload['default'] = xdefault;
|
|
23905
25130
|
}
|
|
@@ -23912,7 +25137,7 @@
|
|
|
23912
25137
|
};
|
|
23913
25138
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
23914
25139
|
}
|
|
23915
|
-
|
|
25140
|
+
createIntegerColumn(paramsOrFirst, ...rest) {
|
|
23916
25141
|
let params;
|
|
23917
25142
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
23918
25143
|
params = (paramsOrFirst || {});
|
|
@@ -23923,14 +25148,18 @@
|
|
|
23923
25148
|
tableId: rest[0],
|
|
23924
25149
|
key: rest[1],
|
|
23925
25150
|
required: rest[2],
|
|
23926
|
-
|
|
23927
|
-
|
|
25151
|
+
min: rest[3],
|
|
25152
|
+
max: rest[4],
|
|
25153
|
+
xdefault: rest[5],
|
|
25154
|
+
array: rest[6]
|
|
23928
25155
|
};
|
|
23929
25156
|
}
|
|
23930
25157
|
const databaseId = params.databaseId;
|
|
23931
25158
|
const tableId = params.tableId;
|
|
23932
25159
|
const key = params.key;
|
|
23933
25160
|
const required = params.required;
|
|
25161
|
+
const min = params.min;
|
|
25162
|
+
const max = params.max;
|
|
23934
25163
|
const xdefault = params.xdefault;
|
|
23935
25164
|
const array = params.array;
|
|
23936
25165
|
if (typeof databaseId === 'undefined') {
|
|
@@ -23945,7 +25174,7 @@
|
|
|
23945
25174
|
if (typeof required === 'undefined') {
|
|
23946
25175
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
23947
25176
|
}
|
|
23948
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25177
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
23949
25178
|
const payload = {};
|
|
23950
25179
|
if (typeof key !== 'undefined') {
|
|
23951
25180
|
payload['key'] = key;
|
|
@@ -23953,6 +25182,12 @@
|
|
|
23953
25182
|
if (typeof required !== 'undefined') {
|
|
23954
25183
|
payload['required'] = required;
|
|
23955
25184
|
}
|
|
25185
|
+
if (typeof min !== 'undefined') {
|
|
25186
|
+
payload['min'] = min;
|
|
25187
|
+
}
|
|
25188
|
+
if (typeof max !== 'undefined') {
|
|
25189
|
+
payload['max'] = max;
|
|
25190
|
+
}
|
|
23956
25191
|
if (typeof xdefault !== 'undefined') {
|
|
23957
25192
|
payload['default'] = xdefault;
|
|
23958
25193
|
}
|
|
@@ -23965,7 +25200,7 @@
|
|
|
23965
25200
|
};
|
|
23966
25201
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
23967
25202
|
}
|
|
23968
|
-
|
|
25203
|
+
updateIntegerColumn(paramsOrFirst, ...rest) {
|
|
23969
25204
|
let params;
|
|
23970
25205
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
23971
25206
|
params = (paramsOrFirst || {});
|
|
@@ -23977,7 +25212,9 @@
|
|
|
23977
25212
|
key: rest[1],
|
|
23978
25213
|
required: rest[2],
|
|
23979
25214
|
xdefault: rest[3],
|
|
23980
|
-
|
|
25215
|
+
min: rest[4],
|
|
25216
|
+
max: rest[5],
|
|
25217
|
+
newKey: rest[6]
|
|
23981
25218
|
};
|
|
23982
25219
|
}
|
|
23983
25220
|
const databaseId = params.databaseId;
|
|
@@ -23985,6 +25222,8 @@
|
|
|
23985
25222
|
const key = params.key;
|
|
23986
25223
|
const required = params.required;
|
|
23987
25224
|
const xdefault = params.xdefault;
|
|
25225
|
+
const min = params.min;
|
|
25226
|
+
const max = params.max;
|
|
23988
25227
|
const newKey = params.newKey;
|
|
23989
25228
|
if (typeof databaseId === 'undefined') {
|
|
23990
25229
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -24001,11 +25240,17 @@
|
|
|
24001
25240
|
if (typeof xdefault === 'undefined') {
|
|
24002
25241
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
24003
25242
|
}
|
|
24004
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25243
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
24005
25244
|
const payload = {};
|
|
24006
25245
|
if (typeof required !== 'undefined') {
|
|
24007
25246
|
payload['required'] = required;
|
|
24008
25247
|
}
|
|
25248
|
+
if (typeof min !== 'undefined') {
|
|
25249
|
+
payload['min'] = min;
|
|
25250
|
+
}
|
|
25251
|
+
if (typeof max !== 'undefined') {
|
|
25252
|
+
payload['max'] = max;
|
|
25253
|
+
}
|
|
24009
25254
|
if (typeof xdefault !== 'undefined') {
|
|
24010
25255
|
payload['default'] = xdefault;
|
|
24011
25256
|
}
|
|
@@ -24018,7 +25263,7 @@
|
|
|
24018
25263
|
};
|
|
24019
25264
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
24020
25265
|
}
|
|
24021
|
-
|
|
25266
|
+
createIpColumn(paramsOrFirst, ...rest) {
|
|
24022
25267
|
let params;
|
|
24023
25268
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24024
25269
|
params = (paramsOrFirst || {});
|
|
@@ -24051,7 +25296,7 @@
|
|
|
24051
25296
|
if (typeof required === 'undefined') {
|
|
24052
25297
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
24053
25298
|
}
|
|
24054
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25299
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24055
25300
|
const payload = {};
|
|
24056
25301
|
if (typeof key !== 'undefined') {
|
|
24057
25302
|
payload['key'] = key;
|
|
@@ -24071,7 +25316,7 @@
|
|
|
24071
25316
|
};
|
|
24072
25317
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
24073
25318
|
}
|
|
24074
|
-
|
|
25319
|
+
updateIpColumn(paramsOrFirst, ...rest) {
|
|
24075
25320
|
let params;
|
|
24076
25321
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24077
25322
|
params = (paramsOrFirst || {});
|
|
@@ -24107,7 +25352,7 @@
|
|
|
24107
25352
|
if (typeof xdefault === 'undefined') {
|
|
24108
25353
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
24109
25354
|
}
|
|
24110
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25355
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
24111
25356
|
const payload = {};
|
|
24112
25357
|
if (typeof required !== 'undefined') {
|
|
24113
25358
|
payload['required'] = required;
|
|
@@ -24124,7 +25369,7 @@
|
|
|
24124
25369
|
};
|
|
24125
25370
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
24126
25371
|
}
|
|
24127
|
-
|
|
25372
|
+
createLineColumn(paramsOrFirst, ...rest) {
|
|
24128
25373
|
let params;
|
|
24129
25374
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24130
25375
|
params = (paramsOrFirst || {});
|
|
@@ -24134,19 +25379,15 @@
|
|
|
24134
25379
|
databaseId: paramsOrFirst,
|
|
24135
25380
|
tableId: rest[0],
|
|
24136
25381
|
key: rest[1],
|
|
24137
|
-
|
|
24138
|
-
|
|
24139
|
-
xdefault: rest[4],
|
|
24140
|
-
array: rest[5]
|
|
25382
|
+
required: rest[2],
|
|
25383
|
+
xdefault: rest[3]
|
|
24141
25384
|
};
|
|
24142
25385
|
}
|
|
24143
25386
|
const databaseId = params.databaseId;
|
|
24144
25387
|
const tableId = params.tableId;
|
|
24145
25388
|
const key = params.key;
|
|
24146
|
-
const elements = params.elements;
|
|
24147
25389
|
const required = params.required;
|
|
24148
25390
|
const xdefault = params.xdefault;
|
|
24149
|
-
const array = params.array;
|
|
24150
25391
|
if (typeof databaseId === 'undefined') {
|
|
24151
25392
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24152
25393
|
}
|
|
@@ -24156,36 +25397,27 @@
|
|
|
24156
25397
|
if (typeof key === 'undefined') {
|
|
24157
25398
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
24158
25399
|
}
|
|
24159
|
-
if (typeof elements === 'undefined') {
|
|
24160
|
-
throw new AppwriteException('Missing required parameter: "elements"');
|
|
24161
|
-
}
|
|
24162
25400
|
if (typeof required === 'undefined') {
|
|
24163
25401
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
24164
25402
|
}
|
|
24165
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25403
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24166
25404
|
const payload = {};
|
|
24167
25405
|
if (typeof key !== 'undefined') {
|
|
24168
25406
|
payload['key'] = key;
|
|
24169
25407
|
}
|
|
24170
|
-
if (typeof elements !== 'undefined') {
|
|
24171
|
-
payload['elements'] = elements;
|
|
24172
|
-
}
|
|
24173
25408
|
if (typeof required !== 'undefined') {
|
|
24174
25409
|
payload['required'] = required;
|
|
24175
25410
|
}
|
|
24176
25411
|
if (typeof xdefault !== 'undefined') {
|
|
24177
25412
|
payload['default'] = xdefault;
|
|
24178
25413
|
}
|
|
24179
|
-
if (typeof array !== 'undefined') {
|
|
24180
|
-
payload['array'] = array;
|
|
24181
|
-
}
|
|
24182
25414
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24183
25415
|
const apiHeaders = {
|
|
24184
25416
|
'content-type': 'application/json',
|
|
24185
25417
|
};
|
|
24186
25418
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
24187
25419
|
}
|
|
24188
|
-
|
|
25420
|
+
updateLineColumn(paramsOrFirst, ...rest) {
|
|
24189
25421
|
let params;
|
|
24190
25422
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24191
25423
|
params = (paramsOrFirst || {});
|
|
@@ -24195,16 +25427,14 @@
|
|
|
24195
25427
|
databaseId: paramsOrFirst,
|
|
24196
25428
|
tableId: rest[0],
|
|
24197
25429
|
key: rest[1],
|
|
24198
|
-
|
|
24199
|
-
|
|
24200
|
-
|
|
24201
|
-
newKey: rest[5]
|
|
25430
|
+
required: rest[2],
|
|
25431
|
+
xdefault: rest[3],
|
|
25432
|
+
newKey: rest[4]
|
|
24202
25433
|
};
|
|
24203
25434
|
}
|
|
24204
25435
|
const databaseId = params.databaseId;
|
|
24205
25436
|
const tableId = params.tableId;
|
|
24206
25437
|
const key = params.key;
|
|
24207
|
-
const elements = params.elements;
|
|
24208
25438
|
const required = params.required;
|
|
24209
25439
|
const xdefault = params.xdefault;
|
|
24210
25440
|
const newKey = params.newKey;
|
|
@@ -24217,20 +25447,11 @@
|
|
|
24217
25447
|
if (typeof key === 'undefined') {
|
|
24218
25448
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
24219
25449
|
}
|
|
24220
|
-
if (typeof elements === 'undefined') {
|
|
24221
|
-
throw new AppwriteException('Missing required parameter: "elements"');
|
|
24222
|
-
}
|
|
24223
25450
|
if (typeof required === 'undefined') {
|
|
24224
25451
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
24225
25452
|
}
|
|
24226
|
-
|
|
24227
|
-
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
24228
|
-
}
|
|
24229
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
25453
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
24230
25454
|
const payload = {};
|
|
24231
|
-
if (typeof elements !== 'undefined') {
|
|
24232
|
-
payload['elements'] = elements;
|
|
24233
|
-
}
|
|
24234
25455
|
if (typeof required !== 'undefined') {
|
|
24235
25456
|
payload['required'] = required;
|
|
24236
25457
|
}
|
|
@@ -24246,7 +25467,7 @@
|
|
|
24246
25467
|
};
|
|
24247
25468
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
24248
25469
|
}
|
|
24249
|
-
|
|
25470
|
+
createLongtextColumn(paramsOrFirst, ...rest) {
|
|
24250
25471
|
let params;
|
|
24251
25472
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24252
25473
|
params = (paramsOrFirst || {});
|
|
@@ -24257,18 +25478,14 @@
|
|
|
24257
25478
|
tableId: rest[0],
|
|
24258
25479
|
key: rest[1],
|
|
24259
25480
|
required: rest[2],
|
|
24260
|
-
|
|
24261
|
-
|
|
24262
|
-
xdefault: rest[5],
|
|
24263
|
-
array: rest[6]
|
|
25481
|
+
xdefault: rest[3],
|
|
25482
|
+
array: rest[4]
|
|
24264
25483
|
};
|
|
24265
25484
|
}
|
|
24266
25485
|
const databaseId = params.databaseId;
|
|
24267
25486
|
const tableId = params.tableId;
|
|
24268
25487
|
const key = params.key;
|
|
24269
25488
|
const required = params.required;
|
|
24270
|
-
const min = params.min;
|
|
24271
|
-
const max = params.max;
|
|
24272
25489
|
const xdefault = params.xdefault;
|
|
24273
25490
|
const array = params.array;
|
|
24274
25491
|
if (typeof databaseId === 'undefined') {
|
|
@@ -24283,7 +25500,7 @@
|
|
|
24283
25500
|
if (typeof required === 'undefined') {
|
|
24284
25501
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
24285
25502
|
}
|
|
24286
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25503
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24287
25504
|
const payload = {};
|
|
24288
25505
|
if (typeof key !== 'undefined') {
|
|
24289
25506
|
payload['key'] = key;
|
|
@@ -24291,12 +25508,6 @@
|
|
|
24291
25508
|
if (typeof required !== 'undefined') {
|
|
24292
25509
|
payload['required'] = required;
|
|
24293
25510
|
}
|
|
24294
|
-
if (typeof min !== 'undefined') {
|
|
24295
|
-
payload['min'] = min;
|
|
24296
|
-
}
|
|
24297
|
-
if (typeof max !== 'undefined') {
|
|
24298
|
-
payload['max'] = max;
|
|
24299
|
-
}
|
|
24300
25511
|
if (typeof xdefault !== 'undefined') {
|
|
24301
25512
|
payload['default'] = xdefault;
|
|
24302
25513
|
}
|
|
@@ -24309,7 +25520,7 @@
|
|
|
24309
25520
|
};
|
|
24310
25521
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
24311
25522
|
}
|
|
24312
|
-
|
|
25523
|
+
updateLongtextColumn(paramsOrFirst, ...rest) {
|
|
24313
25524
|
let params;
|
|
24314
25525
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24315
25526
|
params = (paramsOrFirst || {});
|
|
@@ -24321,9 +25532,7 @@
|
|
|
24321
25532
|
key: rest[1],
|
|
24322
25533
|
required: rest[2],
|
|
24323
25534
|
xdefault: rest[3],
|
|
24324
|
-
|
|
24325
|
-
max: rest[5],
|
|
24326
|
-
newKey: rest[6]
|
|
25535
|
+
newKey: rest[4]
|
|
24327
25536
|
};
|
|
24328
25537
|
}
|
|
24329
25538
|
const databaseId = params.databaseId;
|
|
@@ -24331,8 +25540,6 @@
|
|
|
24331
25540
|
const key = params.key;
|
|
24332
25541
|
const required = params.required;
|
|
24333
25542
|
const xdefault = params.xdefault;
|
|
24334
|
-
const min = params.min;
|
|
24335
|
-
const max = params.max;
|
|
24336
25543
|
const newKey = params.newKey;
|
|
24337
25544
|
if (typeof databaseId === 'undefined') {
|
|
24338
25545
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -24349,17 +25556,11 @@
|
|
|
24349
25556
|
if (typeof xdefault === 'undefined') {
|
|
24350
25557
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
24351
25558
|
}
|
|
24352
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25559
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
24353
25560
|
const payload = {};
|
|
24354
25561
|
if (typeof required !== 'undefined') {
|
|
24355
25562
|
payload['required'] = required;
|
|
24356
25563
|
}
|
|
24357
|
-
if (typeof min !== 'undefined') {
|
|
24358
|
-
payload['min'] = min;
|
|
24359
|
-
}
|
|
24360
|
-
if (typeof max !== 'undefined') {
|
|
24361
|
-
payload['max'] = max;
|
|
24362
|
-
}
|
|
24363
25564
|
if (typeof xdefault !== 'undefined') {
|
|
24364
25565
|
payload['default'] = xdefault;
|
|
24365
25566
|
}
|
|
@@ -24372,7 +25573,7 @@
|
|
|
24372
25573
|
};
|
|
24373
25574
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
24374
25575
|
}
|
|
24375
|
-
|
|
25576
|
+
createMediumtextColumn(paramsOrFirst, ...rest) {
|
|
24376
25577
|
let params;
|
|
24377
25578
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24378
25579
|
params = (paramsOrFirst || {});
|
|
@@ -24383,18 +25584,14 @@
|
|
|
24383
25584
|
tableId: rest[0],
|
|
24384
25585
|
key: rest[1],
|
|
24385
25586
|
required: rest[2],
|
|
24386
|
-
|
|
24387
|
-
|
|
24388
|
-
xdefault: rest[5],
|
|
24389
|
-
array: rest[6]
|
|
25587
|
+
xdefault: rest[3],
|
|
25588
|
+
array: rest[4]
|
|
24390
25589
|
};
|
|
24391
25590
|
}
|
|
24392
25591
|
const databaseId = params.databaseId;
|
|
24393
25592
|
const tableId = params.tableId;
|
|
24394
25593
|
const key = params.key;
|
|
24395
25594
|
const required = params.required;
|
|
24396
|
-
const min = params.min;
|
|
24397
|
-
const max = params.max;
|
|
24398
25595
|
const xdefault = params.xdefault;
|
|
24399
25596
|
const array = params.array;
|
|
24400
25597
|
if (typeof databaseId === 'undefined') {
|
|
@@ -24409,7 +25606,7 @@
|
|
|
24409
25606
|
if (typeof required === 'undefined') {
|
|
24410
25607
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
24411
25608
|
}
|
|
24412
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25609
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24413
25610
|
const payload = {};
|
|
24414
25611
|
if (typeof key !== 'undefined') {
|
|
24415
25612
|
payload['key'] = key;
|
|
@@ -24417,12 +25614,6 @@
|
|
|
24417
25614
|
if (typeof required !== 'undefined') {
|
|
24418
25615
|
payload['required'] = required;
|
|
24419
25616
|
}
|
|
24420
|
-
if (typeof min !== 'undefined') {
|
|
24421
|
-
payload['min'] = min;
|
|
24422
|
-
}
|
|
24423
|
-
if (typeof max !== 'undefined') {
|
|
24424
|
-
payload['max'] = max;
|
|
24425
|
-
}
|
|
24426
25617
|
if (typeof xdefault !== 'undefined') {
|
|
24427
25618
|
payload['default'] = xdefault;
|
|
24428
25619
|
}
|
|
@@ -24435,7 +25626,7 @@
|
|
|
24435
25626
|
};
|
|
24436
25627
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
24437
25628
|
}
|
|
24438
|
-
|
|
25629
|
+
updateMediumtextColumn(paramsOrFirst, ...rest) {
|
|
24439
25630
|
let params;
|
|
24440
25631
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24441
25632
|
params = (paramsOrFirst || {});
|
|
@@ -24447,9 +25638,7 @@
|
|
|
24447
25638
|
key: rest[1],
|
|
24448
25639
|
required: rest[2],
|
|
24449
25640
|
xdefault: rest[3],
|
|
24450
|
-
|
|
24451
|
-
max: rest[5],
|
|
24452
|
-
newKey: rest[6]
|
|
25641
|
+
newKey: rest[4]
|
|
24453
25642
|
};
|
|
24454
25643
|
}
|
|
24455
25644
|
const databaseId = params.databaseId;
|
|
@@ -24457,8 +25646,6 @@
|
|
|
24457
25646
|
const key = params.key;
|
|
24458
25647
|
const required = params.required;
|
|
24459
25648
|
const xdefault = params.xdefault;
|
|
24460
|
-
const min = params.min;
|
|
24461
|
-
const max = params.max;
|
|
24462
25649
|
const newKey = params.newKey;
|
|
24463
25650
|
if (typeof databaseId === 'undefined') {
|
|
24464
25651
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -24475,17 +25662,11 @@
|
|
|
24475
25662
|
if (typeof xdefault === 'undefined') {
|
|
24476
25663
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
24477
25664
|
}
|
|
24478
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25665
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
24479
25666
|
const payload = {};
|
|
24480
25667
|
if (typeof required !== 'undefined') {
|
|
24481
25668
|
payload['required'] = required;
|
|
24482
25669
|
}
|
|
24483
|
-
if (typeof min !== 'undefined') {
|
|
24484
|
-
payload['min'] = min;
|
|
24485
|
-
}
|
|
24486
|
-
if (typeof max !== 'undefined') {
|
|
24487
|
-
payload['max'] = max;
|
|
24488
|
-
}
|
|
24489
25670
|
if (typeof xdefault !== 'undefined') {
|
|
24490
25671
|
payload['default'] = xdefault;
|
|
24491
25672
|
}
|
|
@@ -24498,7 +25679,7 @@
|
|
|
24498
25679
|
};
|
|
24499
25680
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
24500
25681
|
}
|
|
24501
|
-
|
|
25682
|
+
createPointColumn(paramsOrFirst, ...rest) {
|
|
24502
25683
|
let params;
|
|
24503
25684
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24504
25685
|
params = (paramsOrFirst || {});
|
|
@@ -24509,8 +25690,7 @@
|
|
|
24509
25690
|
tableId: rest[0],
|
|
24510
25691
|
key: rest[1],
|
|
24511
25692
|
required: rest[2],
|
|
24512
|
-
xdefault: rest[3]
|
|
24513
|
-
array: rest[4]
|
|
25693
|
+
xdefault: rest[3]
|
|
24514
25694
|
};
|
|
24515
25695
|
}
|
|
24516
25696
|
const databaseId = params.databaseId;
|
|
@@ -24518,7 +25698,6 @@
|
|
|
24518
25698
|
const key = params.key;
|
|
24519
25699
|
const required = params.required;
|
|
24520
25700
|
const xdefault = params.xdefault;
|
|
24521
|
-
const array = params.array;
|
|
24522
25701
|
if (typeof databaseId === 'undefined') {
|
|
24523
25702
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24524
25703
|
}
|
|
@@ -24531,7 +25710,7 @@
|
|
|
24531
25710
|
if (typeof required === 'undefined') {
|
|
24532
25711
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
24533
25712
|
}
|
|
24534
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25713
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24535
25714
|
const payload = {};
|
|
24536
25715
|
if (typeof key !== 'undefined') {
|
|
24537
25716
|
payload['key'] = key;
|
|
@@ -24542,16 +25721,13 @@
|
|
|
24542
25721
|
if (typeof xdefault !== 'undefined') {
|
|
24543
25722
|
payload['default'] = xdefault;
|
|
24544
25723
|
}
|
|
24545
|
-
if (typeof array !== 'undefined') {
|
|
24546
|
-
payload['array'] = array;
|
|
24547
|
-
}
|
|
24548
25724
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24549
25725
|
const apiHeaders = {
|
|
24550
25726
|
'content-type': 'application/json',
|
|
24551
25727
|
};
|
|
24552
25728
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
24553
25729
|
}
|
|
24554
|
-
|
|
25730
|
+
updatePointColumn(paramsOrFirst, ...rest) {
|
|
24555
25731
|
let params;
|
|
24556
25732
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24557
25733
|
params = (paramsOrFirst || {});
|
|
@@ -24584,10 +25760,7 @@
|
|
|
24584
25760
|
if (typeof required === 'undefined') {
|
|
24585
25761
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
24586
25762
|
}
|
|
24587
|
-
|
|
24588
|
-
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
24589
|
-
}
|
|
24590
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
25763
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
24591
25764
|
const payload = {};
|
|
24592
25765
|
if (typeof required !== 'undefined') {
|
|
24593
25766
|
payload['required'] = required;
|
|
@@ -24604,7 +25777,7 @@
|
|
|
24604
25777
|
};
|
|
24605
25778
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
24606
25779
|
}
|
|
24607
|
-
|
|
25780
|
+
createPolygonColumn(paramsOrFirst, ...rest) {
|
|
24608
25781
|
let params;
|
|
24609
25782
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24610
25783
|
params = (paramsOrFirst || {});
|
|
@@ -24635,7 +25808,7 @@
|
|
|
24635
25808
|
if (typeof required === 'undefined') {
|
|
24636
25809
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
24637
25810
|
}
|
|
24638
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25811
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24639
25812
|
const payload = {};
|
|
24640
25813
|
if (typeof key !== 'undefined') {
|
|
24641
25814
|
payload['key'] = key;
|
|
@@ -24652,7 +25825,7 @@
|
|
|
24652
25825
|
};
|
|
24653
25826
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
24654
25827
|
}
|
|
24655
|
-
|
|
25828
|
+
updatePolygonColumn(paramsOrFirst, ...rest) {
|
|
24656
25829
|
let params;
|
|
24657
25830
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24658
25831
|
params = (paramsOrFirst || {});
|
|
@@ -24679,30 +25852,93 @@
|
|
|
24679
25852
|
if (typeof tableId === 'undefined') {
|
|
24680
25853
|
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
24681
25854
|
}
|
|
24682
|
-
if (typeof key === 'undefined') {
|
|
24683
|
-
throw new AppwriteException('Missing required parameter: "key"');
|
|
25855
|
+
if (typeof key === 'undefined') {
|
|
25856
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
25857
|
+
}
|
|
25858
|
+
if (typeof required === 'undefined') {
|
|
25859
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
25860
|
+
}
|
|
25861
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
25862
|
+
const payload = {};
|
|
25863
|
+
if (typeof required !== 'undefined') {
|
|
25864
|
+
payload['required'] = required;
|
|
25865
|
+
}
|
|
25866
|
+
if (typeof xdefault !== 'undefined') {
|
|
25867
|
+
payload['default'] = xdefault;
|
|
25868
|
+
}
|
|
25869
|
+
if (typeof newKey !== 'undefined') {
|
|
25870
|
+
payload['newKey'] = newKey;
|
|
25871
|
+
}
|
|
25872
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
25873
|
+
const apiHeaders = {
|
|
25874
|
+
'content-type': 'application/json',
|
|
25875
|
+
};
|
|
25876
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
25877
|
+
}
|
|
25878
|
+
createRelationshipColumn(paramsOrFirst, ...rest) {
|
|
25879
|
+
let params;
|
|
25880
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
25881
|
+
params = (paramsOrFirst || {});
|
|
25882
|
+
}
|
|
25883
|
+
else {
|
|
25884
|
+
params = {
|
|
25885
|
+
databaseId: paramsOrFirst,
|
|
25886
|
+
tableId: rest[0],
|
|
25887
|
+
relatedTableId: rest[1],
|
|
25888
|
+
type: rest[2],
|
|
25889
|
+
twoWay: rest[3],
|
|
25890
|
+
key: rest[4],
|
|
25891
|
+
twoWayKey: rest[5],
|
|
25892
|
+
onDelete: rest[6]
|
|
25893
|
+
};
|
|
25894
|
+
}
|
|
25895
|
+
const databaseId = params.databaseId;
|
|
25896
|
+
const tableId = params.tableId;
|
|
25897
|
+
const relatedTableId = params.relatedTableId;
|
|
25898
|
+
const type = params.type;
|
|
25899
|
+
const twoWay = params.twoWay;
|
|
25900
|
+
const key = params.key;
|
|
25901
|
+
const twoWayKey = params.twoWayKey;
|
|
25902
|
+
const onDelete = params.onDelete;
|
|
25903
|
+
if (typeof databaseId === 'undefined') {
|
|
25904
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
25905
|
+
}
|
|
25906
|
+
if (typeof tableId === 'undefined') {
|
|
25907
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
25908
|
+
}
|
|
25909
|
+
if (typeof relatedTableId === 'undefined') {
|
|
25910
|
+
throw new AppwriteException('Missing required parameter: "relatedTableId"');
|
|
24684
25911
|
}
|
|
24685
|
-
if (typeof
|
|
24686
|
-
throw new AppwriteException('Missing required parameter: "
|
|
25912
|
+
if (typeof type === 'undefined') {
|
|
25913
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
24687
25914
|
}
|
|
24688
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25915
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24689
25916
|
const payload = {};
|
|
24690
|
-
if (typeof
|
|
24691
|
-
payload['
|
|
25917
|
+
if (typeof relatedTableId !== 'undefined') {
|
|
25918
|
+
payload['relatedTableId'] = relatedTableId;
|
|
24692
25919
|
}
|
|
24693
|
-
if (typeof
|
|
24694
|
-
payload['
|
|
25920
|
+
if (typeof type !== 'undefined') {
|
|
25921
|
+
payload['type'] = type;
|
|
24695
25922
|
}
|
|
24696
|
-
if (typeof
|
|
24697
|
-
payload['
|
|
25923
|
+
if (typeof twoWay !== 'undefined') {
|
|
25924
|
+
payload['twoWay'] = twoWay;
|
|
25925
|
+
}
|
|
25926
|
+
if (typeof key !== 'undefined') {
|
|
25927
|
+
payload['key'] = key;
|
|
25928
|
+
}
|
|
25929
|
+
if (typeof twoWayKey !== 'undefined') {
|
|
25930
|
+
payload['twoWayKey'] = twoWayKey;
|
|
25931
|
+
}
|
|
25932
|
+
if (typeof onDelete !== 'undefined') {
|
|
25933
|
+
payload['onDelete'] = onDelete;
|
|
24698
25934
|
}
|
|
24699
25935
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24700
25936
|
const apiHeaders = {
|
|
24701
25937
|
'content-type': 'application/json',
|
|
24702
25938
|
};
|
|
24703
|
-
return this.client.call('
|
|
25939
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
24704
25940
|
}
|
|
24705
|
-
|
|
25941
|
+
createStringColumn(paramsOrFirst, ...rest) {
|
|
24706
25942
|
let params;
|
|
24707
25943
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24708
25944
|
params = (paramsOrFirst || {});
|
|
@@ -24712,15 +25948,21 @@
|
|
|
24712
25948
|
databaseId: paramsOrFirst,
|
|
24713
25949
|
tableId: rest[0],
|
|
24714
25950
|
key: rest[1],
|
|
24715
|
-
|
|
24716
|
-
|
|
25951
|
+
size: rest[2],
|
|
25952
|
+
required: rest[3],
|
|
25953
|
+
xdefault: rest[4],
|
|
25954
|
+
array: rest[5],
|
|
25955
|
+
encrypt: rest[6]
|
|
24717
25956
|
};
|
|
24718
25957
|
}
|
|
24719
25958
|
const databaseId = params.databaseId;
|
|
24720
25959
|
const tableId = params.tableId;
|
|
24721
25960
|
const key = params.key;
|
|
25961
|
+
const size = params.size;
|
|
24722
25962
|
const required = params.required;
|
|
24723
25963
|
const xdefault = params.xdefault;
|
|
25964
|
+
const array = params.array;
|
|
25965
|
+
const encrypt = params.encrypt;
|
|
24724
25966
|
if (typeof databaseId === 'undefined') {
|
|
24725
25967
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24726
25968
|
}
|
|
@@ -24730,27 +25972,39 @@
|
|
|
24730
25972
|
if (typeof key === 'undefined') {
|
|
24731
25973
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
24732
25974
|
}
|
|
25975
|
+
if (typeof size === 'undefined') {
|
|
25976
|
+
throw new AppwriteException('Missing required parameter: "size"');
|
|
25977
|
+
}
|
|
24733
25978
|
if (typeof required === 'undefined') {
|
|
24734
25979
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
24735
25980
|
}
|
|
24736
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
25981
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24737
25982
|
const payload = {};
|
|
24738
25983
|
if (typeof key !== 'undefined') {
|
|
24739
25984
|
payload['key'] = key;
|
|
24740
25985
|
}
|
|
25986
|
+
if (typeof size !== 'undefined') {
|
|
25987
|
+
payload['size'] = size;
|
|
25988
|
+
}
|
|
24741
25989
|
if (typeof required !== 'undefined') {
|
|
24742
25990
|
payload['required'] = required;
|
|
24743
25991
|
}
|
|
24744
25992
|
if (typeof xdefault !== 'undefined') {
|
|
24745
25993
|
payload['default'] = xdefault;
|
|
24746
25994
|
}
|
|
25995
|
+
if (typeof array !== 'undefined') {
|
|
25996
|
+
payload['array'] = array;
|
|
25997
|
+
}
|
|
25998
|
+
if (typeof encrypt !== 'undefined') {
|
|
25999
|
+
payload['encrypt'] = encrypt;
|
|
26000
|
+
}
|
|
24747
26001
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24748
26002
|
const apiHeaders = {
|
|
24749
26003
|
'content-type': 'application/json',
|
|
24750
26004
|
};
|
|
24751
26005
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
24752
26006
|
}
|
|
24753
|
-
|
|
26007
|
+
updateStringColumn(paramsOrFirst, ...rest) {
|
|
24754
26008
|
let params;
|
|
24755
26009
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24756
26010
|
params = (paramsOrFirst || {});
|
|
@@ -24762,7 +26016,8 @@
|
|
|
24762
26016
|
key: rest[1],
|
|
24763
26017
|
required: rest[2],
|
|
24764
26018
|
xdefault: rest[3],
|
|
24765
|
-
|
|
26019
|
+
size: rest[4],
|
|
26020
|
+
newKey: rest[5]
|
|
24766
26021
|
};
|
|
24767
26022
|
}
|
|
24768
26023
|
const databaseId = params.databaseId;
|
|
@@ -24770,6 +26025,7 @@
|
|
|
24770
26025
|
const key = params.key;
|
|
24771
26026
|
const required = params.required;
|
|
24772
26027
|
const xdefault = params.xdefault;
|
|
26028
|
+
const size = params.size;
|
|
24773
26029
|
const newKey = params.newKey;
|
|
24774
26030
|
if (typeof databaseId === 'undefined') {
|
|
24775
26031
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -24783,7 +26039,10 @@
|
|
|
24783
26039
|
if (typeof required === 'undefined') {
|
|
24784
26040
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
24785
26041
|
}
|
|
24786
|
-
|
|
26042
|
+
if (typeof xdefault === 'undefined') {
|
|
26043
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
26044
|
+
}
|
|
26045
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
24787
26046
|
const payload = {};
|
|
24788
26047
|
if (typeof required !== 'undefined') {
|
|
24789
26048
|
payload['required'] = required;
|
|
@@ -24791,6 +26050,9 @@
|
|
|
24791
26050
|
if (typeof xdefault !== 'undefined') {
|
|
24792
26051
|
payload['default'] = xdefault;
|
|
24793
26052
|
}
|
|
26053
|
+
if (typeof size !== 'undefined') {
|
|
26054
|
+
payload['size'] = size;
|
|
26055
|
+
}
|
|
24794
26056
|
if (typeof newKey !== 'undefined') {
|
|
24795
26057
|
payload['newKey'] = newKey;
|
|
24796
26058
|
}
|
|
@@ -24800,7 +26062,7 @@
|
|
|
24800
26062
|
};
|
|
24801
26063
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
24802
26064
|
}
|
|
24803
|
-
|
|
26065
|
+
createTextColumn(paramsOrFirst, ...rest) {
|
|
24804
26066
|
let params;
|
|
24805
26067
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24806
26068
|
params = (paramsOrFirst || {});
|
|
@@ -24811,7 +26073,8 @@
|
|
|
24811
26073
|
tableId: rest[0],
|
|
24812
26074
|
key: rest[1],
|
|
24813
26075
|
required: rest[2],
|
|
24814
|
-
xdefault: rest[3]
|
|
26076
|
+
xdefault: rest[3],
|
|
26077
|
+
array: rest[4]
|
|
24815
26078
|
};
|
|
24816
26079
|
}
|
|
24817
26080
|
const databaseId = params.databaseId;
|
|
@@ -24819,6 +26082,7 @@
|
|
|
24819
26082
|
const key = params.key;
|
|
24820
26083
|
const required = params.required;
|
|
24821
26084
|
const xdefault = params.xdefault;
|
|
26085
|
+
const array = params.array;
|
|
24822
26086
|
if (typeof databaseId === 'undefined') {
|
|
24823
26087
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24824
26088
|
}
|
|
@@ -24831,7 +26095,7 @@
|
|
|
24831
26095
|
if (typeof required === 'undefined') {
|
|
24832
26096
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
24833
26097
|
}
|
|
24834
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
26098
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24835
26099
|
const payload = {};
|
|
24836
26100
|
if (typeof key !== 'undefined') {
|
|
24837
26101
|
payload['key'] = key;
|
|
@@ -24842,13 +26106,16 @@
|
|
|
24842
26106
|
if (typeof xdefault !== 'undefined') {
|
|
24843
26107
|
payload['default'] = xdefault;
|
|
24844
26108
|
}
|
|
26109
|
+
if (typeof array !== 'undefined') {
|
|
26110
|
+
payload['array'] = array;
|
|
26111
|
+
}
|
|
24845
26112
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24846
26113
|
const apiHeaders = {
|
|
24847
26114
|
'content-type': 'application/json',
|
|
24848
26115
|
};
|
|
24849
26116
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
24850
26117
|
}
|
|
24851
|
-
|
|
26118
|
+
updateTextColumn(paramsOrFirst, ...rest) {
|
|
24852
26119
|
let params;
|
|
24853
26120
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24854
26121
|
params = (paramsOrFirst || {});
|
|
@@ -24881,7 +26148,10 @@
|
|
|
24881
26148
|
if (typeof required === 'undefined') {
|
|
24882
26149
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
24883
26150
|
}
|
|
24884
|
-
|
|
26151
|
+
if (typeof xdefault === 'undefined') {
|
|
26152
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
26153
|
+
}
|
|
26154
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
24885
26155
|
const payload = {};
|
|
24886
26156
|
if (typeof required !== 'undefined') {
|
|
24887
26157
|
payload['required'] = required;
|
|
@@ -24898,70 +26168,7 @@
|
|
|
24898
26168
|
};
|
|
24899
26169
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
24900
26170
|
}
|
|
24901
|
-
|
|
24902
|
-
let params;
|
|
24903
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24904
|
-
params = (paramsOrFirst || {});
|
|
24905
|
-
}
|
|
24906
|
-
else {
|
|
24907
|
-
params = {
|
|
24908
|
-
databaseId: paramsOrFirst,
|
|
24909
|
-
tableId: rest[0],
|
|
24910
|
-
relatedTableId: rest[1],
|
|
24911
|
-
type: rest[2],
|
|
24912
|
-
twoWay: rest[3],
|
|
24913
|
-
key: rest[4],
|
|
24914
|
-
twoWayKey: rest[5],
|
|
24915
|
-
onDelete: rest[6]
|
|
24916
|
-
};
|
|
24917
|
-
}
|
|
24918
|
-
const databaseId = params.databaseId;
|
|
24919
|
-
const tableId = params.tableId;
|
|
24920
|
-
const relatedTableId = params.relatedTableId;
|
|
24921
|
-
const type = params.type;
|
|
24922
|
-
const twoWay = params.twoWay;
|
|
24923
|
-
const key = params.key;
|
|
24924
|
-
const twoWayKey = params.twoWayKey;
|
|
24925
|
-
const onDelete = params.onDelete;
|
|
24926
|
-
if (typeof databaseId === 'undefined') {
|
|
24927
|
-
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24928
|
-
}
|
|
24929
|
-
if (typeof tableId === 'undefined') {
|
|
24930
|
-
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
24931
|
-
}
|
|
24932
|
-
if (typeof relatedTableId === 'undefined') {
|
|
24933
|
-
throw new AppwriteException('Missing required parameter: "relatedTableId"');
|
|
24934
|
-
}
|
|
24935
|
-
if (typeof type === 'undefined') {
|
|
24936
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
24937
|
-
}
|
|
24938
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
24939
|
-
const payload = {};
|
|
24940
|
-
if (typeof relatedTableId !== 'undefined') {
|
|
24941
|
-
payload['relatedTableId'] = relatedTableId;
|
|
24942
|
-
}
|
|
24943
|
-
if (typeof type !== 'undefined') {
|
|
24944
|
-
payload['type'] = type;
|
|
24945
|
-
}
|
|
24946
|
-
if (typeof twoWay !== 'undefined') {
|
|
24947
|
-
payload['twoWay'] = twoWay;
|
|
24948
|
-
}
|
|
24949
|
-
if (typeof key !== 'undefined') {
|
|
24950
|
-
payload['key'] = key;
|
|
24951
|
-
}
|
|
24952
|
-
if (typeof twoWayKey !== 'undefined') {
|
|
24953
|
-
payload['twoWayKey'] = twoWayKey;
|
|
24954
|
-
}
|
|
24955
|
-
if (typeof onDelete !== 'undefined') {
|
|
24956
|
-
payload['onDelete'] = onDelete;
|
|
24957
|
-
}
|
|
24958
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24959
|
-
const apiHeaders = {
|
|
24960
|
-
'content-type': 'application/json',
|
|
24961
|
-
};
|
|
24962
|
-
return this.client.call('post', uri, apiHeaders, payload);
|
|
24963
|
-
}
|
|
24964
|
-
createStringColumn(paramsOrFirst, ...rest) {
|
|
26171
|
+
createUrlColumn(paramsOrFirst, ...rest) {
|
|
24965
26172
|
let params;
|
|
24966
26173
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
24967
26174
|
params = (paramsOrFirst || {});
|
|
@@ -24971,21 +26178,17 @@
|
|
|
24971
26178
|
databaseId: paramsOrFirst,
|
|
24972
26179
|
tableId: rest[0],
|
|
24973
26180
|
key: rest[1],
|
|
24974
|
-
|
|
24975
|
-
|
|
24976
|
-
|
|
24977
|
-
array: rest[5],
|
|
24978
|
-
encrypt: rest[6]
|
|
26181
|
+
required: rest[2],
|
|
26182
|
+
xdefault: rest[3],
|
|
26183
|
+
array: rest[4]
|
|
24979
26184
|
};
|
|
24980
26185
|
}
|
|
24981
26186
|
const databaseId = params.databaseId;
|
|
24982
26187
|
const tableId = params.tableId;
|
|
24983
26188
|
const key = params.key;
|
|
24984
|
-
const size = params.size;
|
|
24985
26189
|
const required = params.required;
|
|
24986
26190
|
const xdefault = params.xdefault;
|
|
24987
26191
|
const array = params.array;
|
|
24988
|
-
const encrypt = params.encrypt;
|
|
24989
26192
|
if (typeof databaseId === 'undefined') {
|
|
24990
26193
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
24991
26194
|
}
|
|
@@ -24995,20 +26198,14 @@
|
|
|
24995
26198
|
if (typeof key === 'undefined') {
|
|
24996
26199
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
24997
26200
|
}
|
|
24998
|
-
if (typeof size === 'undefined') {
|
|
24999
|
-
throw new AppwriteException('Missing required parameter: "size"');
|
|
25000
|
-
}
|
|
25001
26201
|
if (typeof required === 'undefined') {
|
|
25002
26202
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
25003
26203
|
}
|
|
25004
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
26204
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
25005
26205
|
const payload = {};
|
|
25006
26206
|
if (typeof key !== 'undefined') {
|
|
25007
26207
|
payload['key'] = key;
|
|
25008
26208
|
}
|
|
25009
|
-
if (typeof size !== 'undefined') {
|
|
25010
|
-
payload['size'] = size;
|
|
25011
|
-
}
|
|
25012
26209
|
if (typeof required !== 'undefined') {
|
|
25013
26210
|
payload['required'] = required;
|
|
25014
26211
|
}
|
|
@@ -25018,16 +26215,13 @@
|
|
|
25018
26215
|
if (typeof array !== 'undefined') {
|
|
25019
26216
|
payload['array'] = array;
|
|
25020
26217
|
}
|
|
25021
|
-
if (typeof encrypt !== 'undefined') {
|
|
25022
|
-
payload['encrypt'] = encrypt;
|
|
25023
|
-
}
|
|
25024
26218
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
25025
26219
|
const apiHeaders = {
|
|
25026
26220
|
'content-type': 'application/json',
|
|
25027
26221
|
};
|
|
25028
26222
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
25029
26223
|
}
|
|
25030
|
-
|
|
26224
|
+
updateUrlColumn(paramsOrFirst, ...rest) {
|
|
25031
26225
|
let params;
|
|
25032
26226
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
25033
26227
|
params = (paramsOrFirst || {});
|
|
@@ -25039,8 +26233,7 @@
|
|
|
25039
26233
|
key: rest[1],
|
|
25040
26234
|
required: rest[2],
|
|
25041
26235
|
xdefault: rest[3],
|
|
25042
|
-
|
|
25043
|
-
newKey: rest[5]
|
|
26236
|
+
newKey: rest[4]
|
|
25044
26237
|
};
|
|
25045
26238
|
}
|
|
25046
26239
|
const databaseId = params.databaseId;
|
|
@@ -25048,7 +26241,6 @@
|
|
|
25048
26241
|
const key = params.key;
|
|
25049
26242
|
const required = params.required;
|
|
25050
26243
|
const xdefault = params.xdefault;
|
|
25051
|
-
const size = params.size;
|
|
25052
26244
|
const newKey = params.newKey;
|
|
25053
26245
|
if (typeof databaseId === 'undefined') {
|
|
25054
26246
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -25065,7 +26257,7 @@
|
|
|
25065
26257
|
if (typeof xdefault === 'undefined') {
|
|
25066
26258
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
25067
26259
|
}
|
|
25068
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
26260
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
25069
26261
|
const payload = {};
|
|
25070
26262
|
if (typeof required !== 'undefined') {
|
|
25071
26263
|
payload['required'] = required;
|
|
@@ -25073,9 +26265,6 @@
|
|
|
25073
26265
|
if (typeof xdefault !== 'undefined') {
|
|
25074
26266
|
payload['default'] = xdefault;
|
|
25075
26267
|
}
|
|
25076
|
-
if (typeof size !== 'undefined') {
|
|
25077
|
-
payload['size'] = size;
|
|
25078
|
-
}
|
|
25079
26268
|
if (typeof newKey !== 'undefined') {
|
|
25080
26269
|
payload['newKey'] = newKey;
|
|
25081
26270
|
}
|
|
@@ -25085,7 +26274,7 @@
|
|
|
25085
26274
|
};
|
|
25086
26275
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
25087
26276
|
}
|
|
25088
|
-
|
|
26277
|
+
createVarcharColumn(paramsOrFirst, ...rest) {
|
|
25089
26278
|
let params;
|
|
25090
26279
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
25091
26280
|
params = (paramsOrFirst || {});
|
|
@@ -25095,14 +26284,16 @@
|
|
|
25095
26284
|
databaseId: paramsOrFirst,
|
|
25096
26285
|
tableId: rest[0],
|
|
25097
26286
|
key: rest[1],
|
|
25098
|
-
|
|
25099
|
-
|
|
25100
|
-
|
|
26287
|
+
size: rest[2],
|
|
26288
|
+
required: rest[3],
|
|
26289
|
+
xdefault: rest[4],
|
|
26290
|
+
array: rest[5]
|
|
25101
26291
|
};
|
|
25102
26292
|
}
|
|
25103
26293
|
const databaseId = params.databaseId;
|
|
25104
26294
|
const tableId = params.tableId;
|
|
25105
26295
|
const key = params.key;
|
|
26296
|
+
const size = params.size;
|
|
25106
26297
|
const required = params.required;
|
|
25107
26298
|
const xdefault = params.xdefault;
|
|
25108
26299
|
const array = params.array;
|
|
@@ -25115,14 +26306,20 @@
|
|
|
25115
26306
|
if (typeof key === 'undefined') {
|
|
25116
26307
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
25117
26308
|
}
|
|
26309
|
+
if (typeof size === 'undefined') {
|
|
26310
|
+
throw new AppwriteException('Missing required parameter: "size"');
|
|
26311
|
+
}
|
|
25118
26312
|
if (typeof required === 'undefined') {
|
|
25119
26313
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
25120
26314
|
}
|
|
25121
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
26315
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
25122
26316
|
const payload = {};
|
|
25123
26317
|
if (typeof key !== 'undefined') {
|
|
25124
26318
|
payload['key'] = key;
|
|
25125
26319
|
}
|
|
26320
|
+
if (typeof size !== 'undefined') {
|
|
26321
|
+
payload['size'] = size;
|
|
26322
|
+
}
|
|
25126
26323
|
if (typeof required !== 'undefined') {
|
|
25127
26324
|
payload['required'] = required;
|
|
25128
26325
|
}
|
|
@@ -25138,7 +26335,7 @@
|
|
|
25138
26335
|
};
|
|
25139
26336
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
25140
26337
|
}
|
|
25141
|
-
|
|
26338
|
+
updateVarcharColumn(paramsOrFirst, ...rest) {
|
|
25142
26339
|
let params;
|
|
25143
26340
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
25144
26341
|
params = (paramsOrFirst || {});
|
|
@@ -25150,7 +26347,8 @@
|
|
|
25150
26347
|
key: rest[1],
|
|
25151
26348
|
required: rest[2],
|
|
25152
26349
|
xdefault: rest[3],
|
|
25153
|
-
|
|
26350
|
+
size: rest[4],
|
|
26351
|
+
newKey: rest[5]
|
|
25154
26352
|
};
|
|
25155
26353
|
}
|
|
25156
26354
|
const databaseId = params.databaseId;
|
|
@@ -25158,6 +26356,7 @@
|
|
|
25158
26356
|
const key = params.key;
|
|
25159
26357
|
const required = params.required;
|
|
25160
26358
|
const xdefault = params.xdefault;
|
|
26359
|
+
const size = params.size;
|
|
25161
26360
|
const newKey = params.newKey;
|
|
25162
26361
|
if (typeof databaseId === 'undefined') {
|
|
25163
26362
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -25174,7 +26373,7 @@
|
|
|
25174
26373
|
if (typeof xdefault === 'undefined') {
|
|
25175
26374
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
25176
26375
|
}
|
|
25177
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
26376
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
25178
26377
|
const payload = {};
|
|
25179
26378
|
if (typeof required !== 'undefined') {
|
|
25180
26379
|
payload['required'] = required;
|
|
@@ -25182,6 +26381,9 @@
|
|
|
25182
26381
|
if (typeof xdefault !== 'undefined') {
|
|
25183
26382
|
payload['default'] = xdefault;
|
|
25184
26383
|
}
|
|
26384
|
+
if (typeof size !== 'undefined') {
|
|
26385
|
+
payload['size'] = size;
|
|
26386
|
+
}
|
|
25185
26387
|
if (typeof newKey !== 'undefined') {
|
|
25186
26388
|
payload['newKey'] = newKey;
|
|
25187
26389
|
}
|
|
@@ -27214,7 +28416,7 @@
|
|
|
27214
28416
|
}
|
|
27215
28417
|
getUsage(paramsOrFirst) {
|
|
27216
28418
|
let params;
|
|
27217
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
28419
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
27218
28420
|
params = (paramsOrFirst || {});
|
|
27219
28421
|
}
|
|
27220
28422
|
else {
|
|
@@ -28584,11 +29786,16 @@
|
|
|
28584
29786
|
this.TYPE_CONNECTED = 'connected';
|
|
28585
29787
|
this.DEBOUNCE_MS = 1;
|
|
28586
29788
|
this.HEARTBEAT_INTERVAL = 20000; // 20 seconds in milliseconds
|
|
28587
|
-
|
|
29789
|
+
// Slot-centric state: Map<slot, { channels: Set<string>, queries: string[], callback: Function }>
|
|
28588
29790
|
this.activeSubscriptions = new Map();
|
|
29791
|
+
// Map slot index -> subscriptionId (from backend)
|
|
29792
|
+
this.slotToSubscriptionId = new Map();
|
|
29793
|
+
// Inverse map: subscriptionId -> slot index (for O(1) lookup)
|
|
29794
|
+
this.subscriptionIdToSlot = new Map();
|
|
28589
29795
|
this.subCallDepth = 0;
|
|
28590
29796
|
this.reconnectAttempts = 0;
|
|
28591
29797
|
this.subscriptionsCounter = 0;
|
|
29798
|
+
this.connectionId = 0;
|
|
28592
29799
|
this.reconnect = true;
|
|
28593
29800
|
this.onErrorCallbacks = [];
|
|
28594
29801
|
this.onCloseCallbacks = [];
|
|
@@ -28638,7 +29845,7 @@
|
|
|
28638
29845
|
}
|
|
28639
29846
|
createSocket() {
|
|
28640
29847
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28641
|
-
if (this.
|
|
29848
|
+
if (this.activeSubscriptions.size === 0) {
|
|
28642
29849
|
this.reconnect = false;
|
|
28643
29850
|
yield this.closeSocket();
|
|
28644
29851
|
return;
|
|
@@ -28647,10 +29854,36 @@
|
|
|
28647
29854
|
if (!projectId) {
|
|
28648
29855
|
throw new AppwriteException('Missing project ID');
|
|
28649
29856
|
}
|
|
29857
|
+
// Collect all unique channels from all slots
|
|
29858
|
+
const allChannels = new Set();
|
|
29859
|
+
for (const subscription of this.activeSubscriptions.values()) {
|
|
29860
|
+
for (const channel of subscription.channels) {
|
|
29861
|
+
allChannels.add(channel);
|
|
29862
|
+
}
|
|
29863
|
+
}
|
|
28650
29864
|
let queryParams = `project=${projectId}`;
|
|
28651
|
-
for (const channel of
|
|
29865
|
+
for (const channel of allChannels) {
|
|
28652
29866
|
queryParams += `&channels[]=${encodeURIComponent(channel)}`;
|
|
28653
29867
|
}
|
|
29868
|
+
// Build query string from slots → channels → queries
|
|
29869
|
+
// Format: channel[slot][]=query
|
|
29870
|
+
// For each slot, repeat its queries under each channel it subscribes to
|
|
29871
|
+
// Example: slot 1 → channels [tests, prod], queries [q1, q2]
|
|
29872
|
+
// Produces: tests[1][]=q1&tests[1][]=q2&prod[1][]=q1&prod[1][]=q2
|
|
29873
|
+
const selectAllQuery = Query.select(['*']).toString();
|
|
29874
|
+
for (const [slot, subscription] of this.activeSubscriptions) {
|
|
29875
|
+
// queries is string[] - iterate over each query string
|
|
29876
|
+
const queries = subscription.queries.length === 0
|
|
29877
|
+
? [selectAllQuery]
|
|
29878
|
+
: subscription.queries;
|
|
29879
|
+
// Repeat this slot's queries under each channel it subscribes to
|
|
29880
|
+
// Each query is sent as a separate parameter: channel[slot][]=q1&channel[slot][]=q2
|
|
29881
|
+
for (const channel of subscription.channels) {
|
|
29882
|
+
for (const query of queries) {
|
|
29883
|
+
queryParams += `&${encodeURIComponent(channel)}[${slot}][]=${encodeURIComponent(query)}`;
|
|
29884
|
+
}
|
|
29885
|
+
}
|
|
29886
|
+
}
|
|
28654
29887
|
const endpoint = this.client.config.endpointRealtime !== ''
|
|
28655
29888
|
? this.client.config.endpointRealtime
|
|
28656
29889
|
: this.client.config.endpoint || '';
|
|
@@ -28660,18 +29893,29 @@
|
|
|
28660
29893
|
const url = `${realtimeEndpoint}/realtime?${queryParams}`;
|
|
28661
29894
|
if (this.socket) {
|
|
28662
29895
|
this.reconnect = false;
|
|
28663
|
-
|
|
29896
|
+
if (this.socket.readyState < WebSocket.CLOSING) {
|
|
29897
|
+
yield this.closeSocket();
|
|
29898
|
+
}
|
|
29899
|
+
// Ensure reconnect isn't stuck false if close event was missed.
|
|
29900
|
+
this.reconnect = true;
|
|
28664
29901
|
}
|
|
28665
29902
|
return new Promise((resolve, reject) => {
|
|
28666
29903
|
try {
|
|
28667
|
-
|
|
28668
|
-
this.socket
|
|
29904
|
+
const connectionId = ++this.connectionId;
|
|
29905
|
+
const socket = (this.socket = new WebSocket(url));
|
|
29906
|
+
socket.addEventListener('open', () => {
|
|
29907
|
+
if (connectionId !== this.connectionId) {
|
|
29908
|
+
return;
|
|
29909
|
+
}
|
|
28669
29910
|
this.reconnectAttempts = 0;
|
|
28670
29911
|
this.onOpenCallbacks.forEach(callback => callback());
|
|
28671
29912
|
this.startHeartbeat();
|
|
28672
29913
|
resolve();
|
|
28673
29914
|
});
|
|
28674
|
-
|
|
29915
|
+
socket.addEventListener('message', (event) => {
|
|
29916
|
+
if (connectionId !== this.connectionId) {
|
|
29917
|
+
return;
|
|
29918
|
+
}
|
|
28675
29919
|
try {
|
|
28676
29920
|
const message = JSON.parse(event.data);
|
|
28677
29921
|
this.handleMessage(message);
|
|
@@ -28680,7 +29924,10 @@
|
|
|
28680
29924
|
console.error('Failed to parse message:', error);
|
|
28681
29925
|
}
|
|
28682
29926
|
});
|
|
28683
|
-
|
|
29927
|
+
socket.addEventListener('close', (event) => __awaiter(this, void 0, void 0, function* () {
|
|
29928
|
+
if (connectionId !== this.connectionId || socket !== this.socket) {
|
|
29929
|
+
return;
|
|
29930
|
+
}
|
|
28684
29931
|
this.stopHeartbeat();
|
|
28685
29932
|
this.onCloseCallbacks.forEach(callback => callback());
|
|
28686
29933
|
if (!this.reconnect || event.code === RealtimeCode.POLICY_VIOLATION) {
|
|
@@ -28698,7 +29945,10 @@
|
|
|
28698
29945
|
console.error('Failed to reconnect:', error);
|
|
28699
29946
|
}
|
|
28700
29947
|
}));
|
|
28701
|
-
|
|
29948
|
+
socket.addEventListener('error', (event) => {
|
|
29949
|
+
if (connectionId !== this.connectionId || socket !== this.socket) {
|
|
29950
|
+
return;
|
|
29951
|
+
}
|
|
28702
29952
|
this.stopHeartbeat();
|
|
28703
29953
|
const error = new Error('WebSocket error');
|
|
28704
29954
|
console.error('WebSocket error:', error.message);
|
|
@@ -28769,7 +30019,7 @@
|
|
|
28769
30019
|
}
|
|
28770
30020
|
return String(channel);
|
|
28771
30021
|
}
|
|
28772
|
-
subscribe(channelsOrChannel, callback) {
|
|
30022
|
+
subscribe(channelsOrChannel, callback, queries = []) {
|
|
28773
30023
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28774
30024
|
const channelArray = Array.isArray(channelsOrChannel)
|
|
28775
30025
|
? channelsOrChannel
|
|
@@ -28777,13 +30027,29 @@
|
|
|
28777
30027
|
// Convert all channels to strings
|
|
28778
30028
|
const channelStrings = channelArray.map(ch => this.channelToString(ch));
|
|
28779
30029
|
const channels = new Set(channelStrings);
|
|
28780
|
-
|
|
28781
|
-
|
|
28782
|
-
|
|
28783
|
-
|
|
30030
|
+
// Convert queries to array of strings
|
|
30031
|
+
// Ensure each query is a separate string in the array
|
|
30032
|
+
const queryStrings = [];
|
|
30033
|
+
for (const q of (queries !== null && queries !== void 0 ? queries : [])) {
|
|
30034
|
+
if (Array.isArray(q)) {
|
|
30035
|
+
// Handle nested arrays: [[q1, q2]] -> [q1, q2]
|
|
30036
|
+
for (const inner of q) {
|
|
30037
|
+
queryStrings.push(typeof inner === 'string' ? inner : inner.toString());
|
|
30038
|
+
}
|
|
30039
|
+
}
|
|
30040
|
+
else {
|
|
30041
|
+
queryStrings.push(typeof q === 'string' ? q : q.toString());
|
|
30042
|
+
}
|
|
28784
30043
|
}
|
|
28785
|
-
|
|
30044
|
+
// Allocate a new slot index
|
|
30045
|
+
this.subscriptionsCounter++;
|
|
30046
|
+
const slot = this.subscriptionsCounter;
|
|
30047
|
+
// Store slot-centric data: channels, queries, and callback belong to the slot
|
|
30048
|
+
// queries is stored as string[] (array of query strings)
|
|
30049
|
+
// No channel mutation occurs here - channels are derived from slots in createSocket()
|
|
30050
|
+
this.activeSubscriptions.set(slot, {
|
|
28786
30051
|
channels,
|
|
30052
|
+
queries: queryStrings,
|
|
28787
30053
|
callback
|
|
28788
30054
|
});
|
|
28789
30055
|
this.subCallDepth++;
|
|
@@ -28794,23 +30060,19 @@
|
|
|
28794
30060
|
this.subCallDepth--;
|
|
28795
30061
|
return {
|
|
28796
30062
|
close: () => __awaiter(this, void 0, void 0, function* () {
|
|
28797
|
-
this.
|
|
28798
|
-
this.
|
|
30063
|
+
const subscriptionId = this.slotToSubscriptionId.get(slot);
|
|
30064
|
+
this.activeSubscriptions.delete(slot);
|
|
30065
|
+
this.slotToSubscriptionId.delete(slot);
|
|
30066
|
+
if (subscriptionId) {
|
|
30067
|
+
this.subscriptionIdToSlot.delete(subscriptionId);
|
|
30068
|
+
}
|
|
28799
30069
|
yield this.createSocket();
|
|
28800
30070
|
})
|
|
28801
30071
|
};
|
|
28802
30072
|
});
|
|
28803
30073
|
}
|
|
28804
|
-
cleanUp(
|
|
28805
|
-
|
|
28806
|
-
if (!channels.has(channel)) {
|
|
28807
|
-
return true;
|
|
28808
|
-
}
|
|
28809
|
-
const subsWithChannel = Array.from(this.activeSubscriptions.values())
|
|
28810
|
-
.filter(sub => sub.channels.has(channel));
|
|
28811
|
-
return subsWithChannel.length > 0;
|
|
28812
|
-
}));
|
|
28813
|
-
}
|
|
30074
|
+
// cleanUp is no longer needed - slots are removed directly in subscribe().close()
|
|
30075
|
+
// Channels are automatically rebuilt from remaining slots in createSocket()
|
|
28814
30076
|
handleMessage(message) {
|
|
28815
30077
|
if (!message.type) {
|
|
28816
30078
|
return;
|
|
@@ -28836,6 +30098,19 @@
|
|
|
28836
30098
|
return;
|
|
28837
30099
|
}
|
|
28838
30100
|
const messageData = message.data;
|
|
30101
|
+
// Store subscription ID mappings from backend
|
|
30102
|
+
// Format: { "0": "sub_a1f9", "1": "sub_b83c", ... }
|
|
30103
|
+
if (messageData.subscriptions) {
|
|
30104
|
+
this.slotToSubscriptionId.clear();
|
|
30105
|
+
this.subscriptionIdToSlot.clear();
|
|
30106
|
+
for (const [slotStr, subscriptionId] of Object.entries(messageData.subscriptions)) {
|
|
30107
|
+
const slot = Number(slotStr);
|
|
30108
|
+
if (!isNaN(slot)) {
|
|
30109
|
+
this.slotToSubscriptionId.set(slot, subscriptionId);
|
|
30110
|
+
this.subscriptionIdToSlot.set(subscriptionId, slot);
|
|
30111
|
+
}
|
|
30112
|
+
}
|
|
30113
|
+
}
|
|
28839
30114
|
let session = this.client.config.session;
|
|
28840
30115
|
if (!session) {
|
|
28841
30116
|
try {
|
|
@@ -28870,23 +30145,26 @@
|
|
|
28870
30145
|
const events = data.events;
|
|
28871
30146
|
const payload = data.payload;
|
|
28872
30147
|
const timestamp = data.timestamp;
|
|
28873
|
-
|
|
28874
|
-
|
|
28875
|
-
}
|
|
28876
|
-
const hasActiveChannel = channels.some(channel => this.activeChannels.has(channel));
|
|
28877
|
-
if (!hasActiveChannel) {
|
|
30148
|
+
const subscriptions = data.subscriptions;
|
|
30149
|
+
if (!channels || !events || !payload || !subscriptions || subscriptions.length === 0) {
|
|
28878
30150
|
return;
|
|
28879
30151
|
}
|
|
28880
|
-
|
|
28881
|
-
|
|
28882
|
-
|
|
28883
|
-
|
|
28884
|
-
|
|
28885
|
-
|
|
28886
|
-
|
|
28887
|
-
|
|
28888
|
-
|
|
28889
|
-
|
|
30152
|
+
// Iterate over all matching subscriptionIds and call callback for each
|
|
30153
|
+
for (const subscriptionId of subscriptions) {
|
|
30154
|
+
// O(1) lookup using subscriptionId
|
|
30155
|
+
const slot = this.subscriptionIdToSlot.get(subscriptionId);
|
|
30156
|
+
if (slot !== undefined) {
|
|
30157
|
+
const subscription = this.activeSubscriptions.get(slot);
|
|
30158
|
+
if (subscription) {
|
|
30159
|
+
const response = {
|
|
30160
|
+
events,
|
|
30161
|
+
channels,
|
|
30162
|
+
timestamp,
|
|
30163
|
+
payload,
|
|
30164
|
+
subscriptions
|
|
30165
|
+
};
|
|
30166
|
+
subscription.callback(response);
|
|
30167
|
+
}
|
|
28890
30168
|
}
|
|
28891
30169
|
}
|
|
28892
30170
|
}
|
|
@@ -29088,8 +30366,11 @@
|
|
|
29088
30366
|
constructor(segments) {
|
|
29089
30367
|
this.segments = segments;
|
|
29090
30368
|
}
|
|
29091
|
-
next(segment, id
|
|
29092
|
-
|
|
30369
|
+
next(segment, id) {
|
|
30370
|
+
const segments = id === undefined
|
|
30371
|
+
? [...this.segments, segment]
|
|
30372
|
+
: [...this.segments, segment, normalize(id)];
|
|
30373
|
+
return new Channel(segments);
|
|
29093
30374
|
}
|
|
29094
30375
|
resolve(action) {
|
|
29095
30376
|
return new Channel([...this.segments, action]);
|
|
@@ -29099,28 +30380,29 @@
|
|
|
29099
30380
|
}
|
|
29100
30381
|
// --- DATABASE ROUTE ---
|
|
29101
30382
|
// Only available on Channel<Database>
|
|
29102
|
-
collection(id
|
|
29103
|
-
|
|
30383
|
+
collection(id) {
|
|
30384
|
+
// Default: wildcard collection ID
|
|
30385
|
+
return this.next("collections", id !== null && id !== void 0 ? id : "*");
|
|
29104
30386
|
}
|
|
29105
30387
|
// Only available on Channel<Collection>
|
|
29106
|
-
document(id
|
|
30388
|
+
document(id) {
|
|
30389
|
+
// Default: no document ID segment
|
|
29107
30390
|
return this.next("documents", id);
|
|
29108
30391
|
}
|
|
29109
30392
|
// --- TABLESDB ROUTE ---
|
|
29110
|
-
table(id
|
|
29111
|
-
|
|
30393
|
+
table(id) {
|
|
30394
|
+
// Default: wildcard table ID
|
|
30395
|
+
return this.next("tables", id !== null && id !== void 0 ? id : "*");
|
|
29112
30396
|
}
|
|
29113
|
-
row(id
|
|
30397
|
+
row(id) {
|
|
30398
|
+
// Default: no row ID segment
|
|
29114
30399
|
return this.next("rows", id);
|
|
29115
30400
|
}
|
|
29116
30401
|
// --- BUCKET ROUTE ---
|
|
29117
|
-
file(id
|
|
30402
|
+
file(id) {
|
|
30403
|
+
// Default: no file ID segment
|
|
29118
30404
|
return this.next("files", id);
|
|
29119
30405
|
}
|
|
29120
|
-
// --- FUNCTION ROUTE ---
|
|
29121
|
-
execution(id = "*") {
|
|
29122
|
-
return this.next("executions", id);
|
|
29123
|
-
}
|
|
29124
30406
|
// --- TERMINAL ACTIONS ---
|
|
29125
30407
|
// Restricted to the Actionable union
|
|
29126
30408
|
create() {
|
|
@@ -29136,6 +30418,9 @@
|
|
|
29136
30418
|
static database(id = "*") {
|
|
29137
30419
|
return new Channel(["databases", normalize(id)]);
|
|
29138
30420
|
}
|
|
30421
|
+
static execution(id = "*") {
|
|
30422
|
+
return new Channel(["executions", normalize(id)]);
|
|
30423
|
+
}
|
|
29139
30424
|
static tablesdb(id = "*") {
|
|
29140
30425
|
return new Channel(["tablesdb", normalize(id)]);
|
|
29141
30426
|
}
|
|
@@ -29151,23 +30436,28 @@
|
|
|
29151
30436
|
static membership(id = "*") {
|
|
29152
30437
|
return new Channel(["memberships", normalize(id)]);
|
|
29153
30438
|
}
|
|
29154
|
-
static account(
|
|
29155
|
-
|
|
29156
|
-
return id === "*" ? "account" : `account.${id}`;
|
|
30439
|
+
static account() {
|
|
30440
|
+
return "account";
|
|
29157
30441
|
}
|
|
29158
30442
|
// Global events
|
|
29159
|
-
static
|
|
30443
|
+
static documents() {
|
|
29160
30444
|
return "documents";
|
|
29161
30445
|
}
|
|
29162
|
-
static
|
|
30446
|
+
static rows() {
|
|
29163
30447
|
return "rows";
|
|
29164
30448
|
}
|
|
29165
|
-
static
|
|
30449
|
+
static files() {
|
|
29166
30450
|
return "files";
|
|
29167
30451
|
}
|
|
29168
|
-
static
|
|
30452
|
+
static executions() {
|
|
29169
30453
|
return "executions";
|
|
29170
30454
|
}
|
|
30455
|
+
static teams() {
|
|
30456
|
+
return "teams";
|
|
30457
|
+
}
|
|
30458
|
+
static memberships() {
|
|
30459
|
+
return "memberships";
|
|
30460
|
+
}
|
|
29171
30461
|
}
|
|
29172
30462
|
|
|
29173
30463
|
exports.Condition = void 0;
|
|
@@ -29435,6 +30725,74 @@
|
|
|
29435
30725
|
*/
|
|
29436
30726
|
Operator.dateSetNow = () => new Operator("dateSetNow", []).toString();
|
|
29437
30727
|
|
|
30728
|
+
exports.Scopes = void 0;
|
|
30729
|
+
(function (Scopes) {
|
|
30730
|
+
Scopes["SessionsWrite"] = "sessions.write";
|
|
30731
|
+
Scopes["UsersRead"] = "users.read";
|
|
30732
|
+
Scopes["UsersWrite"] = "users.write";
|
|
30733
|
+
Scopes["TeamsRead"] = "teams.read";
|
|
30734
|
+
Scopes["TeamsWrite"] = "teams.write";
|
|
30735
|
+
Scopes["DatabasesRead"] = "databases.read";
|
|
30736
|
+
Scopes["DatabasesWrite"] = "databases.write";
|
|
30737
|
+
Scopes["CollectionsRead"] = "collections.read";
|
|
30738
|
+
Scopes["CollectionsWrite"] = "collections.write";
|
|
30739
|
+
Scopes["TablesRead"] = "tables.read";
|
|
30740
|
+
Scopes["TablesWrite"] = "tables.write";
|
|
30741
|
+
Scopes["AttributesRead"] = "attributes.read";
|
|
30742
|
+
Scopes["AttributesWrite"] = "attributes.write";
|
|
30743
|
+
Scopes["ColumnsRead"] = "columns.read";
|
|
30744
|
+
Scopes["ColumnsWrite"] = "columns.write";
|
|
30745
|
+
Scopes["IndexesRead"] = "indexes.read";
|
|
30746
|
+
Scopes["IndexesWrite"] = "indexes.write";
|
|
30747
|
+
Scopes["DocumentsRead"] = "documents.read";
|
|
30748
|
+
Scopes["DocumentsWrite"] = "documents.write";
|
|
30749
|
+
Scopes["RowsRead"] = "rows.read";
|
|
30750
|
+
Scopes["RowsWrite"] = "rows.write";
|
|
30751
|
+
Scopes["FilesRead"] = "files.read";
|
|
30752
|
+
Scopes["FilesWrite"] = "files.write";
|
|
30753
|
+
Scopes["BucketsRead"] = "buckets.read";
|
|
30754
|
+
Scopes["BucketsWrite"] = "buckets.write";
|
|
30755
|
+
Scopes["FunctionsRead"] = "functions.read";
|
|
30756
|
+
Scopes["FunctionsWrite"] = "functions.write";
|
|
30757
|
+
Scopes["SitesRead"] = "sites.read";
|
|
30758
|
+
Scopes["SitesWrite"] = "sites.write";
|
|
30759
|
+
Scopes["LogRead"] = "log.read";
|
|
30760
|
+
Scopes["LogWrite"] = "log.write";
|
|
30761
|
+
Scopes["ExecutionRead"] = "execution.read";
|
|
30762
|
+
Scopes["ExecutionWrite"] = "execution.write";
|
|
30763
|
+
Scopes["LocaleRead"] = "locale.read";
|
|
30764
|
+
Scopes["AvatarsRead"] = "avatars.read";
|
|
30765
|
+
Scopes["HealthRead"] = "health.read";
|
|
30766
|
+
Scopes["ProvidersRead"] = "providers.read";
|
|
30767
|
+
Scopes["ProvidersWrite"] = "providers.write";
|
|
30768
|
+
Scopes["MessagesRead"] = "messages.read";
|
|
30769
|
+
Scopes["MessagesWrite"] = "messages.write";
|
|
30770
|
+
Scopes["TopicsRead"] = "topics.read";
|
|
30771
|
+
Scopes["TopicsWrite"] = "topics.write";
|
|
30772
|
+
Scopes["SubscribersRead"] = "subscribers.read";
|
|
30773
|
+
Scopes["SubscribersWrite"] = "subscribers.write";
|
|
30774
|
+
Scopes["TargetsRead"] = "targets.read";
|
|
30775
|
+
Scopes["TargetsWrite"] = "targets.write";
|
|
30776
|
+
Scopes["RulesRead"] = "rules.read";
|
|
30777
|
+
Scopes["RulesWrite"] = "rules.write";
|
|
30778
|
+
Scopes["MigrationsRead"] = "migrations.read";
|
|
30779
|
+
Scopes["MigrationsWrite"] = "migrations.write";
|
|
30780
|
+
Scopes["VcsRead"] = "vcs.read";
|
|
30781
|
+
Scopes["VcsWrite"] = "vcs.write";
|
|
30782
|
+
Scopes["AssistantRead"] = "assistant.read";
|
|
30783
|
+
Scopes["TokensRead"] = "tokens.read";
|
|
30784
|
+
Scopes["TokensWrite"] = "tokens.write";
|
|
30785
|
+
Scopes["PoliciesWrite"] = "policies.write";
|
|
30786
|
+
Scopes["PoliciesRead"] = "policies.read";
|
|
30787
|
+
Scopes["ArchivesRead"] = "archives.read";
|
|
30788
|
+
Scopes["ArchivesWrite"] = "archives.write";
|
|
30789
|
+
Scopes["RestorationsRead"] = "restorations.read";
|
|
30790
|
+
Scopes["RestorationsWrite"] = "restorations.write";
|
|
30791
|
+
Scopes["DomainsRead"] = "domains.read";
|
|
30792
|
+
Scopes["DomainsWrite"] = "domains.write";
|
|
30793
|
+
Scopes["EventsRead"] = "events.read";
|
|
30794
|
+
})(exports.Scopes || (exports.Scopes = {}));
|
|
30795
|
+
|
|
29438
30796
|
exports.AuthenticatorType = void 0;
|
|
29439
30797
|
(function (AuthenticatorType) {
|
|
29440
30798
|
AuthenticatorType["Totp"] = "totp";
|
|
@@ -30160,6 +31518,30 @@
|
|
|
30160
31518
|
Timezone["Utc"] = "utc";
|
|
30161
31519
|
})(exports.Timezone || (exports.Timezone = {}));
|
|
30162
31520
|
|
|
31521
|
+
exports.BrowserPermission = void 0;
|
|
31522
|
+
(function (BrowserPermission) {
|
|
31523
|
+
BrowserPermission["Geolocation"] = "geolocation";
|
|
31524
|
+
BrowserPermission["Camera"] = "camera";
|
|
31525
|
+
BrowserPermission["Microphone"] = "microphone";
|
|
31526
|
+
BrowserPermission["Notifications"] = "notifications";
|
|
31527
|
+
BrowserPermission["Midi"] = "midi";
|
|
31528
|
+
BrowserPermission["Push"] = "push";
|
|
31529
|
+
BrowserPermission["Clipboardread"] = "clipboard-read";
|
|
31530
|
+
BrowserPermission["Clipboardwrite"] = "clipboard-write";
|
|
31531
|
+
BrowserPermission["Paymenthandler"] = "payment-handler";
|
|
31532
|
+
BrowserPermission["Usb"] = "usb";
|
|
31533
|
+
BrowserPermission["Bluetooth"] = "bluetooth";
|
|
31534
|
+
BrowserPermission["Accelerometer"] = "accelerometer";
|
|
31535
|
+
BrowserPermission["Gyroscope"] = "gyroscope";
|
|
31536
|
+
BrowserPermission["Magnetometer"] = "magnetometer";
|
|
31537
|
+
BrowserPermission["Ambientlightsensor"] = "ambient-light-sensor";
|
|
31538
|
+
BrowserPermission["Backgroundsync"] = "background-sync";
|
|
31539
|
+
BrowserPermission["Persistentstorage"] = "persistent-storage";
|
|
31540
|
+
BrowserPermission["Screenwakelock"] = "screen-wake-lock";
|
|
31541
|
+
BrowserPermission["Webshare"] = "web-share";
|
|
31542
|
+
BrowserPermission["Xrspatialtracking"] = "xr-spatial-tracking";
|
|
31543
|
+
})(exports.BrowserPermission || (exports.BrowserPermission = {}));
|
|
31544
|
+
|
|
30163
31545
|
exports.ImageFormat = void 0;
|
|
30164
31546
|
(function (ImageFormat) {
|
|
30165
31547
|
ImageFormat["Jpg"] = "jpg";
|
|
@@ -30171,6 +31553,13 @@
|
|
|
30171
31553
|
ImageFormat["Gif"] = "gif";
|
|
30172
31554
|
})(exports.ImageFormat || (exports.ImageFormat = {}));
|
|
30173
31555
|
|
|
31556
|
+
exports.BackupServices = void 0;
|
|
31557
|
+
(function (BackupServices) {
|
|
31558
|
+
BackupServices["Databases"] = "databases";
|
|
31559
|
+
BackupServices["Functions"] = "functions";
|
|
31560
|
+
BackupServices["Storage"] = "storage";
|
|
31561
|
+
})(exports.BackupServices || (exports.BackupServices = {}));
|
|
31562
|
+
|
|
30174
31563
|
exports.Platform = void 0;
|
|
30175
31564
|
(function (Platform) {
|
|
30176
31565
|
Platform["Appwrite"] = "appwrite";
|
|
@@ -30212,6 +31601,20 @@
|
|
|
30212
31601
|
IndexType["Spatial"] = "spatial";
|
|
30213
31602
|
})(exports.IndexType || (exports.IndexType = {}));
|
|
30214
31603
|
|
|
31604
|
+
exports.OrderBy = void 0;
|
|
31605
|
+
(function (OrderBy) {
|
|
31606
|
+
OrderBy["Asc"] = "asc";
|
|
31607
|
+
OrderBy["Desc"] = "desc";
|
|
31608
|
+
})(exports.OrderBy || (exports.OrderBy = {}));
|
|
31609
|
+
|
|
31610
|
+
exports.RegistrationType = void 0;
|
|
31611
|
+
(function (RegistrationType) {
|
|
31612
|
+
RegistrationType["New"] = "new";
|
|
31613
|
+
RegistrationType["Transfer"] = "transfer";
|
|
31614
|
+
RegistrationType["Renewal"] = "renewal";
|
|
31615
|
+
RegistrationType["Trade"] = "trade";
|
|
31616
|
+
})(exports.RegistrationType || (exports.RegistrationType = {}));
|
|
31617
|
+
|
|
30215
31618
|
exports.FilterType = void 0;
|
|
30216
31619
|
(function (FilterType) {
|
|
30217
31620
|
FilterType["Premium"] = "premium";
|
|
@@ -30242,6 +31645,9 @@
|
|
|
30242
31645
|
Runtime["Python312"] = "python-3.12";
|
|
30243
31646
|
Runtime["Pythonml311"] = "python-ml-3.11";
|
|
30244
31647
|
Runtime["Pythonml312"] = "python-ml-3.12";
|
|
31648
|
+
Runtime["Deno121"] = "deno-1.21";
|
|
31649
|
+
Runtime["Deno124"] = "deno-1.24";
|
|
31650
|
+
Runtime["Deno135"] = "deno-1.35";
|
|
30245
31651
|
Runtime["Deno140"] = "deno-1.40";
|
|
30246
31652
|
Runtime["Deno146"] = "deno-1.46";
|
|
30247
31653
|
Runtime["Deno20"] = "deno-2.0";
|
|
@@ -30256,6 +31662,7 @@
|
|
|
30256
31662
|
Runtime["Dart35"] = "dart-3.5";
|
|
30257
31663
|
Runtime["Dart38"] = "dart-3.8";
|
|
30258
31664
|
Runtime["Dart39"] = "dart-3.9";
|
|
31665
|
+
Runtime["Dart310"] = "dart-3.10";
|
|
30259
31666
|
Runtime["Dotnet60"] = "dotnet-6.0";
|
|
30260
31667
|
Runtime["Dotnet70"] = "dotnet-7.0";
|
|
30261
31668
|
Runtime["Dotnet80"] = "dotnet-8.0";
|
|
@@ -30284,8 +31691,95 @@
|
|
|
30284
31691
|
Runtime["Flutter329"] = "flutter-3.29";
|
|
30285
31692
|
Runtime["Flutter332"] = "flutter-3.32";
|
|
30286
31693
|
Runtime["Flutter335"] = "flutter-3.35";
|
|
31694
|
+
Runtime["Flutter338"] = "flutter-3.38";
|
|
30287
31695
|
})(exports.Runtime || (exports.Runtime = {}));
|
|
30288
31696
|
|
|
31697
|
+
exports.Runtimes = void 0;
|
|
31698
|
+
(function (Runtimes) {
|
|
31699
|
+
Runtimes["Node145"] = "node-14.5";
|
|
31700
|
+
Runtimes["Node160"] = "node-16.0";
|
|
31701
|
+
Runtimes["Node180"] = "node-18.0";
|
|
31702
|
+
Runtimes["Node190"] = "node-19.0";
|
|
31703
|
+
Runtimes["Node200"] = "node-20.0";
|
|
31704
|
+
Runtimes["Node210"] = "node-21.0";
|
|
31705
|
+
Runtimes["Node22"] = "node-22";
|
|
31706
|
+
Runtimes["Php80"] = "php-8.0";
|
|
31707
|
+
Runtimes["Php81"] = "php-8.1";
|
|
31708
|
+
Runtimes["Php82"] = "php-8.2";
|
|
31709
|
+
Runtimes["Php83"] = "php-8.3";
|
|
31710
|
+
Runtimes["Ruby30"] = "ruby-3.0";
|
|
31711
|
+
Runtimes["Ruby31"] = "ruby-3.1";
|
|
31712
|
+
Runtimes["Ruby32"] = "ruby-3.2";
|
|
31713
|
+
Runtimes["Ruby33"] = "ruby-3.3";
|
|
31714
|
+
Runtimes["Python38"] = "python-3.8";
|
|
31715
|
+
Runtimes["Python39"] = "python-3.9";
|
|
31716
|
+
Runtimes["Python310"] = "python-3.10";
|
|
31717
|
+
Runtimes["Python311"] = "python-3.11";
|
|
31718
|
+
Runtimes["Python312"] = "python-3.12";
|
|
31719
|
+
Runtimes["Pythonml311"] = "python-ml-3.11";
|
|
31720
|
+
Runtimes["Pythonml312"] = "python-ml-3.12";
|
|
31721
|
+
Runtimes["Deno121"] = "deno-1.21";
|
|
31722
|
+
Runtimes["Deno124"] = "deno-1.24";
|
|
31723
|
+
Runtimes["Deno135"] = "deno-1.35";
|
|
31724
|
+
Runtimes["Deno140"] = "deno-1.40";
|
|
31725
|
+
Runtimes["Deno146"] = "deno-1.46";
|
|
31726
|
+
Runtimes["Deno20"] = "deno-2.0";
|
|
31727
|
+
Runtimes["Dart215"] = "dart-2.15";
|
|
31728
|
+
Runtimes["Dart216"] = "dart-2.16";
|
|
31729
|
+
Runtimes["Dart217"] = "dart-2.17";
|
|
31730
|
+
Runtimes["Dart218"] = "dart-2.18";
|
|
31731
|
+
Runtimes["Dart219"] = "dart-2.19";
|
|
31732
|
+
Runtimes["Dart30"] = "dart-3.0";
|
|
31733
|
+
Runtimes["Dart31"] = "dart-3.1";
|
|
31734
|
+
Runtimes["Dart33"] = "dart-3.3";
|
|
31735
|
+
Runtimes["Dart35"] = "dart-3.5";
|
|
31736
|
+
Runtimes["Dart38"] = "dart-3.8";
|
|
31737
|
+
Runtimes["Dart39"] = "dart-3.9";
|
|
31738
|
+
Runtimes["Dart310"] = "dart-3.10";
|
|
31739
|
+
Runtimes["Dotnet60"] = "dotnet-6.0";
|
|
31740
|
+
Runtimes["Dotnet70"] = "dotnet-7.0";
|
|
31741
|
+
Runtimes["Dotnet80"] = "dotnet-8.0";
|
|
31742
|
+
Runtimes["Java80"] = "java-8.0";
|
|
31743
|
+
Runtimes["Java110"] = "java-11.0";
|
|
31744
|
+
Runtimes["Java170"] = "java-17.0";
|
|
31745
|
+
Runtimes["Java180"] = "java-18.0";
|
|
31746
|
+
Runtimes["Java210"] = "java-21.0";
|
|
31747
|
+
Runtimes["Java22"] = "java-22";
|
|
31748
|
+
Runtimes["Swift55"] = "swift-5.5";
|
|
31749
|
+
Runtimes["Swift58"] = "swift-5.8";
|
|
31750
|
+
Runtimes["Swift59"] = "swift-5.9";
|
|
31751
|
+
Runtimes["Swift510"] = "swift-5.10";
|
|
31752
|
+
Runtimes["Kotlin16"] = "kotlin-1.6";
|
|
31753
|
+
Runtimes["Kotlin18"] = "kotlin-1.8";
|
|
31754
|
+
Runtimes["Kotlin19"] = "kotlin-1.9";
|
|
31755
|
+
Runtimes["Kotlin20"] = "kotlin-2.0";
|
|
31756
|
+
Runtimes["Cpp17"] = "cpp-17";
|
|
31757
|
+
Runtimes["Cpp20"] = "cpp-20";
|
|
31758
|
+
Runtimes["Bun10"] = "bun-1.0";
|
|
31759
|
+
Runtimes["Bun11"] = "bun-1.1";
|
|
31760
|
+
Runtimes["Go123"] = "go-1.23";
|
|
31761
|
+
Runtimes["Static1"] = "static-1";
|
|
31762
|
+
Runtimes["Flutter324"] = "flutter-3.24";
|
|
31763
|
+
Runtimes["Flutter327"] = "flutter-3.27";
|
|
31764
|
+
Runtimes["Flutter329"] = "flutter-3.29";
|
|
31765
|
+
Runtimes["Flutter332"] = "flutter-3.32";
|
|
31766
|
+
Runtimes["Flutter335"] = "flutter-3.35";
|
|
31767
|
+
Runtimes["Flutter338"] = "flutter-3.38";
|
|
31768
|
+
})(exports.Runtimes || (exports.Runtimes = {}));
|
|
31769
|
+
|
|
31770
|
+
exports.UseCases = void 0;
|
|
31771
|
+
(function (UseCases) {
|
|
31772
|
+
UseCases["Portfolio"] = "portfolio";
|
|
31773
|
+
UseCases["Starter"] = "starter";
|
|
31774
|
+
UseCases["Events"] = "events";
|
|
31775
|
+
UseCases["Ecommerce"] = "ecommerce";
|
|
31776
|
+
UseCases["Documentation"] = "documentation";
|
|
31777
|
+
UseCases["Blog"] = "blog";
|
|
31778
|
+
UseCases["Ai"] = "ai";
|
|
31779
|
+
UseCases["Forms"] = "forms";
|
|
31780
|
+
UseCases["Dashboard"] = "dashboard";
|
|
31781
|
+
})(exports.UseCases || (exports.UseCases = {}));
|
|
31782
|
+
|
|
30289
31783
|
exports.TemplateReferenceType = void 0;
|
|
30290
31784
|
(function (TemplateReferenceType) {
|
|
30291
31785
|
TemplateReferenceType["Branch"] = "branch";
|
|
@@ -30347,24 +31841,20 @@
|
|
|
30347
31841
|
SmtpEncryption["Tls"] = "tls";
|
|
30348
31842
|
})(exports.SmtpEncryption || (exports.SmtpEncryption = {}));
|
|
30349
31843
|
|
|
30350
|
-
exports.
|
|
30351
|
-
(function (
|
|
30352
|
-
|
|
30353
|
-
|
|
30354
|
-
|
|
30355
|
-
|
|
30356
|
-
|
|
30357
|
-
|
|
30358
|
-
|
|
30359
|
-
|
|
30360
|
-
|
|
30361
|
-
|
|
30362
|
-
|
|
30363
|
-
|
|
30364
|
-
BillingPlan["Imaginetier11100"] = "imagine-tier-1-1100";
|
|
30365
|
-
BillingPlan["Imaginetier11650"] = "imagine-tier-1-1650";
|
|
30366
|
-
BillingPlan["Imaginetier12200"] = "imagine-tier-1-2200";
|
|
30367
|
-
})(exports.BillingPlan || (exports.BillingPlan = {}));
|
|
31844
|
+
exports.Resources = void 0;
|
|
31845
|
+
(function (Resources) {
|
|
31846
|
+
Resources["User"] = "user";
|
|
31847
|
+
Resources["Database"] = "database";
|
|
31848
|
+
Resources["Table"] = "table";
|
|
31849
|
+
Resources["Column"] = "column";
|
|
31850
|
+
Resources["Index"] = "index";
|
|
31851
|
+
Resources["Row"] = "row";
|
|
31852
|
+
Resources["Document"] = "document";
|
|
31853
|
+
Resources["Attribute"] = "attribute";
|
|
31854
|
+
Resources["Collection"] = "collection";
|
|
31855
|
+
Resources["Bucket"] = "bucket";
|
|
31856
|
+
Resources["File"] = "file";
|
|
31857
|
+
})(exports.Resources || (exports.Resources = {}));
|
|
30368
31858
|
|
|
30369
31859
|
exports.ProjectUsageRange = void 0;
|
|
30370
31860
|
(function (ProjectUsageRange) {
|
|
@@ -30442,12 +31932,6 @@
|
|
|
30442
31932
|
SMTPSecure["Ssl"] = "ssl";
|
|
30443
31933
|
})(exports.SMTPSecure || (exports.SMTPSecure = {}));
|
|
30444
31934
|
|
|
30445
|
-
exports.Status = void 0;
|
|
30446
|
-
(function (Status) {
|
|
30447
|
-
Status["Active"] = "active";
|
|
30448
|
-
Status["Archived"] = "archived";
|
|
30449
|
-
})(exports.Status || (exports.Status = {}));
|
|
30450
|
-
|
|
30451
31935
|
exports.EmailTemplateType = void 0;
|
|
30452
31936
|
(function (EmailTemplateType) {
|
|
30453
31937
|
EmailTemplateType["Verification"] = "verification";
|
|
@@ -30794,6 +32278,9 @@
|
|
|
30794
32278
|
BuildRuntime["Python312"] = "python-3.12";
|
|
30795
32279
|
BuildRuntime["Pythonml311"] = "python-ml-3.11";
|
|
30796
32280
|
BuildRuntime["Pythonml312"] = "python-ml-3.12";
|
|
32281
|
+
BuildRuntime["Deno121"] = "deno-1.21";
|
|
32282
|
+
BuildRuntime["Deno124"] = "deno-1.24";
|
|
32283
|
+
BuildRuntime["Deno135"] = "deno-1.35";
|
|
30797
32284
|
BuildRuntime["Deno140"] = "deno-1.40";
|
|
30798
32285
|
BuildRuntime["Deno146"] = "deno-1.46";
|
|
30799
32286
|
BuildRuntime["Deno20"] = "deno-2.0";
|
|
@@ -30808,6 +32295,7 @@
|
|
|
30808
32295
|
BuildRuntime["Dart35"] = "dart-3.5";
|
|
30809
32296
|
BuildRuntime["Dart38"] = "dart-3.8";
|
|
30810
32297
|
BuildRuntime["Dart39"] = "dart-3.9";
|
|
32298
|
+
BuildRuntime["Dart310"] = "dart-3.10";
|
|
30811
32299
|
BuildRuntime["Dotnet60"] = "dotnet-6.0";
|
|
30812
32300
|
BuildRuntime["Dotnet70"] = "dotnet-7.0";
|
|
30813
32301
|
BuildRuntime["Dotnet80"] = "dotnet-8.0";
|
|
@@ -30836,6 +32324,7 @@
|
|
|
30836
32324
|
BuildRuntime["Flutter329"] = "flutter-3.29";
|
|
30837
32325
|
BuildRuntime["Flutter332"] = "flutter-3.32";
|
|
30838
32326
|
BuildRuntime["Flutter335"] = "flutter-3.35";
|
|
32327
|
+
BuildRuntime["Flutter338"] = "flutter-3.38";
|
|
30839
32328
|
})(exports.BuildRuntime || (exports.BuildRuntime = {}));
|
|
30840
32329
|
|
|
30841
32330
|
exports.Adapter = void 0;
|
|
@@ -30844,6 +32333,25 @@
|
|
|
30844
32333
|
Adapter["Ssr"] = "ssr";
|
|
30845
32334
|
})(exports.Adapter || (exports.Adapter = {}));
|
|
30846
32335
|
|
|
32336
|
+
exports.Frameworks = void 0;
|
|
32337
|
+
(function (Frameworks) {
|
|
32338
|
+
Frameworks["Analog"] = "analog";
|
|
32339
|
+
Frameworks["Angular"] = "angular";
|
|
32340
|
+
Frameworks["Nextjs"] = "nextjs";
|
|
32341
|
+
Frameworks["React"] = "react";
|
|
32342
|
+
Frameworks["Nuxt"] = "nuxt";
|
|
32343
|
+
Frameworks["Vue"] = "vue";
|
|
32344
|
+
Frameworks["Sveltekit"] = "sveltekit";
|
|
32345
|
+
Frameworks["Astro"] = "astro";
|
|
32346
|
+
Frameworks["Tanstackstart"] = "tanstack-start";
|
|
32347
|
+
Frameworks["Remix"] = "remix";
|
|
32348
|
+
Frameworks["Lynx"] = "lynx";
|
|
32349
|
+
Frameworks["Flutter"] = "flutter";
|
|
32350
|
+
Frameworks["Reactnative"] = "react-native";
|
|
32351
|
+
Frameworks["Vite"] = "vite";
|
|
32352
|
+
Frameworks["Other"] = "other";
|
|
32353
|
+
})(exports.Frameworks || (exports.Frameworks = {}));
|
|
32354
|
+
|
|
30847
32355
|
exports.Compression = void 0;
|
|
30848
32356
|
(function (Compression) {
|
|
30849
32357
|
Compression["None"] = "none";
|
|
@@ -30931,6 +32439,7 @@
|
|
|
30931
32439
|
DeploymentStatus["Processing"] = "processing";
|
|
30932
32440
|
DeploymentStatus["Building"] = "building";
|
|
30933
32441
|
DeploymentStatus["Ready"] = "ready";
|
|
32442
|
+
DeploymentStatus["Canceled"] = "canceled";
|
|
30934
32443
|
DeploymentStatus["Failed"] = "failed";
|
|
30935
32444
|
})(exports.DeploymentStatus || (exports.DeploymentStatus = {}));
|
|
30936
32445
|
|