@appwrite.io/console 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +326 -194
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +327 -195
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +326 -194
- 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/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 +2 -0
- package/docs/examples/databases/create-mediumtext-attribute.md +2 -0
- package/docs/examples/databases/create-operations.md +2 -0
- package/docs/examples/databases/create-point-attribute.md +2 -0
- package/docs/examples/databases/create-polygon-attribute.md +2 -0
- package/docs/examples/databases/create-relationship-attribute.md +2 -0
- package/docs/examples/databases/create-string-attribute.md +2 -0
- package/docs/examples/databases/create-text-attribute.md +2 -0
- package/docs/examples/databases/create-transaction.md +2 -0
- package/docs/examples/databases/create-url-attribute.md +2 -0
- package/docs/examples/databases/create-varchar-attribute.md +2 -0
- package/docs/examples/databases/create.md +2 -0
- package/docs/examples/databases/decrement-document-attribute.md +2 -0
- package/docs/examples/databases/delete-attribute.md +2 -0
- package/docs/examples/databases/delete-collection.md +2 -0
- package/docs/examples/databases/delete-document.md +2 -0
- package/docs/examples/databases/delete-documents.md +2 -0
- package/docs/examples/databases/delete-index.md +2 -0
- package/docs/examples/databases/delete-transaction.md +2 -0
- package/docs/examples/databases/delete.md +2 -0
- package/docs/examples/databases/get-attribute.md +2 -0
- package/docs/examples/databases/get-collection-usage.md +2 -0
- package/docs/examples/databases/get-collection.md +2 -0
- package/docs/examples/databases/get-document.md +2 -0
- package/docs/examples/databases/get-index.md +2 -0
- package/docs/examples/databases/get-transaction.md +2 -0
- package/docs/examples/databases/get-usage.md +2 -0
- package/docs/examples/databases/get.md +2 -0
- package/docs/examples/databases/increment-document-attribute.md +2 -0
- package/docs/examples/databases/list-attributes.md +2 -0
- package/docs/examples/databases/list-collection-logs.md +2 -0
- package/docs/examples/databases/list-collections.md +2 -0
- package/docs/examples/databases/list-document-logs.md +2 -0
- package/docs/examples/databases/list-documents.md +2 -0
- package/docs/examples/databases/list-indexes.md +2 -0
- package/docs/examples/databases/list-logs.md +2 -0
- package/docs/examples/databases/list-transactions.md +2 -0
- package/docs/examples/databases/list-usage.md +2 -0
- package/docs/examples/databases/list.md +2 -0
- package/docs/examples/databases/update-boolean-attribute.md +2 -0
- package/docs/examples/databases/update-collection.md +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 +2 -0
- package/docs/examples/tablesdb/create-mediumtext-column.md +2 -0
- package/docs/examples/tablesdb/create-operations.md +2 -0
- package/docs/examples/tablesdb/create-point-column.md +2 -0
- package/docs/examples/tablesdb/create-polygon-column.md +2 -0
- package/docs/examples/tablesdb/create-relationship-column.md +2 -0
- package/docs/examples/tablesdb/create-row.md +2 -0
- package/docs/examples/tablesdb/create-rows.md +2 -0
- package/docs/examples/tablesdb/create-string-column.md +2 -0
- package/docs/examples/tablesdb/create-table.md +2 -0
- package/docs/examples/tablesdb/create-text-column.md +2 -0
- package/docs/examples/tablesdb/create-transaction.md +2 -0
- package/docs/examples/tablesdb/create-url-column.md +2 -0
- package/docs/examples/tablesdb/create-varchar-column.md +2 -0
- package/docs/examples/tablesdb/create.md +2 -0
- package/docs/examples/tablesdb/decrement-row-column.md +2 -0
- package/docs/examples/tablesdb/delete-column.md +2 -0
- package/docs/examples/tablesdb/delete-index.md +2 -0
- package/docs/examples/tablesdb/delete-row.md +2 -0
- package/docs/examples/tablesdb/delete-rows.md +2 -0
- package/docs/examples/tablesdb/delete-table.md +2 -0
- package/docs/examples/tablesdb/delete-transaction.md +2 -0
- package/docs/examples/tablesdb/delete.md +2 -0
- package/docs/examples/tablesdb/get-column.md +2 -0
- package/docs/examples/tablesdb/get-index.md +2 -0
- package/docs/examples/tablesdb/get-row.md +2 -0
- package/docs/examples/tablesdb/get-table-usage.md +2 -0
- package/docs/examples/tablesdb/get-table.md +2 -0
- package/docs/examples/tablesdb/get-transaction.md +2 -0
- package/docs/examples/tablesdb/get-usage.md +2 -0
- package/docs/examples/tablesdb/get.md +2 -0
- package/docs/examples/tablesdb/increment-row-column.md +2 -0
- package/docs/examples/tablesdb/list-columns.md +2 -0
- package/docs/examples/tablesdb/list-indexes.md +2 -0
- package/docs/examples/tablesdb/list-row-logs.md +2 -0
- package/docs/examples/tablesdb/list-rows.md +2 -0
- package/docs/examples/tablesdb/list-table-logs.md +2 -0
- package/docs/examples/tablesdb/list-tables.md +2 -0
- package/docs/examples/tablesdb/list-transactions.md +2 -0
- package/docs/examples/tablesdb/list-usage.md +2 -0
- package/docs/examples/tablesdb/list.md +2 -0
- package/docs/examples/tablesdb/update-boolean-column.md +2 -0
- package/docs/examples/tablesdb/update-datetime-column.md +2 -0
- package/docs/examples/tablesdb/update-email-column.md +2 -0
- package/docs/examples/tablesdb/update-enum-column.md +2 -0
- package/docs/examples/tablesdb/update-float-column.md +2 -0
- package/docs/examples/tablesdb/update-integer-column.md +2 -0
- package/docs/examples/tablesdb/update-ip-column.md +2 -0
- package/docs/examples/tablesdb/update-line-column.md +2 -0
- package/docs/examples/tablesdb/update-longtext-column.md +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 +5 -0
- package/src/enums/registration-type.ts +6 -0
- package/src/enums/runtime.ts +5 -0
- package/src/enums/runtimes.ts +5 -0
- package/src/enums/scopes.ts +1 -0
- package/src/index.ts +2 -3
- package/src/models.ts +45 -3
- package/src/services/account.ts +11 -11
- 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 +1 -1
- 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 +8 -8
- 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 +1 -1
- 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 +6 -1
- package/types/enums/registration-type.d.ts +6 -0
- package/types/enums/runtime.d.ts +6 -1
- package/types/enums/runtimes.d.ts +6 -1
- package/types/enums/scopes.d.ts +2 -1
- package/types/index.d.ts +2 -3
- package/types/models.d.ts +44 -3
- package/types/services/backups.d.ts +13 -13
- package/types/services/domains.d.ts +26 -0
- 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/teams.d.ts +8 -9
- package/docs/examples/organizations/update-projects.md +0 -14
- package/docs/examples/projects/update-status.md +0 -14
- package/src/enums/roles.ts +0 -7
- package/src/enums/status.ts +0 -4
- package/types/enums/roles.d.ts +0 -7
- package/types/enums/status.d.ts +0 -4
package/src/client.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Models } from './models';
|
|
2
2
|
import { Channel, ActionableChannel, ResolvedChannel } from './channel';
|
|
3
|
+
import { Query } from './query';
|
|
3
4
|
import JSONbigModule from 'json-bigint';
|
|
4
5
|
import BigNumber from 'bignumber.js';
|
|
5
6
|
const JSONbigParser = JSONbigModule({ storeAsString: false });
|
|
@@ -89,12 +90,17 @@ type RealtimeResponseEvent<T extends unknown> = {
|
|
|
89
90
|
/**
|
|
90
91
|
* Timestamp indicating the time of the event.
|
|
91
92
|
*/
|
|
92
|
-
timestamp:
|
|
93
|
+
timestamp: string;
|
|
93
94
|
|
|
94
95
|
/**
|
|
95
96
|
* Payload containing event-specific data.
|
|
96
97
|
*/
|
|
97
98
|
payload: T;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Subscription IDs this event matches (from backend, optional).
|
|
102
|
+
*/
|
|
103
|
+
subscriptions?: string[];
|
|
98
104
|
}
|
|
99
105
|
|
|
100
106
|
/**
|
|
@@ -125,6 +131,11 @@ type RealtimeResponseConnected = {
|
|
|
125
131
|
* User object representing the connected user (optional).
|
|
126
132
|
*/
|
|
127
133
|
user?: object;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Map slot index -> subscription ID from backend (optional).
|
|
137
|
+
*/
|
|
138
|
+
subscriptions?: Record<string, string>;
|
|
128
139
|
}
|
|
129
140
|
|
|
130
141
|
/**
|
|
@@ -193,14 +204,30 @@ type Realtime = {
|
|
|
193
204
|
*/
|
|
194
205
|
channels: Set<string>;
|
|
195
206
|
|
|
207
|
+
/**
|
|
208
|
+
* Set of query strings the client is subscribed to.
|
|
209
|
+
*/
|
|
210
|
+
queries: Set<string>;
|
|
211
|
+
|
|
196
212
|
/**
|
|
197
213
|
* Map of subscriptions containing channel names and corresponding callback functions.
|
|
198
214
|
*/
|
|
199
215
|
subscriptions: Map<number, {
|
|
200
216
|
channels: string[];
|
|
217
|
+
queries: string[];
|
|
201
218
|
callback: (payload: RealtimeResponseEvent<any>) => void
|
|
202
219
|
}>;
|
|
203
220
|
|
|
221
|
+
/**
|
|
222
|
+
* Map slot index -> subscription ID (from backend, set on 'connected').
|
|
223
|
+
*/
|
|
224
|
+
slotToSubscriptionId: Map<number, string>;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Map subscription ID -> slot index (for O(1) event dispatch).
|
|
228
|
+
*/
|
|
229
|
+
subscriptionIdToSlot: Map<string, number>;
|
|
230
|
+
|
|
204
231
|
/**
|
|
205
232
|
* Counter for managing subscriptions.
|
|
206
233
|
*/
|
|
@@ -241,7 +268,7 @@ type Realtime = {
|
|
|
241
268
|
*
|
|
242
269
|
* @param {string[]} channels - List of channel names to clean up.
|
|
243
270
|
*/
|
|
244
|
-
cleanUp: (channels: string[]) => void;
|
|
271
|
+
cleanUp: (channels: string[], queries: string[]) => void;
|
|
245
272
|
|
|
246
273
|
/**
|
|
247
274
|
* Function to handle incoming messages from the WebSocket connection.
|
|
@@ -360,7 +387,7 @@ class Client {
|
|
|
360
387
|
'x-sdk-name': 'Console',
|
|
361
388
|
'x-sdk-platform': 'console',
|
|
362
389
|
'x-sdk-language': 'web',
|
|
363
|
-
'x-sdk-version': '2.
|
|
390
|
+
'x-sdk-version': '2.3.0',
|
|
364
391
|
'X-Appwrite-Response-Format': '1.8.0',
|
|
365
392
|
};
|
|
366
393
|
|
|
@@ -521,7 +548,10 @@ class Client {
|
|
|
521
548
|
heartbeat: undefined,
|
|
522
549
|
url: '',
|
|
523
550
|
channels: new Set(),
|
|
551
|
+
queries: new Set(),
|
|
524
552
|
subscriptions: new Map(),
|
|
553
|
+
slotToSubscriptionId: new Map(),
|
|
554
|
+
subscriptionIdToSlot: new Map(),
|
|
525
555
|
subscriptionsCounter: 0,
|
|
526
556
|
reconnect: true,
|
|
527
557
|
reconnectAttempts: 0,
|
|
@@ -556,21 +586,31 @@ class Client {
|
|
|
556
586
|
}, 20_000);
|
|
557
587
|
},
|
|
558
588
|
createSocket: () => {
|
|
559
|
-
if (this.realtime.
|
|
589
|
+
if (this.realtime.subscriptions.size < 1) {
|
|
560
590
|
this.realtime.reconnect = false;
|
|
561
591
|
this.realtime.socket?.close();
|
|
562
592
|
return;
|
|
563
593
|
}
|
|
564
594
|
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
}
|
|
595
|
+
const encodedProject = encodeURIComponent((this.config.project as string) ?? '');
|
|
596
|
+
let queryParams = 'project=' + encodedProject;
|
|
597
|
+
|
|
569
598
|
this.realtime.channels.forEach(channel => {
|
|
570
|
-
|
|
599
|
+
queryParams += '&channels[]=' + encodeURIComponent(channel);
|
|
600
|
+
});
|
|
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
|
+
});
|
|
571
611
|
});
|
|
572
612
|
|
|
573
|
-
const url = this.config.endpointRealtime + '/realtime?' +
|
|
613
|
+
const url = this.config.endpointRealtime + '/realtime?' + queryParams;
|
|
574
614
|
|
|
575
615
|
if (
|
|
576
616
|
url !== this.realtime.url || // Check if URL is present
|
|
@@ -619,15 +659,26 @@ class Client {
|
|
|
619
659
|
const message: RealtimeResponse = JSONbig.parse(event.data);
|
|
620
660
|
this.realtime.lastMessage = message;
|
|
621
661
|
switch (message.type) {
|
|
622
|
-
case 'connected':
|
|
662
|
+
case 'connected': {
|
|
663
|
+
const messageData = <RealtimeResponseConnected>message.data;
|
|
664
|
+
if (messageData?.subscriptions) {
|
|
665
|
+
this.realtime.slotToSubscriptionId.clear();
|
|
666
|
+
this.realtime.subscriptionIdToSlot.clear();
|
|
667
|
+
for (const [slotStr, subscriptionId] of Object.entries(messageData.subscriptions)) {
|
|
668
|
+
const slot = Number(slotStr);
|
|
669
|
+
if (!isNaN(slot) && typeof subscriptionId === 'string') {
|
|
670
|
+
this.realtime.slotToSubscriptionId.set(slot, subscriptionId);
|
|
671
|
+
this.realtime.subscriptionIdToSlot.set(subscriptionId, slot);
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
623
676
|
let session = this.config.session;
|
|
624
677
|
if (!session) {
|
|
625
678
|
const cookie = JSONbig.parse(window.localStorage.getItem('cookieFallback') ?? '{}');
|
|
626
679
|
session = cookie?.[`a_session_${this.config.project}`];
|
|
627
680
|
}
|
|
628
|
-
|
|
629
|
-
const messageData = <RealtimeResponseConnected>message.data;
|
|
630
|
-
if (session && !messageData.user) {
|
|
681
|
+
if (session && !messageData?.user) {
|
|
631
682
|
this.realtime.socket?.send(JSONbig.stringify(<RealtimeRequest>{
|
|
632
683
|
type: 'authentication',
|
|
633
684
|
data: {
|
|
@@ -636,18 +687,33 @@ class Client {
|
|
|
636
687
|
}));
|
|
637
688
|
}
|
|
638
689
|
break;
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
690
|
+
}
|
|
691
|
+
case 'event': {
|
|
692
|
+
const data = <RealtimeResponseEvent<unknown>>message.data;
|
|
693
|
+
if (!data?.channels) break;
|
|
694
|
+
|
|
695
|
+
const eventSubIds = data.subscriptions;
|
|
696
|
+
if (eventSubIds && eventSubIds.length > 0) {
|
|
697
|
+
for (const subscriptionId of eventSubIds) {
|
|
698
|
+
const slot = this.realtime.subscriptionIdToSlot.get(subscriptionId);
|
|
699
|
+
if (slot !== undefined) {
|
|
700
|
+
const subscription = this.realtime.subscriptions.get(slot);
|
|
701
|
+
if (subscription) {
|
|
702
|
+
setTimeout(() => subscription.callback(data));
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
} else {
|
|
642
707
|
const isSubscribed = data.channels.some(channel => this.realtime.channels.has(channel));
|
|
643
|
-
if (!isSubscribed)
|
|
708
|
+
if (!isSubscribed) break;
|
|
644
709
|
this.realtime.subscriptions.forEach(subscription => {
|
|
645
710
|
if (data.channels.some(channel => subscription.channels.includes(channel))) {
|
|
646
711
|
setTimeout(() => subscription.callback(data));
|
|
647
712
|
}
|
|
648
|
-
})
|
|
713
|
+
});
|
|
649
714
|
}
|
|
650
715
|
break;
|
|
716
|
+
}
|
|
651
717
|
case 'pong':
|
|
652
718
|
break; // Handle pong response if needed
|
|
653
719
|
case 'error':
|
|
@@ -659,7 +725,7 @@ class Client {
|
|
|
659
725
|
console.error(e);
|
|
660
726
|
}
|
|
661
727
|
},
|
|
662
|
-
cleanUp: channels => {
|
|
728
|
+
cleanUp: (channels, queries) => {
|
|
663
729
|
this.realtime.channels.forEach(channel => {
|
|
664
730
|
if (channels.includes(channel)) {
|
|
665
731
|
let found = Array.from(this.realtime.subscriptions).some(([_key, subscription] )=> {
|
|
@@ -671,6 +737,18 @@ class Client {
|
|
|
671
737
|
}
|
|
672
738
|
}
|
|
673
739
|
})
|
|
740
|
+
|
|
741
|
+
this.realtime.queries.forEach(query => {
|
|
742
|
+
if (queries.includes(query)) {
|
|
743
|
+
let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
|
|
744
|
+
return subscription.queries?.includes(query);
|
|
745
|
+
});
|
|
746
|
+
|
|
747
|
+
if (!found) {
|
|
748
|
+
this.realtime.queries.delete(query);
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
})
|
|
674
752
|
}
|
|
675
753
|
}
|
|
676
754
|
|
|
@@ -709,7 +787,11 @@ class Client {
|
|
|
709
787
|
* @param {(payload: RealtimeMessage) => void} callback Is called on every realtime update.
|
|
710
788
|
* @returns {() => void} Unsubscribes from events.
|
|
711
789
|
*/
|
|
712
|
-
subscribe<T extends unknown>(
|
|
790
|
+
subscribe<T extends unknown>(
|
|
791
|
+
channels: string | string[] | Channel<any> | ActionableChannel | ResolvedChannel | (Channel<any> | ActionableChannel | ResolvedChannel)[],
|
|
792
|
+
callback: (payload: RealtimeResponseEvent<T>) => void,
|
|
793
|
+
queries: (string | Query)[] = []
|
|
794
|
+
): () => void {
|
|
713
795
|
const channelArray = Array.isArray(channels) ? channels : [channels];
|
|
714
796
|
// Convert Channel instances to strings
|
|
715
797
|
const channelStrings = channelArray.map(ch => {
|
|
@@ -725,9 +807,13 @@ class Client {
|
|
|
725
807
|
});
|
|
726
808
|
channelStrings.forEach(channel => this.realtime.channels.add(channel));
|
|
727
809
|
|
|
810
|
+
const queryStrings = (queries ?? []).map(q => typeof q === 'string' ? q : q.toString());
|
|
811
|
+
queryStrings.forEach(query => this.realtime.queries.add(query));
|
|
812
|
+
|
|
728
813
|
const counter = this.realtime.subscriptionsCounter++;
|
|
729
814
|
this.realtime.subscriptions.set(counter, {
|
|
730
815
|
channels: channelStrings,
|
|
816
|
+
queries: queryStrings,
|
|
731
817
|
callback
|
|
732
818
|
});
|
|
733
819
|
|
|
@@ -735,7 +821,7 @@ class Client {
|
|
|
735
821
|
|
|
736
822
|
return () => {
|
|
737
823
|
this.realtime.subscriptions.delete(counter);
|
|
738
|
-
this.realtime.cleanUp(channelStrings);
|
|
824
|
+
this.realtime.cleanUp(channelStrings, queryStrings);
|
|
739
825
|
this.realtime.connect();
|
|
740
826
|
}
|
|
741
827
|
}
|
|
@@ -21,6 +21,9 @@ export enum BuildRuntime {
|
|
|
21
21
|
Python312 = 'python-3.12',
|
|
22
22
|
Pythonml311 = 'python-ml-3.11',
|
|
23
23
|
Pythonml312 = 'python-ml-3.12',
|
|
24
|
+
Deno121 = 'deno-1.21',
|
|
25
|
+
Deno124 = 'deno-1.24',
|
|
26
|
+
Deno135 = 'deno-1.35',
|
|
24
27
|
Deno140 = 'deno-1.40',
|
|
25
28
|
Deno146 = 'deno-1.46',
|
|
26
29
|
Deno20 = 'deno-2.0',
|
|
@@ -35,6 +38,7 @@ export enum BuildRuntime {
|
|
|
35
38
|
Dart35 = 'dart-3.5',
|
|
36
39
|
Dart38 = 'dart-3.8',
|
|
37
40
|
Dart39 = 'dart-3.9',
|
|
41
|
+
Dart310 = 'dart-3.10',
|
|
38
42
|
Dotnet60 = 'dotnet-6.0',
|
|
39
43
|
Dotnet70 = 'dotnet-7.0',
|
|
40
44
|
Dotnet80 = 'dotnet-8.0',
|
|
@@ -63,4 +67,5 @@ export enum BuildRuntime {
|
|
|
63
67
|
Flutter329 = 'flutter-3.29',
|
|
64
68
|
Flutter332 = 'flutter-3.32',
|
|
65
69
|
Flutter335 = 'flutter-3.35',
|
|
70
|
+
Flutter338 = 'flutter-3.38',
|
|
66
71
|
}
|
package/src/enums/runtime.ts
CHANGED
|
@@ -21,6 +21,9 @@ export enum Runtime {
|
|
|
21
21
|
Python312 = 'python-3.12',
|
|
22
22
|
Pythonml311 = 'python-ml-3.11',
|
|
23
23
|
Pythonml312 = 'python-ml-3.12',
|
|
24
|
+
Deno121 = 'deno-1.21',
|
|
25
|
+
Deno124 = 'deno-1.24',
|
|
26
|
+
Deno135 = 'deno-1.35',
|
|
24
27
|
Deno140 = 'deno-1.40',
|
|
25
28
|
Deno146 = 'deno-1.46',
|
|
26
29
|
Deno20 = 'deno-2.0',
|
|
@@ -35,6 +38,7 @@ export enum Runtime {
|
|
|
35
38
|
Dart35 = 'dart-3.5',
|
|
36
39
|
Dart38 = 'dart-3.8',
|
|
37
40
|
Dart39 = 'dart-3.9',
|
|
41
|
+
Dart310 = 'dart-3.10',
|
|
38
42
|
Dotnet60 = 'dotnet-6.0',
|
|
39
43
|
Dotnet70 = 'dotnet-7.0',
|
|
40
44
|
Dotnet80 = 'dotnet-8.0',
|
|
@@ -63,4 +67,5 @@ export enum Runtime {
|
|
|
63
67
|
Flutter329 = 'flutter-3.29',
|
|
64
68
|
Flutter332 = 'flutter-3.32',
|
|
65
69
|
Flutter335 = 'flutter-3.35',
|
|
70
|
+
Flutter338 = 'flutter-3.38',
|
|
66
71
|
}
|
package/src/enums/runtimes.ts
CHANGED
|
@@ -21,6 +21,9 @@ export enum Runtimes {
|
|
|
21
21
|
Python312 = 'python-3.12',
|
|
22
22
|
Pythonml311 = 'python-ml-3.11',
|
|
23
23
|
Pythonml312 = 'python-ml-3.12',
|
|
24
|
+
Deno121 = 'deno-1.21',
|
|
25
|
+
Deno124 = 'deno-1.24',
|
|
26
|
+
Deno135 = 'deno-1.35',
|
|
24
27
|
Deno140 = 'deno-1.40',
|
|
25
28
|
Deno146 = 'deno-1.46',
|
|
26
29
|
Deno20 = 'deno-2.0',
|
|
@@ -35,6 +38,7 @@ export enum Runtimes {
|
|
|
35
38
|
Dart35 = 'dart-3.5',
|
|
36
39
|
Dart38 = 'dart-3.8',
|
|
37
40
|
Dart39 = 'dart-3.9',
|
|
41
|
+
Dart310 = 'dart-3.10',
|
|
38
42
|
Dotnet60 = 'dotnet-6.0',
|
|
39
43
|
Dotnet70 = 'dotnet-7.0',
|
|
40
44
|
Dotnet80 = 'dotnet-8.0',
|
|
@@ -63,4 +67,5 @@ export enum Runtimes {
|
|
|
63
67
|
Flutter329 = 'flutter-3.29',
|
|
64
68
|
Flutter332 = 'flutter-3.32',
|
|
65
69
|
Flutter335 = 'flutter-3.35',
|
|
70
|
+
Flutter338 = 'flutter-3.38',
|
|
66
71
|
}
|
package/src/enums/scopes.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -49,7 +49,7 @@ export { Theme } from './enums/theme';
|
|
|
49
49
|
export { Timezone } from './enums/timezone';
|
|
50
50
|
export { BrowserPermission } from './enums/browser-permission';
|
|
51
51
|
export { ImageFormat } from './enums/image-format';
|
|
52
|
-
export {
|
|
52
|
+
export { BackupServices } from './enums/backup-services';
|
|
53
53
|
export { Platform } from './enums/platform';
|
|
54
54
|
export { ConsoleResourceType } from './enums/console-resource-type';
|
|
55
55
|
export { UsageRange } from './enums/usage-range';
|
|
@@ -57,6 +57,7 @@ export { RelationshipType } from './enums/relationship-type';
|
|
|
57
57
|
export { RelationMutate } from './enums/relation-mutate';
|
|
58
58
|
export { IndexType } from './enums/index-type';
|
|
59
59
|
export { OrderBy } from './enums/order-by';
|
|
60
|
+
export { RegistrationType } from './enums/registration-type';
|
|
60
61
|
export { FilterType } from './enums/filter-type';
|
|
61
62
|
export { Runtime } from './enums/runtime';
|
|
62
63
|
export { Runtimes } from './enums/runtimes';
|
|
@@ -76,7 +77,6 @@ export { AuthMethod } from './enums/auth-method';
|
|
|
76
77
|
export { PlatformType } from './enums/platform-type';
|
|
77
78
|
export { ApiService } from './enums/api-service';
|
|
78
79
|
export { SMTPSecure } from './enums/smtp-secure';
|
|
79
|
-
export { Status } from './enums/status';
|
|
80
80
|
export { EmailTemplateType } from './enums/email-template-type';
|
|
81
81
|
export { EmailTemplateLocale } from './enums/email-template-locale';
|
|
82
82
|
export { SmsTemplateType } from './enums/sms-template-type';
|
|
@@ -89,7 +89,6 @@ export { Adapter } from './enums/adapter';
|
|
|
89
89
|
export { Frameworks } from './enums/frameworks';
|
|
90
90
|
export { Compression } from './enums/compression';
|
|
91
91
|
export { ImageGravity } from './enums/image-gravity';
|
|
92
|
-
export { Roles } from './enums/roles';
|
|
93
92
|
export { PasswordHash } from './enums/password-hash';
|
|
94
93
|
export { MessagingProviderType } from './enums/messaging-provider-type';
|
|
95
94
|
export { VCSDetectionType } from './enums/vcs-detection-type';
|
package/src/models.ts
CHANGED
|
@@ -816,6 +816,14 @@ export namespace Models {
|
|
|
816
816
|
* Collection indexes.
|
|
817
817
|
*/
|
|
818
818
|
indexes: Index[];
|
|
819
|
+
/**
|
|
820
|
+
* Maximum document size in bytes. Returns 0 when no limit applies.
|
|
821
|
+
*/
|
|
822
|
+
bytesMax: number;
|
|
823
|
+
/**
|
|
824
|
+
* Currently used document size in bytes based on defined attributes.
|
|
825
|
+
*/
|
|
826
|
+
bytesUsed: number;
|
|
819
827
|
}
|
|
820
828
|
|
|
821
829
|
/**
|
|
@@ -1657,11 +1665,19 @@ export namespace Models {
|
|
|
1657
1665
|
/**
|
|
1658
1666
|
* Table columns.
|
|
1659
1667
|
*/
|
|
1660
|
-
columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnString)[];
|
|
1668
|
+
columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
|
|
1661
1669
|
/**
|
|
1662
1670
|
* Table indexes.
|
|
1663
1671
|
*/
|
|
1664
1672
|
indexes: ColumnIndex[];
|
|
1673
|
+
/**
|
|
1674
|
+
* Maximum row size in bytes. Returns 0 when no limit applies.
|
|
1675
|
+
*/
|
|
1676
|
+
bytesMax: number;
|
|
1677
|
+
/**
|
|
1678
|
+
* Currently used row size in bytes based on defined columns.
|
|
1679
|
+
*/
|
|
1680
|
+
bytesUsed: number;
|
|
1665
1681
|
}
|
|
1666
1682
|
|
|
1667
1683
|
/**
|
|
@@ -1675,7 +1691,7 @@ export namespace Models {
|
|
|
1675
1691
|
/**
|
|
1676
1692
|
* List of columns.
|
|
1677
1693
|
*/
|
|
1678
|
-
columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnString)[];
|
|
1694
|
+
columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
|
|
1679
1695
|
}
|
|
1680
1696
|
|
|
1681
1697
|
/**
|
|
@@ -6274,7 +6290,7 @@ export namespace Models {
|
|
|
6274
6290
|
*/
|
|
6275
6291
|
_APP_ASSISTANT_ENABLED: boolean;
|
|
6276
6292
|
/**
|
|
6277
|
-
* A
|
|
6293
|
+
* A comma separated list of domains to use for site URLs.
|
|
6278
6294
|
*/
|
|
6279
6295
|
_APP_DOMAIN_SITES: string;
|
|
6280
6296
|
/**
|
|
@@ -8581,6 +8597,32 @@ export namespace Models {
|
|
|
8581
8597
|
value: number;
|
|
8582
8598
|
}
|
|
8583
8599
|
|
|
8600
|
+
/**
|
|
8601
|
+
* DomainPrice
|
|
8602
|
+
*/
|
|
8603
|
+
export type DomainPrice = {
|
|
8604
|
+
/**
|
|
8605
|
+
* Domain name.
|
|
8606
|
+
*/
|
|
8607
|
+
domain: string;
|
|
8608
|
+
/**
|
|
8609
|
+
* Top-level domain for the requested domain.
|
|
8610
|
+
*/
|
|
8611
|
+
tld: string;
|
|
8612
|
+
/**
|
|
8613
|
+
* Whether the domain is currently available for registration.
|
|
8614
|
+
*/
|
|
8615
|
+
available: boolean;
|
|
8616
|
+
/**
|
|
8617
|
+
* Domain registration price.
|
|
8618
|
+
*/
|
|
8619
|
+
price: number;
|
|
8620
|
+
/**
|
|
8621
|
+
* Price period in years.
|
|
8622
|
+
*/
|
|
8623
|
+
periodYears: number;
|
|
8624
|
+
}
|
|
8625
|
+
|
|
8584
8626
|
/**
|
|
8585
8627
|
* DomainSuggestion
|
|
8586
8628
|
*/
|
package/src/services/account.ts
CHANGED
|
@@ -1278,7 +1278,7 @@ export class Account {
|
|
|
1278
1278
|
): Promise<Models.MfaType> {
|
|
1279
1279
|
let params: { type: AuthenticatorType };
|
|
1280
1280
|
|
|
1281
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1281
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1282
1282
|
params = (paramsOrFirst || {}) as { type: AuthenticatorType };
|
|
1283
1283
|
} else {
|
|
1284
1284
|
params = {
|
|
@@ -1330,7 +1330,7 @@ export class Account {
|
|
|
1330
1330
|
): Promise<Models.MfaType> {
|
|
1331
1331
|
let params: { type: AuthenticatorType };
|
|
1332
1332
|
|
|
1333
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1333
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1334
1334
|
params = (paramsOrFirst || {}) as { type: AuthenticatorType };
|
|
1335
1335
|
} else {
|
|
1336
1336
|
params = {
|
|
@@ -1386,7 +1386,7 @@ export class Account {
|
|
|
1386
1386
|
): Promise<Models.User<Preferences>> {
|
|
1387
1387
|
let params: { type: AuthenticatorType, otp: string };
|
|
1388
1388
|
|
|
1389
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1389
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst || 'otp' in paramsOrFirst))) {
|
|
1390
1390
|
params = (paramsOrFirst || {}) as { type: AuthenticatorType, otp: string };
|
|
1391
1391
|
} else {
|
|
1392
1392
|
params = {
|
|
@@ -1449,7 +1449,7 @@ export class Account {
|
|
|
1449
1449
|
): Promise<Models.User<Preferences>> {
|
|
1450
1450
|
let params: { type: AuthenticatorType, otp: string };
|
|
1451
1451
|
|
|
1452
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1452
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst || 'otp' in paramsOrFirst))) {
|
|
1453
1453
|
params = (paramsOrFirst || {}) as { type: AuthenticatorType, otp: string };
|
|
1454
1454
|
} else {
|
|
1455
1455
|
params = {
|
|
@@ -1510,7 +1510,7 @@ export class Account {
|
|
|
1510
1510
|
): Promise<{}> {
|
|
1511
1511
|
let params: { type: AuthenticatorType };
|
|
1512
1512
|
|
|
1513
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1513
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1514
1514
|
params = (paramsOrFirst || {}) as { type: AuthenticatorType };
|
|
1515
1515
|
} else {
|
|
1516
1516
|
params = {
|
|
@@ -1562,7 +1562,7 @@ export class Account {
|
|
|
1562
1562
|
): Promise<{}> {
|
|
1563
1563
|
let params: { type: AuthenticatorType };
|
|
1564
1564
|
|
|
1565
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1565
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1566
1566
|
params = (paramsOrFirst || {}) as { type: AuthenticatorType };
|
|
1567
1567
|
} else {
|
|
1568
1568
|
params = {
|
|
@@ -1615,7 +1615,7 @@ export class Account {
|
|
|
1615
1615
|
): Promise<Models.MfaChallenge> {
|
|
1616
1616
|
let params: { factor: AuthenticationFactor };
|
|
1617
1617
|
|
|
1618
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
|
|
1618
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
|
|
1619
1619
|
params = (paramsOrFirst || {}) as { factor: AuthenticationFactor };
|
|
1620
1620
|
} else {
|
|
1621
1621
|
params = {
|
|
@@ -1670,7 +1670,7 @@ export class Account {
|
|
|
1670
1670
|
): Promise<Models.MfaChallenge> {
|
|
1671
1671
|
let params: { factor: AuthenticationFactor };
|
|
1672
1672
|
|
|
1673
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
|
|
1673
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
|
|
1674
1674
|
params = (paramsOrFirst || {}) as { factor: AuthenticationFactor };
|
|
1675
1675
|
} else {
|
|
1676
1676
|
params = {
|
|
@@ -2647,7 +2647,7 @@ export class Account {
|
|
|
2647
2647
|
): Promise<Models.User<Preferences>> {
|
|
2648
2648
|
let params: { prefs: Partial<Preferences> };
|
|
2649
2649
|
|
|
2650
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'prefs' in paramsOrFirst)) {
|
|
2650
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('prefs' in paramsOrFirst))) {
|
|
2651
2651
|
params = (paramsOrFirst || {}) as { prefs: Partial<Preferences> };
|
|
2652
2652
|
} else {
|
|
2653
2653
|
params = {
|
|
@@ -3073,7 +3073,7 @@ export class Account {
|
|
|
3073
3073
|
): void | string {
|
|
3074
3074
|
let params: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] };
|
|
3075
3075
|
|
|
3076
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'provider' in paramsOrFirst)) {
|
|
3076
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('provider' in paramsOrFirst || 'success' in paramsOrFirst || 'failure' in paramsOrFirst || 'scopes' in paramsOrFirst))) {
|
|
3077
3077
|
params = (paramsOrFirst || {}) as { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] };
|
|
3078
3078
|
} else {
|
|
3079
3079
|
params = {
|
|
@@ -3825,7 +3825,7 @@ export class Account {
|
|
|
3825
3825
|
): void | string {
|
|
3826
3826
|
let params: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] };
|
|
3827
3827
|
|
|
3828
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'provider' in paramsOrFirst)) {
|
|
3828
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('provider' in paramsOrFirst || 'success' in paramsOrFirst || 'failure' in paramsOrFirst || 'scopes' in paramsOrFirst))) {
|
|
3829
3829
|
params = (paramsOrFirst || {}) as { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] };
|
|
3830
3830
|
} else {
|
|
3831
3831
|
params = {
|
package/src/services/avatars.ts
CHANGED
|
@@ -50,7 +50,7 @@ export class Avatars {
|
|
|
50
50
|
): string {
|
|
51
51
|
let params: { code: Browser, width?: number, height?: number, quality?: number };
|
|
52
52
|
|
|
53
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
53
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
54
54
|
params = (paramsOrFirst || {}) as { code: Browser, width?: number, height?: number, quality?: number };
|
|
55
55
|
} else {
|
|
56
56
|
params = {
|
|
@@ -130,7 +130,7 @@ export class Avatars {
|
|
|
130
130
|
): string {
|
|
131
131
|
let params: { code: CreditCard, width?: number, height?: number, quality?: number };
|
|
132
132
|
|
|
133
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
133
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
134
134
|
params = (paramsOrFirst || {}) as { code: CreditCard, width?: number, height?: number, quality?: number };
|
|
135
135
|
} else {
|
|
136
136
|
params = {
|
|
@@ -269,7 +269,7 @@ export class Avatars {
|
|
|
269
269
|
): string {
|
|
270
270
|
let params: { code: Flag, width?: number, height?: number, quality?: number };
|
|
271
271
|
|
|
272
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
|
|
272
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
|
|
273
273
|
params = (paramsOrFirst || {}) as { code: Flag, width?: number, height?: number, quality?: number };
|
|
274
274
|
} else {
|
|
275
275
|
params = {
|