@appwrite.io/console 2.2.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +412 -202
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +412 -203
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +412 -202
- package/docs/examples/account/create-anonymous-session.md +2 -0
- package/docs/examples/account/create-billing-address.md +2 -0
- package/docs/examples/account/create-email-password-session.md +2 -0
- package/docs/examples/account/create-email-token.md +2 -0
- package/docs/examples/account/create-email-verification.md +2 -0
- package/docs/examples/account/create-jwt.md +2 -0
- package/docs/examples/account/create-key.md +2 -0
- package/docs/examples/account/create-magic-url-token.md +2 -0
- package/docs/examples/account/create-mfa-authenticator.md +2 -0
- package/docs/examples/account/create-mfa-challenge.md +2 -0
- package/docs/examples/account/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/account/create-o-auth-2-session.md +2 -0
- package/docs/examples/account/create-o-auth-2-token.md +2 -0
- package/docs/examples/account/create-payment-method.md +2 -0
- package/docs/examples/account/create-phone-token.md +2 -0
- package/docs/examples/account/create-phone-verification.md +2 -0
- package/docs/examples/account/create-push-target.md +2 -0
- package/docs/examples/account/create-recovery.md +2 -0
- package/docs/examples/account/create-session.md +2 -0
- package/docs/examples/account/create-verification.md +2 -0
- package/docs/examples/account/create.md +2 -0
- package/docs/examples/account/delete-billing-address.md +2 -0
- package/docs/examples/account/delete-identity.md +2 -0
- package/docs/examples/account/delete-key.md +2 -0
- package/docs/examples/account/delete-mfa-authenticator.md +2 -0
- package/docs/examples/account/delete-payment-method.md +2 -0
- package/docs/examples/account/delete-push-target.md +2 -0
- package/docs/examples/account/delete-session.md +2 -0
- package/docs/examples/account/delete-sessions.md +2 -0
- package/docs/examples/account/delete.md +2 -0
- package/docs/examples/account/get-billing-address.md +2 -0
- package/docs/examples/account/get-coupon.md +2 -0
- package/docs/examples/account/get-key.md +2 -0
- package/docs/examples/account/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/account/get-payment-method.md +2 -0
- package/docs/examples/account/get-prefs.md +2 -0
- package/docs/examples/account/get-session.md +2 -0
- package/docs/examples/account/get.md +2 -0
- package/docs/examples/account/list-billing-addresses.md +2 -0
- package/docs/examples/account/list-identities.md +2 -0
- package/docs/examples/account/list-invoices.md +2 -0
- package/docs/examples/account/list-keys.md +2 -0
- package/docs/examples/account/list-logs.md +2 -0
- package/docs/examples/account/list-mfa-factors.md +2 -0
- package/docs/examples/account/list-payment-methods.md +2 -0
- package/docs/examples/account/list-sessions.md +2 -0
- package/docs/examples/account/update-billing-address.md +2 -0
- package/docs/examples/account/update-email-verification.md +2 -0
- package/docs/examples/account/update-email.md +2 -0
- package/docs/examples/account/update-key.md +2 -0
- package/docs/examples/account/update-magic-url-session.md +2 -0
- package/docs/examples/account/update-mfa-authenticator.md +2 -0
- package/docs/examples/account/update-mfa-challenge.md +2 -0
- package/docs/examples/account/update-mfa-recovery-codes.md +2 -0
- package/docs/examples/account/update-mfa.md +2 -0
- package/docs/examples/account/update-name.md +2 -0
- package/docs/examples/account/update-password.md +2 -0
- package/docs/examples/account/update-payment-method-mandate-options.md +2 -0
- package/docs/examples/account/update-payment-method-provider.md +2 -0
- package/docs/examples/account/update-payment-method.md +2 -0
- package/docs/examples/account/update-phone-session.md +2 -0
- package/docs/examples/account/update-phone-verification.md +2 -0
- package/docs/examples/account/update-phone.md +2 -0
- package/docs/examples/account/update-prefs.md +2 -0
- package/docs/examples/account/update-push-target.md +2 -0
- package/docs/examples/account/update-recovery.md +2 -0
- package/docs/examples/account/update-session.md +2 -0
- package/docs/examples/account/update-status.md +2 -0
- package/docs/examples/account/update-verification.md +2 -0
- package/docs/examples/activities/get-event.md +15 -0
- package/docs/examples/activities/list-events.md +15 -0
- package/docs/examples/assistant/chat.md +2 -0
- package/docs/examples/avatars/get-browser.md +2 -0
- package/docs/examples/avatars/get-credit-card.md +2 -0
- package/docs/examples/avatars/get-favicon.md +2 -0
- package/docs/examples/avatars/get-flag.md +2 -0
- package/docs/examples/avatars/get-image.md +2 -0
- package/docs/examples/avatars/get-initials.md +2 -0
- package/docs/examples/avatars/get-qr.md +2 -0
- package/docs/examples/avatars/get-screenshot.md +2 -0
- package/docs/examples/backups/create-archive.md +4 -2
- package/docs/examples/backups/create-policy.md +4 -2
- package/docs/examples/backups/create-restoration.md +4 -2
- package/docs/examples/backups/delete-archive.md +2 -0
- package/docs/examples/backups/delete-policy.md +2 -0
- package/docs/examples/backups/get-archive.md +2 -0
- package/docs/examples/backups/get-policy.md +2 -0
- package/docs/examples/backups/get-restoration.md +2 -0
- package/docs/examples/backups/list-archives.md +2 -0
- package/docs/examples/backups/list-policies.md +2 -0
- package/docs/examples/backups/list-restorations.md +2 -0
- package/docs/examples/backups/update-policy.md +2 -0
- package/docs/examples/console/create-program-membership.md +2 -0
- package/docs/examples/console/create-source.md +2 -0
- package/docs/examples/console/get-campaign.md +2 -0
- package/docs/examples/console/get-coupon.md +2 -0
- package/docs/examples/console/get-plan.md +2 -0
- package/docs/examples/console/get-plans.md +2 -0
- package/docs/examples/console/get-program.md +2 -0
- package/docs/examples/console/get-resource.md +2 -0
- package/docs/examples/console/list-regions.md +2 -0
- package/docs/examples/console/suggest-columns.md +2 -0
- package/docs/examples/console/suggest-indexes.md +2 -0
- package/docs/examples/console/variables.md +2 -0
- package/docs/examples/databases/create-boolean-attribute.md +2 -0
- package/docs/examples/databases/create-collection.md +2 -0
- package/docs/examples/databases/create-datetime-attribute.md +2 -0
- package/docs/examples/databases/create-document.md +2 -0
- package/docs/examples/databases/create-documents.md +2 -0
- package/docs/examples/databases/create-email-attribute.md +2 -0
- package/docs/examples/databases/create-enum-attribute.md +2 -0
- package/docs/examples/databases/create-float-attribute.md +2 -0
- package/docs/examples/databases/create-index.md +2 -0
- package/docs/examples/databases/create-integer-attribute.md +2 -0
- package/docs/examples/databases/create-ip-attribute.md +2 -0
- package/docs/examples/databases/create-line-attribute.md +2 -0
- package/docs/examples/databases/create-longtext-attribute.md +4 -1
- package/docs/examples/databases/create-mediumtext-attribute.md +4 -1
- package/docs/examples/databases/create-operations.md +2 -0
- package/docs/examples/databases/create-point-attribute.md +2 -0
- package/docs/examples/databases/create-polygon-attribute.md +2 -0
- package/docs/examples/databases/create-relationship-attribute.md +2 -0
- package/docs/examples/databases/create-string-attribute.md +2 -0
- package/docs/examples/databases/create-text-attribute.md +4 -1
- package/docs/examples/databases/create-transaction.md +2 -0
- package/docs/examples/databases/create-url-attribute.md +2 -0
- package/docs/examples/databases/create-varchar-attribute.md +4 -1
- package/docs/examples/databases/create.md +2 -0
- package/docs/examples/databases/decrement-document-attribute.md +2 -0
- package/docs/examples/databases/delete-attribute.md +2 -0
- package/docs/examples/databases/delete-collection.md +2 -0
- package/docs/examples/databases/delete-document.md +2 -0
- package/docs/examples/databases/delete-documents.md +2 -0
- package/docs/examples/databases/delete-index.md +2 -0
- package/docs/examples/databases/delete-transaction.md +2 -0
- package/docs/examples/databases/delete.md +2 -0
- package/docs/examples/databases/get-attribute.md +2 -0
- package/docs/examples/databases/get-collection-usage.md +2 -0
- package/docs/examples/databases/get-collection.md +2 -0
- package/docs/examples/databases/get-document.md +2 -0
- package/docs/examples/databases/get-index.md +2 -0
- package/docs/examples/databases/get-transaction.md +2 -0
- package/docs/examples/databases/get-usage.md +2 -0
- package/docs/examples/databases/get.md +2 -0
- package/docs/examples/databases/increment-document-attribute.md +2 -0
- package/docs/examples/databases/list-attributes.md +2 -0
- package/docs/examples/databases/list-collection-logs.md +2 -0
- package/docs/examples/databases/list-collections.md +2 -0
- package/docs/examples/databases/list-document-logs.md +2 -0
- package/docs/examples/databases/list-documents.md +2 -0
- package/docs/examples/databases/list-indexes.md +2 -0
- package/docs/examples/databases/list-logs.md +2 -0
- package/docs/examples/databases/list-transactions.md +2 -0
- package/docs/examples/databases/list-usage.md +2 -0
- package/docs/examples/databases/list.md +2 -0
- package/docs/examples/databases/update-boolean-attribute.md +2 -0
- package/docs/examples/databases/update-collection.md +2 -0
- package/docs/examples/databases/update-datetime-attribute.md +2 -0
- package/docs/examples/databases/update-document.md +2 -0
- package/docs/examples/databases/update-documents.md +2 -0
- package/docs/examples/databases/update-email-attribute.md +2 -0
- package/docs/examples/databases/update-enum-attribute.md +2 -0
- package/docs/examples/databases/update-float-attribute.md +2 -0
- package/docs/examples/databases/update-integer-attribute.md +2 -0
- package/docs/examples/databases/update-ip-attribute.md +2 -0
- package/docs/examples/databases/update-line-attribute.md +2 -0
- package/docs/examples/databases/update-longtext-attribute.md +2 -0
- package/docs/examples/databases/update-mediumtext-attribute.md +2 -0
- package/docs/examples/databases/update-point-attribute.md +2 -0
- package/docs/examples/databases/update-polygon-attribute.md +2 -0
- package/docs/examples/databases/update-relationship-attribute.md +2 -0
- package/docs/examples/databases/update-string-attribute.md +2 -0
- package/docs/examples/databases/update-text-attribute.md +2 -0
- package/docs/examples/databases/update-transaction.md +2 -0
- package/docs/examples/databases/update-url-attribute.md +2 -0
- package/docs/examples/databases/update-varchar-attribute.md +2 -0
- package/docs/examples/databases/update.md +2 -0
- package/docs/examples/databases/upsert-document.md +2 -0
- package/docs/examples/databases/upsert-documents.md +2 -0
- package/docs/examples/domains/create-preset-google-workspace.md +2 -0
- package/docs/examples/domains/create-preset-i-cloud.md +2 -0
- package/docs/examples/domains/create-preset-mailgun.md +2 -0
- package/docs/examples/domains/create-preset-outlook.md +2 -0
- package/docs/examples/domains/create-preset-proton-mail.md +2 -0
- package/docs/examples/domains/create-preset-zoho.md +2 -0
- package/docs/examples/domains/create-record-a.md +2 -0
- package/docs/examples/domains/create-record-aaaa.md +2 -0
- package/docs/examples/domains/create-record-alias.md +2 -0
- package/docs/examples/domains/create-record-caa.md +2 -0
- package/docs/examples/domains/create-record-cname.md +2 -0
- package/docs/examples/domains/create-record-https.md +2 -0
- package/docs/examples/domains/create-record-mx.md +2 -0
- package/docs/examples/domains/create-record-ns.md +2 -0
- package/docs/examples/domains/create-record-srv.md +2 -0
- package/docs/examples/domains/create-record-txt.md +2 -0
- package/docs/examples/domains/create.md +2 -0
- package/docs/examples/domains/delete-record.md +2 -0
- package/docs/examples/domains/delete.md +2 -0
- package/docs/examples/domains/get-preset-google-workspace.md +2 -0
- package/docs/examples/domains/get-preset-i-cloud.md +2 -0
- package/docs/examples/domains/get-preset-mailgun.md +2 -0
- package/docs/examples/domains/get-preset-outlook.md +2 -0
- package/docs/examples/domains/get-preset-proton-mail.md +2 -0
- package/docs/examples/domains/get-preset-zoho.md +2 -0
- package/docs/examples/domains/get-price.md +17 -0
- package/docs/examples/domains/get-record.md +2 -0
- package/docs/examples/domains/get-zone.md +2 -0
- package/docs/examples/domains/get.md +2 -0
- package/docs/examples/domains/list-records.md +2 -0
- package/docs/examples/domains/list-suggestions.md +2 -0
- package/docs/examples/domains/list.md +2 -0
- package/docs/examples/domains/update-nameservers.md +2 -0
- package/docs/examples/domains/update-record-a.md +2 -0
- package/docs/examples/domains/update-record-aaaa.md +2 -0
- package/docs/examples/domains/update-record-alias.md +2 -0
- package/docs/examples/domains/update-record-caa.md +2 -0
- package/docs/examples/domains/update-record-cname.md +2 -0
- package/docs/examples/domains/update-record-https.md +2 -0
- package/docs/examples/domains/update-record-mx.md +2 -0
- package/docs/examples/domains/update-record-ns.md +2 -0
- package/docs/examples/domains/update-record-srv.md +2 -0
- package/docs/examples/domains/update-record-txt.md +2 -0
- package/docs/examples/domains/update-team.md +2 -0
- package/docs/examples/domains/update-zone.md +2 -0
- package/docs/examples/functions/create-deployment.md +2 -0
- package/docs/examples/functions/create-duplicate-deployment.md +2 -0
- package/docs/examples/functions/create-execution.md +2 -0
- package/docs/examples/functions/create-template-deployment.md +2 -0
- package/docs/examples/functions/create-variable.md +2 -0
- package/docs/examples/functions/create-vcs-deployment.md +2 -0
- package/docs/examples/functions/create.md +2 -0
- package/docs/examples/functions/delete-deployment.md +2 -0
- package/docs/examples/functions/delete-execution.md +2 -0
- package/docs/examples/functions/delete-variable.md +2 -0
- package/docs/examples/functions/delete.md +2 -0
- package/docs/examples/functions/get-deployment-download.md +2 -0
- package/docs/examples/functions/get-deployment.md +2 -0
- package/docs/examples/functions/get-execution.md +2 -0
- package/docs/examples/functions/get-template.md +2 -0
- package/docs/examples/functions/get-usage.md +2 -0
- package/docs/examples/functions/get-variable.md +2 -0
- package/docs/examples/functions/get.md +2 -0
- package/docs/examples/functions/list-deployments.md +2 -0
- package/docs/examples/functions/list-executions.md +2 -0
- package/docs/examples/functions/list-runtimes.md +2 -0
- package/docs/examples/functions/list-specifications.md +2 -0
- package/docs/examples/functions/list-templates.md +2 -0
- package/docs/examples/functions/list-usage.md +2 -0
- package/docs/examples/functions/list-variables.md +2 -0
- package/docs/examples/functions/list.md +2 -0
- package/docs/examples/functions/update-deployment-status.md +2 -0
- package/docs/examples/functions/update-function-deployment.md +2 -0
- package/docs/examples/functions/update-variable.md +2 -0
- package/docs/examples/functions/update.md +2 -0
- package/docs/examples/graphql/mutation.md +2 -0
- package/docs/examples/graphql/query.md +2 -0
- package/docs/examples/health/get-antivirus.md +2 -0
- package/docs/examples/health/get-cache.md +2 -0
- package/docs/examples/health/get-certificate.md +2 -0
- package/docs/examples/health/get-db.md +2 -0
- package/docs/examples/health/get-failed-jobs.md +2 -0
- package/docs/examples/health/get-pub-sub.md +2 -0
- package/docs/examples/health/get-queue-audits.md +2 -0
- package/docs/examples/health/get-queue-billing-project-aggregation.md +2 -0
- package/docs/examples/health/get-queue-billing-team-aggregation.md +2 -0
- package/docs/examples/health/get-queue-builds.md +2 -0
- package/docs/examples/health/get-queue-certificates.md +2 -0
- package/docs/examples/health/get-queue-databases.md +2 -0
- package/docs/examples/health/get-queue-deletes.md +2 -0
- package/docs/examples/health/get-queue-functions.md +2 -0
- package/docs/examples/health/get-queue-logs.md +2 -0
- package/docs/examples/health/get-queue-mails.md +2 -0
- package/docs/examples/health/get-queue-messaging.md +2 -0
- package/docs/examples/health/get-queue-migrations.md +2 -0
- package/docs/examples/health/get-queue-priority-builds.md +2 -0
- package/docs/examples/health/get-queue-region-manager.md +2 -0
- package/docs/examples/health/get-queue-stats-resources.md +2 -0
- package/docs/examples/health/get-queue-threats.md +2 -0
- package/docs/examples/health/get-queue-usage.md +2 -0
- package/docs/examples/health/get-queue-webhooks.md +2 -0
- package/docs/examples/health/get-storage-local.md +2 -0
- package/docs/examples/health/get-storage.md +2 -0
- package/docs/examples/health/get-time.md +2 -0
- package/docs/examples/health/get.md +2 -0
- package/docs/examples/locale/get.md +2 -0
- package/docs/examples/locale/list-codes.md +2 -0
- package/docs/examples/locale/list-continents.md +2 -0
- package/docs/examples/locale/list-countries-eu.md +2 -0
- package/docs/examples/locale/list-countries-phones.md +2 -0
- package/docs/examples/locale/list-countries.md +2 -0
- package/docs/examples/locale/list-currencies.md +2 -0
- package/docs/examples/locale/list-languages.md +2 -0
- package/docs/examples/messaging/create-apns-provider.md +2 -0
- package/docs/examples/messaging/create-email.md +2 -0
- package/docs/examples/messaging/create-fcm-provider.md +2 -0
- package/docs/examples/messaging/create-mailgun-provider.md +2 -0
- package/docs/examples/messaging/create-msg-91-provider.md +2 -0
- package/docs/examples/messaging/create-push.md +2 -0
- package/docs/examples/messaging/create-resend-provider.md +2 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +2 -0
- package/docs/examples/messaging/create-sms.md +2 -0
- package/docs/examples/messaging/create-smtp-provider.md +2 -0
- package/docs/examples/messaging/create-subscriber.md +2 -0
- package/docs/examples/messaging/create-telesign-provider.md +2 -0
- package/docs/examples/messaging/create-textmagic-provider.md +2 -0
- package/docs/examples/messaging/create-topic.md +2 -0
- package/docs/examples/messaging/create-twilio-provider.md +2 -0
- package/docs/examples/messaging/create-vonage-provider.md +2 -0
- package/docs/examples/messaging/delete-provider.md +2 -0
- package/docs/examples/messaging/delete-subscriber.md +2 -0
- package/docs/examples/messaging/delete-topic.md +2 -0
- package/docs/examples/messaging/delete.md +2 -0
- package/docs/examples/messaging/get-message.md +2 -0
- package/docs/examples/messaging/get-provider.md +2 -0
- package/docs/examples/messaging/get-subscriber.md +2 -0
- package/docs/examples/messaging/get-topic.md +2 -0
- package/docs/examples/messaging/list-message-logs.md +2 -0
- package/docs/examples/messaging/list-messages.md +2 -0
- package/docs/examples/messaging/list-provider-logs.md +2 -0
- package/docs/examples/messaging/list-providers.md +2 -0
- package/docs/examples/messaging/list-subscriber-logs.md +2 -0
- package/docs/examples/messaging/list-subscribers.md +2 -0
- package/docs/examples/messaging/list-targets.md +2 -0
- package/docs/examples/messaging/list-topic-logs.md +2 -0
- package/docs/examples/messaging/list-topics.md +2 -0
- package/docs/examples/messaging/update-apns-provider.md +2 -0
- package/docs/examples/messaging/update-email.md +2 -0
- package/docs/examples/messaging/update-fcm-provider.md +2 -0
- package/docs/examples/messaging/update-mailgun-provider.md +2 -0
- package/docs/examples/messaging/update-msg-91-provider.md +2 -0
- package/docs/examples/messaging/update-push.md +2 -0
- package/docs/examples/messaging/update-resend-provider.md +2 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +2 -0
- package/docs/examples/messaging/update-sms.md +2 -0
- package/docs/examples/messaging/update-smtp-provider.md +2 -0
- package/docs/examples/messaging/update-telesign-provider.md +2 -0
- package/docs/examples/messaging/update-textmagic-provider.md +2 -0
- package/docs/examples/messaging/update-topic.md +2 -0
- package/docs/examples/messaging/update-twilio-provider.md +2 -0
- package/docs/examples/messaging/update-vonage-provider.md +2 -0
- package/docs/examples/migrations/create-appwrite-migration.md +2 -0
- package/docs/examples/migrations/create-csv-export.md +2 -0
- package/docs/examples/migrations/create-csv-import.md +2 -0
- package/docs/examples/migrations/create-firebase-migration.md +2 -0
- package/docs/examples/migrations/create-n-host-migration.md +2 -0
- package/docs/examples/migrations/create-supabase-migration.md +2 -0
- package/docs/examples/migrations/delete.md +2 -0
- package/docs/examples/migrations/get-appwrite-report.md +2 -0
- package/docs/examples/migrations/get-firebase-report.md +2 -0
- package/docs/examples/migrations/get-n-host-report.md +2 -0
- package/docs/examples/migrations/get-supabase-report.md +2 -0
- package/docs/examples/migrations/get.md +2 -0
- package/docs/examples/migrations/list.md +2 -0
- package/docs/examples/migrations/retry.md +2 -0
- package/docs/examples/organizations/add-credit.md +2 -0
- package/docs/examples/organizations/cancel-downgrade.md +2 -0
- package/docs/examples/organizations/create-downgrade-feedback.md +2 -0
- package/docs/examples/organizations/create-invoice-payment.md +2 -0
- package/docs/examples/organizations/create-key.md +2 -0
- package/docs/examples/organizations/create.md +2 -0
- package/docs/examples/organizations/delete-backup-payment-method.md +2 -0
- package/docs/examples/organizations/delete-billing-address.md +2 -0
- package/docs/examples/organizations/delete-default-payment-method.md +2 -0
- package/docs/examples/organizations/delete-key.md +2 -0
- package/docs/examples/organizations/delete.md +2 -0
- package/docs/examples/organizations/estimation-create-organization.md +2 -0
- package/docs/examples/organizations/estimation-delete-organization.md +2 -0
- package/docs/examples/organizations/estimation-update-plan.md +2 -0
- package/docs/examples/organizations/get-aggregation.md +2 -0
- package/docs/examples/organizations/get-available-credits.md +2 -0
- package/docs/examples/organizations/get-billing-address.md +2 -0
- package/docs/examples/organizations/get-credit.md +2 -0
- package/docs/examples/organizations/get-invoice-download.md +2 -0
- package/docs/examples/organizations/get-invoice-view.md +2 -0
- package/docs/examples/organizations/get-invoice.md +2 -0
- package/docs/examples/organizations/get-key.md +2 -0
- package/docs/examples/organizations/get-payment-method.md +2 -0
- package/docs/examples/organizations/get-plan.md +2 -0
- package/docs/examples/organizations/get-scopes.md +2 -0
- package/docs/examples/organizations/get-usage.md +2 -0
- package/docs/examples/organizations/list-aggregations.md +2 -0
- package/docs/examples/organizations/list-credits.md +2 -0
- package/docs/examples/organizations/list-invoices.md +2 -0
- package/docs/examples/organizations/list-keys.md +2 -0
- package/docs/examples/organizations/list-regions.md +2 -0
- package/docs/examples/organizations/list.md +2 -0
- package/docs/examples/organizations/set-backup-payment-method.md +2 -0
- package/docs/examples/organizations/set-billing-address.md +2 -0
- package/docs/examples/organizations/set-billing-email.md +2 -0
- package/docs/examples/organizations/set-billing-tax-id.md +2 -0
- package/docs/examples/organizations/set-default-payment-method.md +2 -0
- package/docs/examples/organizations/update-budget.md +2 -0
- package/docs/examples/organizations/update-key.md +2 -0
- package/docs/examples/organizations/update-plan.md +2 -0
- package/docs/examples/organizations/validate-invoice.md +2 -0
- package/docs/examples/organizations/validate-payment.md +2 -0
- package/docs/examples/project/create-variable.md +2 -0
- package/docs/examples/project/delete-variable.md +2 -0
- package/docs/examples/project/get-usage.md +2 -0
- package/docs/examples/project/get-variable.md +2 -0
- package/docs/examples/project/list-variables.md +2 -0
- package/docs/examples/project/update-variable.md +2 -0
- package/docs/examples/projects/create-dev-key.md +2 -0
- package/docs/examples/projects/create-jwt.md +2 -0
- package/docs/examples/projects/create-key.md +3 -0
- package/docs/examples/projects/create-platform.md +2 -0
- package/docs/examples/projects/create-smtp-test.md +2 -0
- package/docs/examples/projects/create-webhook.md +2 -0
- package/docs/examples/projects/create.md +2 -0
- package/docs/examples/projects/delete-dev-key.md +2 -0
- package/docs/examples/projects/delete-email-template.md +2 -0
- package/docs/examples/projects/delete-key.md +2 -0
- package/docs/examples/projects/delete-platform.md +2 -0
- package/docs/examples/projects/delete-sms-template.md +2 -0
- package/docs/examples/projects/delete-webhook.md +2 -0
- package/docs/examples/projects/delete.md +2 -0
- package/docs/examples/projects/get-dev-key.md +2 -0
- package/docs/examples/projects/get-email-template.md +2 -0
- package/docs/examples/projects/get-key.md +2 -0
- package/docs/examples/projects/get-platform.md +2 -0
- package/docs/examples/projects/get-sms-template.md +2 -0
- package/docs/examples/projects/get-webhook.md +2 -0
- package/docs/examples/projects/get.md +2 -0
- package/docs/examples/projects/list-dev-keys.md +2 -0
- package/docs/examples/projects/list-keys.md +3 -0
- package/docs/examples/projects/list-platforms.md +2 -0
- package/docs/examples/projects/list-webhooks.md +2 -0
- package/docs/examples/projects/list.md +2 -0
- package/docs/examples/projects/update-api-status-all.md +2 -0
- package/docs/examples/projects/update-api-status.md +2 -0
- package/docs/examples/projects/update-auth-duration.md +2 -0
- package/docs/examples/projects/update-auth-limit.md +2 -0
- package/docs/examples/projects/update-auth-password-dictionary.md +2 -0
- package/docs/examples/projects/update-auth-password-history.md +2 -0
- package/docs/examples/projects/update-auth-sessions-limit.md +2 -0
- package/docs/examples/projects/update-auth-status.md +2 -0
- package/docs/examples/projects/update-dev-key.md +2 -0
- package/docs/examples/projects/update-email-template.md +2 -0
- package/docs/examples/projects/update-key.md +2 -0
- package/docs/examples/projects/update-labels.md +2 -0
- package/docs/examples/projects/update-memberships-privacy.md +2 -0
- package/docs/examples/projects/update-mock-numbers.md +2 -0
- package/docs/examples/projects/update-o-auth-2.md +2 -0
- package/docs/examples/projects/update-personal-data-check.md +2 -0
- package/docs/examples/projects/update-platform.md +2 -0
- package/docs/examples/projects/update-service-status-all.md +2 -0
- package/docs/examples/projects/update-service-status.md +2 -0
- package/docs/examples/projects/update-session-alerts.md +2 -0
- package/docs/examples/projects/update-session-invalidation.md +2 -0
- package/docs/examples/projects/update-sms-template.md +2 -0
- package/docs/examples/projects/update-smtp.md +2 -0
- package/docs/examples/projects/update-team.md +2 -0
- package/docs/examples/projects/update-webhook-signature.md +2 -0
- package/docs/examples/projects/update-webhook.md +2 -0
- package/docs/examples/projects/update.md +2 -0
- package/docs/examples/proxy/create-api-rule.md +2 -0
- package/docs/examples/proxy/create-function-rule.md +2 -0
- package/docs/examples/proxy/create-redirect-rule.md +2 -0
- package/docs/examples/proxy/create-site-rule.md +2 -0
- package/docs/examples/proxy/delete-rule.md +2 -0
- package/docs/examples/proxy/get-rule.md +2 -0
- package/docs/examples/proxy/list-rules.md +2 -0
- package/docs/examples/proxy/update-rule-verification.md +2 -0
- package/docs/examples/sites/create-deployment.md +2 -0
- package/docs/examples/sites/create-duplicate-deployment.md +2 -0
- package/docs/examples/sites/create-template-deployment.md +2 -0
- package/docs/examples/sites/create-variable.md +2 -0
- package/docs/examples/sites/create-vcs-deployment.md +2 -0
- package/docs/examples/sites/create.md +2 -0
- package/docs/examples/sites/delete-deployment.md +2 -0
- package/docs/examples/sites/delete-log.md +2 -0
- package/docs/examples/sites/delete-variable.md +2 -0
- package/docs/examples/sites/delete.md +2 -0
- package/docs/examples/sites/get-deployment-download.md +2 -0
- package/docs/examples/sites/get-deployment.md +2 -0
- package/docs/examples/sites/get-log.md +2 -0
- package/docs/examples/sites/get-template.md +2 -0
- package/docs/examples/sites/get-usage.md +2 -0
- package/docs/examples/sites/get-variable.md +2 -0
- package/docs/examples/sites/get.md +2 -0
- package/docs/examples/sites/list-deployments.md +2 -0
- package/docs/examples/sites/list-frameworks.md +2 -0
- package/docs/examples/sites/list-logs.md +2 -0
- package/docs/examples/sites/list-specifications.md +2 -0
- package/docs/examples/sites/list-templates.md +2 -0
- package/docs/examples/sites/list-usage.md +2 -0
- package/docs/examples/sites/list-variables.md +2 -0
- package/docs/examples/sites/list.md +2 -0
- package/docs/examples/sites/update-deployment-status.md +2 -0
- package/docs/examples/sites/update-site-deployment.md +2 -0
- package/docs/examples/sites/update-variable.md +2 -0
- package/docs/examples/sites/update.md +2 -0
- package/docs/examples/storage/create-bucket.md +2 -0
- package/docs/examples/storage/create-file.md +2 -0
- package/docs/examples/storage/delete-bucket.md +2 -0
- package/docs/examples/storage/delete-file.md +2 -0
- package/docs/examples/storage/get-bucket-usage.md +2 -0
- package/docs/examples/storage/get-bucket.md +2 -0
- package/docs/examples/storage/get-file-download.md +2 -0
- package/docs/examples/storage/get-file-preview.md +2 -0
- package/docs/examples/storage/get-file-view.md +2 -0
- package/docs/examples/storage/get-file.md +2 -0
- package/docs/examples/storage/get-usage.md +2 -0
- package/docs/examples/storage/list-buckets.md +2 -0
- package/docs/examples/storage/list-files.md +2 -0
- package/docs/examples/storage/update-bucket.md +2 -0
- package/docs/examples/storage/update-file.md +2 -0
- package/docs/examples/tablesdb/create-boolean-column.md +2 -0
- package/docs/examples/tablesdb/create-datetime-column.md +2 -0
- package/docs/examples/tablesdb/create-email-column.md +2 -0
- package/docs/examples/tablesdb/create-enum-column.md +2 -0
- package/docs/examples/tablesdb/create-float-column.md +2 -0
- package/docs/examples/tablesdb/create-index.md +2 -0
- package/docs/examples/tablesdb/create-integer-column.md +2 -0
- package/docs/examples/tablesdb/create-ip-column.md +2 -0
- package/docs/examples/tablesdb/create-line-column.md +2 -0
- package/docs/examples/tablesdb/create-longtext-column.md +4 -1
- package/docs/examples/tablesdb/create-mediumtext-column.md +4 -1
- package/docs/examples/tablesdb/create-operations.md +2 -0
- package/docs/examples/tablesdb/create-point-column.md +2 -0
- package/docs/examples/tablesdb/create-polygon-column.md +2 -0
- package/docs/examples/tablesdb/create-relationship-column.md +2 -0
- package/docs/examples/tablesdb/create-row.md +2 -0
- package/docs/examples/tablesdb/create-rows.md +2 -0
- package/docs/examples/tablesdb/create-string-column.md +2 -0
- package/docs/examples/tablesdb/create-table.md +2 -0
- package/docs/examples/tablesdb/create-text-column.md +4 -1
- package/docs/examples/tablesdb/create-transaction.md +2 -0
- package/docs/examples/tablesdb/create-url-column.md +2 -0
- package/docs/examples/tablesdb/create-varchar-column.md +4 -1
- package/docs/examples/tablesdb/create.md +2 -0
- package/docs/examples/tablesdb/decrement-row-column.md +2 -0
- package/docs/examples/tablesdb/delete-column.md +2 -0
- package/docs/examples/tablesdb/delete-index.md +2 -0
- package/docs/examples/tablesdb/delete-row.md +2 -0
- package/docs/examples/tablesdb/delete-rows.md +2 -0
- package/docs/examples/tablesdb/delete-table.md +2 -0
- package/docs/examples/tablesdb/delete-transaction.md +2 -0
- package/docs/examples/tablesdb/delete.md +2 -0
- package/docs/examples/tablesdb/get-column.md +2 -0
- package/docs/examples/tablesdb/get-index.md +2 -0
- package/docs/examples/tablesdb/get-row.md +2 -0
- package/docs/examples/tablesdb/get-table-usage.md +2 -0
- package/docs/examples/tablesdb/get-table.md +2 -0
- package/docs/examples/tablesdb/get-transaction.md +2 -0
- package/docs/examples/tablesdb/get-usage.md +2 -0
- package/docs/examples/tablesdb/get.md +2 -0
- package/docs/examples/tablesdb/increment-row-column.md +2 -0
- package/docs/examples/tablesdb/list-columns.md +2 -0
- package/docs/examples/tablesdb/list-indexes.md +2 -0
- package/docs/examples/tablesdb/list-row-logs.md +2 -0
- package/docs/examples/tablesdb/list-rows.md +2 -0
- package/docs/examples/tablesdb/list-table-logs.md +2 -0
- package/docs/examples/tablesdb/list-tables.md +2 -0
- package/docs/examples/tablesdb/list-transactions.md +2 -0
- package/docs/examples/tablesdb/list-usage.md +2 -0
- package/docs/examples/tablesdb/list.md +2 -0
- package/docs/examples/tablesdb/update-boolean-column.md +2 -0
- package/docs/examples/tablesdb/update-datetime-column.md +2 -0
- package/docs/examples/tablesdb/update-email-column.md +2 -0
- package/docs/examples/tablesdb/update-enum-column.md +2 -0
- package/docs/examples/tablesdb/update-float-column.md +2 -0
- package/docs/examples/tablesdb/update-integer-column.md +2 -0
- package/docs/examples/tablesdb/update-ip-column.md +2 -0
- package/docs/examples/tablesdb/update-line-column.md +2 -0
- package/docs/examples/tablesdb/update-longtext-column.md +2 -0
- package/docs/examples/tablesdb/update-mediumtext-column.md +2 -0
- package/docs/examples/tablesdb/update-point-column.md +2 -0
- package/docs/examples/tablesdb/update-polygon-column.md +2 -0
- package/docs/examples/tablesdb/update-relationship-column.md +2 -0
- package/docs/examples/tablesdb/update-row.md +2 -0
- package/docs/examples/tablesdb/update-rows.md +2 -0
- package/docs/examples/tablesdb/update-string-column.md +2 -0
- package/docs/examples/tablesdb/update-table.md +2 -0
- package/docs/examples/tablesdb/update-text-column.md +2 -0
- package/docs/examples/tablesdb/update-transaction.md +2 -0
- package/docs/examples/tablesdb/update-url-column.md +2 -0
- package/docs/examples/tablesdb/update-varchar-column.md +2 -0
- package/docs/examples/tablesdb/update.md +2 -0
- package/docs/examples/tablesdb/upsert-row.md +2 -0
- package/docs/examples/tablesdb/upsert-rows.md +2 -0
- package/docs/examples/teams/create-membership.md +4 -2
- package/docs/examples/teams/create.md +2 -0
- package/docs/examples/teams/delete-membership.md +2 -0
- package/docs/examples/teams/delete.md +2 -0
- package/docs/examples/teams/get-membership.md +2 -0
- package/docs/examples/teams/get-prefs.md +2 -0
- package/docs/examples/teams/get.md +2 -0
- package/docs/examples/teams/list-logs.md +2 -0
- package/docs/examples/teams/list-memberships.md +2 -0
- package/docs/examples/teams/list.md +2 -0
- package/docs/examples/teams/update-membership-status.md +2 -0
- package/docs/examples/teams/update-membership.md +4 -2
- package/docs/examples/teams/update-name.md +2 -0
- package/docs/examples/teams/update-prefs.md +2 -0
- package/docs/examples/tokens/create-file-token.md +2 -0
- package/docs/examples/tokens/delete.md +2 -0
- package/docs/examples/tokens/get.md +2 -0
- package/docs/examples/tokens/list.md +2 -0
- package/docs/examples/tokens/update.md +2 -0
- package/docs/examples/users/create-argon-2-user.md +2 -0
- package/docs/examples/users/create-bcrypt-user.md +2 -0
- package/docs/examples/users/create-jwt.md +2 -0
- package/docs/examples/users/create-md-5-user.md +2 -0
- package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/create-ph-pass-user.md +2 -0
- package/docs/examples/users/create-scrypt-modified-user.md +2 -0
- package/docs/examples/users/create-scrypt-user.md +2 -0
- package/docs/examples/users/create-session.md +2 -0
- package/docs/examples/users/create-sha-user.md +2 -0
- package/docs/examples/users/create-target.md +2 -0
- package/docs/examples/users/create-token.md +2 -0
- package/docs/examples/users/create.md +2 -0
- package/docs/examples/users/delete-identity.md +2 -0
- package/docs/examples/users/delete-mfa-authenticator.md +2 -0
- package/docs/examples/users/delete-session.md +2 -0
- package/docs/examples/users/delete-sessions.md +2 -0
- package/docs/examples/users/delete-target.md +2 -0
- package/docs/examples/users/delete.md +2 -0
- package/docs/examples/users/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/get-prefs.md +2 -0
- package/docs/examples/users/get-target.md +2 -0
- package/docs/examples/users/get-usage.md +2 -0
- package/docs/examples/users/get.md +2 -0
- package/docs/examples/users/list-identities.md +2 -0
- package/docs/examples/users/list-logs.md +2 -0
- package/docs/examples/users/list-memberships.md +2 -0
- package/docs/examples/users/list-mfa-factors.md +2 -0
- package/docs/examples/users/list-sessions.md +2 -0
- package/docs/examples/users/list-targets.md +2 -0
- package/docs/examples/users/list.md +2 -0
- package/docs/examples/users/update-email-verification.md +2 -0
- package/docs/examples/users/update-email.md +2 -0
- package/docs/examples/users/update-labels.md +2 -0
- package/docs/examples/users/update-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/update-mfa.md +2 -0
- package/docs/examples/users/update-name.md +2 -0
- package/docs/examples/users/update-password.md +2 -0
- package/docs/examples/users/update-phone-verification.md +2 -0
- package/docs/examples/users/update-phone.md +2 -0
- package/docs/examples/users/update-prefs.md +2 -0
- package/docs/examples/users/update-status.md +2 -0
- package/docs/examples/users/update-target.md +2 -0
- package/docs/examples/vcs/create-repository-detection.md +2 -0
- package/docs/examples/vcs/create-repository.md +2 -0
- package/docs/examples/vcs/delete-installation.md +2 -0
- package/docs/examples/vcs/get-installation.md +2 -0
- package/docs/examples/vcs/get-repository-contents.md +2 -0
- package/docs/examples/vcs/get-repository.md +2 -0
- package/docs/examples/vcs/list-installations.md +2 -0
- package/docs/examples/vcs/list-repositories.md +2 -0
- package/docs/examples/vcs/list-repository-branches.md +2 -0
- package/docs/examples/vcs/update-external-deployments.md +2 -0
- package/package.json +1 -1
- package/src/channel.ts +30 -18
- package/src/client.ts +108 -22
- package/src/enums/{services.ts → backup-services.ts} +1 -1
- package/src/enums/build-runtime.ts +2 -0
- package/src/enums/registration-type.ts +6 -0
- package/src/enums/runtime.ts +2 -0
- package/src/enums/runtimes.ts +2 -0
- package/src/enums/scopes.ts +1 -0
- package/src/index.ts +3 -3
- package/src/models.ts +227 -5
- package/src/services/account.ts +11 -11
- package/src/services/activities.ts +116 -0
- package/src/services/avatars.ts +3 -3
- package/src/services/backups.ts +28 -28
- package/src/services/console.ts +1 -1
- package/src/services/databases.ts +57 -29
- package/src/services/domains.ts +70 -0
- package/src/services/functions.ts +2 -2
- package/src/services/graphql.ts +2 -2
- package/src/services/health.ts +1 -1
- package/src/services/migrations.ts +10 -10
- package/src/services/organizations.ts +0 -60
- package/src/services/projects.ts +28 -78
- package/src/services/realtime.ts +135 -58
- package/src/services/sites.ts +2 -2
- package/src/services/storage.ts +1 -1
- package/src/services/tables-db.ts +57 -29
- package/src/services/teams.ts +18 -19
- package/src/services/users.ts +1 -1
- package/types/channel.d.ts +4 -3
- package/types/client.d.ts +7 -2
- package/types/enums/{services.d.ts → backup-services.d.ts} +1 -1
- package/types/enums/build-runtime.d.ts +3 -1
- package/types/enums/registration-type.d.ts +6 -0
- package/types/enums/runtime.d.ts +3 -1
- package/types/enums/runtimes.d.ts +3 -1
- package/types/enums/scopes.d.ts +2 -1
- package/types/index.d.ts +3 -3
- package/types/models.d.ts +224 -5
- package/types/services/activities.d.ts +46 -0
- package/types/services/backups.d.ts +13 -13
- package/types/services/databases.d.ts +16 -4
- package/types/services/domains.d.ts +26 -0
- package/types/services/migrations.d.ts +2 -2
- package/types/services/organizations.d.ts +0 -22
- package/types/services/projects.d.ts +8 -25
- package/types/services/realtime.d.ts +13 -6
- package/types/services/tables-db.d.ts +16 -4
- package/types/services/teams.d.ts +8 -9
- package/docs/examples/organizations/update-projects.md +0 -14
- package/docs/examples/projects/update-status.md +0 -14
- package/src/enums/roles.ts +0 -7
- package/src/enums/status.ts +0 -4
- package/types/enums/roles.d.ts +0 -7
- package/types/enums/status.d.ts +0 -4
package/dist/iife/sdk.js
CHANGED
|
@@ -4279,7 +4279,7 @@
|
|
|
4279
4279
|
'x-sdk-name': 'Console',
|
|
4280
4280
|
'x-sdk-platform': 'console',
|
|
4281
4281
|
'x-sdk-language': 'web',
|
|
4282
|
-
'x-sdk-version': '2.
|
|
4282
|
+
'x-sdk-version': '2.3.1',
|
|
4283
4283
|
'X-Appwrite-Response-Format': '1.8.0',
|
|
4284
4284
|
};
|
|
4285
4285
|
this.realtime = {
|
|
@@ -4288,7 +4288,10 @@
|
|
|
4288
4288
|
heartbeat: undefined,
|
|
4289
4289
|
url: '',
|
|
4290
4290
|
channels: new Set(),
|
|
4291
|
+
queries: new Set(),
|
|
4291
4292
|
subscriptions: new Map(),
|
|
4293
|
+
slotToSubscriptionId: new Map(),
|
|
4294
|
+
subscriptionIdToSlot: new Map(),
|
|
4292
4295
|
subscriptionsCounter: 0,
|
|
4293
4296
|
reconnect: true,
|
|
4294
4297
|
reconnectAttempts: 0,
|
|
@@ -4323,26 +4326,34 @@
|
|
|
4323
4326
|
}, 20000);
|
|
4324
4327
|
},
|
|
4325
4328
|
createSocket: () => {
|
|
4326
|
-
var _a, _b, _c;
|
|
4327
|
-
if (this.realtime.
|
|
4329
|
+
var _a, _b, _c, _d;
|
|
4330
|
+
if (this.realtime.subscriptions.size < 1) {
|
|
4328
4331
|
this.realtime.reconnect = false;
|
|
4329
4332
|
(_a = this.realtime.socket) === null || _a === void 0 ? void 0 : _a.close();
|
|
4330
4333
|
return;
|
|
4331
4334
|
}
|
|
4332
|
-
const
|
|
4333
|
-
|
|
4334
|
-
channels.set('project', this.config.project);
|
|
4335
|
-
}
|
|
4335
|
+
const encodedProject = encodeURIComponent((_b = this.config.project) !== null && _b !== void 0 ? _b : '');
|
|
4336
|
+
let queryParams = 'project=' + encodedProject;
|
|
4336
4337
|
this.realtime.channels.forEach(channel => {
|
|
4337
|
-
|
|
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
|
+
});
|
|
4338
4349
|
});
|
|
4339
|
-
const url = this.config.endpointRealtime + '/realtime?' +
|
|
4350
|
+
const url = this.config.endpointRealtime + '/realtime?' + queryParams;
|
|
4340
4351
|
if (url !== this.realtime.url || // Check if URL is present
|
|
4341
4352
|
!this.realtime.socket || // Check if WebSocket has not been created
|
|
4342
|
-
((
|
|
4353
|
+
((_c = this.realtime.socket) === null || _c === void 0 ? void 0 : _c.readyState) > WebSocket.OPEN // Check if WebSocket is CLOSING (3) or CLOSED (4)
|
|
4343
4354
|
) {
|
|
4344
4355
|
if (this.realtime.socket &&
|
|
4345
|
-
((
|
|
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)
|
|
4346
4357
|
) {
|
|
4347
4358
|
this.realtime.reconnect = false;
|
|
4348
4359
|
this.realtime.socket.close();
|
|
@@ -4378,14 +4389,25 @@
|
|
|
4378
4389
|
const message = JSONbig.parse(event.data);
|
|
4379
4390
|
this.realtime.lastMessage = message;
|
|
4380
4391
|
switch (message.type) {
|
|
4381
|
-
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
|
+
}
|
|
4382
4405
|
let session = this.config.session;
|
|
4383
4406
|
if (!session) {
|
|
4384
4407
|
const cookie = JSONbig.parse((_a = window.localStorage.getItem('cookieFallback')) !== null && _a !== void 0 ? _a : '{}');
|
|
4385
4408
|
session = cookie === null || cookie === void 0 ? void 0 : cookie[`a_session_${this.config.project}`];
|
|
4386
4409
|
}
|
|
4387
|
-
|
|
4388
|
-
if (session && !messageData.user) {
|
|
4410
|
+
if (session && !(messageData === null || messageData === void 0 ? void 0 : messageData.user)) {
|
|
4389
4411
|
(_b = this.realtime.socket) === null || _b === void 0 ? void 0 : _b.send(JSONbig.stringify({
|
|
4390
4412
|
type: 'authentication',
|
|
4391
4413
|
data: {
|
|
@@ -4394,12 +4416,27 @@
|
|
|
4394
4416
|
}));
|
|
4395
4417
|
}
|
|
4396
4418
|
break;
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
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 {
|
|
4400
4437
|
const isSubscribed = data.channels.some(channel => this.realtime.channels.has(channel));
|
|
4401
4438
|
if (!isSubscribed)
|
|
4402
|
-
|
|
4439
|
+
break;
|
|
4403
4440
|
this.realtime.subscriptions.forEach(subscription => {
|
|
4404
4441
|
if (data.channels.some(channel => subscription.channels.includes(channel))) {
|
|
4405
4442
|
setTimeout(() => subscription.callback(data));
|
|
@@ -4407,6 +4444,7 @@
|
|
|
4407
4444
|
});
|
|
4408
4445
|
}
|
|
4409
4446
|
break;
|
|
4447
|
+
}
|
|
4410
4448
|
case 'pong':
|
|
4411
4449
|
break; // Handle pong response if needed
|
|
4412
4450
|
case 'error':
|
|
@@ -4419,7 +4457,7 @@
|
|
|
4419
4457
|
console.error(e);
|
|
4420
4458
|
}
|
|
4421
4459
|
},
|
|
4422
|
-
cleanUp: channels => {
|
|
4460
|
+
cleanUp: (channels, queries) => {
|
|
4423
4461
|
this.realtime.channels.forEach(channel => {
|
|
4424
4462
|
if (channels.includes(channel)) {
|
|
4425
4463
|
let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
|
|
@@ -4430,6 +4468,17 @@
|
|
|
4430
4468
|
}
|
|
4431
4469
|
}
|
|
4432
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
|
+
});
|
|
4433
4482
|
}
|
|
4434
4483
|
};
|
|
4435
4484
|
}
|
|
@@ -4610,7 +4659,7 @@
|
|
|
4610
4659
|
* @param {(payload: RealtimeMessage) => void} callback Is called on every realtime update.
|
|
4611
4660
|
* @returns {() => void} Unsubscribes from events.
|
|
4612
4661
|
*/
|
|
4613
|
-
subscribe(channels, callback) {
|
|
4662
|
+
subscribe(channels, callback, queries = []) {
|
|
4614
4663
|
const channelArray = Array.isArray(channels) ? channels : [channels];
|
|
4615
4664
|
// Convert Channel instances to strings
|
|
4616
4665
|
const channelStrings = channelArray.map(ch => {
|
|
@@ -4625,15 +4674,18 @@
|
|
|
4625
4674
|
return String(ch);
|
|
4626
4675
|
});
|
|
4627
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));
|
|
4628
4679
|
const counter = this.realtime.subscriptionsCounter++;
|
|
4629
4680
|
this.realtime.subscriptions.set(counter, {
|
|
4630
4681
|
channels: channelStrings,
|
|
4682
|
+
queries: queryStrings,
|
|
4631
4683
|
callback
|
|
4632
4684
|
});
|
|
4633
4685
|
this.realtime.connect();
|
|
4634
4686
|
return () => {
|
|
4635
4687
|
this.realtime.subscriptions.delete(counter);
|
|
4636
|
-
this.realtime.cleanUp(channelStrings);
|
|
4688
|
+
this.realtime.cleanUp(channelStrings, queryStrings);
|
|
4637
4689
|
this.realtime.connect();
|
|
4638
4690
|
};
|
|
4639
4691
|
}
|
|
@@ -5405,7 +5457,7 @@
|
|
|
5405
5457
|
}
|
|
5406
5458
|
createMfaAuthenticator(paramsOrFirst) {
|
|
5407
5459
|
let params;
|
|
5408
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
5460
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
5409
5461
|
params = (paramsOrFirst || {});
|
|
5410
5462
|
}
|
|
5411
5463
|
else {
|
|
@@ -5427,7 +5479,7 @@
|
|
|
5427
5479
|
}
|
|
5428
5480
|
createMFAAuthenticator(paramsOrFirst) {
|
|
5429
5481
|
let params;
|
|
5430
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
5482
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
5431
5483
|
params = (paramsOrFirst || {});
|
|
5432
5484
|
}
|
|
5433
5485
|
else {
|
|
@@ -5449,7 +5501,7 @@
|
|
|
5449
5501
|
}
|
|
5450
5502
|
updateMfaAuthenticator(paramsOrFirst, ...rest) {
|
|
5451
5503
|
let params;
|
|
5452
|
-
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))) {
|
|
5453
5505
|
params = (paramsOrFirst || {});
|
|
5454
5506
|
}
|
|
5455
5507
|
else {
|
|
@@ -5479,7 +5531,7 @@
|
|
|
5479
5531
|
}
|
|
5480
5532
|
updateMFAAuthenticator(paramsOrFirst, ...rest) {
|
|
5481
5533
|
let params;
|
|
5482
|
-
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))) {
|
|
5483
5535
|
params = (paramsOrFirst || {});
|
|
5484
5536
|
}
|
|
5485
5537
|
else {
|
|
@@ -5509,7 +5561,7 @@
|
|
|
5509
5561
|
}
|
|
5510
5562
|
deleteMfaAuthenticator(paramsOrFirst) {
|
|
5511
5563
|
let params;
|
|
5512
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
5564
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
5513
5565
|
params = (paramsOrFirst || {});
|
|
5514
5566
|
}
|
|
5515
5567
|
else {
|
|
@@ -5531,7 +5583,7 @@
|
|
|
5531
5583
|
}
|
|
5532
5584
|
deleteMFAAuthenticator(paramsOrFirst) {
|
|
5533
5585
|
let params;
|
|
5534
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
5586
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
5535
5587
|
params = (paramsOrFirst || {});
|
|
5536
5588
|
}
|
|
5537
5589
|
else {
|
|
@@ -5553,7 +5605,7 @@
|
|
|
5553
5605
|
}
|
|
5554
5606
|
createMfaChallenge(paramsOrFirst) {
|
|
5555
5607
|
let params;
|
|
5556
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
|
|
5608
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
|
|
5557
5609
|
params = (paramsOrFirst || {});
|
|
5558
5610
|
}
|
|
5559
5611
|
else {
|
|
@@ -5578,7 +5630,7 @@
|
|
|
5578
5630
|
}
|
|
5579
5631
|
createMFAChallenge(paramsOrFirst) {
|
|
5580
5632
|
let params;
|
|
5581
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
|
|
5633
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
|
|
5582
5634
|
params = (paramsOrFirst || {});
|
|
5583
5635
|
}
|
|
5584
5636
|
else {
|
|
@@ -6071,7 +6123,7 @@
|
|
|
6071
6123
|
}
|
|
6072
6124
|
updatePrefs(paramsOrFirst) {
|
|
6073
6125
|
let params;
|
|
6074
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'prefs' in paramsOrFirst)) {
|
|
6126
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('prefs' in paramsOrFirst))) {
|
|
6075
6127
|
params = (paramsOrFirst || {});
|
|
6076
6128
|
}
|
|
6077
6129
|
else {
|
|
@@ -6279,7 +6331,7 @@
|
|
|
6279
6331
|
}
|
|
6280
6332
|
createOAuth2Session(paramsOrFirst, ...rest) {
|
|
6281
6333
|
let params;
|
|
6282
|
-
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))) {
|
|
6283
6335
|
params = (paramsOrFirst || {});
|
|
6284
6336
|
}
|
|
6285
6337
|
else {
|
|
@@ -6639,7 +6691,7 @@
|
|
|
6639
6691
|
}
|
|
6640
6692
|
createOAuth2Token(paramsOrFirst, ...rest) {
|
|
6641
6693
|
let params;
|
|
6642
|
-
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))) {
|
|
6643
6695
|
params = (paramsOrFirst || {});
|
|
6644
6696
|
}
|
|
6645
6697
|
else {
|
|
@@ -6880,13 +6932,59 @@
|
|
|
6880
6932
|
}
|
|
6881
6933
|
}
|
|
6882
6934
|
|
|
6935
|
+
class Activities {
|
|
6936
|
+
constructor(client) {
|
|
6937
|
+
this.client = client;
|
|
6938
|
+
}
|
|
6939
|
+
listEvents(paramsOrFirst) {
|
|
6940
|
+
let params;
|
|
6941
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6942
|
+
params = (paramsOrFirst || {});
|
|
6943
|
+
}
|
|
6944
|
+
else {
|
|
6945
|
+
params = {
|
|
6946
|
+
queries: paramsOrFirst
|
|
6947
|
+
};
|
|
6948
|
+
}
|
|
6949
|
+
const queries = params.queries;
|
|
6950
|
+
const apiPath = '/activities/events';
|
|
6951
|
+
const payload = {};
|
|
6952
|
+
if (typeof queries !== 'undefined') {
|
|
6953
|
+
payload['queries'] = queries;
|
|
6954
|
+
}
|
|
6955
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6956
|
+
const apiHeaders = {};
|
|
6957
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
6958
|
+
}
|
|
6959
|
+
getEvent(paramsOrFirst) {
|
|
6960
|
+
let params;
|
|
6961
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6962
|
+
params = (paramsOrFirst || {});
|
|
6963
|
+
}
|
|
6964
|
+
else {
|
|
6965
|
+
params = {
|
|
6966
|
+
eventId: paramsOrFirst
|
|
6967
|
+
};
|
|
6968
|
+
}
|
|
6969
|
+
const eventId = params.eventId;
|
|
6970
|
+
if (typeof eventId === 'undefined') {
|
|
6971
|
+
throw new AppwriteException('Missing required parameter: "eventId"');
|
|
6972
|
+
}
|
|
6973
|
+
const apiPath = '/activities/events/{eventId}'.replace('{eventId}', eventId);
|
|
6974
|
+
const payload = {};
|
|
6975
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6976
|
+
const apiHeaders = {};
|
|
6977
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
6978
|
+
}
|
|
6979
|
+
}
|
|
6980
|
+
|
|
6883
6981
|
class Avatars {
|
|
6884
6982
|
constructor(client) {
|
|
6885
6983
|
this.client = client;
|
|
6886
6984
|
}
|
|
6887
6985
|
getBrowser(paramsOrFirst, ...rest) {
|
|
6888
6986
|
let params;
|
|
6889
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
6987
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
6890
6988
|
params = (paramsOrFirst || {});
|
|
6891
6989
|
}
|
|
6892
6990
|
else {
|
|
@@ -6924,7 +7022,7 @@
|
|
|
6924
7022
|
}
|
|
6925
7023
|
getCreditCard(paramsOrFirst, ...rest) {
|
|
6926
7024
|
let params;
|
|
6927
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
7025
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
6928
7026
|
params = (paramsOrFirst || {});
|
|
6929
7027
|
}
|
|
6930
7028
|
else {
|
|
@@ -6988,7 +7086,7 @@
|
|
|
6988
7086
|
}
|
|
6989
7087
|
getFlag(paramsOrFirst, ...rest) {
|
|
6990
7088
|
let params;
|
|
6991
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
7089
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
6992
7090
|
params = (paramsOrFirst || {});
|
|
6993
7091
|
}
|
|
6994
7092
|
else {
|
|
@@ -7288,7 +7386,7 @@
|
|
|
7288
7386
|
}
|
|
7289
7387
|
createArchive(paramsOrFirst, ...rest) {
|
|
7290
7388
|
let params;
|
|
7291
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'services' in paramsOrFirst)) {
|
|
7389
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('services' in paramsOrFirst || 'resourceId' in paramsOrFirst))) {
|
|
7292
7390
|
params = (paramsOrFirst || {});
|
|
7293
7391
|
}
|
|
7294
7392
|
else {
|
|
@@ -7688,7 +7786,7 @@
|
|
|
7688
7786
|
}
|
|
7689
7787
|
getPlans(paramsOrFirst) {
|
|
7690
7788
|
let params;
|
|
7691
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'platform' in paramsOrFirst)) {
|
|
7789
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('platform' in paramsOrFirst))) {
|
|
7692
7790
|
params = (paramsOrFirst || {});
|
|
7693
7791
|
}
|
|
7694
7792
|
else {
|
|
@@ -8173,7 +8271,7 @@
|
|
|
8173
8271
|
}
|
|
8174
8272
|
listUsage(paramsOrFirst) {
|
|
8175
8273
|
let params;
|
|
8176
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
8274
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
8177
8275
|
params = (paramsOrFirst || {});
|
|
8178
8276
|
}
|
|
8179
8277
|
else {
|
|
@@ -9405,7 +9503,8 @@
|
|
|
9405
9503
|
key: rest[1],
|
|
9406
9504
|
required: rest[2],
|
|
9407
9505
|
xdefault: rest[3],
|
|
9408
|
-
array: rest[4]
|
|
9506
|
+
array: rest[4],
|
|
9507
|
+
encrypt: rest[5]
|
|
9409
9508
|
};
|
|
9410
9509
|
}
|
|
9411
9510
|
const databaseId = params.databaseId;
|
|
@@ -9414,6 +9513,7 @@
|
|
|
9414
9513
|
const required = params.required;
|
|
9415
9514
|
const xdefault = params.xdefault;
|
|
9416
9515
|
const array = params.array;
|
|
9516
|
+
const encrypt = params.encrypt;
|
|
9417
9517
|
if (typeof databaseId === 'undefined') {
|
|
9418
9518
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9419
9519
|
}
|
|
@@ -9440,6 +9540,9 @@
|
|
|
9440
9540
|
if (typeof array !== 'undefined') {
|
|
9441
9541
|
payload['array'] = array;
|
|
9442
9542
|
}
|
|
9543
|
+
if (typeof encrypt !== 'undefined') {
|
|
9544
|
+
payload['encrypt'] = encrypt;
|
|
9545
|
+
}
|
|
9443
9546
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9444
9547
|
const apiHeaders = {
|
|
9445
9548
|
'content-type': 'application/json',
|
|
@@ -9511,7 +9614,8 @@
|
|
|
9511
9614
|
key: rest[1],
|
|
9512
9615
|
required: rest[2],
|
|
9513
9616
|
xdefault: rest[3],
|
|
9514
|
-
array: rest[4]
|
|
9617
|
+
array: rest[4],
|
|
9618
|
+
encrypt: rest[5]
|
|
9515
9619
|
};
|
|
9516
9620
|
}
|
|
9517
9621
|
const databaseId = params.databaseId;
|
|
@@ -9520,6 +9624,7 @@
|
|
|
9520
9624
|
const required = params.required;
|
|
9521
9625
|
const xdefault = params.xdefault;
|
|
9522
9626
|
const array = params.array;
|
|
9627
|
+
const encrypt = params.encrypt;
|
|
9523
9628
|
if (typeof databaseId === 'undefined') {
|
|
9524
9629
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9525
9630
|
}
|
|
@@ -9546,6 +9651,9 @@
|
|
|
9546
9651
|
if (typeof array !== 'undefined') {
|
|
9547
9652
|
payload['array'] = array;
|
|
9548
9653
|
}
|
|
9654
|
+
if (typeof encrypt !== 'undefined') {
|
|
9655
|
+
payload['encrypt'] = encrypt;
|
|
9656
|
+
}
|
|
9549
9657
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9550
9658
|
const apiHeaders = {
|
|
9551
9659
|
'content-type': 'application/json',
|
|
@@ -10000,7 +10108,8 @@
|
|
|
10000
10108
|
key: rest[1],
|
|
10001
10109
|
required: rest[2],
|
|
10002
10110
|
xdefault: rest[3],
|
|
10003
|
-
array: rest[4]
|
|
10111
|
+
array: rest[4],
|
|
10112
|
+
encrypt: rest[5]
|
|
10004
10113
|
};
|
|
10005
10114
|
}
|
|
10006
10115
|
const databaseId = params.databaseId;
|
|
@@ -10009,6 +10118,7 @@
|
|
|
10009
10118
|
const required = params.required;
|
|
10010
10119
|
const xdefault = params.xdefault;
|
|
10011
10120
|
const array = params.array;
|
|
10121
|
+
const encrypt = params.encrypt;
|
|
10012
10122
|
if (typeof databaseId === 'undefined') {
|
|
10013
10123
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10014
10124
|
}
|
|
@@ -10035,6 +10145,9 @@
|
|
|
10035
10145
|
if (typeof array !== 'undefined') {
|
|
10036
10146
|
payload['array'] = array;
|
|
10037
10147
|
}
|
|
10148
|
+
if (typeof encrypt !== 'undefined') {
|
|
10149
|
+
payload['encrypt'] = encrypt;
|
|
10150
|
+
}
|
|
10038
10151
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10039
10152
|
const apiHeaders = {
|
|
10040
10153
|
'content-type': 'application/json',
|
|
@@ -10213,7 +10326,8 @@
|
|
|
10213
10326
|
size: rest[2],
|
|
10214
10327
|
required: rest[3],
|
|
10215
10328
|
xdefault: rest[4],
|
|
10216
|
-
array: rest[5]
|
|
10329
|
+
array: rest[5],
|
|
10330
|
+
encrypt: rest[6]
|
|
10217
10331
|
};
|
|
10218
10332
|
}
|
|
10219
10333
|
const databaseId = params.databaseId;
|
|
@@ -10223,6 +10337,7 @@
|
|
|
10223
10337
|
const required = params.required;
|
|
10224
10338
|
const xdefault = params.xdefault;
|
|
10225
10339
|
const array = params.array;
|
|
10340
|
+
const encrypt = params.encrypt;
|
|
10226
10341
|
if (typeof databaseId === 'undefined') {
|
|
10227
10342
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10228
10343
|
}
|
|
@@ -10255,6 +10370,9 @@
|
|
|
10255
10370
|
if (typeof array !== 'undefined') {
|
|
10256
10371
|
payload['array'] = array;
|
|
10257
10372
|
}
|
|
10373
|
+
if (typeof encrypt !== 'undefined') {
|
|
10374
|
+
payload['encrypt'] = encrypt;
|
|
10375
|
+
}
|
|
10258
10376
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10259
10377
|
const apiHeaders = {
|
|
10260
10378
|
'content-type': 'application/json',
|
|
@@ -11317,6 +11435,39 @@
|
|
|
11317
11435
|
};
|
|
11318
11436
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
11319
11437
|
}
|
|
11438
|
+
getPrice(paramsOrFirst, ...rest) {
|
|
11439
|
+
let params;
|
|
11440
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
11441
|
+
params = (paramsOrFirst || {});
|
|
11442
|
+
}
|
|
11443
|
+
else {
|
|
11444
|
+
params = {
|
|
11445
|
+
domain: paramsOrFirst,
|
|
11446
|
+
periodYears: rest[0],
|
|
11447
|
+
registrationType: rest[1]
|
|
11448
|
+
};
|
|
11449
|
+
}
|
|
11450
|
+
const domain = params.domain;
|
|
11451
|
+
const periodYears = params.periodYears;
|
|
11452
|
+
const registrationType = params.registrationType;
|
|
11453
|
+
if (typeof domain === 'undefined') {
|
|
11454
|
+
throw new AppwriteException('Missing required parameter: "domain"');
|
|
11455
|
+
}
|
|
11456
|
+
const apiPath = '/domains/price';
|
|
11457
|
+
const payload = {};
|
|
11458
|
+
if (typeof domain !== 'undefined') {
|
|
11459
|
+
payload['domain'] = domain;
|
|
11460
|
+
}
|
|
11461
|
+
if (typeof periodYears !== 'undefined') {
|
|
11462
|
+
payload['periodYears'] = periodYears;
|
|
11463
|
+
}
|
|
11464
|
+
if (typeof registrationType !== 'undefined') {
|
|
11465
|
+
payload['registrationType'] = registrationType;
|
|
11466
|
+
}
|
|
11467
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11468
|
+
const apiHeaders = {};
|
|
11469
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
11470
|
+
}
|
|
11320
11471
|
listSuggestions(paramsOrFirst, ...rest) {
|
|
11321
11472
|
let params;
|
|
11322
11473
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -13149,7 +13300,7 @@
|
|
|
13149
13300
|
}
|
|
13150
13301
|
listTemplates(paramsOrFirst, ...rest) {
|
|
13151
13302
|
let params;
|
|
13152
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'runtimes' in paramsOrFirst)) {
|
|
13303
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('runtimes' in paramsOrFirst || 'useCases' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst || 'total' in paramsOrFirst))) {
|
|
13153
13304
|
params = (paramsOrFirst || {});
|
|
13154
13305
|
}
|
|
13155
13306
|
else {
|
|
@@ -13209,7 +13360,7 @@
|
|
|
13209
13360
|
}
|
|
13210
13361
|
listUsage(paramsOrFirst) {
|
|
13211
13362
|
let params;
|
|
13212
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
13363
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
13213
13364
|
params = (paramsOrFirst || {});
|
|
13214
13365
|
}
|
|
13215
13366
|
else {
|
|
@@ -14079,7 +14230,7 @@
|
|
|
14079
14230
|
}
|
|
14080
14231
|
query(paramsOrFirst) {
|
|
14081
14232
|
let params;
|
|
14082
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {
|
|
14233
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) {
|
|
14083
14234
|
params = (paramsOrFirst || {});
|
|
14084
14235
|
}
|
|
14085
14236
|
else {
|
|
@@ -14105,7 +14256,7 @@
|
|
|
14105
14256
|
}
|
|
14106
14257
|
mutation(paramsOrFirst) {
|
|
14107
14258
|
let params;
|
|
14108
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {
|
|
14259
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) {
|
|
14109
14260
|
params = (paramsOrFirst || {});
|
|
14110
14261
|
}
|
|
14111
14262
|
else {
|
|
@@ -14387,7 +14538,7 @@
|
|
|
14387
14538
|
}
|
|
14388
14539
|
getFailedJobs(paramsOrFirst, ...rest) {
|
|
14389
14540
|
let params;
|
|
14390
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'name' in paramsOrFirst)) {
|
|
14541
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('name' in paramsOrFirst || 'threshold' in paramsOrFirst))) {
|
|
14391
14542
|
params = (paramsOrFirst || {});
|
|
14392
14543
|
}
|
|
14393
14544
|
else {
|
|
@@ -17622,7 +17773,7 @@
|
|
|
17622
17773
|
}
|
|
17623
17774
|
createAppwriteMigration(paramsOrFirst, ...rest) {
|
|
17624
17775
|
let params;
|
|
17625
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
17776
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'projectId' in paramsOrFirst || 'apiKey' in paramsOrFirst))) {
|
|
17626
17777
|
params = (paramsOrFirst || {});
|
|
17627
17778
|
}
|
|
17628
17779
|
else {
|
|
@@ -17671,7 +17822,7 @@
|
|
|
17671
17822
|
}
|
|
17672
17823
|
getAppwriteReport(paramsOrFirst, ...rest) {
|
|
17673
17824
|
let params;
|
|
17674
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
17825
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'projectID' in paramsOrFirst || 'key' in paramsOrFirst))) {
|
|
17675
17826
|
params = (paramsOrFirst || {});
|
|
17676
17827
|
}
|
|
17677
17828
|
else {
|
|
@@ -17832,7 +17983,7 @@
|
|
|
17832
17983
|
}
|
|
17833
17984
|
createFirebaseMigration(paramsOrFirst, ...rest) {
|
|
17834
17985
|
let params;
|
|
17835
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
17986
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'serviceAccount' in paramsOrFirst))) {
|
|
17836
17987
|
params = (paramsOrFirst || {});
|
|
17837
17988
|
}
|
|
17838
17989
|
else {
|
|
@@ -17865,7 +18016,7 @@
|
|
|
17865
18016
|
}
|
|
17866
18017
|
getFirebaseReport(paramsOrFirst, ...rest) {
|
|
17867
18018
|
let params;
|
|
17868
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
18019
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'serviceAccount' in paramsOrFirst))) {
|
|
17869
18020
|
params = (paramsOrFirst || {});
|
|
17870
18021
|
}
|
|
17871
18022
|
else {
|
|
@@ -17896,7 +18047,7 @@
|
|
|
17896
18047
|
}
|
|
17897
18048
|
createNHostMigration(paramsOrFirst, ...rest) {
|
|
17898
18049
|
let params;
|
|
17899
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
18050
|
+
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))) {
|
|
17900
18051
|
params = (paramsOrFirst || {});
|
|
17901
18052
|
}
|
|
17902
18053
|
else {
|
|
@@ -17974,7 +18125,7 @@
|
|
|
17974
18125
|
}
|
|
17975
18126
|
getNHostReport(paramsOrFirst, ...rest) {
|
|
17976
18127
|
let params;
|
|
17977
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
18128
|
+
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))) {
|
|
17978
18129
|
params = (paramsOrFirst || {});
|
|
17979
18130
|
}
|
|
17980
18131
|
else {
|
|
@@ -18050,7 +18201,7 @@
|
|
|
18050
18201
|
}
|
|
18051
18202
|
createSupabaseMigration(paramsOrFirst, ...rest) {
|
|
18052
18203
|
let params;
|
|
18053
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
18204
|
+
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))) {
|
|
18054
18205
|
params = (paramsOrFirst || {});
|
|
18055
18206
|
}
|
|
18056
18207
|
else {
|
|
@@ -18120,7 +18271,7 @@
|
|
|
18120
18271
|
}
|
|
18121
18272
|
getSupabaseReport(paramsOrFirst, ...rest) {
|
|
18122
18273
|
let params;
|
|
18123
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
18274
|
+
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))) {
|
|
18124
18275
|
params = (paramsOrFirst || {});
|
|
18125
18276
|
}
|
|
18126
18277
|
else {
|
|
@@ -19403,33 +19554,6 @@
|
|
|
19403
19554
|
};
|
|
19404
19555
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
19405
19556
|
}
|
|
19406
|
-
updateProjects(paramsOrFirst, ...rest) {
|
|
19407
|
-
let params;
|
|
19408
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
19409
|
-
params = (paramsOrFirst || {});
|
|
19410
|
-
}
|
|
19411
|
-
else {
|
|
19412
|
-
params = {
|
|
19413
|
-
organizationId: paramsOrFirst,
|
|
19414
|
-
projects: rest[0]
|
|
19415
|
-
};
|
|
19416
|
-
}
|
|
19417
|
-
const organizationId = params.organizationId;
|
|
19418
|
-
const projects = params.projects;
|
|
19419
|
-
if (typeof organizationId === 'undefined') {
|
|
19420
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
19421
|
-
}
|
|
19422
|
-
const apiPath = '/organizations/{organizationId}/projects'.replace('{organizationId}', organizationId);
|
|
19423
|
-
const payload = {};
|
|
19424
|
-
if (typeof projects !== 'undefined') {
|
|
19425
|
-
payload['projects'] = projects;
|
|
19426
|
-
}
|
|
19427
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19428
|
-
const apiHeaders = {
|
|
19429
|
-
'content-type': 'application/json',
|
|
19430
|
-
};
|
|
19431
|
-
return this.client.call('patch', uri, apiHeaders, payload);
|
|
19432
|
-
}
|
|
19433
19557
|
listRegions(paramsOrFirst) {
|
|
19434
19558
|
let params;
|
|
19435
19559
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -20664,16 +20788,21 @@
|
|
|
20664
20788
|
else {
|
|
20665
20789
|
params = {
|
|
20666
20790
|
projectId: paramsOrFirst,
|
|
20667
|
-
|
|
20791
|
+
queries: rest[0],
|
|
20792
|
+
total: rest[1]
|
|
20668
20793
|
};
|
|
20669
20794
|
}
|
|
20670
20795
|
const projectId = params.projectId;
|
|
20796
|
+
const queries = params.queries;
|
|
20671
20797
|
const total = params.total;
|
|
20672
20798
|
if (typeof projectId === 'undefined') {
|
|
20673
20799
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
20674
20800
|
}
|
|
20675
20801
|
const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
20676
20802
|
const payload = {};
|
|
20803
|
+
if (typeof queries !== 'undefined') {
|
|
20804
|
+
payload['queries'] = queries;
|
|
20805
|
+
}
|
|
20677
20806
|
if (typeof total !== 'undefined') {
|
|
20678
20807
|
payload['total'] = total;
|
|
20679
20808
|
}
|
|
@@ -20691,12 +20820,14 @@
|
|
|
20691
20820
|
projectId: paramsOrFirst,
|
|
20692
20821
|
name: rest[0],
|
|
20693
20822
|
scopes: rest[1],
|
|
20694
|
-
|
|
20823
|
+
keyId: rest[2],
|
|
20824
|
+
expire: rest[3]
|
|
20695
20825
|
};
|
|
20696
20826
|
}
|
|
20697
20827
|
const projectId = params.projectId;
|
|
20698
20828
|
const name = params.name;
|
|
20699
20829
|
const scopes = params.scopes;
|
|
20830
|
+
const keyId = params.keyId;
|
|
20700
20831
|
const expire = params.expire;
|
|
20701
20832
|
if (typeof projectId === 'undefined') {
|
|
20702
20833
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
@@ -20709,6 +20840,9 @@
|
|
|
20709
20840
|
}
|
|
20710
20841
|
const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
20711
20842
|
const payload = {};
|
|
20843
|
+
if (typeof keyId !== 'undefined') {
|
|
20844
|
+
payload['keyId'] = keyId;
|
|
20845
|
+
}
|
|
20712
20846
|
if (typeof name !== 'undefined') {
|
|
20713
20847
|
payload['name'] = name;
|
|
20714
20848
|
}
|
|
@@ -21445,36 +21579,6 @@
|
|
|
21445
21579
|
};
|
|
21446
21580
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
21447
21581
|
}
|
|
21448
|
-
updateStatus(paramsOrFirst, ...rest) {
|
|
21449
|
-
let params;
|
|
21450
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21451
|
-
params = (paramsOrFirst || {});
|
|
21452
|
-
}
|
|
21453
|
-
else {
|
|
21454
|
-
params = {
|
|
21455
|
-
projectId: paramsOrFirst,
|
|
21456
|
-
status: rest[0]
|
|
21457
|
-
};
|
|
21458
|
-
}
|
|
21459
|
-
const projectId = params.projectId;
|
|
21460
|
-
const status = params.status;
|
|
21461
|
-
if (typeof projectId === 'undefined') {
|
|
21462
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
21463
|
-
}
|
|
21464
|
-
if (typeof status === 'undefined') {
|
|
21465
|
-
throw new AppwriteException('Missing required parameter: "status"');
|
|
21466
|
-
}
|
|
21467
|
-
const apiPath = '/projects/{projectId}/status'.replace('{projectId}', projectId);
|
|
21468
|
-
const payload = {};
|
|
21469
|
-
if (typeof status !== 'undefined') {
|
|
21470
|
-
payload['status'] = status;
|
|
21471
|
-
}
|
|
21472
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21473
|
-
const apiHeaders = {
|
|
21474
|
-
'content-type': 'application/json',
|
|
21475
|
-
};
|
|
21476
|
-
return this.client.call('patch', uri, apiHeaders, payload);
|
|
21477
|
-
}
|
|
21478
21582
|
updateTeam(paramsOrFirst, ...rest) {
|
|
21479
21583
|
let params;
|
|
21480
21584
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -22522,7 +22626,7 @@
|
|
|
22522
22626
|
}
|
|
22523
22627
|
listTemplates(paramsOrFirst, ...rest) {
|
|
22524
22628
|
let params;
|
|
22525
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'frameworks' in paramsOrFirst)) {
|
|
22629
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('frameworks' in paramsOrFirst || 'useCases' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst))) {
|
|
22526
22630
|
params = (paramsOrFirst || {});
|
|
22527
22631
|
}
|
|
22528
22632
|
else {
|
|
@@ -22577,7 +22681,7 @@
|
|
|
22577
22681
|
}
|
|
22578
22682
|
listUsage(paramsOrFirst) {
|
|
22579
22683
|
let params;
|
|
22580
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
22684
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
22581
22685
|
params = (paramsOrFirst || {});
|
|
22582
22686
|
}
|
|
22583
22687
|
else {
|
|
@@ -23947,7 +24051,7 @@
|
|
|
23947
24051
|
}
|
|
23948
24052
|
getUsage(paramsOrFirst) {
|
|
23949
24053
|
let params;
|
|
23950
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
24054
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
23951
24055
|
params = (paramsOrFirst || {});
|
|
23952
24056
|
}
|
|
23953
24057
|
else {
|
|
@@ -24209,7 +24313,7 @@
|
|
|
24209
24313
|
}
|
|
24210
24314
|
listUsage(paramsOrFirst) {
|
|
24211
24315
|
let params;
|
|
24212
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
24316
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
24213
24317
|
params = (paramsOrFirst || {});
|
|
24214
24318
|
}
|
|
24215
24319
|
else {
|
|
@@ -25441,7 +25545,8 @@
|
|
|
25441
25545
|
key: rest[1],
|
|
25442
25546
|
required: rest[2],
|
|
25443
25547
|
xdefault: rest[3],
|
|
25444
|
-
array: rest[4]
|
|
25548
|
+
array: rest[4],
|
|
25549
|
+
encrypt: rest[5]
|
|
25445
25550
|
};
|
|
25446
25551
|
}
|
|
25447
25552
|
const databaseId = params.databaseId;
|
|
@@ -25450,6 +25555,7 @@
|
|
|
25450
25555
|
const required = params.required;
|
|
25451
25556
|
const xdefault = params.xdefault;
|
|
25452
25557
|
const array = params.array;
|
|
25558
|
+
const encrypt = params.encrypt;
|
|
25453
25559
|
if (typeof databaseId === 'undefined') {
|
|
25454
25560
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
25455
25561
|
}
|
|
@@ -25476,6 +25582,9 @@
|
|
|
25476
25582
|
if (typeof array !== 'undefined') {
|
|
25477
25583
|
payload['array'] = array;
|
|
25478
25584
|
}
|
|
25585
|
+
if (typeof encrypt !== 'undefined') {
|
|
25586
|
+
payload['encrypt'] = encrypt;
|
|
25587
|
+
}
|
|
25479
25588
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
25480
25589
|
const apiHeaders = {
|
|
25481
25590
|
'content-type': 'application/json',
|
|
@@ -25547,7 +25656,8 @@
|
|
|
25547
25656
|
key: rest[1],
|
|
25548
25657
|
required: rest[2],
|
|
25549
25658
|
xdefault: rest[3],
|
|
25550
|
-
array: rest[4]
|
|
25659
|
+
array: rest[4],
|
|
25660
|
+
encrypt: rest[5]
|
|
25551
25661
|
};
|
|
25552
25662
|
}
|
|
25553
25663
|
const databaseId = params.databaseId;
|
|
@@ -25556,6 +25666,7 @@
|
|
|
25556
25666
|
const required = params.required;
|
|
25557
25667
|
const xdefault = params.xdefault;
|
|
25558
25668
|
const array = params.array;
|
|
25669
|
+
const encrypt = params.encrypt;
|
|
25559
25670
|
if (typeof databaseId === 'undefined') {
|
|
25560
25671
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
25561
25672
|
}
|
|
@@ -25582,6 +25693,9 @@
|
|
|
25582
25693
|
if (typeof array !== 'undefined') {
|
|
25583
25694
|
payload['array'] = array;
|
|
25584
25695
|
}
|
|
25696
|
+
if (typeof encrypt !== 'undefined') {
|
|
25697
|
+
payload['encrypt'] = encrypt;
|
|
25698
|
+
}
|
|
25585
25699
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
25586
25700
|
const apiHeaders = {
|
|
25587
25701
|
'content-type': 'application/json',
|
|
@@ -26036,7 +26150,8 @@
|
|
|
26036
26150
|
key: rest[1],
|
|
26037
26151
|
required: rest[2],
|
|
26038
26152
|
xdefault: rest[3],
|
|
26039
|
-
array: rest[4]
|
|
26153
|
+
array: rest[4],
|
|
26154
|
+
encrypt: rest[5]
|
|
26040
26155
|
};
|
|
26041
26156
|
}
|
|
26042
26157
|
const databaseId = params.databaseId;
|
|
@@ -26045,6 +26160,7 @@
|
|
|
26045
26160
|
const required = params.required;
|
|
26046
26161
|
const xdefault = params.xdefault;
|
|
26047
26162
|
const array = params.array;
|
|
26163
|
+
const encrypt = params.encrypt;
|
|
26048
26164
|
if (typeof databaseId === 'undefined') {
|
|
26049
26165
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
26050
26166
|
}
|
|
@@ -26071,6 +26187,9 @@
|
|
|
26071
26187
|
if (typeof array !== 'undefined') {
|
|
26072
26188
|
payload['array'] = array;
|
|
26073
26189
|
}
|
|
26190
|
+
if (typeof encrypt !== 'undefined') {
|
|
26191
|
+
payload['encrypt'] = encrypt;
|
|
26192
|
+
}
|
|
26074
26193
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
26075
26194
|
const apiHeaders = {
|
|
26076
26195
|
'content-type': 'application/json',
|
|
@@ -26249,7 +26368,8 @@
|
|
|
26249
26368
|
size: rest[2],
|
|
26250
26369
|
required: rest[3],
|
|
26251
26370
|
xdefault: rest[4],
|
|
26252
|
-
array: rest[5]
|
|
26371
|
+
array: rest[5],
|
|
26372
|
+
encrypt: rest[6]
|
|
26253
26373
|
};
|
|
26254
26374
|
}
|
|
26255
26375
|
const databaseId = params.databaseId;
|
|
@@ -26259,6 +26379,7 @@
|
|
|
26259
26379
|
const required = params.required;
|
|
26260
26380
|
const xdefault = params.xdefault;
|
|
26261
26381
|
const array = params.array;
|
|
26382
|
+
const encrypt = params.encrypt;
|
|
26262
26383
|
if (typeof databaseId === 'undefined') {
|
|
26263
26384
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
26264
26385
|
}
|
|
@@ -26291,6 +26412,9 @@
|
|
|
26291
26412
|
if (typeof array !== 'undefined') {
|
|
26292
26413
|
payload['array'] = array;
|
|
26293
26414
|
}
|
|
26415
|
+
if (typeof encrypt !== 'undefined') {
|
|
26416
|
+
payload['encrypt'] = encrypt;
|
|
26417
|
+
}
|
|
26294
26418
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
26295
26419
|
const apiHeaders = {
|
|
26296
26420
|
'content-type': 'application/json',
|
|
@@ -28378,7 +28502,7 @@
|
|
|
28378
28502
|
}
|
|
28379
28503
|
getUsage(paramsOrFirst) {
|
|
28380
28504
|
let params;
|
|
28381
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
28505
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
28382
28506
|
params = (paramsOrFirst || {});
|
|
28383
28507
|
}
|
|
28384
28508
|
else {
|
|
@@ -29748,11 +29872,16 @@
|
|
|
29748
29872
|
this.TYPE_CONNECTED = 'connected';
|
|
29749
29873
|
this.DEBOUNCE_MS = 1;
|
|
29750
29874
|
this.HEARTBEAT_INTERVAL = 20000; // 20 seconds in milliseconds
|
|
29751
|
-
|
|
29875
|
+
// Slot-centric state: Map<slot, { channels: Set<string>, queries: string[], callback: Function }>
|
|
29752
29876
|
this.activeSubscriptions = new Map();
|
|
29877
|
+
// Map slot index -> subscriptionId (from backend)
|
|
29878
|
+
this.slotToSubscriptionId = new Map();
|
|
29879
|
+
// Inverse map: subscriptionId -> slot index (for O(1) lookup)
|
|
29880
|
+
this.subscriptionIdToSlot = new Map();
|
|
29753
29881
|
this.subCallDepth = 0;
|
|
29754
29882
|
this.reconnectAttempts = 0;
|
|
29755
29883
|
this.subscriptionsCounter = 0;
|
|
29884
|
+
this.connectionId = 0;
|
|
29756
29885
|
this.reconnect = true;
|
|
29757
29886
|
this.onErrorCallbacks = [];
|
|
29758
29887
|
this.onCloseCallbacks = [];
|
|
@@ -29802,7 +29931,7 @@
|
|
|
29802
29931
|
}
|
|
29803
29932
|
createSocket() {
|
|
29804
29933
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29805
|
-
if (this.
|
|
29934
|
+
if (this.activeSubscriptions.size === 0) {
|
|
29806
29935
|
this.reconnect = false;
|
|
29807
29936
|
yield this.closeSocket();
|
|
29808
29937
|
return;
|
|
@@ -29811,10 +29940,36 @@
|
|
|
29811
29940
|
if (!projectId) {
|
|
29812
29941
|
throw new AppwriteException('Missing project ID');
|
|
29813
29942
|
}
|
|
29943
|
+
// Collect all unique channels from all slots
|
|
29944
|
+
const allChannels = new Set();
|
|
29945
|
+
for (const subscription of this.activeSubscriptions.values()) {
|
|
29946
|
+
for (const channel of subscription.channels) {
|
|
29947
|
+
allChannels.add(channel);
|
|
29948
|
+
}
|
|
29949
|
+
}
|
|
29814
29950
|
let queryParams = `project=${projectId}`;
|
|
29815
|
-
for (const channel of
|
|
29951
|
+
for (const channel of allChannels) {
|
|
29816
29952
|
queryParams += `&channels[]=${encodeURIComponent(channel)}`;
|
|
29817
29953
|
}
|
|
29954
|
+
// Build query string from slots → channels → queries
|
|
29955
|
+
// Format: channel[slot][]=query
|
|
29956
|
+
// For each slot, repeat its queries under each channel it subscribes to
|
|
29957
|
+
// Example: slot 1 → channels [tests, prod], queries [q1, q2]
|
|
29958
|
+
// Produces: tests[1][]=q1&tests[1][]=q2&prod[1][]=q1&prod[1][]=q2
|
|
29959
|
+
const selectAllQuery = Query.select(['*']).toString();
|
|
29960
|
+
for (const [slot, subscription] of this.activeSubscriptions) {
|
|
29961
|
+
// queries is string[] - iterate over each query string
|
|
29962
|
+
const queries = subscription.queries.length === 0
|
|
29963
|
+
? [selectAllQuery]
|
|
29964
|
+
: subscription.queries;
|
|
29965
|
+
// Repeat this slot's queries under each channel it subscribes to
|
|
29966
|
+
// Each query is sent as a separate parameter: channel[slot][]=q1&channel[slot][]=q2
|
|
29967
|
+
for (const channel of subscription.channels) {
|
|
29968
|
+
for (const query of queries) {
|
|
29969
|
+
queryParams += `&${encodeURIComponent(channel)}[${slot}][]=${encodeURIComponent(query)}`;
|
|
29970
|
+
}
|
|
29971
|
+
}
|
|
29972
|
+
}
|
|
29818
29973
|
const endpoint = this.client.config.endpointRealtime !== ''
|
|
29819
29974
|
? this.client.config.endpointRealtime
|
|
29820
29975
|
: this.client.config.endpoint || '';
|
|
@@ -29824,18 +29979,29 @@
|
|
|
29824
29979
|
const url = `${realtimeEndpoint}/realtime?${queryParams}`;
|
|
29825
29980
|
if (this.socket) {
|
|
29826
29981
|
this.reconnect = false;
|
|
29827
|
-
|
|
29982
|
+
if (this.socket.readyState < WebSocket.CLOSING) {
|
|
29983
|
+
yield this.closeSocket();
|
|
29984
|
+
}
|
|
29985
|
+
// Ensure reconnect isn't stuck false if close event was missed.
|
|
29986
|
+
this.reconnect = true;
|
|
29828
29987
|
}
|
|
29829
29988
|
return new Promise((resolve, reject) => {
|
|
29830
29989
|
try {
|
|
29831
|
-
|
|
29832
|
-
this.socket
|
|
29990
|
+
const connectionId = ++this.connectionId;
|
|
29991
|
+
const socket = (this.socket = new WebSocket(url));
|
|
29992
|
+
socket.addEventListener('open', () => {
|
|
29993
|
+
if (connectionId !== this.connectionId) {
|
|
29994
|
+
return;
|
|
29995
|
+
}
|
|
29833
29996
|
this.reconnectAttempts = 0;
|
|
29834
29997
|
this.onOpenCallbacks.forEach(callback => callback());
|
|
29835
29998
|
this.startHeartbeat();
|
|
29836
29999
|
resolve();
|
|
29837
30000
|
});
|
|
29838
|
-
|
|
30001
|
+
socket.addEventListener('message', (event) => {
|
|
30002
|
+
if (connectionId !== this.connectionId) {
|
|
30003
|
+
return;
|
|
30004
|
+
}
|
|
29839
30005
|
try {
|
|
29840
30006
|
const message = JSON.parse(event.data);
|
|
29841
30007
|
this.handleMessage(message);
|
|
@@ -29844,7 +30010,10 @@
|
|
|
29844
30010
|
console.error('Failed to parse message:', error);
|
|
29845
30011
|
}
|
|
29846
30012
|
});
|
|
29847
|
-
|
|
30013
|
+
socket.addEventListener('close', (event) => __awaiter(this, void 0, void 0, function* () {
|
|
30014
|
+
if (connectionId !== this.connectionId || socket !== this.socket) {
|
|
30015
|
+
return;
|
|
30016
|
+
}
|
|
29848
30017
|
this.stopHeartbeat();
|
|
29849
30018
|
this.onCloseCallbacks.forEach(callback => callback());
|
|
29850
30019
|
if (!this.reconnect || event.code === RealtimeCode.POLICY_VIOLATION) {
|
|
@@ -29862,7 +30031,10 @@
|
|
|
29862
30031
|
console.error('Failed to reconnect:', error);
|
|
29863
30032
|
}
|
|
29864
30033
|
}));
|
|
29865
|
-
|
|
30034
|
+
socket.addEventListener('error', (event) => {
|
|
30035
|
+
if (connectionId !== this.connectionId || socket !== this.socket) {
|
|
30036
|
+
return;
|
|
30037
|
+
}
|
|
29866
30038
|
this.stopHeartbeat();
|
|
29867
30039
|
const error = new Error('WebSocket error');
|
|
29868
30040
|
console.error('WebSocket error:', error.message);
|
|
@@ -29933,7 +30105,7 @@
|
|
|
29933
30105
|
}
|
|
29934
30106
|
return String(channel);
|
|
29935
30107
|
}
|
|
29936
|
-
subscribe(channelsOrChannel, callback) {
|
|
30108
|
+
subscribe(channelsOrChannel, callback, queries = []) {
|
|
29937
30109
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29938
30110
|
const channelArray = Array.isArray(channelsOrChannel)
|
|
29939
30111
|
? channelsOrChannel
|
|
@@ -29941,13 +30113,29 @@
|
|
|
29941
30113
|
// Convert all channels to strings
|
|
29942
30114
|
const channelStrings = channelArray.map(ch => this.channelToString(ch));
|
|
29943
30115
|
const channels = new Set(channelStrings);
|
|
29944
|
-
|
|
29945
|
-
|
|
29946
|
-
|
|
29947
|
-
|
|
30116
|
+
// Convert queries to array of strings
|
|
30117
|
+
// Ensure each query is a separate string in the array
|
|
30118
|
+
const queryStrings = [];
|
|
30119
|
+
for (const q of (queries !== null && queries !== void 0 ? queries : [])) {
|
|
30120
|
+
if (Array.isArray(q)) {
|
|
30121
|
+
// Handle nested arrays: [[q1, q2]] -> [q1, q2]
|
|
30122
|
+
for (const inner of q) {
|
|
30123
|
+
queryStrings.push(typeof inner === 'string' ? inner : inner.toString());
|
|
30124
|
+
}
|
|
30125
|
+
}
|
|
30126
|
+
else {
|
|
30127
|
+
queryStrings.push(typeof q === 'string' ? q : q.toString());
|
|
30128
|
+
}
|
|
29948
30129
|
}
|
|
29949
|
-
|
|
30130
|
+
// Allocate a new slot index
|
|
30131
|
+
this.subscriptionsCounter++;
|
|
30132
|
+
const slot = this.subscriptionsCounter;
|
|
30133
|
+
// Store slot-centric data: channels, queries, and callback belong to the slot
|
|
30134
|
+
// queries is stored as string[] (array of query strings)
|
|
30135
|
+
// No channel mutation occurs here - channels are derived from slots in createSocket()
|
|
30136
|
+
this.activeSubscriptions.set(slot, {
|
|
29950
30137
|
channels,
|
|
30138
|
+
queries: queryStrings,
|
|
29951
30139
|
callback
|
|
29952
30140
|
});
|
|
29953
30141
|
this.subCallDepth++;
|
|
@@ -29958,23 +30146,19 @@
|
|
|
29958
30146
|
this.subCallDepth--;
|
|
29959
30147
|
return {
|
|
29960
30148
|
close: () => __awaiter(this, void 0, void 0, function* () {
|
|
29961
|
-
this.
|
|
29962
|
-
this.
|
|
30149
|
+
const subscriptionId = this.slotToSubscriptionId.get(slot);
|
|
30150
|
+
this.activeSubscriptions.delete(slot);
|
|
30151
|
+
this.slotToSubscriptionId.delete(slot);
|
|
30152
|
+
if (subscriptionId) {
|
|
30153
|
+
this.subscriptionIdToSlot.delete(subscriptionId);
|
|
30154
|
+
}
|
|
29963
30155
|
yield this.createSocket();
|
|
29964
30156
|
})
|
|
29965
30157
|
};
|
|
29966
30158
|
});
|
|
29967
30159
|
}
|
|
29968
|
-
cleanUp(
|
|
29969
|
-
|
|
29970
|
-
if (!channels.has(channel)) {
|
|
29971
|
-
return true;
|
|
29972
|
-
}
|
|
29973
|
-
const subsWithChannel = Array.from(this.activeSubscriptions.values())
|
|
29974
|
-
.filter(sub => sub.channels.has(channel));
|
|
29975
|
-
return subsWithChannel.length > 0;
|
|
29976
|
-
}));
|
|
29977
|
-
}
|
|
30160
|
+
// cleanUp is no longer needed - slots are removed directly in subscribe().close()
|
|
30161
|
+
// Channels are automatically rebuilt from remaining slots in createSocket()
|
|
29978
30162
|
handleMessage(message) {
|
|
29979
30163
|
if (!message.type) {
|
|
29980
30164
|
return;
|
|
@@ -30000,6 +30184,19 @@
|
|
|
30000
30184
|
return;
|
|
30001
30185
|
}
|
|
30002
30186
|
const messageData = message.data;
|
|
30187
|
+
// Store subscription ID mappings from backend
|
|
30188
|
+
// Format: { "0": "sub_a1f9", "1": "sub_b83c", ... }
|
|
30189
|
+
if (messageData.subscriptions) {
|
|
30190
|
+
this.slotToSubscriptionId.clear();
|
|
30191
|
+
this.subscriptionIdToSlot.clear();
|
|
30192
|
+
for (const [slotStr, subscriptionId] of Object.entries(messageData.subscriptions)) {
|
|
30193
|
+
const slot = Number(slotStr);
|
|
30194
|
+
if (!isNaN(slot)) {
|
|
30195
|
+
this.slotToSubscriptionId.set(slot, subscriptionId);
|
|
30196
|
+
this.subscriptionIdToSlot.set(subscriptionId, slot);
|
|
30197
|
+
}
|
|
30198
|
+
}
|
|
30199
|
+
}
|
|
30003
30200
|
let session = this.client.config.session;
|
|
30004
30201
|
if (!session) {
|
|
30005
30202
|
try {
|
|
@@ -30034,23 +30231,26 @@
|
|
|
30034
30231
|
const events = data.events;
|
|
30035
30232
|
const payload = data.payload;
|
|
30036
30233
|
const timestamp = data.timestamp;
|
|
30037
|
-
|
|
30234
|
+
const subscriptions = data.subscriptions;
|
|
30235
|
+
if (!channels || !events || !payload || !subscriptions || subscriptions.length === 0) {
|
|
30038
30236
|
return;
|
|
30039
30237
|
}
|
|
30040
|
-
|
|
30041
|
-
|
|
30042
|
-
|
|
30043
|
-
|
|
30044
|
-
|
|
30045
|
-
|
|
30046
|
-
|
|
30047
|
-
|
|
30048
|
-
|
|
30049
|
-
|
|
30050
|
-
|
|
30051
|
-
|
|
30052
|
-
|
|
30053
|
-
|
|
30238
|
+
// Iterate over all matching subscriptionIds and call callback for each
|
|
30239
|
+
for (const subscriptionId of subscriptions) {
|
|
30240
|
+
// O(1) lookup using subscriptionId
|
|
30241
|
+
const slot = this.subscriptionIdToSlot.get(subscriptionId);
|
|
30242
|
+
if (slot !== undefined) {
|
|
30243
|
+
const subscription = this.activeSubscriptions.get(slot);
|
|
30244
|
+
if (subscription) {
|
|
30245
|
+
const response = {
|
|
30246
|
+
events,
|
|
30247
|
+
channels,
|
|
30248
|
+
timestamp,
|
|
30249
|
+
payload,
|
|
30250
|
+
subscriptions
|
|
30251
|
+
};
|
|
30252
|
+
subscription.callback(response);
|
|
30253
|
+
}
|
|
30054
30254
|
}
|
|
30055
30255
|
}
|
|
30056
30256
|
}
|
|
@@ -30252,8 +30452,11 @@
|
|
|
30252
30452
|
constructor(segments) {
|
|
30253
30453
|
this.segments = segments;
|
|
30254
30454
|
}
|
|
30255
|
-
next(segment, id
|
|
30256
|
-
|
|
30455
|
+
next(segment, id) {
|
|
30456
|
+
const segments = id === undefined
|
|
30457
|
+
? [...this.segments, segment]
|
|
30458
|
+
: [...this.segments, segment, normalize(id)];
|
|
30459
|
+
return new Channel(segments);
|
|
30257
30460
|
}
|
|
30258
30461
|
resolve(action) {
|
|
30259
30462
|
return new Channel([...this.segments, action]);
|
|
@@ -30263,28 +30466,29 @@
|
|
|
30263
30466
|
}
|
|
30264
30467
|
// --- DATABASE ROUTE ---
|
|
30265
30468
|
// Only available on Channel<Database>
|
|
30266
|
-
collection(id
|
|
30267
|
-
|
|
30469
|
+
collection(id) {
|
|
30470
|
+
// Default: wildcard collection ID
|
|
30471
|
+
return this.next("collections", id !== null && id !== void 0 ? id : "*");
|
|
30268
30472
|
}
|
|
30269
30473
|
// Only available on Channel<Collection>
|
|
30270
|
-
document(id
|
|
30474
|
+
document(id) {
|
|
30475
|
+
// Default: no document ID segment
|
|
30271
30476
|
return this.next("documents", id);
|
|
30272
30477
|
}
|
|
30273
30478
|
// --- TABLESDB ROUTE ---
|
|
30274
|
-
table(id
|
|
30275
|
-
|
|
30479
|
+
table(id) {
|
|
30480
|
+
// Default: wildcard table ID
|
|
30481
|
+
return this.next("tables", id !== null && id !== void 0 ? id : "*");
|
|
30276
30482
|
}
|
|
30277
|
-
row(id
|
|
30483
|
+
row(id) {
|
|
30484
|
+
// Default: no row ID segment
|
|
30278
30485
|
return this.next("rows", id);
|
|
30279
30486
|
}
|
|
30280
30487
|
// --- BUCKET ROUTE ---
|
|
30281
|
-
file(id
|
|
30488
|
+
file(id) {
|
|
30489
|
+
// Default: no file ID segment
|
|
30282
30490
|
return this.next("files", id);
|
|
30283
30491
|
}
|
|
30284
|
-
// --- FUNCTION ROUTE ---
|
|
30285
|
-
execution(id = "*") {
|
|
30286
|
-
return this.next("executions", id);
|
|
30287
|
-
}
|
|
30288
30492
|
// --- TERMINAL ACTIONS ---
|
|
30289
30493
|
// Restricted to the Actionable union
|
|
30290
30494
|
create() {
|
|
@@ -30300,6 +30504,9 @@
|
|
|
30300
30504
|
static database(id = "*") {
|
|
30301
30505
|
return new Channel(["databases", normalize(id)]);
|
|
30302
30506
|
}
|
|
30507
|
+
static execution(id = "*") {
|
|
30508
|
+
return new Channel(["executions", normalize(id)]);
|
|
30509
|
+
}
|
|
30303
30510
|
static tablesdb(id = "*") {
|
|
30304
30511
|
return new Channel(["tablesdb", normalize(id)]);
|
|
30305
30512
|
}
|
|
@@ -30315,9 +30522,8 @@
|
|
|
30315
30522
|
static membership(id = "*") {
|
|
30316
30523
|
return new Channel(["memberships", normalize(id)]);
|
|
30317
30524
|
}
|
|
30318
|
-
static account(
|
|
30319
|
-
|
|
30320
|
-
return id === "*" ? "account" : `account.${id}`;
|
|
30525
|
+
static account() {
|
|
30526
|
+
return "account";
|
|
30321
30527
|
}
|
|
30322
30528
|
// Global events
|
|
30323
30529
|
static documents() {
|
|
@@ -30335,6 +30541,9 @@
|
|
|
30335
30541
|
static teams() {
|
|
30336
30542
|
return "teams";
|
|
30337
30543
|
}
|
|
30544
|
+
static memberships() {
|
|
30545
|
+
return "memberships";
|
|
30546
|
+
}
|
|
30338
30547
|
}
|
|
30339
30548
|
|
|
30340
30549
|
exports.Condition = void 0;
|
|
@@ -30667,6 +30876,7 @@
|
|
|
30667
30876
|
Scopes["RestorationsWrite"] = "restorations.write";
|
|
30668
30877
|
Scopes["DomainsRead"] = "domains.read";
|
|
30669
30878
|
Scopes["DomainsWrite"] = "domains.write";
|
|
30879
|
+
Scopes["EventsRead"] = "events.read";
|
|
30670
30880
|
})(exports.Scopes || (exports.Scopes = {}));
|
|
30671
30881
|
|
|
30672
30882
|
exports.AuthenticatorType = void 0;
|
|
@@ -31429,12 +31639,12 @@
|
|
|
31429
31639
|
ImageFormat["Gif"] = "gif";
|
|
31430
31640
|
})(exports.ImageFormat || (exports.ImageFormat = {}));
|
|
31431
31641
|
|
|
31432
|
-
exports.
|
|
31433
|
-
(function (
|
|
31434
|
-
|
|
31435
|
-
|
|
31436
|
-
|
|
31437
|
-
})(exports.
|
|
31642
|
+
exports.BackupServices = void 0;
|
|
31643
|
+
(function (BackupServices) {
|
|
31644
|
+
BackupServices["Databases"] = "databases";
|
|
31645
|
+
BackupServices["Functions"] = "functions";
|
|
31646
|
+
BackupServices["Storage"] = "storage";
|
|
31647
|
+
})(exports.BackupServices || (exports.BackupServices = {}));
|
|
31438
31648
|
|
|
31439
31649
|
exports.Platform = void 0;
|
|
31440
31650
|
(function (Platform) {
|
|
@@ -31483,6 +31693,14 @@
|
|
|
31483
31693
|
OrderBy["Desc"] = "desc";
|
|
31484
31694
|
})(exports.OrderBy || (exports.OrderBy = {}));
|
|
31485
31695
|
|
|
31696
|
+
exports.RegistrationType = void 0;
|
|
31697
|
+
(function (RegistrationType) {
|
|
31698
|
+
RegistrationType["New"] = "new";
|
|
31699
|
+
RegistrationType["Transfer"] = "transfer";
|
|
31700
|
+
RegistrationType["Renewal"] = "renewal";
|
|
31701
|
+
RegistrationType["Trade"] = "trade";
|
|
31702
|
+
})(exports.RegistrationType || (exports.RegistrationType = {}));
|
|
31703
|
+
|
|
31486
31704
|
exports.FilterType = void 0;
|
|
31487
31705
|
(function (FilterType) {
|
|
31488
31706
|
FilterType["Premium"] = "premium";
|
|
@@ -31527,6 +31745,7 @@
|
|
|
31527
31745
|
Runtime["Dart35"] = "dart-3.5";
|
|
31528
31746
|
Runtime["Dart38"] = "dart-3.8";
|
|
31529
31747
|
Runtime["Dart39"] = "dart-3.9";
|
|
31748
|
+
Runtime["Dart310"] = "dart-3.10";
|
|
31530
31749
|
Runtime["Dotnet60"] = "dotnet-6.0";
|
|
31531
31750
|
Runtime["Dotnet70"] = "dotnet-7.0";
|
|
31532
31751
|
Runtime["Dotnet80"] = "dotnet-8.0";
|
|
@@ -31555,6 +31774,7 @@
|
|
|
31555
31774
|
Runtime["Flutter329"] = "flutter-3.29";
|
|
31556
31775
|
Runtime["Flutter332"] = "flutter-3.32";
|
|
31557
31776
|
Runtime["Flutter335"] = "flutter-3.35";
|
|
31777
|
+
Runtime["Flutter338"] = "flutter-3.38";
|
|
31558
31778
|
})(exports.Runtime || (exports.Runtime = {}));
|
|
31559
31779
|
|
|
31560
31780
|
exports.Runtimes = void 0;
|
|
@@ -31595,6 +31815,7 @@
|
|
|
31595
31815
|
Runtimes["Dart35"] = "dart-3.5";
|
|
31596
31816
|
Runtimes["Dart38"] = "dart-3.8";
|
|
31597
31817
|
Runtimes["Dart39"] = "dart-3.9";
|
|
31818
|
+
Runtimes["Dart310"] = "dart-3.10";
|
|
31598
31819
|
Runtimes["Dotnet60"] = "dotnet-6.0";
|
|
31599
31820
|
Runtimes["Dotnet70"] = "dotnet-7.0";
|
|
31600
31821
|
Runtimes["Dotnet80"] = "dotnet-8.0";
|
|
@@ -31623,6 +31844,7 @@
|
|
|
31623
31844
|
Runtimes["Flutter329"] = "flutter-3.29";
|
|
31624
31845
|
Runtimes["Flutter332"] = "flutter-3.32";
|
|
31625
31846
|
Runtimes["Flutter335"] = "flutter-3.35";
|
|
31847
|
+
Runtimes["Flutter338"] = "flutter-3.38";
|
|
31626
31848
|
})(exports.Runtimes || (exports.Runtimes = {}));
|
|
31627
31849
|
|
|
31628
31850
|
exports.UseCases = void 0;
|
|
@@ -31790,12 +32012,6 @@
|
|
|
31790
32012
|
SMTPSecure["Ssl"] = "ssl";
|
|
31791
32013
|
})(exports.SMTPSecure || (exports.SMTPSecure = {}));
|
|
31792
32014
|
|
|
31793
|
-
exports.Status = void 0;
|
|
31794
|
-
(function (Status) {
|
|
31795
|
-
Status["Active"] = "active";
|
|
31796
|
-
Status["Archived"] = "archived";
|
|
31797
|
-
})(exports.Status || (exports.Status = {}));
|
|
31798
|
-
|
|
31799
32015
|
exports.EmailTemplateType = void 0;
|
|
31800
32016
|
(function (EmailTemplateType) {
|
|
31801
32017
|
EmailTemplateType["Verification"] = "verification";
|
|
@@ -32156,6 +32372,7 @@
|
|
|
32156
32372
|
BuildRuntime["Dart35"] = "dart-3.5";
|
|
32157
32373
|
BuildRuntime["Dart38"] = "dart-3.8";
|
|
32158
32374
|
BuildRuntime["Dart39"] = "dart-3.9";
|
|
32375
|
+
BuildRuntime["Dart310"] = "dart-3.10";
|
|
32159
32376
|
BuildRuntime["Dotnet60"] = "dotnet-6.0";
|
|
32160
32377
|
BuildRuntime["Dotnet70"] = "dotnet-7.0";
|
|
32161
32378
|
BuildRuntime["Dotnet80"] = "dotnet-8.0";
|
|
@@ -32184,6 +32401,7 @@
|
|
|
32184
32401
|
BuildRuntime["Flutter329"] = "flutter-3.29";
|
|
32185
32402
|
BuildRuntime["Flutter332"] = "flutter-3.32";
|
|
32186
32403
|
BuildRuntime["Flutter335"] = "flutter-3.35";
|
|
32404
|
+
BuildRuntime["Flutter338"] = "flutter-3.38";
|
|
32187
32405
|
})(exports.BuildRuntime || (exports.BuildRuntime = {}));
|
|
32188
32406
|
|
|
32189
32407
|
exports.Adapter = void 0;
|
|
@@ -32231,15 +32449,6 @@
|
|
|
32231
32449
|
ImageGravity["Bottomright"] = "bottom-right";
|
|
32232
32450
|
})(exports.ImageGravity || (exports.ImageGravity = {}));
|
|
32233
32451
|
|
|
32234
|
-
exports.Roles = void 0;
|
|
32235
|
-
(function (Roles) {
|
|
32236
|
-
Roles["Developer"] = "developer";
|
|
32237
|
-
Roles["Editor"] = "editor";
|
|
32238
|
-
Roles["Analyst"] = "analyst";
|
|
32239
|
-
Roles["Billing"] = "billing";
|
|
32240
|
-
Roles["Owner"] = "owner";
|
|
32241
|
-
})(exports.Roles || (exports.Roles = {}));
|
|
32242
|
-
|
|
32243
32452
|
exports.PasswordHash = void 0;
|
|
32244
32453
|
(function (PasswordHash) {
|
|
32245
32454
|
PasswordHash["Sha1"] = "sha1";
|
|
@@ -32371,6 +32580,7 @@
|
|
|
32371
32580
|
})(exports.BillingPlanGroup || (exports.BillingPlanGroup = {}));
|
|
32372
32581
|
|
|
32373
32582
|
exports.Account = Account;
|
|
32583
|
+
exports.Activities = Activities;
|
|
32374
32584
|
exports.AppwriteException = AppwriteException;
|
|
32375
32585
|
exports.Assistant = Assistant;
|
|
32376
32586
|
exports.Avatars = Avatars;
|