@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/cjs/sdk.js
CHANGED
|
@@ -541,7 +541,7 @@ class Client {
|
|
|
541
541
|
'x-sdk-name': 'Console',
|
|
542
542
|
'x-sdk-platform': 'console',
|
|
543
543
|
'x-sdk-language': 'web',
|
|
544
|
-
'x-sdk-version': '2.
|
|
544
|
+
'x-sdk-version': '2.3.1',
|
|
545
545
|
'X-Appwrite-Response-Format': '1.8.0',
|
|
546
546
|
};
|
|
547
547
|
this.realtime = {
|
|
@@ -550,7 +550,10 @@ class Client {
|
|
|
550
550
|
heartbeat: undefined,
|
|
551
551
|
url: '',
|
|
552
552
|
channels: new Set(),
|
|
553
|
+
queries: new Set(),
|
|
553
554
|
subscriptions: new Map(),
|
|
555
|
+
slotToSubscriptionId: new Map(),
|
|
556
|
+
subscriptionIdToSlot: new Map(),
|
|
554
557
|
subscriptionsCounter: 0,
|
|
555
558
|
reconnect: true,
|
|
556
559
|
reconnectAttempts: 0,
|
|
@@ -585,26 +588,34 @@ class Client {
|
|
|
585
588
|
}, 20000);
|
|
586
589
|
},
|
|
587
590
|
createSocket: () => {
|
|
588
|
-
var _a, _b, _c;
|
|
589
|
-
if (this.realtime.
|
|
591
|
+
var _a, _b, _c, _d;
|
|
592
|
+
if (this.realtime.subscriptions.size < 1) {
|
|
590
593
|
this.realtime.reconnect = false;
|
|
591
594
|
(_a = this.realtime.socket) === null || _a === void 0 ? void 0 : _a.close();
|
|
592
595
|
return;
|
|
593
596
|
}
|
|
594
|
-
const
|
|
595
|
-
|
|
596
|
-
channels.set('project', this.config.project);
|
|
597
|
-
}
|
|
597
|
+
const encodedProject = encodeURIComponent((_b = this.config.project) !== null && _b !== void 0 ? _b : '');
|
|
598
|
+
let queryParams = 'project=' + encodedProject;
|
|
598
599
|
this.realtime.channels.forEach(channel => {
|
|
599
|
-
|
|
600
|
+
queryParams += '&channels[]=' + encodeURIComponent(channel);
|
|
601
|
+
});
|
|
602
|
+
// Per-subscription queries: channel[slot][]=query so server can route events by subscription
|
|
603
|
+
const selectAllQuery = Query.select(['*']).toString();
|
|
604
|
+
this.realtime.subscriptions.forEach((sub, slot) => {
|
|
605
|
+
const queries = sub.queries.length > 0 ? sub.queries : [selectAllQuery];
|
|
606
|
+
sub.channels.forEach(channel => {
|
|
607
|
+
queries.forEach(query => {
|
|
608
|
+
queryParams += '&' + encodeURIComponent(channel) + '[' + slot + '][]=' + encodeURIComponent(query);
|
|
609
|
+
});
|
|
610
|
+
});
|
|
600
611
|
});
|
|
601
|
-
const url = this.config.endpointRealtime + '/realtime?' +
|
|
612
|
+
const url = this.config.endpointRealtime + '/realtime?' + queryParams;
|
|
602
613
|
if (url !== this.realtime.url || // Check if URL is present
|
|
603
614
|
!this.realtime.socket || // Check if WebSocket has not been created
|
|
604
|
-
((
|
|
615
|
+
((_c = this.realtime.socket) === null || _c === void 0 ? void 0 : _c.readyState) > WebSocket.OPEN // Check if WebSocket is CLOSING (3) or CLOSED (4)
|
|
605
616
|
) {
|
|
606
617
|
if (this.realtime.socket &&
|
|
607
|
-
((
|
|
618
|
+
((_d = this.realtime.socket) === null || _d === void 0 ? void 0 : _d.readyState) < WebSocket.CLOSING // Close WebSocket if it is CONNECTING (0) or OPEN (1)
|
|
608
619
|
) {
|
|
609
620
|
this.realtime.reconnect = false;
|
|
610
621
|
this.realtime.socket.close();
|
|
@@ -640,14 +651,25 @@ class Client {
|
|
|
640
651
|
const message = JSONbig.parse(event.data);
|
|
641
652
|
this.realtime.lastMessage = message;
|
|
642
653
|
switch (message.type) {
|
|
643
|
-
case 'connected':
|
|
654
|
+
case 'connected': {
|
|
655
|
+
const messageData = message.data;
|
|
656
|
+
if (messageData === null || messageData === void 0 ? void 0 : messageData.subscriptions) {
|
|
657
|
+
this.realtime.slotToSubscriptionId.clear();
|
|
658
|
+
this.realtime.subscriptionIdToSlot.clear();
|
|
659
|
+
for (const [slotStr, subscriptionId] of Object.entries(messageData.subscriptions)) {
|
|
660
|
+
const slot = Number(slotStr);
|
|
661
|
+
if (!isNaN(slot) && typeof subscriptionId === 'string') {
|
|
662
|
+
this.realtime.slotToSubscriptionId.set(slot, subscriptionId);
|
|
663
|
+
this.realtime.subscriptionIdToSlot.set(subscriptionId, slot);
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
644
667
|
let session = this.config.session;
|
|
645
668
|
if (!session) {
|
|
646
669
|
const cookie = JSONbig.parse((_a = window.localStorage.getItem('cookieFallback')) !== null && _a !== void 0 ? _a : '{}');
|
|
647
670
|
session = cookie === null || cookie === void 0 ? void 0 : cookie[`a_session_${this.config.project}`];
|
|
648
671
|
}
|
|
649
|
-
|
|
650
|
-
if (session && !messageData.user) {
|
|
672
|
+
if (session && !(messageData === null || messageData === void 0 ? void 0 : messageData.user)) {
|
|
651
673
|
(_b = this.realtime.socket) === null || _b === void 0 ? void 0 : _b.send(JSONbig.stringify({
|
|
652
674
|
type: 'authentication',
|
|
653
675
|
data: {
|
|
@@ -656,12 +678,27 @@ class Client {
|
|
|
656
678
|
}));
|
|
657
679
|
}
|
|
658
680
|
break;
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
681
|
+
}
|
|
682
|
+
case 'event': {
|
|
683
|
+
const data = message.data;
|
|
684
|
+
if (!(data === null || data === void 0 ? void 0 : data.channels))
|
|
685
|
+
break;
|
|
686
|
+
const eventSubIds = data.subscriptions;
|
|
687
|
+
if (eventSubIds && eventSubIds.length > 0) {
|
|
688
|
+
for (const subscriptionId of eventSubIds) {
|
|
689
|
+
const slot = this.realtime.subscriptionIdToSlot.get(subscriptionId);
|
|
690
|
+
if (slot !== undefined) {
|
|
691
|
+
const subscription = this.realtime.subscriptions.get(slot);
|
|
692
|
+
if (subscription) {
|
|
693
|
+
setTimeout(() => subscription.callback(data));
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
else {
|
|
662
699
|
const isSubscribed = data.channels.some(channel => this.realtime.channels.has(channel));
|
|
663
700
|
if (!isSubscribed)
|
|
664
|
-
|
|
701
|
+
break;
|
|
665
702
|
this.realtime.subscriptions.forEach(subscription => {
|
|
666
703
|
if (data.channels.some(channel => subscription.channels.includes(channel))) {
|
|
667
704
|
setTimeout(() => subscription.callback(data));
|
|
@@ -669,6 +706,7 @@ class Client {
|
|
|
669
706
|
});
|
|
670
707
|
}
|
|
671
708
|
break;
|
|
709
|
+
}
|
|
672
710
|
case 'pong':
|
|
673
711
|
break; // Handle pong response if needed
|
|
674
712
|
case 'error':
|
|
@@ -681,7 +719,7 @@ class Client {
|
|
|
681
719
|
console.error(e);
|
|
682
720
|
}
|
|
683
721
|
},
|
|
684
|
-
cleanUp: channels => {
|
|
722
|
+
cleanUp: (channels, queries) => {
|
|
685
723
|
this.realtime.channels.forEach(channel => {
|
|
686
724
|
if (channels.includes(channel)) {
|
|
687
725
|
let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
|
|
@@ -692,6 +730,17 @@ class Client {
|
|
|
692
730
|
}
|
|
693
731
|
}
|
|
694
732
|
});
|
|
733
|
+
this.realtime.queries.forEach(query => {
|
|
734
|
+
if (queries.includes(query)) {
|
|
735
|
+
let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
|
|
736
|
+
var _a;
|
|
737
|
+
return (_a = subscription.queries) === null || _a === void 0 ? void 0 : _a.includes(query);
|
|
738
|
+
});
|
|
739
|
+
if (!found) {
|
|
740
|
+
this.realtime.queries.delete(query);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
});
|
|
695
744
|
}
|
|
696
745
|
};
|
|
697
746
|
}
|
|
@@ -872,7 +921,7 @@ class Client {
|
|
|
872
921
|
* @param {(payload: RealtimeMessage) => void} callback Is called on every realtime update.
|
|
873
922
|
* @returns {() => void} Unsubscribes from events.
|
|
874
923
|
*/
|
|
875
|
-
subscribe(channels, callback) {
|
|
924
|
+
subscribe(channels, callback, queries = []) {
|
|
876
925
|
const channelArray = Array.isArray(channels) ? channels : [channels];
|
|
877
926
|
// Convert Channel instances to strings
|
|
878
927
|
const channelStrings = channelArray.map(ch => {
|
|
@@ -887,15 +936,18 @@ class Client {
|
|
|
887
936
|
return String(ch);
|
|
888
937
|
});
|
|
889
938
|
channelStrings.forEach(channel => this.realtime.channels.add(channel));
|
|
939
|
+
const queryStrings = (queries !== null && queries !== void 0 ? queries : []).map(q => typeof q === 'string' ? q : q.toString());
|
|
940
|
+
queryStrings.forEach(query => this.realtime.queries.add(query));
|
|
890
941
|
const counter = this.realtime.subscriptionsCounter++;
|
|
891
942
|
this.realtime.subscriptions.set(counter, {
|
|
892
943
|
channels: channelStrings,
|
|
944
|
+
queries: queryStrings,
|
|
893
945
|
callback
|
|
894
946
|
});
|
|
895
947
|
this.realtime.connect();
|
|
896
948
|
return () => {
|
|
897
949
|
this.realtime.subscriptions.delete(counter);
|
|
898
|
-
this.realtime.cleanUp(channelStrings);
|
|
950
|
+
this.realtime.cleanUp(channelStrings, queryStrings);
|
|
899
951
|
this.realtime.connect();
|
|
900
952
|
};
|
|
901
953
|
}
|
|
@@ -1667,7 +1719,7 @@ class Account {
|
|
|
1667
1719
|
}
|
|
1668
1720
|
createMfaAuthenticator(paramsOrFirst) {
|
|
1669
1721
|
let params;
|
|
1670
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1722
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1671
1723
|
params = (paramsOrFirst || {});
|
|
1672
1724
|
}
|
|
1673
1725
|
else {
|
|
@@ -1689,7 +1741,7 @@ class Account {
|
|
|
1689
1741
|
}
|
|
1690
1742
|
createMFAAuthenticator(paramsOrFirst) {
|
|
1691
1743
|
let params;
|
|
1692
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1744
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1693
1745
|
params = (paramsOrFirst || {});
|
|
1694
1746
|
}
|
|
1695
1747
|
else {
|
|
@@ -1711,7 +1763,7 @@ class Account {
|
|
|
1711
1763
|
}
|
|
1712
1764
|
updateMfaAuthenticator(paramsOrFirst, ...rest) {
|
|
1713
1765
|
let params;
|
|
1714
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1766
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst || 'otp' in paramsOrFirst))) {
|
|
1715
1767
|
params = (paramsOrFirst || {});
|
|
1716
1768
|
}
|
|
1717
1769
|
else {
|
|
@@ -1741,7 +1793,7 @@ class Account {
|
|
|
1741
1793
|
}
|
|
1742
1794
|
updateMFAAuthenticator(paramsOrFirst, ...rest) {
|
|
1743
1795
|
let params;
|
|
1744
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1796
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst || 'otp' in paramsOrFirst))) {
|
|
1745
1797
|
params = (paramsOrFirst || {});
|
|
1746
1798
|
}
|
|
1747
1799
|
else {
|
|
@@ -1771,7 +1823,7 @@ class Account {
|
|
|
1771
1823
|
}
|
|
1772
1824
|
deleteMfaAuthenticator(paramsOrFirst) {
|
|
1773
1825
|
let params;
|
|
1774
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1826
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1775
1827
|
params = (paramsOrFirst || {});
|
|
1776
1828
|
}
|
|
1777
1829
|
else {
|
|
@@ -1793,7 +1845,7 @@ class Account {
|
|
|
1793
1845
|
}
|
|
1794
1846
|
deleteMFAAuthenticator(paramsOrFirst) {
|
|
1795
1847
|
let params;
|
|
1796
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1848
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1797
1849
|
params = (paramsOrFirst || {});
|
|
1798
1850
|
}
|
|
1799
1851
|
else {
|
|
@@ -1815,7 +1867,7 @@ class Account {
|
|
|
1815
1867
|
}
|
|
1816
1868
|
createMfaChallenge(paramsOrFirst) {
|
|
1817
1869
|
let params;
|
|
1818
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
|
|
1870
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
|
|
1819
1871
|
params = (paramsOrFirst || {});
|
|
1820
1872
|
}
|
|
1821
1873
|
else {
|
|
@@ -1840,7 +1892,7 @@ class Account {
|
|
|
1840
1892
|
}
|
|
1841
1893
|
createMFAChallenge(paramsOrFirst) {
|
|
1842
1894
|
let params;
|
|
1843
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
|
|
1895
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
|
|
1844
1896
|
params = (paramsOrFirst || {});
|
|
1845
1897
|
}
|
|
1846
1898
|
else {
|
|
@@ -2333,7 +2385,7 @@ class Account {
|
|
|
2333
2385
|
}
|
|
2334
2386
|
updatePrefs(paramsOrFirst) {
|
|
2335
2387
|
let params;
|
|
2336
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'prefs' in paramsOrFirst)) {
|
|
2388
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('prefs' in paramsOrFirst))) {
|
|
2337
2389
|
params = (paramsOrFirst || {});
|
|
2338
2390
|
}
|
|
2339
2391
|
else {
|
|
@@ -2541,7 +2593,7 @@ class Account {
|
|
|
2541
2593
|
}
|
|
2542
2594
|
createOAuth2Session(paramsOrFirst, ...rest) {
|
|
2543
2595
|
let params;
|
|
2544
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'provider' in paramsOrFirst)) {
|
|
2596
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('provider' in paramsOrFirst || 'success' in paramsOrFirst || 'failure' in paramsOrFirst || 'scopes' in paramsOrFirst))) {
|
|
2545
2597
|
params = (paramsOrFirst || {});
|
|
2546
2598
|
}
|
|
2547
2599
|
else {
|
|
@@ -2901,7 +2953,7 @@ class Account {
|
|
|
2901
2953
|
}
|
|
2902
2954
|
createOAuth2Token(paramsOrFirst, ...rest) {
|
|
2903
2955
|
let params;
|
|
2904
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'provider' in paramsOrFirst)) {
|
|
2956
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('provider' in paramsOrFirst || 'success' in paramsOrFirst || 'failure' in paramsOrFirst || 'scopes' in paramsOrFirst))) {
|
|
2905
2957
|
params = (paramsOrFirst || {});
|
|
2906
2958
|
}
|
|
2907
2959
|
else {
|
|
@@ -3142,13 +3194,59 @@ class Account {
|
|
|
3142
3194
|
}
|
|
3143
3195
|
}
|
|
3144
3196
|
|
|
3197
|
+
class Activities {
|
|
3198
|
+
constructor(client) {
|
|
3199
|
+
this.client = client;
|
|
3200
|
+
}
|
|
3201
|
+
listEvents(paramsOrFirst) {
|
|
3202
|
+
let params;
|
|
3203
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3204
|
+
params = (paramsOrFirst || {});
|
|
3205
|
+
}
|
|
3206
|
+
else {
|
|
3207
|
+
params = {
|
|
3208
|
+
queries: paramsOrFirst
|
|
3209
|
+
};
|
|
3210
|
+
}
|
|
3211
|
+
const queries = params.queries;
|
|
3212
|
+
const apiPath = '/activities/events';
|
|
3213
|
+
const payload = {};
|
|
3214
|
+
if (typeof queries !== 'undefined') {
|
|
3215
|
+
payload['queries'] = queries;
|
|
3216
|
+
}
|
|
3217
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3218
|
+
const apiHeaders = {};
|
|
3219
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
3220
|
+
}
|
|
3221
|
+
getEvent(paramsOrFirst) {
|
|
3222
|
+
let params;
|
|
3223
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3224
|
+
params = (paramsOrFirst || {});
|
|
3225
|
+
}
|
|
3226
|
+
else {
|
|
3227
|
+
params = {
|
|
3228
|
+
eventId: paramsOrFirst
|
|
3229
|
+
};
|
|
3230
|
+
}
|
|
3231
|
+
const eventId = params.eventId;
|
|
3232
|
+
if (typeof eventId === 'undefined') {
|
|
3233
|
+
throw new AppwriteException('Missing required parameter: "eventId"');
|
|
3234
|
+
}
|
|
3235
|
+
const apiPath = '/activities/events/{eventId}'.replace('{eventId}', eventId);
|
|
3236
|
+
const payload = {};
|
|
3237
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3238
|
+
const apiHeaders = {};
|
|
3239
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3145
3243
|
class Avatars {
|
|
3146
3244
|
constructor(client) {
|
|
3147
3245
|
this.client = client;
|
|
3148
3246
|
}
|
|
3149
3247
|
getBrowser(paramsOrFirst, ...rest) {
|
|
3150
3248
|
let params;
|
|
3151
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
3249
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
3152
3250
|
params = (paramsOrFirst || {});
|
|
3153
3251
|
}
|
|
3154
3252
|
else {
|
|
@@ -3186,7 +3284,7 @@ class Avatars {
|
|
|
3186
3284
|
}
|
|
3187
3285
|
getCreditCard(paramsOrFirst, ...rest) {
|
|
3188
3286
|
let params;
|
|
3189
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
3287
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
3190
3288
|
params = (paramsOrFirst || {});
|
|
3191
3289
|
}
|
|
3192
3290
|
else {
|
|
@@ -3250,7 +3348,7 @@ class Avatars {
|
|
|
3250
3348
|
}
|
|
3251
3349
|
getFlag(paramsOrFirst, ...rest) {
|
|
3252
3350
|
let params;
|
|
3253
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
3351
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
3254
3352
|
params = (paramsOrFirst || {});
|
|
3255
3353
|
}
|
|
3256
3354
|
else {
|
|
@@ -3550,7 +3648,7 @@ class Backups {
|
|
|
3550
3648
|
}
|
|
3551
3649
|
createArchive(paramsOrFirst, ...rest) {
|
|
3552
3650
|
let params;
|
|
3553
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'services' in paramsOrFirst)) {
|
|
3651
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('services' in paramsOrFirst || 'resourceId' in paramsOrFirst))) {
|
|
3554
3652
|
params = (paramsOrFirst || {});
|
|
3555
3653
|
}
|
|
3556
3654
|
else {
|
|
@@ -3950,7 +4048,7 @@ class Console {
|
|
|
3950
4048
|
}
|
|
3951
4049
|
getPlans(paramsOrFirst) {
|
|
3952
4050
|
let params;
|
|
3953
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'platform' in paramsOrFirst)) {
|
|
4051
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('platform' in paramsOrFirst))) {
|
|
3954
4052
|
params = (paramsOrFirst || {});
|
|
3955
4053
|
}
|
|
3956
4054
|
else {
|
|
@@ -4435,7 +4533,7 @@ class Databases {
|
|
|
4435
4533
|
}
|
|
4436
4534
|
listUsage(paramsOrFirst) {
|
|
4437
4535
|
let params;
|
|
4438
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
4536
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
4439
4537
|
params = (paramsOrFirst || {});
|
|
4440
4538
|
}
|
|
4441
4539
|
else {
|
|
@@ -5667,7 +5765,8 @@ class Databases {
|
|
|
5667
5765
|
key: rest[1],
|
|
5668
5766
|
required: rest[2],
|
|
5669
5767
|
xdefault: rest[3],
|
|
5670
|
-
array: rest[4]
|
|
5768
|
+
array: rest[4],
|
|
5769
|
+
encrypt: rest[5]
|
|
5671
5770
|
};
|
|
5672
5771
|
}
|
|
5673
5772
|
const databaseId = params.databaseId;
|
|
@@ -5676,6 +5775,7 @@ class Databases {
|
|
|
5676
5775
|
const required = params.required;
|
|
5677
5776
|
const xdefault = params.xdefault;
|
|
5678
5777
|
const array = params.array;
|
|
5778
|
+
const encrypt = params.encrypt;
|
|
5679
5779
|
if (typeof databaseId === 'undefined') {
|
|
5680
5780
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
5681
5781
|
}
|
|
@@ -5702,6 +5802,9 @@ class Databases {
|
|
|
5702
5802
|
if (typeof array !== 'undefined') {
|
|
5703
5803
|
payload['array'] = array;
|
|
5704
5804
|
}
|
|
5805
|
+
if (typeof encrypt !== 'undefined') {
|
|
5806
|
+
payload['encrypt'] = encrypt;
|
|
5807
|
+
}
|
|
5705
5808
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5706
5809
|
const apiHeaders = {
|
|
5707
5810
|
'content-type': 'application/json',
|
|
@@ -5773,7 +5876,8 @@ class Databases {
|
|
|
5773
5876
|
key: rest[1],
|
|
5774
5877
|
required: rest[2],
|
|
5775
5878
|
xdefault: rest[3],
|
|
5776
|
-
array: rest[4]
|
|
5879
|
+
array: rest[4],
|
|
5880
|
+
encrypt: rest[5]
|
|
5777
5881
|
};
|
|
5778
5882
|
}
|
|
5779
5883
|
const databaseId = params.databaseId;
|
|
@@ -5782,6 +5886,7 @@ class Databases {
|
|
|
5782
5886
|
const required = params.required;
|
|
5783
5887
|
const xdefault = params.xdefault;
|
|
5784
5888
|
const array = params.array;
|
|
5889
|
+
const encrypt = params.encrypt;
|
|
5785
5890
|
if (typeof databaseId === 'undefined') {
|
|
5786
5891
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
5787
5892
|
}
|
|
@@ -5808,6 +5913,9 @@ class Databases {
|
|
|
5808
5913
|
if (typeof array !== 'undefined') {
|
|
5809
5914
|
payload['array'] = array;
|
|
5810
5915
|
}
|
|
5916
|
+
if (typeof encrypt !== 'undefined') {
|
|
5917
|
+
payload['encrypt'] = encrypt;
|
|
5918
|
+
}
|
|
5811
5919
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5812
5920
|
const apiHeaders = {
|
|
5813
5921
|
'content-type': 'application/json',
|
|
@@ -6262,7 +6370,8 @@ class Databases {
|
|
|
6262
6370
|
key: rest[1],
|
|
6263
6371
|
required: rest[2],
|
|
6264
6372
|
xdefault: rest[3],
|
|
6265
|
-
array: rest[4]
|
|
6373
|
+
array: rest[4],
|
|
6374
|
+
encrypt: rest[5]
|
|
6266
6375
|
};
|
|
6267
6376
|
}
|
|
6268
6377
|
const databaseId = params.databaseId;
|
|
@@ -6271,6 +6380,7 @@ class Databases {
|
|
|
6271
6380
|
const required = params.required;
|
|
6272
6381
|
const xdefault = params.xdefault;
|
|
6273
6382
|
const array = params.array;
|
|
6383
|
+
const encrypt = params.encrypt;
|
|
6274
6384
|
if (typeof databaseId === 'undefined') {
|
|
6275
6385
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6276
6386
|
}
|
|
@@ -6297,6 +6407,9 @@ class Databases {
|
|
|
6297
6407
|
if (typeof array !== 'undefined') {
|
|
6298
6408
|
payload['array'] = array;
|
|
6299
6409
|
}
|
|
6410
|
+
if (typeof encrypt !== 'undefined') {
|
|
6411
|
+
payload['encrypt'] = encrypt;
|
|
6412
|
+
}
|
|
6300
6413
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6301
6414
|
const apiHeaders = {
|
|
6302
6415
|
'content-type': 'application/json',
|
|
@@ -6475,7 +6588,8 @@ class Databases {
|
|
|
6475
6588
|
size: rest[2],
|
|
6476
6589
|
required: rest[3],
|
|
6477
6590
|
xdefault: rest[4],
|
|
6478
|
-
array: rest[5]
|
|
6591
|
+
array: rest[5],
|
|
6592
|
+
encrypt: rest[6]
|
|
6479
6593
|
};
|
|
6480
6594
|
}
|
|
6481
6595
|
const databaseId = params.databaseId;
|
|
@@ -6485,6 +6599,7 @@ class Databases {
|
|
|
6485
6599
|
const required = params.required;
|
|
6486
6600
|
const xdefault = params.xdefault;
|
|
6487
6601
|
const array = params.array;
|
|
6602
|
+
const encrypt = params.encrypt;
|
|
6488
6603
|
if (typeof databaseId === 'undefined') {
|
|
6489
6604
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6490
6605
|
}
|
|
@@ -6517,6 +6632,9 @@ class Databases {
|
|
|
6517
6632
|
if (typeof array !== 'undefined') {
|
|
6518
6633
|
payload['array'] = array;
|
|
6519
6634
|
}
|
|
6635
|
+
if (typeof encrypt !== 'undefined') {
|
|
6636
|
+
payload['encrypt'] = encrypt;
|
|
6637
|
+
}
|
|
6520
6638
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6521
6639
|
const apiHeaders = {
|
|
6522
6640
|
'content-type': 'application/json',
|
|
@@ -7579,6 +7697,39 @@ class Domains {
|
|
|
7579
7697
|
};
|
|
7580
7698
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
7581
7699
|
}
|
|
7700
|
+
getPrice(paramsOrFirst, ...rest) {
|
|
7701
|
+
let params;
|
|
7702
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
7703
|
+
params = (paramsOrFirst || {});
|
|
7704
|
+
}
|
|
7705
|
+
else {
|
|
7706
|
+
params = {
|
|
7707
|
+
domain: paramsOrFirst,
|
|
7708
|
+
periodYears: rest[0],
|
|
7709
|
+
registrationType: rest[1]
|
|
7710
|
+
};
|
|
7711
|
+
}
|
|
7712
|
+
const domain = params.domain;
|
|
7713
|
+
const periodYears = params.periodYears;
|
|
7714
|
+
const registrationType = params.registrationType;
|
|
7715
|
+
if (typeof domain === 'undefined') {
|
|
7716
|
+
throw new AppwriteException('Missing required parameter: "domain"');
|
|
7717
|
+
}
|
|
7718
|
+
const apiPath = '/domains/price';
|
|
7719
|
+
const payload = {};
|
|
7720
|
+
if (typeof domain !== 'undefined') {
|
|
7721
|
+
payload['domain'] = domain;
|
|
7722
|
+
}
|
|
7723
|
+
if (typeof periodYears !== 'undefined') {
|
|
7724
|
+
payload['periodYears'] = periodYears;
|
|
7725
|
+
}
|
|
7726
|
+
if (typeof registrationType !== 'undefined') {
|
|
7727
|
+
payload['registrationType'] = registrationType;
|
|
7728
|
+
}
|
|
7729
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
7730
|
+
const apiHeaders = {};
|
|
7731
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
7732
|
+
}
|
|
7582
7733
|
listSuggestions(paramsOrFirst, ...rest) {
|
|
7583
7734
|
let params;
|
|
7584
7735
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -9411,7 +9562,7 @@ class Functions {
|
|
|
9411
9562
|
}
|
|
9412
9563
|
listTemplates(paramsOrFirst, ...rest) {
|
|
9413
9564
|
let params;
|
|
9414
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'runtimes' in paramsOrFirst)) {
|
|
9565
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('runtimes' in paramsOrFirst || 'useCases' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst || 'total' in paramsOrFirst))) {
|
|
9415
9566
|
params = (paramsOrFirst || {});
|
|
9416
9567
|
}
|
|
9417
9568
|
else {
|
|
@@ -9471,7 +9622,7 @@ class Functions {
|
|
|
9471
9622
|
}
|
|
9472
9623
|
listUsage(paramsOrFirst) {
|
|
9473
9624
|
let params;
|
|
9474
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
9625
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
9475
9626
|
params = (paramsOrFirst || {});
|
|
9476
9627
|
}
|
|
9477
9628
|
else {
|
|
@@ -10341,7 +10492,7 @@ class Graphql {
|
|
|
10341
10492
|
}
|
|
10342
10493
|
query(paramsOrFirst) {
|
|
10343
10494
|
let params;
|
|
10344
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {
|
|
10495
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) {
|
|
10345
10496
|
params = (paramsOrFirst || {});
|
|
10346
10497
|
}
|
|
10347
10498
|
else {
|
|
@@ -10367,7 +10518,7 @@ class Graphql {
|
|
|
10367
10518
|
}
|
|
10368
10519
|
mutation(paramsOrFirst) {
|
|
10369
10520
|
let params;
|
|
10370
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {
|
|
10521
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) {
|
|
10371
10522
|
params = (paramsOrFirst || {});
|
|
10372
10523
|
}
|
|
10373
10524
|
else {
|
|
@@ -10649,7 +10800,7 @@ class Health {
|
|
|
10649
10800
|
}
|
|
10650
10801
|
getFailedJobs(paramsOrFirst, ...rest) {
|
|
10651
10802
|
let params;
|
|
10652
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'name' in paramsOrFirst)) {
|
|
10803
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('name' in paramsOrFirst || 'threshold' in paramsOrFirst))) {
|
|
10653
10804
|
params = (paramsOrFirst || {});
|
|
10654
10805
|
}
|
|
10655
10806
|
else {
|
|
@@ -13884,7 +14035,7 @@ class Migrations {
|
|
|
13884
14035
|
}
|
|
13885
14036
|
createAppwriteMigration(paramsOrFirst, ...rest) {
|
|
13886
14037
|
let params;
|
|
13887
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
14038
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'projectId' in paramsOrFirst || 'apiKey' in paramsOrFirst))) {
|
|
13888
14039
|
params = (paramsOrFirst || {});
|
|
13889
14040
|
}
|
|
13890
14041
|
else {
|
|
@@ -13933,7 +14084,7 @@ class Migrations {
|
|
|
13933
14084
|
}
|
|
13934
14085
|
getAppwriteReport(paramsOrFirst, ...rest) {
|
|
13935
14086
|
let params;
|
|
13936
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
14087
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'projectID' in paramsOrFirst || 'key' in paramsOrFirst))) {
|
|
13937
14088
|
params = (paramsOrFirst || {});
|
|
13938
14089
|
}
|
|
13939
14090
|
else {
|
|
@@ -14094,7 +14245,7 @@ class Migrations {
|
|
|
14094
14245
|
}
|
|
14095
14246
|
createFirebaseMigration(paramsOrFirst, ...rest) {
|
|
14096
14247
|
let params;
|
|
14097
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
14248
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'serviceAccount' in paramsOrFirst))) {
|
|
14098
14249
|
params = (paramsOrFirst || {});
|
|
14099
14250
|
}
|
|
14100
14251
|
else {
|
|
@@ -14127,7 +14278,7 @@ class Migrations {
|
|
|
14127
14278
|
}
|
|
14128
14279
|
getFirebaseReport(paramsOrFirst, ...rest) {
|
|
14129
14280
|
let params;
|
|
14130
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
14281
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'serviceAccount' in paramsOrFirst))) {
|
|
14131
14282
|
params = (paramsOrFirst || {});
|
|
14132
14283
|
}
|
|
14133
14284
|
else {
|
|
@@ -14158,7 +14309,7 @@ class Migrations {
|
|
|
14158
14309
|
}
|
|
14159
14310
|
createNHostMigration(paramsOrFirst, ...rest) {
|
|
14160
14311
|
let params;
|
|
14161
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
14312
|
+
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))) {
|
|
14162
14313
|
params = (paramsOrFirst || {});
|
|
14163
14314
|
}
|
|
14164
14315
|
else {
|
|
@@ -14236,7 +14387,7 @@ class Migrations {
|
|
|
14236
14387
|
}
|
|
14237
14388
|
getNHostReport(paramsOrFirst, ...rest) {
|
|
14238
14389
|
let params;
|
|
14239
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
14390
|
+
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))) {
|
|
14240
14391
|
params = (paramsOrFirst || {});
|
|
14241
14392
|
}
|
|
14242
14393
|
else {
|
|
@@ -14312,7 +14463,7 @@ class Migrations {
|
|
|
14312
14463
|
}
|
|
14313
14464
|
createSupabaseMigration(paramsOrFirst, ...rest) {
|
|
14314
14465
|
let params;
|
|
14315
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
14466
|
+
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))) {
|
|
14316
14467
|
params = (paramsOrFirst || {});
|
|
14317
14468
|
}
|
|
14318
14469
|
else {
|
|
@@ -14382,7 +14533,7 @@ class Migrations {
|
|
|
14382
14533
|
}
|
|
14383
14534
|
getSupabaseReport(paramsOrFirst, ...rest) {
|
|
14384
14535
|
let params;
|
|
14385
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
|
|
14536
|
+
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))) {
|
|
14386
14537
|
params = (paramsOrFirst || {});
|
|
14387
14538
|
}
|
|
14388
14539
|
else {
|
|
@@ -15665,33 +15816,6 @@ class Organizations {
|
|
|
15665
15816
|
};
|
|
15666
15817
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
15667
15818
|
}
|
|
15668
|
-
updateProjects(paramsOrFirst, ...rest) {
|
|
15669
|
-
let params;
|
|
15670
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
15671
|
-
params = (paramsOrFirst || {});
|
|
15672
|
-
}
|
|
15673
|
-
else {
|
|
15674
|
-
params = {
|
|
15675
|
-
organizationId: paramsOrFirst,
|
|
15676
|
-
projects: rest[0]
|
|
15677
|
-
};
|
|
15678
|
-
}
|
|
15679
|
-
const organizationId = params.organizationId;
|
|
15680
|
-
const projects = params.projects;
|
|
15681
|
-
if (typeof organizationId === 'undefined') {
|
|
15682
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
15683
|
-
}
|
|
15684
|
-
const apiPath = '/organizations/{organizationId}/projects'.replace('{organizationId}', organizationId);
|
|
15685
|
-
const payload = {};
|
|
15686
|
-
if (typeof projects !== 'undefined') {
|
|
15687
|
-
payload['projects'] = projects;
|
|
15688
|
-
}
|
|
15689
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
15690
|
-
const apiHeaders = {
|
|
15691
|
-
'content-type': 'application/json',
|
|
15692
|
-
};
|
|
15693
|
-
return this.client.call('patch', uri, apiHeaders, payload);
|
|
15694
|
-
}
|
|
15695
15819
|
listRegions(paramsOrFirst) {
|
|
15696
15820
|
let params;
|
|
15697
15821
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -16926,16 +17050,21 @@ class Projects {
|
|
|
16926
17050
|
else {
|
|
16927
17051
|
params = {
|
|
16928
17052
|
projectId: paramsOrFirst,
|
|
16929
|
-
|
|
17053
|
+
queries: rest[0],
|
|
17054
|
+
total: rest[1]
|
|
16930
17055
|
};
|
|
16931
17056
|
}
|
|
16932
17057
|
const projectId = params.projectId;
|
|
17058
|
+
const queries = params.queries;
|
|
16933
17059
|
const total = params.total;
|
|
16934
17060
|
if (typeof projectId === 'undefined') {
|
|
16935
17061
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
16936
17062
|
}
|
|
16937
17063
|
const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
16938
17064
|
const payload = {};
|
|
17065
|
+
if (typeof queries !== 'undefined') {
|
|
17066
|
+
payload['queries'] = queries;
|
|
17067
|
+
}
|
|
16939
17068
|
if (typeof total !== 'undefined') {
|
|
16940
17069
|
payload['total'] = total;
|
|
16941
17070
|
}
|
|
@@ -16953,12 +17082,14 @@ class Projects {
|
|
|
16953
17082
|
projectId: paramsOrFirst,
|
|
16954
17083
|
name: rest[0],
|
|
16955
17084
|
scopes: rest[1],
|
|
16956
|
-
|
|
17085
|
+
keyId: rest[2],
|
|
17086
|
+
expire: rest[3]
|
|
16957
17087
|
};
|
|
16958
17088
|
}
|
|
16959
17089
|
const projectId = params.projectId;
|
|
16960
17090
|
const name = params.name;
|
|
16961
17091
|
const scopes = params.scopes;
|
|
17092
|
+
const keyId = params.keyId;
|
|
16962
17093
|
const expire = params.expire;
|
|
16963
17094
|
if (typeof projectId === 'undefined') {
|
|
16964
17095
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
@@ -16971,6 +17102,9 @@ class Projects {
|
|
|
16971
17102
|
}
|
|
16972
17103
|
const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
16973
17104
|
const payload = {};
|
|
17105
|
+
if (typeof keyId !== 'undefined') {
|
|
17106
|
+
payload['keyId'] = keyId;
|
|
17107
|
+
}
|
|
16974
17108
|
if (typeof name !== 'undefined') {
|
|
16975
17109
|
payload['name'] = name;
|
|
16976
17110
|
}
|
|
@@ -17707,36 +17841,6 @@ class Projects {
|
|
|
17707
17841
|
};
|
|
17708
17842
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
17709
17843
|
}
|
|
17710
|
-
updateStatus(paramsOrFirst, ...rest) {
|
|
17711
|
-
let params;
|
|
17712
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
17713
|
-
params = (paramsOrFirst || {});
|
|
17714
|
-
}
|
|
17715
|
-
else {
|
|
17716
|
-
params = {
|
|
17717
|
-
projectId: paramsOrFirst,
|
|
17718
|
-
status: rest[0]
|
|
17719
|
-
};
|
|
17720
|
-
}
|
|
17721
|
-
const projectId = params.projectId;
|
|
17722
|
-
const status = params.status;
|
|
17723
|
-
if (typeof projectId === 'undefined') {
|
|
17724
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
17725
|
-
}
|
|
17726
|
-
if (typeof status === 'undefined') {
|
|
17727
|
-
throw new AppwriteException('Missing required parameter: "status"');
|
|
17728
|
-
}
|
|
17729
|
-
const apiPath = '/projects/{projectId}/status'.replace('{projectId}', projectId);
|
|
17730
|
-
const payload = {};
|
|
17731
|
-
if (typeof status !== 'undefined') {
|
|
17732
|
-
payload['status'] = status;
|
|
17733
|
-
}
|
|
17734
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
17735
|
-
const apiHeaders = {
|
|
17736
|
-
'content-type': 'application/json',
|
|
17737
|
-
};
|
|
17738
|
-
return this.client.call('patch', uri, apiHeaders, payload);
|
|
17739
|
-
}
|
|
17740
17844
|
updateTeam(paramsOrFirst, ...rest) {
|
|
17741
17845
|
let params;
|
|
17742
17846
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -18784,7 +18888,7 @@ class Sites {
|
|
|
18784
18888
|
}
|
|
18785
18889
|
listTemplates(paramsOrFirst, ...rest) {
|
|
18786
18890
|
let params;
|
|
18787
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'frameworks' in paramsOrFirst)) {
|
|
18891
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('frameworks' in paramsOrFirst || 'useCases' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst))) {
|
|
18788
18892
|
params = (paramsOrFirst || {});
|
|
18789
18893
|
}
|
|
18790
18894
|
else {
|
|
@@ -18839,7 +18943,7 @@ class Sites {
|
|
|
18839
18943
|
}
|
|
18840
18944
|
listUsage(paramsOrFirst) {
|
|
18841
18945
|
let params;
|
|
18842
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
18946
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
18843
18947
|
params = (paramsOrFirst || {});
|
|
18844
18948
|
}
|
|
18845
18949
|
else {
|
|
@@ -20209,7 +20313,7 @@ class Storage {
|
|
|
20209
20313
|
}
|
|
20210
20314
|
getUsage(paramsOrFirst) {
|
|
20211
20315
|
let params;
|
|
20212
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
20316
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
20213
20317
|
params = (paramsOrFirst || {});
|
|
20214
20318
|
}
|
|
20215
20319
|
else {
|
|
@@ -20471,7 +20575,7 @@ class TablesDB {
|
|
|
20471
20575
|
}
|
|
20472
20576
|
listUsage(paramsOrFirst) {
|
|
20473
20577
|
let params;
|
|
20474
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
20578
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
20475
20579
|
params = (paramsOrFirst || {});
|
|
20476
20580
|
}
|
|
20477
20581
|
else {
|
|
@@ -21703,7 +21807,8 @@ class TablesDB {
|
|
|
21703
21807
|
key: rest[1],
|
|
21704
21808
|
required: rest[2],
|
|
21705
21809
|
xdefault: rest[3],
|
|
21706
|
-
array: rest[4]
|
|
21810
|
+
array: rest[4],
|
|
21811
|
+
encrypt: rest[5]
|
|
21707
21812
|
};
|
|
21708
21813
|
}
|
|
21709
21814
|
const databaseId = params.databaseId;
|
|
@@ -21712,6 +21817,7 @@ class TablesDB {
|
|
|
21712
21817
|
const required = params.required;
|
|
21713
21818
|
const xdefault = params.xdefault;
|
|
21714
21819
|
const array = params.array;
|
|
21820
|
+
const encrypt = params.encrypt;
|
|
21715
21821
|
if (typeof databaseId === 'undefined') {
|
|
21716
21822
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
21717
21823
|
}
|
|
@@ -21738,6 +21844,9 @@ class TablesDB {
|
|
|
21738
21844
|
if (typeof array !== 'undefined') {
|
|
21739
21845
|
payload['array'] = array;
|
|
21740
21846
|
}
|
|
21847
|
+
if (typeof encrypt !== 'undefined') {
|
|
21848
|
+
payload['encrypt'] = encrypt;
|
|
21849
|
+
}
|
|
21741
21850
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21742
21851
|
const apiHeaders = {
|
|
21743
21852
|
'content-type': 'application/json',
|
|
@@ -21809,7 +21918,8 @@ class TablesDB {
|
|
|
21809
21918
|
key: rest[1],
|
|
21810
21919
|
required: rest[2],
|
|
21811
21920
|
xdefault: rest[3],
|
|
21812
|
-
array: rest[4]
|
|
21921
|
+
array: rest[4],
|
|
21922
|
+
encrypt: rest[5]
|
|
21813
21923
|
};
|
|
21814
21924
|
}
|
|
21815
21925
|
const databaseId = params.databaseId;
|
|
@@ -21818,6 +21928,7 @@ class TablesDB {
|
|
|
21818
21928
|
const required = params.required;
|
|
21819
21929
|
const xdefault = params.xdefault;
|
|
21820
21930
|
const array = params.array;
|
|
21931
|
+
const encrypt = params.encrypt;
|
|
21821
21932
|
if (typeof databaseId === 'undefined') {
|
|
21822
21933
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
21823
21934
|
}
|
|
@@ -21844,6 +21955,9 @@ class TablesDB {
|
|
|
21844
21955
|
if (typeof array !== 'undefined') {
|
|
21845
21956
|
payload['array'] = array;
|
|
21846
21957
|
}
|
|
21958
|
+
if (typeof encrypt !== 'undefined') {
|
|
21959
|
+
payload['encrypt'] = encrypt;
|
|
21960
|
+
}
|
|
21847
21961
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21848
21962
|
const apiHeaders = {
|
|
21849
21963
|
'content-type': 'application/json',
|
|
@@ -22298,7 +22412,8 @@ class TablesDB {
|
|
|
22298
22412
|
key: rest[1],
|
|
22299
22413
|
required: rest[2],
|
|
22300
22414
|
xdefault: rest[3],
|
|
22301
|
-
array: rest[4]
|
|
22415
|
+
array: rest[4],
|
|
22416
|
+
encrypt: rest[5]
|
|
22302
22417
|
};
|
|
22303
22418
|
}
|
|
22304
22419
|
const databaseId = params.databaseId;
|
|
@@ -22307,6 +22422,7 @@ class TablesDB {
|
|
|
22307
22422
|
const required = params.required;
|
|
22308
22423
|
const xdefault = params.xdefault;
|
|
22309
22424
|
const array = params.array;
|
|
22425
|
+
const encrypt = params.encrypt;
|
|
22310
22426
|
if (typeof databaseId === 'undefined') {
|
|
22311
22427
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
22312
22428
|
}
|
|
@@ -22333,6 +22449,9 @@ class TablesDB {
|
|
|
22333
22449
|
if (typeof array !== 'undefined') {
|
|
22334
22450
|
payload['array'] = array;
|
|
22335
22451
|
}
|
|
22452
|
+
if (typeof encrypt !== 'undefined') {
|
|
22453
|
+
payload['encrypt'] = encrypt;
|
|
22454
|
+
}
|
|
22336
22455
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
22337
22456
|
const apiHeaders = {
|
|
22338
22457
|
'content-type': 'application/json',
|
|
@@ -22511,7 +22630,8 @@ class TablesDB {
|
|
|
22511
22630
|
size: rest[2],
|
|
22512
22631
|
required: rest[3],
|
|
22513
22632
|
xdefault: rest[4],
|
|
22514
|
-
array: rest[5]
|
|
22633
|
+
array: rest[5],
|
|
22634
|
+
encrypt: rest[6]
|
|
22515
22635
|
};
|
|
22516
22636
|
}
|
|
22517
22637
|
const databaseId = params.databaseId;
|
|
@@ -22521,6 +22641,7 @@ class TablesDB {
|
|
|
22521
22641
|
const required = params.required;
|
|
22522
22642
|
const xdefault = params.xdefault;
|
|
22523
22643
|
const array = params.array;
|
|
22644
|
+
const encrypt = params.encrypt;
|
|
22524
22645
|
if (typeof databaseId === 'undefined') {
|
|
22525
22646
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
22526
22647
|
}
|
|
@@ -22553,6 +22674,9 @@ class TablesDB {
|
|
|
22553
22674
|
if (typeof array !== 'undefined') {
|
|
22554
22675
|
payload['array'] = array;
|
|
22555
22676
|
}
|
|
22677
|
+
if (typeof encrypt !== 'undefined') {
|
|
22678
|
+
payload['encrypt'] = encrypt;
|
|
22679
|
+
}
|
|
22556
22680
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
22557
22681
|
const apiHeaders = {
|
|
22558
22682
|
'content-type': 'application/json',
|
|
@@ -24640,7 +24764,7 @@ class Users {
|
|
|
24640
24764
|
}
|
|
24641
24765
|
getUsage(paramsOrFirst) {
|
|
24642
24766
|
let params;
|
|
24643
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
24767
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
|
|
24644
24768
|
params = (paramsOrFirst || {});
|
|
24645
24769
|
}
|
|
24646
24770
|
else {
|
|
@@ -26010,11 +26134,16 @@ class Realtime {
|
|
|
26010
26134
|
this.TYPE_CONNECTED = 'connected';
|
|
26011
26135
|
this.DEBOUNCE_MS = 1;
|
|
26012
26136
|
this.HEARTBEAT_INTERVAL = 20000; // 20 seconds in milliseconds
|
|
26013
|
-
|
|
26137
|
+
// Slot-centric state: Map<slot, { channels: Set<string>, queries: string[], callback: Function }>
|
|
26014
26138
|
this.activeSubscriptions = new Map();
|
|
26139
|
+
// Map slot index -> subscriptionId (from backend)
|
|
26140
|
+
this.slotToSubscriptionId = new Map();
|
|
26141
|
+
// Inverse map: subscriptionId -> slot index (for O(1) lookup)
|
|
26142
|
+
this.subscriptionIdToSlot = new Map();
|
|
26015
26143
|
this.subCallDepth = 0;
|
|
26016
26144
|
this.reconnectAttempts = 0;
|
|
26017
26145
|
this.subscriptionsCounter = 0;
|
|
26146
|
+
this.connectionId = 0;
|
|
26018
26147
|
this.reconnect = true;
|
|
26019
26148
|
this.onErrorCallbacks = [];
|
|
26020
26149
|
this.onCloseCallbacks = [];
|
|
@@ -26064,7 +26193,7 @@ class Realtime {
|
|
|
26064
26193
|
}
|
|
26065
26194
|
createSocket() {
|
|
26066
26195
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26067
|
-
if (this.
|
|
26196
|
+
if (this.activeSubscriptions.size === 0) {
|
|
26068
26197
|
this.reconnect = false;
|
|
26069
26198
|
yield this.closeSocket();
|
|
26070
26199
|
return;
|
|
@@ -26073,10 +26202,36 @@ class Realtime {
|
|
|
26073
26202
|
if (!projectId) {
|
|
26074
26203
|
throw new AppwriteException('Missing project ID');
|
|
26075
26204
|
}
|
|
26205
|
+
// Collect all unique channels from all slots
|
|
26206
|
+
const allChannels = new Set();
|
|
26207
|
+
for (const subscription of this.activeSubscriptions.values()) {
|
|
26208
|
+
for (const channel of subscription.channels) {
|
|
26209
|
+
allChannels.add(channel);
|
|
26210
|
+
}
|
|
26211
|
+
}
|
|
26076
26212
|
let queryParams = `project=${projectId}`;
|
|
26077
|
-
for (const channel of
|
|
26213
|
+
for (const channel of allChannels) {
|
|
26078
26214
|
queryParams += `&channels[]=${encodeURIComponent(channel)}`;
|
|
26079
26215
|
}
|
|
26216
|
+
// Build query string from slots → channels → queries
|
|
26217
|
+
// Format: channel[slot][]=query
|
|
26218
|
+
// For each slot, repeat its queries under each channel it subscribes to
|
|
26219
|
+
// Example: slot 1 → channels [tests, prod], queries [q1, q2]
|
|
26220
|
+
// Produces: tests[1][]=q1&tests[1][]=q2&prod[1][]=q1&prod[1][]=q2
|
|
26221
|
+
const selectAllQuery = Query.select(['*']).toString();
|
|
26222
|
+
for (const [slot, subscription] of this.activeSubscriptions) {
|
|
26223
|
+
// queries is string[] - iterate over each query string
|
|
26224
|
+
const queries = subscription.queries.length === 0
|
|
26225
|
+
? [selectAllQuery]
|
|
26226
|
+
: subscription.queries;
|
|
26227
|
+
// Repeat this slot's queries under each channel it subscribes to
|
|
26228
|
+
// Each query is sent as a separate parameter: channel[slot][]=q1&channel[slot][]=q2
|
|
26229
|
+
for (const channel of subscription.channels) {
|
|
26230
|
+
for (const query of queries) {
|
|
26231
|
+
queryParams += `&${encodeURIComponent(channel)}[${slot}][]=${encodeURIComponent(query)}`;
|
|
26232
|
+
}
|
|
26233
|
+
}
|
|
26234
|
+
}
|
|
26080
26235
|
const endpoint = this.client.config.endpointRealtime !== ''
|
|
26081
26236
|
? this.client.config.endpointRealtime
|
|
26082
26237
|
: this.client.config.endpoint || '';
|
|
@@ -26086,18 +26241,29 @@ class Realtime {
|
|
|
26086
26241
|
const url = `${realtimeEndpoint}/realtime?${queryParams}`;
|
|
26087
26242
|
if (this.socket) {
|
|
26088
26243
|
this.reconnect = false;
|
|
26089
|
-
|
|
26244
|
+
if (this.socket.readyState < WebSocket.CLOSING) {
|
|
26245
|
+
yield this.closeSocket();
|
|
26246
|
+
}
|
|
26247
|
+
// Ensure reconnect isn't stuck false if close event was missed.
|
|
26248
|
+
this.reconnect = true;
|
|
26090
26249
|
}
|
|
26091
26250
|
return new Promise((resolve, reject) => {
|
|
26092
26251
|
try {
|
|
26093
|
-
|
|
26094
|
-
this.socket
|
|
26252
|
+
const connectionId = ++this.connectionId;
|
|
26253
|
+
const socket = (this.socket = new WebSocket(url));
|
|
26254
|
+
socket.addEventListener('open', () => {
|
|
26255
|
+
if (connectionId !== this.connectionId) {
|
|
26256
|
+
return;
|
|
26257
|
+
}
|
|
26095
26258
|
this.reconnectAttempts = 0;
|
|
26096
26259
|
this.onOpenCallbacks.forEach(callback => callback());
|
|
26097
26260
|
this.startHeartbeat();
|
|
26098
26261
|
resolve();
|
|
26099
26262
|
});
|
|
26100
|
-
|
|
26263
|
+
socket.addEventListener('message', (event) => {
|
|
26264
|
+
if (connectionId !== this.connectionId) {
|
|
26265
|
+
return;
|
|
26266
|
+
}
|
|
26101
26267
|
try {
|
|
26102
26268
|
const message = JSON.parse(event.data);
|
|
26103
26269
|
this.handleMessage(message);
|
|
@@ -26106,7 +26272,10 @@ class Realtime {
|
|
|
26106
26272
|
console.error('Failed to parse message:', error);
|
|
26107
26273
|
}
|
|
26108
26274
|
});
|
|
26109
|
-
|
|
26275
|
+
socket.addEventListener('close', (event) => __awaiter(this, void 0, void 0, function* () {
|
|
26276
|
+
if (connectionId !== this.connectionId || socket !== this.socket) {
|
|
26277
|
+
return;
|
|
26278
|
+
}
|
|
26110
26279
|
this.stopHeartbeat();
|
|
26111
26280
|
this.onCloseCallbacks.forEach(callback => callback());
|
|
26112
26281
|
if (!this.reconnect || event.code === RealtimeCode.POLICY_VIOLATION) {
|
|
@@ -26124,7 +26293,10 @@ class Realtime {
|
|
|
26124
26293
|
console.error('Failed to reconnect:', error);
|
|
26125
26294
|
}
|
|
26126
26295
|
}));
|
|
26127
|
-
|
|
26296
|
+
socket.addEventListener('error', (event) => {
|
|
26297
|
+
if (connectionId !== this.connectionId || socket !== this.socket) {
|
|
26298
|
+
return;
|
|
26299
|
+
}
|
|
26128
26300
|
this.stopHeartbeat();
|
|
26129
26301
|
const error = new Error('WebSocket error');
|
|
26130
26302
|
console.error('WebSocket error:', error.message);
|
|
@@ -26195,7 +26367,7 @@ class Realtime {
|
|
|
26195
26367
|
}
|
|
26196
26368
|
return String(channel);
|
|
26197
26369
|
}
|
|
26198
|
-
subscribe(channelsOrChannel, callback) {
|
|
26370
|
+
subscribe(channelsOrChannel, callback, queries = []) {
|
|
26199
26371
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26200
26372
|
const channelArray = Array.isArray(channelsOrChannel)
|
|
26201
26373
|
? channelsOrChannel
|
|
@@ -26203,13 +26375,29 @@ class Realtime {
|
|
|
26203
26375
|
// Convert all channels to strings
|
|
26204
26376
|
const channelStrings = channelArray.map(ch => this.channelToString(ch));
|
|
26205
26377
|
const channels = new Set(channelStrings);
|
|
26206
|
-
|
|
26207
|
-
|
|
26208
|
-
|
|
26209
|
-
|
|
26378
|
+
// Convert queries to array of strings
|
|
26379
|
+
// Ensure each query is a separate string in the array
|
|
26380
|
+
const queryStrings = [];
|
|
26381
|
+
for (const q of (queries !== null && queries !== void 0 ? queries : [])) {
|
|
26382
|
+
if (Array.isArray(q)) {
|
|
26383
|
+
// Handle nested arrays: [[q1, q2]] -> [q1, q2]
|
|
26384
|
+
for (const inner of q) {
|
|
26385
|
+
queryStrings.push(typeof inner === 'string' ? inner : inner.toString());
|
|
26386
|
+
}
|
|
26387
|
+
}
|
|
26388
|
+
else {
|
|
26389
|
+
queryStrings.push(typeof q === 'string' ? q : q.toString());
|
|
26390
|
+
}
|
|
26210
26391
|
}
|
|
26211
|
-
|
|
26392
|
+
// Allocate a new slot index
|
|
26393
|
+
this.subscriptionsCounter++;
|
|
26394
|
+
const slot = this.subscriptionsCounter;
|
|
26395
|
+
// Store slot-centric data: channels, queries, and callback belong to the slot
|
|
26396
|
+
// queries is stored as string[] (array of query strings)
|
|
26397
|
+
// No channel mutation occurs here - channels are derived from slots in createSocket()
|
|
26398
|
+
this.activeSubscriptions.set(slot, {
|
|
26212
26399
|
channels,
|
|
26400
|
+
queries: queryStrings,
|
|
26213
26401
|
callback
|
|
26214
26402
|
});
|
|
26215
26403
|
this.subCallDepth++;
|
|
@@ -26220,23 +26408,19 @@ class Realtime {
|
|
|
26220
26408
|
this.subCallDepth--;
|
|
26221
26409
|
return {
|
|
26222
26410
|
close: () => __awaiter(this, void 0, void 0, function* () {
|
|
26223
|
-
this.
|
|
26224
|
-
this.
|
|
26411
|
+
const subscriptionId = this.slotToSubscriptionId.get(slot);
|
|
26412
|
+
this.activeSubscriptions.delete(slot);
|
|
26413
|
+
this.slotToSubscriptionId.delete(slot);
|
|
26414
|
+
if (subscriptionId) {
|
|
26415
|
+
this.subscriptionIdToSlot.delete(subscriptionId);
|
|
26416
|
+
}
|
|
26225
26417
|
yield this.createSocket();
|
|
26226
26418
|
})
|
|
26227
26419
|
};
|
|
26228
26420
|
});
|
|
26229
26421
|
}
|
|
26230
|
-
cleanUp(
|
|
26231
|
-
|
|
26232
|
-
if (!channels.has(channel)) {
|
|
26233
|
-
return true;
|
|
26234
|
-
}
|
|
26235
|
-
const subsWithChannel = Array.from(this.activeSubscriptions.values())
|
|
26236
|
-
.filter(sub => sub.channels.has(channel));
|
|
26237
|
-
return subsWithChannel.length > 0;
|
|
26238
|
-
}));
|
|
26239
|
-
}
|
|
26422
|
+
// cleanUp is no longer needed - slots are removed directly in subscribe().close()
|
|
26423
|
+
// Channels are automatically rebuilt from remaining slots in createSocket()
|
|
26240
26424
|
handleMessage(message) {
|
|
26241
26425
|
if (!message.type) {
|
|
26242
26426
|
return;
|
|
@@ -26262,6 +26446,19 @@ class Realtime {
|
|
|
26262
26446
|
return;
|
|
26263
26447
|
}
|
|
26264
26448
|
const messageData = message.data;
|
|
26449
|
+
// Store subscription ID mappings from backend
|
|
26450
|
+
// Format: { "0": "sub_a1f9", "1": "sub_b83c", ... }
|
|
26451
|
+
if (messageData.subscriptions) {
|
|
26452
|
+
this.slotToSubscriptionId.clear();
|
|
26453
|
+
this.subscriptionIdToSlot.clear();
|
|
26454
|
+
for (const [slotStr, subscriptionId] of Object.entries(messageData.subscriptions)) {
|
|
26455
|
+
const slot = Number(slotStr);
|
|
26456
|
+
if (!isNaN(slot)) {
|
|
26457
|
+
this.slotToSubscriptionId.set(slot, subscriptionId);
|
|
26458
|
+
this.subscriptionIdToSlot.set(subscriptionId, slot);
|
|
26459
|
+
}
|
|
26460
|
+
}
|
|
26461
|
+
}
|
|
26265
26462
|
let session = this.client.config.session;
|
|
26266
26463
|
if (!session) {
|
|
26267
26464
|
try {
|
|
@@ -26296,23 +26493,26 @@ class Realtime {
|
|
|
26296
26493
|
const events = data.events;
|
|
26297
26494
|
const payload = data.payload;
|
|
26298
26495
|
const timestamp = data.timestamp;
|
|
26299
|
-
|
|
26496
|
+
const subscriptions = data.subscriptions;
|
|
26497
|
+
if (!channels || !events || !payload || !subscriptions || subscriptions.length === 0) {
|
|
26300
26498
|
return;
|
|
26301
26499
|
}
|
|
26302
|
-
|
|
26303
|
-
|
|
26304
|
-
|
|
26305
|
-
|
|
26306
|
-
|
|
26307
|
-
|
|
26308
|
-
|
|
26309
|
-
|
|
26310
|
-
|
|
26311
|
-
|
|
26312
|
-
|
|
26313
|
-
|
|
26314
|
-
|
|
26315
|
-
|
|
26500
|
+
// Iterate over all matching subscriptionIds and call callback for each
|
|
26501
|
+
for (const subscriptionId of subscriptions) {
|
|
26502
|
+
// O(1) lookup using subscriptionId
|
|
26503
|
+
const slot = this.subscriptionIdToSlot.get(subscriptionId);
|
|
26504
|
+
if (slot !== undefined) {
|
|
26505
|
+
const subscription = this.activeSubscriptions.get(slot);
|
|
26506
|
+
if (subscription) {
|
|
26507
|
+
const response = {
|
|
26508
|
+
events,
|
|
26509
|
+
channels,
|
|
26510
|
+
timestamp,
|
|
26511
|
+
payload,
|
|
26512
|
+
subscriptions
|
|
26513
|
+
};
|
|
26514
|
+
subscription.callback(response);
|
|
26515
|
+
}
|
|
26316
26516
|
}
|
|
26317
26517
|
}
|
|
26318
26518
|
}
|
|
@@ -26514,8 +26714,11 @@ class Channel {
|
|
|
26514
26714
|
constructor(segments) {
|
|
26515
26715
|
this.segments = segments;
|
|
26516
26716
|
}
|
|
26517
|
-
next(segment, id
|
|
26518
|
-
|
|
26717
|
+
next(segment, id) {
|
|
26718
|
+
const segments = id === undefined
|
|
26719
|
+
? [...this.segments, segment]
|
|
26720
|
+
: [...this.segments, segment, normalize(id)];
|
|
26721
|
+
return new Channel(segments);
|
|
26519
26722
|
}
|
|
26520
26723
|
resolve(action) {
|
|
26521
26724
|
return new Channel([...this.segments, action]);
|
|
@@ -26525,28 +26728,29 @@ class Channel {
|
|
|
26525
26728
|
}
|
|
26526
26729
|
// --- DATABASE ROUTE ---
|
|
26527
26730
|
// Only available on Channel<Database>
|
|
26528
|
-
collection(id
|
|
26529
|
-
|
|
26731
|
+
collection(id) {
|
|
26732
|
+
// Default: wildcard collection ID
|
|
26733
|
+
return this.next("collections", id !== null && id !== void 0 ? id : "*");
|
|
26530
26734
|
}
|
|
26531
26735
|
// Only available on Channel<Collection>
|
|
26532
|
-
document(id
|
|
26736
|
+
document(id) {
|
|
26737
|
+
// Default: no document ID segment
|
|
26533
26738
|
return this.next("documents", id);
|
|
26534
26739
|
}
|
|
26535
26740
|
// --- TABLESDB ROUTE ---
|
|
26536
|
-
table(id
|
|
26537
|
-
|
|
26741
|
+
table(id) {
|
|
26742
|
+
// Default: wildcard table ID
|
|
26743
|
+
return this.next("tables", id !== null && id !== void 0 ? id : "*");
|
|
26538
26744
|
}
|
|
26539
|
-
row(id
|
|
26745
|
+
row(id) {
|
|
26746
|
+
// Default: no row ID segment
|
|
26540
26747
|
return this.next("rows", id);
|
|
26541
26748
|
}
|
|
26542
26749
|
// --- BUCKET ROUTE ---
|
|
26543
|
-
file(id
|
|
26750
|
+
file(id) {
|
|
26751
|
+
// Default: no file ID segment
|
|
26544
26752
|
return this.next("files", id);
|
|
26545
26753
|
}
|
|
26546
|
-
// --- FUNCTION ROUTE ---
|
|
26547
|
-
execution(id = "*") {
|
|
26548
|
-
return this.next("executions", id);
|
|
26549
|
-
}
|
|
26550
26754
|
// --- TERMINAL ACTIONS ---
|
|
26551
26755
|
// Restricted to the Actionable union
|
|
26552
26756
|
create() {
|
|
@@ -26562,6 +26766,9 @@ class Channel {
|
|
|
26562
26766
|
static database(id = "*") {
|
|
26563
26767
|
return new Channel(["databases", normalize(id)]);
|
|
26564
26768
|
}
|
|
26769
|
+
static execution(id = "*") {
|
|
26770
|
+
return new Channel(["executions", normalize(id)]);
|
|
26771
|
+
}
|
|
26565
26772
|
static tablesdb(id = "*") {
|
|
26566
26773
|
return new Channel(["tablesdb", normalize(id)]);
|
|
26567
26774
|
}
|
|
@@ -26577,9 +26784,8 @@ class Channel {
|
|
|
26577
26784
|
static membership(id = "*") {
|
|
26578
26785
|
return new Channel(["memberships", normalize(id)]);
|
|
26579
26786
|
}
|
|
26580
|
-
static account(
|
|
26581
|
-
|
|
26582
|
-
return id === "*" ? "account" : `account.${id}`;
|
|
26787
|
+
static account() {
|
|
26788
|
+
return "account";
|
|
26583
26789
|
}
|
|
26584
26790
|
// Global events
|
|
26585
26791
|
static documents() {
|
|
@@ -26597,6 +26803,9 @@ class Channel {
|
|
|
26597
26803
|
static teams() {
|
|
26598
26804
|
return "teams";
|
|
26599
26805
|
}
|
|
26806
|
+
static memberships() {
|
|
26807
|
+
return "memberships";
|
|
26808
|
+
}
|
|
26600
26809
|
}
|
|
26601
26810
|
|
|
26602
26811
|
exports.Condition = void 0;
|
|
@@ -26929,6 +27138,7 @@ exports.Scopes = void 0;
|
|
|
26929
27138
|
Scopes["RestorationsWrite"] = "restorations.write";
|
|
26930
27139
|
Scopes["DomainsRead"] = "domains.read";
|
|
26931
27140
|
Scopes["DomainsWrite"] = "domains.write";
|
|
27141
|
+
Scopes["EventsRead"] = "events.read";
|
|
26932
27142
|
})(exports.Scopes || (exports.Scopes = {}));
|
|
26933
27143
|
|
|
26934
27144
|
exports.AuthenticatorType = void 0;
|
|
@@ -27691,12 +27901,12 @@ exports.ImageFormat = void 0;
|
|
|
27691
27901
|
ImageFormat["Gif"] = "gif";
|
|
27692
27902
|
})(exports.ImageFormat || (exports.ImageFormat = {}));
|
|
27693
27903
|
|
|
27694
|
-
exports.
|
|
27695
|
-
(function (
|
|
27696
|
-
|
|
27697
|
-
|
|
27698
|
-
|
|
27699
|
-
})(exports.
|
|
27904
|
+
exports.BackupServices = void 0;
|
|
27905
|
+
(function (BackupServices) {
|
|
27906
|
+
BackupServices["Databases"] = "databases";
|
|
27907
|
+
BackupServices["Functions"] = "functions";
|
|
27908
|
+
BackupServices["Storage"] = "storage";
|
|
27909
|
+
})(exports.BackupServices || (exports.BackupServices = {}));
|
|
27700
27910
|
|
|
27701
27911
|
exports.Platform = void 0;
|
|
27702
27912
|
(function (Platform) {
|
|
@@ -27745,6 +27955,14 @@ exports.OrderBy = void 0;
|
|
|
27745
27955
|
OrderBy["Desc"] = "desc";
|
|
27746
27956
|
})(exports.OrderBy || (exports.OrderBy = {}));
|
|
27747
27957
|
|
|
27958
|
+
exports.RegistrationType = void 0;
|
|
27959
|
+
(function (RegistrationType) {
|
|
27960
|
+
RegistrationType["New"] = "new";
|
|
27961
|
+
RegistrationType["Transfer"] = "transfer";
|
|
27962
|
+
RegistrationType["Renewal"] = "renewal";
|
|
27963
|
+
RegistrationType["Trade"] = "trade";
|
|
27964
|
+
})(exports.RegistrationType || (exports.RegistrationType = {}));
|
|
27965
|
+
|
|
27748
27966
|
exports.FilterType = void 0;
|
|
27749
27967
|
(function (FilterType) {
|
|
27750
27968
|
FilterType["Premium"] = "premium";
|
|
@@ -27789,6 +28007,7 @@ exports.Runtime = void 0;
|
|
|
27789
28007
|
Runtime["Dart35"] = "dart-3.5";
|
|
27790
28008
|
Runtime["Dart38"] = "dart-3.8";
|
|
27791
28009
|
Runtime["Dart39"] = "dart-3.9";
|
|
28010
|
+
Runtime["Dart310"] = "dart-3.10";
|
|
27792
28011
|
Runtime["Dotnet60"] = "dotnet-6.0";
|
|
27793
28012
|
Runtime["Dotnet70"] = "dotnet-7.0";
|
|
27794
28013
|
Runtime["Dotnet80"] = "dotnet-8.0";
|
|
@@ -27817,6 +28036,7 @@ exports.Runtime = void 0;
|
|
|
27817
28036
|
Runtime["Flutter329"] = "flutter-3.29";
|
|
27818
28037
|
Runtime["Flutter332"] = "flutter-3.32";
|
|
27819
28038
|
Runtime["Flutter335"] = "flutter-3.35";
|
|
28039
|
+
Runtime["Flutter338"] = "flutter-3.38";
|
|
27820
28040
|
})(exports.Runtime || (exports.Runtime = {}));
|
|
27821
28041
|
|
|
27822
28042
|
exports.Runtimes = void 0;
|
|
@@ -27857,6 +28077,7 @@ exports.Runtimes = void 0;
|
|
|
27857
28077
|
Runtimes["Dart35"] = "dart-3.5";
|
|
27858
28078
|
Runtimes["Dart38"] = "dart-3.8";
|
|
27859
28079
|
Runtimes["Dart39"] = "dart-3.9";
|
|
28080
|
+
Runtimes["Dart310"] = "dart-3.10";
|
|
27860
28081
|
Runtimes["Dotnet60"] = "dotnet-6.0";
|
|
27861
28082
|
Runtimes["Dotnet70"] = "dotnet-7.0";
|
|
27862
28083
|
Runtimes["Dotnet80"] = "dotnet-8.0";
|
|
@@ -27885,6 +28106,7 @@ exports.Runtimes = void 0;
|
|
|
27885
28106
|
Runtimes["Flutter329"] = "flutter-3.29";
|
|
27886
28107
|
Runtimes["Flutter332"] = "flutter-3.32";
|
|
27887
28108
|
Runtimes["Flutter335"] = "flutter-3.35";
|
|
28109
|
+
Runtimes["Flutter338"] = "flutter-3.38";
|
|
27888
28110
|
})(exports.Runtimes || (exports.Runtimes = {}));
|
|
27889
28111
|
|
|
27890
28112
|
exports.UseCases = void 0;
|
|
@@ -28052,12 +28274,6 @@ exports.SMTPSecure = void 0;
|
|
|
28052
28274
|
SMTPSecure["Ssl"] = "ssl";
|
|
28053
28275
|
})(exports.SMTPSecure || (exports.SMTPSecure = {}));
|
|
28054
28276
|
|
|
28055
|
-
exports.Status = void 0;
|
|
28056
|
-
(function (Status) {
|
|
28057
|
-
Status["Active"] = "active";
|
|
28058
|
-
Status["Archived"] = "archived";
|
|
28059
|
-
})(exports.Status || (exports.Status = {}));
|
|
28060
|
-
|
|
28061
28277
|
exports.EmailTemplateType = void 0;
|
|
28062
28278
|
(function (EmailTemplateType) {
|
|
28063
28279
|
EmailTemplateType["Verification"] = "verification";
|
|
@@ -28418,6 +28634,7 @@ exports.BuildRuntime = void 0;
|
|
|
28418
28634
|
BuildRuntime["Dart35"] = "dart-3.5";
|
|
28419
28635
|
BuildRuntime["Dart38"] = "dart-3.8";
|
|
28420
28636
|
BuildRuntime["Dart39"] = "dart-3.9";
|
|
28637
|
+
BuildRuntime["Dart310"] = "dart-3.10";
|
|
28421
28638
|
BuildRuntime["Dotnet60"] = "dotnet-6.0";
|
|
28422
28639
|
BuildRuntime["Dotnet70"] = "dotnet-7.0";
|
|
28423
28640
|
BuildRuntime["Dotnet80"] = "dotnet-8.0";
|
|
@@ -28446,6 +28663,7 @@ exports.BuildRuntime = void 0;
|
|
|
28446
28663
|
BuildRuntime["Flutter329"] = "flutter-3.29";
|
|
28447
28664
|
BuildRuntime["Flutter332"] = "flutter-3.32";
|
|
28448
28665
|
BuildRuntime["Flutter335"] = "flutter-3.35";
|
|
28666
|
+
BuildRuntime["Flutter338"] = "flutter-3.38";
|
|
28449
28667
|
})(exports.BuildRuntime || (exports.BuildRuntime = {}));
|
|
28450
28668
|
|
|
28451
28669
|
exports.Adapter = void 0;
|
|
@@ -28493,15 +28711,6 @@ exports.ImageGravity = void 0;
|
|
|
28493
28711
|
ImageGravity["Bottomright"] = "bottom-right";
|
|
28494
28712
|
})(exports.ImageGravity || (exports.ImageGravity = {}));
|
|
28495
28713
|
|
|
28496
|
-
exports.Roles = void 0;
|
|
28497
|
-
(function (Roles) {
|
|
28498
|
-
Roles["Developer"] = "developer";
|
|
28499
|
-
Roles["Editor"] = "editor";
|
|
28500
|
-
Roles["Analyst"] = "analyst";
|
|
28501
|
-
Roles["Billing"] = "billing";
|
|
28502
|
-
Roles["Owner"] = "owner";
|
|
28503
|
-
})(exports.Roles || (exports.Roles = {}));
|
|
28504
|
-
|
|
28505
28714
|
exports.PasswordHash = void 0;
|
|
28506
28715
|
(function (PasswordHash) {
|
|
28507
28716
|
PasswordHash["Sha1"] = "sha1";
|
|
@@ -28633,6 +28842,7 @@ exports.BillingPlanGroup = void 0;
|
|
|
28633
28842
|
})(exports.BillingPlanGroup || (exports.BillingPlanGroup = {}));
|
|
28634
28843
|
|
|
28635
28844
|
exports.Account = Account;
|
|
28845
|
+
exports.Activities = Activities;
|
|
28636
28846
|
exports.AppwriteException = AppwriteException;
|
|
28637
28847
|
exports.Assistant = Assistant;
|
|
28638
28848
|
exports.Avatars = Avatars;
|