@appwrite.io/console 2.1.3 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +2201 -692
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +2202 -693
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +2201 -692
- package/docs/examples/account/create-anonymous-session.md +2 -0
- package/docs/examples/account/create-billing-address.md +2 -0
- package/docs/examples/account/create-email-password-session.md +2 -0
- package/docs/examples/account/create-email-token.md +2 -0
- package/docs/examples/account/create-email-verification.md +2 -0
- package/docs/examples/account/create-jwt.md +2 -0
- package/docs/examples/account/create-key.md +17 -0
- package/docs/examples/account/create-magic-url-token.md +2 -0
- package/docs/examples/account/create-mfa-authenticator.md +2 -0
- package/docs/examples/account/create-mfa-challenge.md +2 -0
- package/docs/examples/account/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/account/create-o-auth-2-session.md +2 -0
- package/docs/examples/account/create-o-auth-2-token.md +2 -0
- package/docs/examples/account/create-payment-method.md +2 -0
- package/docs/examples/account/create-phone-token.md +2 -0
- package/docs/examples/account/create-phone-verification.md +2 -0
- package/docs/examples/account/create-push-target.md +2 -0
- package/docs/examples/account/create-recovery.md +2 -0
- package/docs/examples/account/create-session.md +2 -0
- package/docs/examples/account/create-verification.md +2 -0
- package/docs/examples/account/create.md +2 -0
- package/docs/examples/account/delete-billing-address.md +2 -0
- package/docs/examples/account/delete-identity.md +2 -0
- package/docs/examples/account/delete-key.md +15 -0
- package/docs/examples/account/delete-mfa-authenticator.md +2 -0
- package/docs/examples/account/delete-payment-method.md +2 -0
- package/docs/examples/account/delete-push-target.md +2 -0
- package/docs/examples/account/delete-session.md +2 -0
- package/docs/examples/account/delete-sessions.md +2 -0
- package/docs/examples/account/delete.md +2 -0
- package/docs/examples/account/get-billing-address.md +2 -0
- package/docs/examples/account/get-coupon.md +2 -0
- package/docs/examples/account/get-key.md +15 -0
- package/docs/examples/account/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/account/get-payment-method.md +2 -0
- package/docs/examples/account/get-prefs.md +2 -0
- package/docs/examples/account/get-session.md +2 -0
- package/docs/examples/account/get.md +2 -0
- package/docs/examples/account/list-billing-addresses.md +2 -0
- package/docs/examples/account/list-identities.md +2 -0
- package/docs/examples/account/list-invoices.md +2 -0
- package/docs/examples/account/list-keys.md +15 -0
- package/docs/examples/account/list-logs.md +2 -0
- package/docs/examples/account/list-mfa-factors.md +2 -0
- package/docs/examples/account/list-payment-methods.md +2 -0
- package/docs/examples/account/list-sessions.md +2 -0
- package/docs/examples/account/update-billing-address.md +2 -0
- package/docs/examples/account/update-email-verification.md +2 -0
- package/docs/examples/account/update-email.md +2 -0
- package/docs/examples/account/update-key.md +18 -0
- package/docs/examples/account/update-magic-url-session.md +2 -0
- package/docs/examples/account/update-mfa-authenticator.md +2 -0
- package/docs/examples/account/update-mfa-challenge.md +2 -0
- package/docs/examples/account/update-mfa-recovery-codes.md +2 -0
- package/docs/examples/account/update-mfa.md +2 -0
- package/docs/examples/account/update-name.md +2 -0
- package/docs/examples/account/update-password.md +2 -0
- package/docs/examples/account/update-payment-method-mandate-options.md +2 -0
- package/docs/examples/account/update-payment-method-provider.md +2 -0
- package/docs/examples/account/update-payment-method.md +2 -0
- package/docs/examples/account/update-phone-session.md +2 -0
- package/docs/examples/account/update-phone-verification.md +2 -0
- package/docs/examples/account/update-phone.md +2 -0
- package/docs/examples/account/update-prefs.md +2 -0
- package/docs/examples/account/update-push-target.md +2 -0
- package/docs/examples/account/update-recovery.md +2 -0
- package/docs/examples/account/update-session.md +2 -0
- package/docs/examples/account/update-status.md +2 -0
- package/docs/examples/account/update-verification.md +2 -0
- package/docs/examples/assistant/chat.md +2 -0
- package/docs/examples/avatars/get-browser.md +2 -0
- package/docs/examples/avatars/get-credit-card.md +2 -0
- package/docs/examples/avatars/get-favicon.md +2 -0
- package/docs/examples/avatars/get-flag.md +2 -0
- package/docs/examples/avatars/get-image.md +2 -0
- package/docs/examples/avatars/get-initials.md +2 -0
- package/docs/examples/avatars/get-qr.md +2 -0
- package/docs/examples/avatars/get-screenshot.md +7 -5
- package/docs/examples/backups/create-archive.md +4 -2
- package/docs/examples/backups/create-policy.md +4 -2
- package/docs/examples/backups/create-restoration.md +4 -2
- package/docs/examples/backups/delete-archive.md +2 -0
- package/docs/examples/backups/delete-policy.md +2 -0
- package/docs/examples/backups/get-archive.md +2 -0
- package/docs/examples/backups/get-policy.md +2 -0
- package/docs/examples/backups/get-restoration.md +2 -0
- package/docs/examples/backups/list-archives.md +2 -0
- package/docs/examples/backups/list-policies.md +2 -0
- package/docs/examples/backups/list-restorations.md +2 -0
- package/docs/examples/backups/update-policy.md +2 -0
- package/docs/examples/console/create-program-membership.md +2 -0
- package/docs/examples/console/create-source.md +2 -0
- package/docs/examples/console/get-campaign.md +2 -0
- package/docs/examples/console/get-coupon.md +2 -0
- package/docs/examples/console/get-plan.md +2 -0
- package/docs/examples/console/get-plans.md +2 -0
- package/docs/examples/console/get-program.md +2 -0
- package/docs/examples/console/get-resource.md +2 -0
- package/docs/examples/console/{get-regions.md → list-regions.md} +3 -3
- package/docs/examples/console/suggest-columns.md +2 -0
- package/docs/examples/console/suggest-indexes.md +2 -0
- package/docs/examples/console/variables.md +2 -0
- package/docs/examples/databases/create-boolean-attribute.md +2 -0
- package/docs/examples/databases/create-collection.md +2 -0
- package/docs/examples/databases/create-datetime-attribute.md +2 -0
- package/docs/examples/databases/create-document.md +2 -0
- package/docs/examples/databases/create-documents.md +2 -0
- package/docs/examples/databases/create-email-attribute.md +2 -0
- package/docs/examples/databases/create-enum-attribute.md +2 -0
- package/docs/examples/databases/create-float-attribute.md +2 -0
- package/docs/examples/databases/create-index.md +4 -2
- package/docs/examples/databases/create-integer-attribute.md +2 -0
- package/docs/examples/databases/create-ip-attribute.md +2 -0
- package/docs/examples/databases/create-line-attribute.md +2 -0
- package/docs/examples/databases/create-longtext-attribute.md +20 -0
- package/docs/examples/databases/create-mediumtext-attribute.md +20 -0
- package/docs/examples/databases/create-operations.md +2 -0
- package/docs/examples/databases/create-point-attribute.md +2 -0
- package/docs/examples/databases/create-polygon-attribute.md +2 -0
- package/docs/examples/databases/create-relationship-attribute.md +2 -0
- package/docs/examples/databases/create-string-attribute.md +2 -0
- package/docs/examples/databases/create-text-attribute.md +20 -0
- package/docs/examples/databases/create-transaction.md +2 -0
- package/docs/examples/databases/create-url-attribute.md +2 -0
- package/docs/examples/databases/create-varchar-attribute.md +21 -0
- package/docs/examples/databases/create.md +2 -0
- package/docs/examples/databases/decrement-document-attribute.md +2 -0
- package/docs/examples/databases/delete-attribute.md +2 -0
- package/docs/examples/databases/delete-collection.md +2 -0
- package/docs/examples/databases/delete-document.md +2 -0
- package/docs/examples/databases/delete-documents.md +2 -0
- package/docs/examples/databases/delete-index.md +2 -0
- package/docs/examples/databases/delete-transaction.md +2 -0
- package/docs/examples/databases/delete.md +2 -0
- package/docs/examples/databases/get-attribute.md +2 -0
- package/docs/examples/databases/get-collection-usage.md +2 -0
- package/docs/examples/databases/get-collection.md +2 -0
- package/docs/examples/databases/get-document.md +2 -0
- package/docs/examples/databases/get-index.md +2 -0
- package/docs/examples/databases/get-transaction.md +2 -0
- package/docs/examples/databases/get-usage.md +2 -0
- package/docs/examples/databases/get.md +2 -0
- package/docs/examples/databases/increment-document-attribute.md +2 -0
- package/docs/examples/databases/list-attributes.md +2 -0
- package/docs/examples/databases/list-collection-logs.md +2 -0
- package/docs/examples/databases/list-collections.md +2 -0
- package/docs/examples/databases/list-document-logs.md +2 -0
- package/docs/examples/databases/list-documents.md +2 -0
- package/docs/examples/databases/list-indexes.md +2 -0
- package/docs/examples/databases/list-logs.md +2 -0
- package/docs/examples/databases/list-transactions.md +2 -0
- package/docs/examples/databases/list-usage.md +2 -0
- package/docs/examples/databases/list.md +2 -0
- package/docs/examples/databases/update-boolean-attribute.md +2 -0
- package/docs/examples/databases/update-collection.md +3 -1
- package/docs/examples/databases/update-datetime-attribute.md +2 -0
- package/docs/examples/databases/update-document.md +2 -0
- package/docs/examples/databases/update-documents.md +2 -0
- package/docs/examples/databases/update-email-attribute.md +2 -0
- package/docs/examples/databases/update-enum-attribute.md +2 -0
- package/docs/examples/databases/update-float-attribute.md +2 -0
- package/docs/examples/databases/update-integer-attribute.md +2 -0
- package/docs/examples/databases/update-ip-attribute.md +2 -0
- package/docs/examples/databases/update-line-attribute.md +2 -0
- package/docs/examples/databases/update-longtext-attribute.md +20 -0
- package/docs/examples/databases/update-mediumtext-attribute.md +20 -0
- package/docs/examples/databases/update-point-attribute.md +2 -0
- package/docs/examples/databases/update-polygon-attribute.md +2 -0
- package/docs/examples/databases/update-relationship-attribute.md +2 -0
- package/docs/examples/databases/update-string-attribute.md +2 -0
- package/docs/examples/databases/update-text-attribute.md +20 -0
- package/docs/examples/databases/update-transaction.md +2 -0
- package/docs/examples/databases/update-url-attribute.md +2 -0
- package/docs/examples/databases/update-varchar-attribute.md +21 -0
- package/docs/examples/databases/update.md +3 -1
- package/docs/examples/databases/upsert-document.md +2 -0
- package/docs/examples/databases/upsert-documents.md +2 -0
- package/docs/examples/domains/create-preset-google-workspace.md +2 -0
- package/docs/examples/domains/create-preset-i-cloud.md +2 -0
- package/docs/examples/domains/create-preset-mailgun.md +2 -0
- package/docs/examples/domains/create-preset-outlook.md +2 -0
- package/docs/examples/domains/create-preset-proton-mail.md +2 -0
- package/docs/examples/domains/create-preset-zoho.md +2 -0
- package/docs/examples/domains/create-record-a.md +2 -0
- package/docs/examples/domains/create-record-aaaa.md +2 -0
- package/docs/examples/domains/create-record-alias.md +2 -0
- package/docs/examples/domains/create-record-caa.md +2 -0
- package/docs/examples/domains/create-record-cname.md +2 -0
- package/docs/examples/domains/create-record-https.md +2 -0
- package/docs/examples/domains/create-record-mx.md +2 -0
- package/docs/examples/domains/create-record-ns.md +2 -0
- package/docs/examples/domains/create-record-srv.md +2 -0
- package/docs/examples/domains/create-record-txt.md +2 -0
- package/docs/examples/domains/create.md +2 -0
- package/docs/examples/domains/delete-record.md +2 -0
- package/docs/examples/domains/delete.md +2 -0
- package/docs/examples/domains/get-preset-google-workspace.md +2 -0
- package/docs/examples/domains/get-preset-i-cloud.md +2 -0
- package/docs/examples/domains/get-preset-mailgun.md +2 -0
- package/docs/examples/domains/get-preset-outlook.md +2 -0
- package/docs/examples/domains/get-preset-proton-mail.md +2 -0
- package/docs/examples/domains/get-preset-zoho.md +2 -0
- package/docs/examples/domains/get-price.md +17 -0
- package/docs/examples/domains/get-record.md +2 -0
- package/docs/examples/domains/get-zone.md +2 -0
- package/docs/examples/domains/get.md +2 -0
- package/docs/examples/domains/list-records.md +2 -0
- package/docs/examples/domains/list-suggestions.md +2 -0
- package/docs/examples/domains/list.md +2 -0
- package/docs/examples/domains/update-nameservers.md +2 -0
- package/docs/examples/domains/update-record-a.md +2 -0
- package/docs/examples/domains/update-record-aaaa.md +2 -0
- package/docs/examples/domains/update-record-alias.md +2 -0
- package/docs/examples/domains/update-record-caa.md +2 -0
- package/docs/examples/domains/update-record-cname.md +2 -0
- package/docs/examples/domains/update-record-https.md +2 -0
- package/docs/examples/domains/update-record-mx.md +2 -0
- package/docs/examples/domains/update-record-ns.md +2 -0
- package/docs/examples/domains/update-record-srv.md +2 -0
- package/docs/examples/domains/update-record-txt.md +2 -0
- package/docs/examples/domains/update-team.md +2 -0
- package/docs/examples/domains/update-zone.md +2 -0
- package/docs/examples/functions/create-deployment.md +2 -0
- package/docs/examples/functions/create-duplicate-deployment.md +2 -0
- package/docs/examples/functions/create-execution.md +2 -0
- package/docs/examples/functions/create-template-deployment.md +2 -0
- package/docs/examples/functions/create-variable.md +2 -0
- package/docs/examples/functions/create-vcs-deployment.md +2 -0
- package/docs/examples/functions/create.md +4 -2
- package/docs/examples/functions/delete-deployment.md +2 -0
- package/docs/examples/functions/delete-execution.md +2 -0
- package/docs/examples/functions/delete-variable.md +2 -0
- package/docs/examples/functions/delete.md +2 -0
- package/docs/examples/functions/get-deployment-download.md +2 -0
- package/docs/examples/functions/get-deployment.md +2 -0
- package/docs/examples/functions/get-execution.md +2 -0
- package/docs/examples/functions/get-template.md +2 -0
- package/docs/examples/functions/get-usage.md +2 -0
- package/docs/examples/functions/get-variable.md +2 -0
- package/docs/examples/functions/get.md +2 -0
- package/docs/examples/functions/list-deployments.md +2 -0
- package/docs/examples/functions/list-executions.md +2 -0
- package/docs/examples/functions/list-runtimes.md +2 -0
- package/docs/examples/functions/list-specifications.md +2 -0
- package/docs/examples/functions/list-templates.md +5 -3
- package/docs/examples/functions/list-usage.md +2 -0
- package/docs/examples/functions/list-variables.md +2 -0
- package/docs/examples/functions/list.md +2 -0
- package/docs/examples/functions/update-deployment-status.md +2 -0
- package/docs/examples/functions/update-function-deployment.md +2 -0
- package/docs/examples/functions/update-variable.md +2 -0
- package/docs/examples/functions/update.md +4 -2
- package/docs/examples/graphql/mutation.md +2 -0
- package/docs/examples/graphql/query.md +2 -0
- package/docs/examples/health/get-antivirus.md +2 -0
- package/docs/examples/health/get-cache.md +2 -0
- package/docs/examples/health/get-certificate.md +2 -0
- package/docs/examples/health/get-db.md +2 -0
- package/docs/examples/health/get-failed-jobs.md +2 -0
- package/docs/examples/health/get-pub-sub.md +2 -0
- package/docs/examples/health/get-queue-audits.md +2 -0
- package/docs/examples/health/get-queue-billing-project-aggregation.md +2 -0
- package/docs/examples/health/get-queue-billing-team-aggregation.md +2 -0
- package/docs/examples/health/get-queue-builds.md +2 -0
- package/docs/examples/health/get-queue-certificates.md +2 -0
- package/docs/examples/health/get-queue-databases.md +2 -0
- package/docs/examples/health/get-queue-deletes.md +2 -0
- package/docs/examples/health/get-queue-functions.md +2 -0
- package/docs/examples/health/get-queue-logs.md +2 -0
- package/docs/examples/health/get-queue-mails.md +2 -0
- package/docs/examples/health/get-queue-messaging.md +2 -0
- package/docs/examples/health/get-queue-migrations.md +2 -0
- package/docs/examples/health/get-queue-priority-builds.md +2 -0
- package/docs/examples/health/get-queue-region-manager.md +2 -0
- package/docs/examples/health/get-queue-stats-resources.md +2 -0
- package/docs/examples/health/get-queue-threats.md +2 -0
- package/docs/examples/health/get-queue-usage.md +2 -0
- package/docs/examples/health/get-queue-webhooks.md +2 -0
- package/docs/examples/health/get-storage-local.md +2 -0
- package/docs/examples/health/get-storage.md +2 -0
- package/docs/examples/health/get-time.md +2 -0
- package/docs/examples/health/get.md +2 -0
- package/docs/examples/locale/get.md +2 -0
- package/docs/examples/locale/list-codes.md +2 -0
- package/docs/examples/locale/list-continents.md +2 -0
- package/docs/examples/locale/list-countries-eu.md +2 -0
- package/docs/examples/locale/list-countries-phones.md +2 -0
- package/docs/examples/locale/list-countries.md +2 -0
- package/docs/examples/locale/list-currencies.md +2 -0
- package/docs/examples/locale/list-languages.md +2 -0
- package/docs/examples/messaging/create-apns-provider.md +2 -0
- package/docs/examples/messaging/create-email.md +2 -0
- package/docs/examples/messaging/create-fcm-provider.md +2 -0
- package/docs/examples/messaging/create-mailgun-provider.md +2 -0
- package/docs/examples/messaging/create-msg-91-provider.md +2 -0
- package/docs/examples/messaging/create-push.md +2 -0
- package/docs/examples/messaging/create-resend-provider.md +2 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +2 -0
- package/docs/examples/messaging/create-sms.md +2 -0
- package/docs/examples/messaging/create-smtp-provider.md +2 -0
- package/docs/examples/messaging/create-subscriber.md +2 -0
- package/docs/examples/messaging/create-telesign-provider.md +2 -0
- package/docs/examples/messaging/create-textmagic-provider.md +2 -0
- package/docs/examples/messaging/create-topic.md +2 -0
- package/docs/examples/messaging/create-twilio-provider.md +2 -0
- package/docs/examples/messaging/create-vonage-provider.md +2 -0
- package/docs/examples/messaging/delete-provider.md +2 -0
- package/docs/examples/messaging/delete-subscriber.md +2 -0
- package/docs/examples/messaging/delete-topic.md +2 -0
- package/docs/examples/messaging/delete.md +2 -0
- package/docs/examples/messaging/get-message.md +2 -0
- package/docs/examples/messaging/get-provider.md +2 -0
- package/docs/examples/messaging/get-subscriber.md +2 -0
- package/docs/examples/messaging/get-topic.md +2 -0
- package/docs/examples/messaging/list-message-logs.md +2 -0
- package/docs/examples/messaging/list-messages.md +2 -0
- package/docs/examples/messaging/list-provider-logs.md +2 -0
- package/docs/examples/messaging/list-providers.md +2 -0
- package/docs/examples/messaging/list-subscriber-logs.md +2 -0
- package/docs/examples/messaging/list-subscribers.md +2 -0
- package/docs/examples/messaging/list-targets.md +2 -0
- package/docs/examples/messaging/list-topic-logs.md +2 -0
- package/docs/examples/messaging/list-topics.md +2 -0
- package/docs/examples/messaging/update-apns-provider.md +2 -0
- package/docs/examples/messaging/update-email.md +2 -0
- package/docs/examples/messaging/update-fcm-provider.md +2 -0
- package/docs/examples/messaging/update-mailgun-provider.md +2 -0
- package/docs/examples/messaging/update-msg-91-provider.md +2 -0
- package/docs/examples/messaging/update-push.md +2 -0
- package/docs/examples/messaging/update-resend-provider.md +2 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +2 -0
- package/docs/examples/messaging/update-sms.md +2 -0
- package/docs/examples/messaging/update-smtp-provider.md +2 -0
- package/docs/examples/messaging/update-telesign-provider.md +2 -0
- package/docs/examples/messaging/update-textmagic-provider.md +2 -0
- package/docs/examples/messaging/update-topic.md +2 -0
- package/docs/examples/messaging/update-twilio-provider.md +2 -0
- package/docs/examples/messaging/update-vonage-provider.md +2 -0
- package/docs/examples/migrations/create-appwrite-migration.md +4 -2
- package/docs/examples/migrations/create-csv-export.md +2 -0
- package/docs/examples/migrations/create-csv-import.md +2 -0
- package/docs/examples/migrations/create-firebase-migration.md +4 -2
- package/docs/examples/migrations/create-n-host-migration.md +4 -2
- package/docs/examples/migrations/create-supabase-migration.md +4 -2
- package/docs/examples/migrations/delete.md +2 -0
- package/docs/examples/migrations/get-appwrite-report.md +4 -2
- package/docs/examples/migrations/get-firebase-report.md +4 -2
- package/docs/examples/migrations/get-n-host-report.md +4 -2
- package/docs/examples/migrations/get-supabase-report.md +4 -2
- package/docs/examples/migrations/get.md +2 -0
- package/docs/examples/migrations/list.md +2 -0
- package/docs/examples/migrations/retry.md +2 -0
- package/docs/examples/organizations/add-credit.md +2 -0
- package/docs/examples/organizations/cancel-downgrade.md +2 -0
- package/docs/examples/organizations/create-downgrade-feedback.md +2 -0
- package/docs/examples/organizations/create-invoice-payment.md +2 -0
- package/docs/examples/organizations/create-key.md +18 -0
- package/docs/examples/organizations/create.md +4 -2
- package/docs/examples/organizations/delete-backup-payment-method.md +2 -0
- package/docs/examples/organizations/delete-billing-address.md +2 -0
- package/docs/examples/organizations/delete-default-payment-method.md +2 -0
- package/docs/examples/organizations/delete-key.md +16 -0
- package/docs/examples/organizations/delete.md +2 -0
- package/docs/examples/organizations/estimation-create-organization.md +4 -2
- package/docs/examples/organizations/estimation-delete-organization.md +2 -0
- package/docs/examples/organizations/estimation-update-plan.md +4 -2
- package/docs/examples/organizations/get-aggregation.md +2 -0
- package/docs/examples/organizations/get-available-credits.md +2 -0
- package/docs/examples/organizations/get-billing-address.md +2 -0
- package/docs/examples/organizations/get-credit.md +2 -0
- package/docs/examples/organizations/get-invoice-download.md +2 -0
- package/docs/examples/organizations/get-invoice-view.md +2 -0
- package/docs/examples/organizations/get-invoice.md +2 -0
- package/docs/examples/organizations/{update-projects.md → get-key.md} +4 -2
- package/docs/examples/organizations/get-payment-method.md +2 -0
- package/docs/examples/organizations/get-plan.md +2 -0
- package/docs/examples/organizations/get-scopes.md +2 -0
- package/docs/examples/organizations/get-usage.md +2 -0
- package/docs/examples/organizations/list-aggregations.md +2 -0
- package/docs/examples/organizations/list-credits.md +2 -0
- package/docs/examples/organizations/list-invoices.md +2 -0
- package/docs/examples/organizations/list-keys.md +16 -0
- package/docs/examples/organizations/list-regions.md +15 -0
- package/docs/examples/organizations/list.md +2 -0
- package/docs/examples/organizations/set-backup-payment-method.md +2 -0
- package/docs/examples/organizations/set-billing-address.md +2 -0
- package/docs/examples/organizations/set-billing-email.md +2 -0
- package/docs/examples/organizations/set-billing-tax-id.md +2 -0
- package/docs/examples/organizations/set-default-payment-method.md +2 -0
- package/docs/examples/organizations/update-budget.md +2 -0
- package/docs/examples/organizations/update-key.md +19 -0
- package/docs/examples/organizations/update-plan.md +4 -2
- package/docs/examples/organizations/validate-invoice.md +2 -0
- package/docs/examples/organizations/validate-payment.md +2 -0
- package/docs/examples/project/create-variable.md +2 -0
- package/docs/examples/project/delete-variable.md +2 -0
- package/docs/examples/project/get-usage.md +2 -0
- package/docs/examples/project/get-variable.md +2 -0
- package/docs/examples/project/list-variables.md +2 -0
- package/docs/examples/project/update-variable.md +2 -0
- package/docs/examples/projects/create-dev-key.md +2 -0
- package/docs/examples/projects/create-jwt.md +4 -2
- package/docs/examples/projects/create-key.md +5 -2
- package/docs/examples/projects/create-platform.md +2 -0
- package/docs/examples/projects/create-smtp-test.md +2 -0
- package/docs/examples/projects/create-webhook.md +2 -0
- package/docs/examples/projects/create.md +2 -0
- package/docs/examples/projects/delete-dev-key.md +2 -0
- package/docs/examples/projects/delete-email-template.md +2 -0
- package/docs/examples/projects/delete-key.md +2 -0
- package/docs/examples/projects/delete-platform.md +2 -0
- package/docs/examples/projects/delete-sms-template.md +2 -0
- package/docs/examples/projects/delete-webhook.md +2 -0
- package/docs/examples/projects/delete.md +2 -0
- package/docs/examples/projects/get-dev-key.md +2 -0
- package/docs/examples/projects/get-email-template.md +2 -0
- package/docs/examples/projects/get-key.md +2 -0
- package/docs/examples/projects/get-platform.md +2 -0
- package/docs/examples/projects/get-sms-template.md +2 -0
- package/docs/examples/projects/get-webhook.md +2 -0
- package/docs/examples/projects/get.md +2 -0
- package/docs/examples/projects/list-dev-keys.md +2 -0
- package/docs/examples/projects/list-keys.md +3 -0
- package/docs/examples/projects/list-platforms.md +2 -0
- package/docs/examples/projects/list-webhooks.md +2 -0
- package/docs/examples/projects/list.md +2 -0
- package/docs/examples/projects/update-api-status-all.md +2 -0
- package/docs/examples/projects/update-api-status.md +2 -0
- package/docs/examples/projects/update-auth-duration.md +2 -0
- package/docs/examples/projects/update-auth-limit.md +2 -0
- package/docs/examples/projects/update-auth-password-dictionary.md +2 -0
- package/docs/examples/projects/update-auth-password-history.md +2 -0
- package/docs/examples/projects/update-auth-sessions-limit.md +2 -0
- package/docs/examples/projects/update-auth-status.md +2 -0
- package/docs/examples/projects/update-dev-key.md +2 -0
- package/docs/examples/projects/update-email-template.md +2 -0
- package/docs/examples/projects/update-key.md +4 -2
- package/docs/examples/projects/update-labels.md +2 -0
- package/docs/examples/projects/update-memberships-privacy.md +2 -0
- package/docs/examples/projects/update-mock-numbers.md +2 -0
- package/docs/examples/projects/update-o-auth-2.md +2 -0
- package/docs/examples/projects/update-personal-data-check.md +2 -0
- package/docs/examples/projects/update-platform.md +2 -0
- package/docs/examples/projects/update-service-status-all.md +2 -0
- package/docs/examples/projects/update-service-status.md +2 -0
- package/docs/examples/projects/update-session-alerts.md +2 -0
- package/docs/examples/projects/update-session-invalidation.md +2 -0
- package/docs/examples/projects/update-sms-template.md +2 -0
- package/docs/examples/projects/update-smtp.md +2 -0
- package/docs/examples/projects/update-team.md +2 -0
- package/docs/examples/projects/update-webhook-signature.md +2 -0
- package/docs/examples/projects/update-webhook.md +2 -0
- package/docs/examples/projects/update.md +2 -0
- package/docs/examples/proxy/create-api-rule.md +2 -0
- package/docs/examples/proxy/create-function-rule.md +2 -0
- package/docs/examples/proxy/create-redirect-rule.md +2 -0
- package/docs/examples/proxy/create-site-rule.md +2 -0
- package/docs/examples/proxy/delete-rule.md +2 -0
- package/docs/examples/proxy/get-rule.md +2 -0
- package/docs/examples/proxy/list-rules.md +2 -0
- package/docs/examples/proxy/update-rule-verification.md +2 -0
- package/docs/examples/sites/create-deployment.md +2 -0
- package/docs/examples/sites/create-duplicate-deployment.md +2 -0
- package/docs/examples/sites/create-template-deployment.md +2 -0
- package/docs/examples/sites/create-variable.md +2 -0
- package/docs/examples/sites/create-vcs-deployment.md +2 -0
- package/docs/examples/sites/create.md +2 -0
- package/docs/examples/sites/delete-deployment.md +2 -0
- package/docs/examples/sites/delete-log.md +2 -0
- package/docs/examples/sites/delete-variable.md +2 -0
- package/docs/examples/sites/delete.md +2 -0
- package/docs/examples/sites/get-deployment-download.md +2 -0
- package/docs/examples/sites/get-deployment.md +2 -0
- package/docs/examples/sites/get-log.md +2 -0
- package/docs/examples/sites/get-template.md +2 -0
- package/docs/examples/sites/get-usage.md +2 -0
- package/docs/examples/sites/get-variable.md +2 -0
- package/docs/examples/sites/get.md +2 -0
- package/docs/examples/sites/list-deployments.md +2 -0
- package/docs/examples/sites/list-frameworks.md +2 -0
- package/docs/examples/sites/list-logs.md +2 -0
- package/docs/examples/sites/list-specifications.md +2 -0
- package/docs/examples/sites/list-templates.md +5 -3
- package/docs/examples/sites/list-usage.md +2 -0
- package/docs/examples/sites/list-variables.md +2 -0
- package/docs/examples/sites/list.md +2 -0
- package/docs/examples/sites/update-deployment-status.md +2 -0
- package/docs/examples/sites/update-site-deployment.md +2 -0
- package/docs/examples/sites/update-variable.md +2 -0
- package/docs/examples/sites/update.md +2 -0
- package/docs/examples/storage/create-bucket.md +2 -0
- package/docs/examples/storage/create-file.md +2 -0
- package/docs/examples/storage/delete-bucket.md +2 -0
- package/docs/examples/storage/delete-file.md +2 -0
- package/docs/examples/storage/get-bucket-usage.md +2 -0
- package/docs/examples/storage/get-bucket.md +2 -0
- package/docs/examples/storage/get-file-download.md +2 -0
- package/docs/examples/storage/get-file-preview.md +2 -0
- package/docs/examples/storage/get-file-view.md +2 -0
- package/docs/examples/storage/get-file.md +2 -0
- package/docs/examples/storage/get-usage.md +2 -0
- package/docs/examples/storage/list-buckets.md +2 -0
- package/docs/examples/storage/list-files.md +2 -0
- package/docs/examples/storage/update-bucket.md +2 -0
- package/docs/examples/storage/update-file.md +2 -0
- package/docs/examples/tablesdb/create-boolean-column.md +2 -0
- package/docs/examples/tablesdb/create-datetime-column.md +2 -0
- package/docs/examples/tablesdb/create-email-column.md +2 -0
- package/docs/examples/tablesdb/create-enum-column.md +2 -0
- package/docs/examples/tablesdb/create-float-column.md +2 -0
- package/docs/examples/tablesdb/create-index.md +4 -2
- package/docs/examples/tablesdb/create-integer-column.md +2 -0
- package/docs/examples/tablesdb/create-ip-column.md +2 -0
- package/docs/examples/tablesdb/create-line-column.md +2 -0
- package/docs/examples/tablesdb/create-longtext-column.md +20 -0
- package/docs/examples/tablesdb/create-mediumtext-column.md +20 -0
- package/docs/examples/tablesdb/create-operations.md +2 -0
- package/docs/examples/tablesdb/create-point-column.md +2 -0
- package/docs/examples/tablesdb/create-polygon-column.md +2 -0
- package/docs/examples/tablesdb/create-relationship-column.md +2 -0
- package/docs/examples/tablesdb/create-row.md +2 -0
- package/docs/examples/tablesdb/create-rows.md +2 -0
- package/docs/examples/tablesdb/create-string-column.md +2 -0
- package/docs/examples/tablesdb/create-table.md +2 -0
- package/docs/examples/tablesdb/create-text-column.md +20 -0
- package/docs/examples/tablesdb/create-transaction.md +2 -0
- package/docs/examples/tablesdb/create-url-column.md +2 -0
- package/docs/examples/tablesdb/create-varchar-column.md +21 -0
- package/docs/examples/tablesdb/create.md +2 -0
- package/docs/examples/tablesdb/decrement-row-column.md +2 -0
- package/docs/examples/tablesdb/delete-column.md +2 -0
- package/docs/examples/tablesdb/delete-index.md +2 -0
- package/docs/examples/tablesdb/delete-row.md +2 -0
- package/docs/examples/tablesdb/delete-rows.md +2 -0
- package/docs/examples/tablesdb/delete-table.md +2 -0
- package/docs/examples/tablesdb/delete-transaction.md +2 -0
- package/docs/examples/tablesdb/delete.md +2 -0
- package/docs/examples/tablesdb/get-column.md +2 -0
- package/docs/examples/tablesdb/get-index.md +2 -0
- package/docs/examples/tablesdb/get-row.md +2 -0
- package/docs/examples/tablesdb/get-table-usage.md +2 -0
- package/docs/examples/tablesdb/get-table.md +2 -0
- package/docs/examples/tablesdb/get-transaction.md +2 -0
- package/docs/examples/tablesdb/get-usage.md +2 -0
- package/docs/examples/tablesdb/get.md +2 -0
- package/docs/examples/tablesdb/increment-row-column.md +2 -0
- package/docs/examples/tablesdb/list-columns.md +2 -0
- package/docs/examples/tablesdb/list-indexes.md +2 -0
- package/docs/examples/tablesdb/list-row-logs.md +2 -0
- package/docs/examples/tablesdb/list-rows.md +2 -0
- package/docs/examples/tablesdb/list-table-logs.md +2 -0
- package/docs/examples/tablesdb/list-tables.md +2 -0
- package/docs/examples/tablesdb/list-transactions.md +2 -0
- package/docs/examples/tablesdb/list-usage.md +2 -0
- package/docs/examples/tablesdb/list.md +2 -0
- package/docs/examples/tablesdb/update-boolean-column.md +2 -0
- package/docs/examples/tablesdb/update-datetime-column.md +2 -0
- package/docs/examples/tablesdb/update-email-column.md +2 -0
- package/docs/examples/tablesdb/update-enum-column.md +2 -0
- package/docs/examples/tablesdb/update-float-column.md +2 -0
- package/docs/examples/tablesdb/update-integer-column.md +2 -0
- package/docs/examples/tablesdb/update-ip-column.md +2 -0
- package/docs/examples/tablesdb/update-line-column.md +2 -0
- package/docs/examples/tablesdb/update-longtext-column.md +20 -0
- package/docs/examples/tablesdb/update-mediumtext-column.md +20 -0
- package/docs/examples/tablesdb/update-point-column.md +2 -0
- package/docs/examples/tablesdb/update-polygon-column.md +2 -0
- package/docs/examples/tablesdb/update-relationship-column.md +2 -0
- package/docs/examples/tablesdb/update-row.md +2 -0
- package/docs/examples/tablesdb/update-rows.md +2 -0
- package/docs/examples/tablesdb/update-string-column.md +2 -0
- package/docs/examples/tablesdb/update-table.md +3 -1
- package/docs/examples/tablesdb/update-text-column.md +20 -0
- package/docs/examples/tablesdb/update-transaction.md +2 -0
- package/docs/examples/tablesdb/update-url-column.md +2 -0
- package/docs/examples/tablesdb/update-varchar-column.md +21 -0
- package/docs/examples/tablesdb/update.md +3 -1
- package/docs/examples/tablesdb/upsert-row.md +2 -0
- package/docs/examples/tablesdb/upsert-rows.md +2 -0
- package/docs/examples/teams/create-membership.md +2 -0
- package/docs/examples/teams/create.md +2 -0
- package/docs/examples/teams/delete-membership.md +2 -0
- package/docs/examples/teams/delete.md +2 -0
- package/docs/examples/teams/get-membership.md +2 -0
- package/docs/examples/teams/get-prefs.md +2 -0
- package/docs/examples/teams/get.md +2 -0
- package/docs/examples/teams/list-logs.md +2 -0
- package/docs/examples/teams/list-memberships.md +2 -0
- package/docs/examples/teams/list.md +2 -0
- package/docs/examples/teams/update-membership-status.md +2 -0
- package/docs/examples/teams/update-membership.md +2 -0
- package/docs/examples/teams/update-name.md +2 -0
- package/docs/examples/teams/update-prefs.md +2 -0
- package/docs/examples/tokens/create-file-token.md +2 -0
- package/docs/examples/tokens/delete.md +2 -0
- package/docs/examples/tokens/get.md +2 -0
- package/docs/examples/tokens/list.md +2 -0
- package/docs/examples/tokens/update.md +2 -0
- package/docs/examples/users/create-argon-2-user.md +2 -0
- package/docs/examples/users/create-bcrypt-user.md +2 -0
- package/docs/examples/users/create-jwt.md +2 -0
- package/docs/examples/users/create-md-5-user.md +2 -0
- package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/create-ph-pass-user.md +2 -0
- package/docs/examples/users/create-scrypt-modified-user.md +2 -0
- package/docs/examples/users/create-scrypt-user.md +2 -0
- package/docs/examples/users/create-session.md +2 -0
- package/docs/examples/users/create-sha-user.md +2 -0
- package/docs/examples/users/create-target.md +2 -0
- package/docs/examples/users/create-token.md +2 -0
- package/docs/examples/users/create.md +2 -0
- package/docs/examples/users/delete-identity.md +2 -0
- package/docs/examples/users/delete-mfa-authenticator.md +2 -0
- package/docs/examples/users/delete-session.md +2 -0
- package/docs/examples/users/delete-sessions.md +2 -0
- package/docs/examples/users/delete-target.md +2 -0
- package/docs/examples/users/delete.md +2 -0
- package/docs/examples/users/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/get-prefs.md +2 -0
- package/docs/examples/users/get-target.md +2 -0
- package/docs/examples/users/get-usage.md +2 -0
- package/docs/examples/users/get.md +2 -0
- package/docs/examples/users/list-identities.md +2 -0
- package/docs/examples/users/list-logs.md +2 -0
- package/docs/examples/users/list-memberships.md +2 -0
- package/docs/examples/users/list-mfa-factors.md +2 -0
- package/docs/examples/users/list-sessions.md +2 -0
- package/docs/examples/users/list-targets.md +2 -0
- package/docs/examples/users/list.md +2 -0
- package/docs/examples/users/update-email-verification.md +2 -0
- package/docs/examples/users/update-email.md +2 -0
- package/docs/examples/users/update-labels.md +2 -0
- package/docs/examples/users/update-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/update-mfa.md +2 -0
- package/docs/examples/users/update-name.md +2 -0
- package/docs/examples/users/update-password.md +2 -0
- package/docs/examples/users/update-phone-verification.md +2 -0
- package/docs/examples/users/update-phone.md +2 -0
- package/docs/examples/users/update-prefs.md +2 -0
- package/docs/examples/users/update-status.md +2 -0
- package/docs/examples/users/update-target.md +2 -0
- package/docs/examples/vcs/create-repository-detection.md +2 -0
- package/docs/examples/vcs/create-repository.md +2 -0
- package/docs/examples/vcs/delete-installation.md +2 -0
- package/docs/examples/vcs/get-installation.md +2 -0
- package/docs/examples/vcs/get-repository-contents.md +2 -0
- package/docs/examples/vcs/get-repository.md +2 -0
- package/docs/examples/vcs/list-installations.md +2 -0
- package/docs/examples/vcs/list-repositories.md +2 -0
- package/docs/examples/vcs/list-repository-branches.md +2 -0
- package/docs/examples/vcs/update-external-deployments.md +2 -0
- package/package.json +1 -1
- package/src/channel.ts +38 -22
- package/src/client.ts +110 -49
- package/src/enums/backup-services.ts +5 -0
- package/src/enums/browser-permission.ts +22 -0
- package/src/enums/build-runtime.ts +5 -0
- package/src/enums/deployment-status.ts +1 -0
- package/src/enums/frameworks.ts +17 -0
- package/src/enums/order-by.ts +4 -0
- package/src/enums/registration-type.ts +6 -0
- package/src/enums/resources.ts +13 -0
- package/src/enums/runtime.ts +5 -0
- package/src/enums/runtimes.ts +71 -0
- package/src/enums/scopes.ts +66 -0
- package/src/enums/use-cases.ts +11 -0
- package/src/index.ts +9 -2
- package/src/models.ts +394 -4
- package/src/services/account.ts +375 -67
- package/src/services/assistant.ts +1 -1
- package/src/services/avatars.ts +20 -19
- package/src/services/backups.ts +37 -36
- package/src/services/console.ts +12 -43
- package/src/services/databases.ts +1061 -281
- package/src/services/domains.ts +114 -44
- package/src/services/functions.ts +61 -58
- package/src/services/graphql.ts +4 -4
- package/src/services/health.ts +23 -21
- package/src/services/messaging.ts +56 -56
- package/src/services/migrations.ts +79 -78
- package/src/services/organizations.ts +430 -94
- package/src/services/project.ts +5 -5
- package/src/services/projects.ts +106 -155
- package/src/services/proxy.ts +8 -8
- package/src/services/realtime.ts +135 -58
- package/src/services/sites.ts +43 -41
- package/src/services/storage.ts +17 -17
- package/src/services/tables-db.ts +1051 -269
- package/src/services/teams.ts +14 -14
- package/src/services/tokens.ts +5 -5
- package/src/services/users.ts +50 -50
- package/src/services/vcs.ts +10 -10
- package/types/channel.d.ts +9 -7
- package/types/client.d.ts +7 -2
- package/types/enums/backup-services.d.ts +5 -0
- package/types/enums/browser-permission.d.ts +22 -0
- package/types/enums/build-runtime.d.ts +6 -1
- package/types/enums/deployment-status.d.ts +1 -0
- package/types/enums/frameworks.d.ts +17 -0
- package/types/enums/order-by.d.ts +4 -0
- package/types/enums/registration-type.d.ts +6 -0
- package/types/enums/resources.d.ts +13 -0
- package/types/enums/runtime.d.ts +6 -1
- package/types/enums/runtimes.d.ts +71 -0
- package/types/enums/scopes.d.ts +66 -0
- package/types/enums/use-cases.d.ts +11 -0
- package/types/index.d.ts +9 -2
- package/types/models.d.ts +385 -4
- package/types/services/account.d.ts +111 -0
- package/types/services/avatars.d.ts +5 -4
- package/types/services/backups.d.ts +13 -12
- package/types/services/console.d.ts +1 -13
- package/types/services/databases.d.ts +303 -8
- package/types/services/domains.d.ts +26 -0
- package/types/services/functions.d.ts +18 -15
- package/types/services/health.d.ts +2 -0
- package/types/services/migrations.d.ts +33 -32
- package/types/services/organizations.d.ts +151 -29
- package/types/services/projects.d.ts +20 -36
- package/types/services/realtime.d.ts +13 -6
- package/types/services/sites.d.ts +9 -7
- package/types/services/tables-db.d.ts +305 -8
- package/docs/examples/projects/update-status.md +0 -14
- package/src/enums/billing-plan.ts +0 -17
- package/src/enums/status.ts +0 -4
- package/types/enums/billing-plan.d.ts +0 -17
- package/types/enums/status.d.ts +0 -4
package/src/services/account.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
|
|
5
|
+
import { Scopes } from '../enums/scopes';
|
|
5
6
|
import { AuthenticatorType } from '../enums/authenticator-type';
|
|
6
7
|
import { AuthenticationFactor } from '../enums/authentication-factor';
|
|
7
8
|
import { OAuthProvider } from '../enums/o-auth-provider';
|
|
@@ -46,7 +47,7 @@ export class Account {
|
|
|
46
47
|
* @throws {AppwriteException}
|
|
47
48
|
* @returns {Promise<Models.User<Preferences>>}
|
|
48
49
|
*/
|
|
49
|
-
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, name?: string
|
|
50
|
+
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, name?: string }): Promise<Models.User<Preferences>>;
|
|
50
51
|
/**
|
|
51
52
|
* Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).
|
|
52
53
|
*
|
|
@@ -150,7 +151,7 @@ export class Account {
|
|
|
150
151
|
* @throws {AppwriteException}
|
|
151
152
|
* @returns {Promise<Models.BillingAddressList>}
|
|
152
153
|
*/
|
|
153
|
-
listBillingAddresses(params?: { queries?: string[]
|
|
154
|
+
listBillingAddresses(params?: { queries?: string[] }): Promise<Models.BillingAddressList>;
|
|
154
155
|
/**
|
|
155
156
|
* List all billing addresses for a user.
|
|
156
157
|
*
|
|
@@ -206,7 +207,7 @@ export class Account {
|
|
|
206
207
|
* @throws {AppwriteException}
|
|
207
208
|
* @returns {Promise<Models.BillingAddress>}
|
|
208
209
|
*/
|
|
209
|
-
createBillingAddress(params: { country: string, city: string, streetAddress: string, addressLine2?: string, state?: string, postalCode?: string
|
|
210
|
+
createBillingAddress(params: { country: string, city: string, streetAddress: string, addressLine2?: string, state?: string, postalCode?: string }): Promise<Models.BillingAddress>;
|
|
210
211
|
/**
|
|
211
212
|
* Add a new billing address to a user's account.
|
|
212
213
|
*
|
|
@@ -298,7 +299,7 @@ export class Account {
|
|
|
298
299
|
* @throws {AppwriteException}
|
|
299
300
|
* @returns {Promise<Models.BillingAddress>}
|
|
300
301
|
*/
|
|
301
|
-
getBillingAddress(params: { billingAddressId: string
|
|
302
|
+
getBillingAddress(params: { billingAddressId: string }): Promise<Models.BillingAddress>;
|
|
302
303
|
/**
|
|
303
304
|
* Get a specific billing address for a user using it's ID.
|
|
304
305
|
*
|
|
@@ -355,7 +356,7 @@ export class Account {
|
|
|
355
356
|
* @throws {AppwriteException}
|
|
356
357
|
* @returns {Promise<Models.BillingAddress>}
|
|
357
358
|
*/
|
|
358
|
-
updateBillingAddress(params: { billingAddressId: string, country: string, city: string, streetAddress: string, addressLine2?: string, state?: string, postalCode?: string
|
|
359
|
+
updateBillingAddress(params: { billingAddressId: string, country: string, city: string, streetAddress: string, addressLine2?: string, state?: string, postalCode?: string }): Promise<Models.BillingAddress>;
|
|
359
360
|
/**
|
|
360
361
|
* Update a specific billing address using it's ID.
|
|
361
362
|
*
|
|
@@ -453,7 +454,7 @@ export class Account {
|
|
|
453
454
|
* @throws {AppwriteException}
|
|
454
455
|
* @returns {Promise<{}>}
|
|
455
456
|
*/
|
|
456
|
-
deleteBillingAddress(params: { billingAddressId: string
|
|
457
|
+
deleteBillingAddress(params: { billingAddressId: string }): Promise<{}>;
|
|
457
458
|
/**
|
|
458
459
|
* Delete a specific billing address using it's ID.
|
|
459
460
|
*
|
|
@@ -505,7 +506,7 @@ export class Account {
|
|
|
505
506
|
* @throws {AppwriteException}
|
|
506
507
|
* @returns {Promise<Models.Coupon>}
|
|
507
508
|
*/
|
|
508
|
-
getCoupon(params: { couponId: string
|
|
509
|
+
getCoupon(params: { couponId: string }): Promise<Models.Coupon>;
|
|
509
510
|
/**
|
|
510
511
|
* Get coupon details for an account.
|
|
511
512
|
*
|
|
@@ -559,7 +560,7 @@ export class Account {
|
|
|
559
560
|
* @throws {AppwriteException}
|
|
560
561
|
* @returns {Promise<Models.User<Preferences>>}
|
|
561
562
|
*/
|
|
562
|
-
updateEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { email: string, password: string
|
|
563
|
+
updateEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { email: string, password: string }): Promise<Models.User<Preferences>>;
|
|
563
564
|
/**
|
|
564
565
|
* Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.
|
|
565
566
|
* This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
|
|
@@ -627,7 +628,7 @@ export class Account {
|
|
|
627
628
|
* @throws {AppwriteException}
|
|
628
629
|
* @returns {Promise<Models.IdentityList>}
|
|
629
630
|
*/
|
|
630
|
-
listIdentities(params?: { queries?: string[], total?: boolean
|
|
631
|
+
listIdentities(params?: { queries?: string[], total?: boolean }): Promise<Models.IdentityList>;
|
|
631
632
|
/**
|
|
632
633
|
* Get the list of identities for the currently logged in user.
|
|
633
634
|
*
|
|
@@ -685,7 +686,7 @@ export class Account {
|
|
|
685
686
|
* @throws {AppwriteException}
|
|
686
687
|
* @returns {Promise<{}>}
|
|
687
688
|
*/
|
|
688
|
-
deleteIdentity(params: { identityId: string
|
|
689
|
+
deleteIdentity(params: { identityId: string }): Promise<{}>;
|
|
689
690
|
/**
|
|
690
691
|
* Delete an identity by its unique ID.
|
|
691
692
|
*
|
|
@@ -737,7 +738,7 @@ export class Account {
|
|
|
737
738
|
* @throws {AppwriteException}
|
|
738
739
|
* @returns {Promise<Models.InvoiceList>}
|
|
739
740
|
*/
|
|
740
|
-
listInvoices(params?: { queries?: string[]
|
|
741
|
+
listInvoices(params?: { queries?: string[] }): Promise<Models.InvoiceList>;
|
|
741
742
|
/**
|
|
742
743
|
* List all invoices tied to an account.
|
|
743
744
|
*
|
|
@@ -788,7 +789,7 @@ export class Account {
|
|
|
788
789
|
* @throws {AppwriteException}
|
|
789
790
|
* @returns {Promise<Models.Jwt>}
|
|
790
791
|
*/
|
|
791
|
-
createJWT(params?: { duration?: number
|
|
792
|
+
createJWT(params?: { duration?: number }): Promise<Models.Jwt>;
|
|
792
793
|
/**
|
|
793
794
|
* Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.
|
|
794
795
|
*
|
|
@@ -833,6 +834,313 @@ export class Account {
|
|
|
833
834
|
);
|
|
834
835
|
}
|
|
835
836
|
|
|
837
|
+
/**
|
|
838
|
+
* Get a list of all API keys from the current account.
|
|
839
|
+
*
|
|
840
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
841
|
+
* @throws {AppwriteException}
|
|
842
|
+
* @returns {Promise<Models.KeyList>}
|
|
843
|
+
*/
|
|
844
|
+
listKeys(params?: { total?: boolean }): Promise<Models.KeyList>;
|
|
845
|
+
/**
|
|
846
|
+
* Get a list of all API keys from the current account.
|
|
847
|
+
*
|
|
848
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
849
|
+
* @throws {AppwriteException}
|
|
850
|
+
* @returns {Promise<Models.KeyList>}
|
|
851
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
852
|
+
*/
|
|
853
|
+
listKeys(total?: boolean): Promise<Models.KeyList>;
|
|
854
|
+
listKeys(
|
|
855
|
+
paramsOrFirst?: { total?: boolean } | boolean
|
|
856
|
+
): Promise<Models.KeyList> {
|
|
857
|
+
let params: { total?: boolean };
|
|
858
|
+
|
|
859
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
860
|
+
params = (paramsOrFirst || {}) as { total?: boolean };
|
|
861
|
+
} else {
|
|
862
|
+
params = {
|
|
863
|
+
total: paramsOrFirst as boolean
|
|
864
|
+
};
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
const total = params.total;
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
const apiPath = '/account/keys';
|
|
871
|
+
const payload: Payload = {};
|
|
872
|
+
if (typeof total !== 'undefined') {
|
|
873
|
+
payload['total'] = total;
|
|
874
|
+
}
|
|
875
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
876
|
+
|
|
877
|
+
const apiHeaders: { [header: string]: string } = {
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
return this.client.call(
|
|
881
|
+
'get',
|
|
882
|
+
uri,
|
|
883
|
+
apiHeaders,
|
|
884
|
+
payload
|
|
885
|
+
);
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* Create a new account API key.
|
|
890
|
+
*
|
|
891
|
+
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
892
|
+
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
893
|
+
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
894
|
+
* @throws {AppwriteException}
|
|
895
|
+
* @returns {Promise<Models.Key>}
|
|
896
|
+
*/
|
|
897
|
+
createKey(params: { name: string, scopes: Scopes[], expire?: string }): Promise<Models.Key>;
|
|
898
|
+
/**
|
|
899
|
+
* Create a new account API key.
|
|
900
|
+
*
|
|
901
|
+
* @param {string} name - Key name. Max length: 128 chars.
|
|
902
|
+
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
903
|
+
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
904
|
+
* @throws {AppwriteException}
|
|
905
|
+
* @returns {Promise<Models.Key>}
|
|
906
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
907
|
+
*/
|
|
908
|
+
createKey(name: string, scopes: Scopes[], expire?: string): Promise<Models.Key>;
|
|
909
|
+
createKey(
|
|
910
|
+
paramsOrFirst: { name: string, scopes: Scopes[], expire?: string } | string,
|
|
911
|
+
...rest: [(Scopes[])?, (string)?]
|
|
912
|
+
): Promise<Models.Key> {
|
|
913
|
+
let params: { name: string, scopes: Scopes[], expire?: string };
|
|
914
|
+
|
|
915
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
916
|
+
params = (paramsOrFirst || {}) as { name: string, scopes: Scopes[], expire?: string };
|
|
917
|
+
} else {
|
|
918
|
+
params = {
|
|
919
|
+
name: paramsOrFirst as string,
|
|
920
|
+
scopes: rest[0] as Scopes[],
|
|
921
|
+
expire: rest[1] as string
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
const name = params.name;
|
|
926
|
+
const scopes = params.scopes;
|
|
927
|
+
const expire = params.expire;
|
|
928
|
+
|
|
929
|
+
if (typeof name === 'undefined') {
|
|
930
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
931
|
+
}
|
|
932
|
+
if (typeof scopes === 'undefined') {
|
|
933
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
const apiPath = '/account/keys';
|
|
937
|
+
const payload: Payload = {};
|
|
938
|
+
if (typeof name !== 'undefined') {
|
|
939
|
+
payload['name'] = name;
|
|
940
|
+
}
|
|
941
|
+
if (typeof scopes !== 'undefined') {
|
|
942
|
+
payload['scopes'] = scopes;
|
|
943
|
+
}
|
|
944
|
+
if (typeof expire !== 'undefined') {
|
|
945
|
+
payload['expire'] = expire;
|
|
946
|
+
}
|
|
947
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
948
|
+
|
|
949
|
+
const apiHeaders: { [header: string]: string } = {
|
|
950
|
+
'content-type': 'application/json',
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
return this.client.call(
|
|
954
|
+
'post',
|
|
955
|
+
uri,
|
|
956
|
+
apiHeaders,
|
|
957
|
+
payload
|
|
958
|
+
);
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* Get a key by its unique ID. This endpoint returns details about a specific API key in your account including it's scopes.
|
|
963
|
+
*
|
|
964
|
+
* @param {string} params.keyId - Key unique ID.
|
|
965
|
+
* @throws {AppwriteException}
|
|
966
|
+
* @returns {Promise<Models.Key>}
|
|
967
|
+
*/
|
|
968
|
+
getKey(params: { keyId: string }): Promise<Models.Key>;
|
|
969
|
+
/**
|
|
970
|
+
* Get a key by its unique ID. This endpoint returns details about a specific API key in your account including it's scopes.
|
|
971
|
+
*
|
|
972
|
+
* @param {string} keyId - Key unique ID.
|
|
973
|
+
* @throws {AppwriteException}
|
|
974
|
+
* @returns {Promise<Models.Key>}
|
|
975
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
976
|
+
*/
|
|
977
|
+
getKey(keyId: string): Promise<Models.Key>;
|
|
978
|
+
getKey(
|
|
979
|
+
paramsOrFirst: { keyId: string } | string
|
|
980
|
+
): Promise<Models.Key> {
|
|
981
|
+
let params: { keyId: string };
|
|
982
|
+
|
|
983
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
984
|
+
params = (paramsOrFirst || {}) as { keyId: string };
|
|
985
|
+
} else {
|
|
986
|
+
params = {
|
|
987
|
+
keyId: paramsOrFirst as string
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
const keyId = params.keyId;
|
|
992
|
+
|
|
993
|
+
if (typeof keyId === 'undefined') {
|
|
994
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
|
|
998
|
+
const payload: Payload = {};
|
|
999
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1000
|
+
|
|
1001
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
return this.client.call(
|
|
1005
|
+
'get',
|
|
1006
|
+
uri,
|
|
1007
|
+
apiHeaders,
|
|
1008
|
+
payload
|
|
1009
|
+
);
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
|
|
1014
|
+
*
|
|
1015
|
+
* @param {string} params.keyId - Key unique ID.
|
|
1016
|
+
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
1017
|
+
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
1018
|
+
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
1019
|
+
* @throws {AppwriteException}
|
|
1020
|
+
* @returns {Promise<Models.Key>}
|
|
1021
|
+
*/
|
|
1022
|
+
updateKey(params: { keyId: string, name: string, scopes: Scopes[], expire?: string }): Promise<Models.Key>;
|
|
1023
|
+
/**
|
|
1024
|
+
* Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
|
|
1025
|
+
*
|
|
1026
|
+
* @param {string} keyId - Key unique ID.
|
|
1027
|
+
* @param {string} name - Key name. Max length: 128 chars.
|
|
1028
|
+
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
1029
|
+
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
1030
|
+
* @throws {AppwriteException}
|
|
1031
|
+
* @returns {Promise<Models.Key>}
|
|
1032
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1033
|
+
*/
|
|
1034
|
+
updateKey(keyId: string, name: string, scopes: Scopes[], expire?: string): Promise<Models.Key>;
|
|
1035
|
+
updateKey(
|
|
1036
|
+
paramsOrFirst: { keyId: string, name: string, scopes: Scopes[], expire?: string } | string,
|
|
1037
|
+
...rest: [(string)?, (Scopes[])?, (string)?]
|
|
1038
|
+
): Promise<Models.Key> {
|
|
1039
|
+
let params: { keyId: string, name: string, scopes: Scopes[], expire?: string };
|
|
1040
|
+
|
|
1041
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1042
|
+
params = (paramsOrFirst || {}) as { keyId: string, name: string, scopes: Scopes[], expire?: string };
|
|
1043
|
+
} else {
|
|
1044
|
+
params = {
|
|
1045
|
+
keyId: paramsOrFirst as string,
|
|
1046
|
+
name: rest[0] as string,
|
|
1047
|
+
scopes: rest[1] as Scopes[],
|
|
1048
|
+
expire: rest[2] as string
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
const keyId = params.keyId;
|
|
1053
|
+
const name = params.name;
|
|
1054
|
+
const scopes = params.scopes;
|
|
1055
|
+
const expire = params.expire;
|
|
1056
|
+
|
|
1057
|
+
if (typeof keyId === 'undefined') {
|
|
1058
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
1059
|
+
}
|
|
1060
|
+
if (typeof name === 'undefined') {
|
|
1061
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
1062
|
+
}
|
|
1063
|
+
if (typeof scopes === 'undefined') {
|
|
1064
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
|
|
1068
|
+
const payload: Payload = {};
|
|
1069
|
+
if (typeof name !== 'undefined') {
|
|
1070
|
+
payload['name'] = name;
|
|
1071
|
+
}
|
|
1072
|
+
if (typeof scopes !== 'undefined') {
|
|
1073
|
+
payload['scopes'] = scopes;
|
|
1074
|
+
}
|
|
1075
|
+
if (typeof expire !== 'undefined') {
|
|
1076
|
+
payload['expire'] = expire;
|
|
1077
|
+
}
|
|
1078
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1079
|
+
|
|
1080
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1081
|
+
'content-type': 'application/json',
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
return this.client.call(
|
|
1085
|
+
'put',
|
|
1086
|
+
uri,
|
|
1087
|
+
apiHeaders,
|
|
1088
|
+
payload
|
|
1089
|
+
);
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
1094
|
+
*
|
|
1095
|
+
* @param {string} params.keyId - Key unique ID.
|
|
1096
|
+
* @throws {AppwriteException}
|
|
1097
|
+
* @returns {Promise<{}>}
|
|
1098
|
+
*/
|
|
1099
|
+
deleteKey(params: { keyId: string }): Promise<{}>;
|
|
1100
|
+
/**
|
|
1101
|
+
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
1102
|
+
*
|
|
1103
|
+
* @param {string} keyId - Key unique ID.
|
|
1104
|
+
* @throws {AppwriteException}
|
|
1105
|
+
* @returns {Promise<{}>}
|
|
1106
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1107
|
+
*/
|
|
1108
|
+
deleteKey(keyId: string): Promise<{}>;
|
|
1109
|
+
deleteKey(
|
|
1110
|
+
paramsOrFirst: { keyId: string } | string
|
|
1111
|
+
): Promise<{}> {
|
|
1112
|
+
let params: { keyId: string };
|
|
1113
|
+
|
|
1114
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1115
|
+
params = (paramsOrFirst || {}) as { keyId: string };
|
|
1116
|
+
} else {
|
|
1117
|
+
params = {
|
|
1118
|
+
keyId: paramsOrFirst as string
|
|
1119
|
+
};
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
const keyId = params.keyId;
|
|
1123
|
+
|
|
1124
|
+
if (typeof keyId === 'undefined') {
|
|
1125
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
|
|
1129
|
+
const payload: Payload = {};
|
|
1130
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1131
|
+
|
|
1132
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1133
|
+
'content-type': 'application/json',
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
return this.client.call(
|
|
1137
|
+
'delete',
|
|
1138
|
+
uri,
|
|
1139
|
+
apiHeaders,
|
|
1140
|
+
payload
|
|
1141
|
+
);
|
|
1142
|
+
}
|
|
1143
|
+
|
|
836
1144
|
/**
|
|
837
1145
|
* Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
|
|
838
1146
|
*
|
|
@@ -841,7 +1149,7 @@ export class Account {
|
|
|
841
1149
|
* @throws {AppwriteException}
|
|
842
1150
|
* @returns {Promise<Models.LogList>}
|
|
843
1151
|
*/
|
|
844
|
-
listLogs(params?: { queries?: string[], total?: boolean
|
|
1152
|
+
listLogs(params?: { queries?: string[], total?: boolean }): Promise<Models.LogList>;
|
|
845
1153
|
/**
|
|
846
1154
|
* Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
|
|
847
1155
|
*
|
|
@@ -899,7 +1207,7 @@ export class Account {
|
|
|
899
1207
|
* @throws {AppwriteException}
|
|
900
1208
|
* @returns {Promise<Models.User<Preferences>>}
|
|
901
1209
|
*/
|
|
902
|
-
updateMFA<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { mfa: boolean
|
|
1210
|
+
updateMFA<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { mfa: boolean }): Promise<Models.User<Preferences>>;
|
|
903
1211
|
/**
|
|
904
1212
|
* Enable or disable MFA on an account.
|
|
905
1213
|
*
|
|
@@ -955,7 +1263,7 @@ export class Account {
|
|
|
955
1263
|
* @returns {Promise<Models.MfaType>}
|
|
956
1264
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Account.createMFAAuthenticator` instead.
|
|
957
1265
|
*/
|
|
958
|
-
createMfaAuthenticator(params: { type: AuthenticatorType
|
|
1266
|
+
createMfaAuthenticator(params: { type: AuthenticatorType }): Promise<Models.MfaType>;
|
|
959
1267
|
/**
|
|
960
1268
|
* Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.
|
|
961
1269
|
*
|
|
@@ -970,7 +1278,7 @@ export class Account {
|
|
|
970
1278
|
): Promise<Models.MfaType> {
|
|
971
1279
|
let params: { type: AuthenticatorType };
|
|
972
1280
|
|
|
973
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1281
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
974
1282
|
params = (paramsOrFirst || {}) as { type: AuthenticatorType };
|
|
975
1283
|
} else {
|
|
976
1284
|
params = {
|
|
@@ -1007,7 +1315,7 @@ export class Account {
|
|
|
1007
1315
|
* @throws {AppwriteException}
|
|
1008
1316
|
* @returns {Promise<Models.MfaType>}
|
|
1009
1317
|
*/
|
|
1010
|
-
createMFAAuthenticator(params: { type: AuthenticatorType
|
|
1318
|
+
createMFAAuthenticator(params: { type: AuthenticatorType }): Promise<Models.MfaType>;
|
|
1011
1319
|
/**
|
|
1012
1320
|
* Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.
|
|
1013
1321
|
*
|
|
@@ -1022,7 +1330,7 @@ export class Account {
|
|
|
1022
1330
|
): Promise<Models.MfaType> {
|
|
1023
1331
|
let params: { type: AuthenticatorType };
|
|
1024
1332
|
|
|
1025
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1333
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1026
1334
|
params = (paramsOrFirst || {}) as { type: AuthenticatorType };
|
|
1027
1335
|
} else {
|
|
1028
1336
|
params = {
|
|
@@ -1061,7 +1369,7 @@ export class Account {
|
|
|
1061
1369
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1062
1370
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Account.updateMFAAuthenticator` instead.
|
|
1063
1371
|
*/
|
|
1064
|
-
updateMfaAuthenticator<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { type: AuthenticatorType, otp: string
|
|
1372
|
+
updateMfaAuthenticator<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { type: AuthenticatorType, otp: string }): Promise<Models.User<Preferences>>;
|
|
1065
1373
|
/**
|
|
1066
1374
|
* Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.
|
|
1067
1375
|
*
|
|
@@ -1078,7 +1386,7 @@ export class Account {
|
|
|
1078
1386
|
): Promise<Models.User<Preferences>> {
|
|
1079
1387
|
let params: { type: AuthenticatorType, otp: string };
|
|
1080
1388
|
|
|
1081
|
-
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))) {
|
|
1082
1390
|
params = (paramsOrFirst || {}) as { type: AuthenticatorType, otp: string };
|
|
1083
1391
|
} else {
|
|
1084
1392
|
params = {
|
|
@@ -1124,7 +1432,7 @@ export class Account {
|
|
|
1124
1432
|
* @throws {AppwriteException}
|
|
1125
1433
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1126
1434
|
*/
|
|
1127
|
-
updateMFAAuthenticator<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { type: AuthenticatorType, otp: string
|
|
1435
|
+
updateMFAAuthenticator<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { type: AuthenticatorType, otp: string }): Promise<Models.User<Preferences>>;
|
|
1128
1436
|
/**
|
|
1129
1437
|
* Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.
|
|
1130
1438
|
*
|
|
@@ -1141,7 +1449,7 @@ export class Account {
|
|
|
1141
1449
|
): Promise<Models.User<Preferences>> {
|
|
1142
1450
|
let params: { type: AuthenticatorType, otp: string };
|
|
1143
1451
|
|
|
1144
|
-
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))) {
|
|
1145
1453
|
params = (paramsOrFirst || {}) as { type: AuthenticatorType, otp: string };
|
|
1146
1454
|
} else {
|
|
1147
1455
|
params = {
|
|
@@ -1187,7 +1495,7 @@ export class Account {
|
|
|
1187
1495
|
* @returns {Promise<{}>}
|
|
1188
1496
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Account.deleteMFAAuthenticator` instead.
|
|
1189
1497
|
*/
|
|
1190
|
-
deleteMfaAuthenticator(params: { type: AuthenticatorType
|
|
1498
|
+
deleteMfaAuthenticator(params: { type: AuthenticatorType }): Promise<{}>;
|
|
1191
1499
|
/**
|
|
1192
1500
|
* Delete an authenticator for a user by ID.
|
|
1193
1501
|
*
|
|
@@ -1202,7 +1510,7 @@ export class Account {
|
|
|
1202
1510
|
): Promise<{}> {
|
|
1203
1511
|
let params: { type: AuthenticatorType };
|
|
1204
1512
|
|
|
1205
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1513
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1206
1514
|
params = (paramsOrFirst || {}) as { type: AuthenticatorType };
|
|
1207
1515
|
} else {
|
|
1208
1516
|
params = {
|
|
@@ -1239,7 +1547,7 @@ export class Account {
|
|
|
1239
1547
|
* @throws {AppwriteException}
|
|
1240
1548
|
* @returns {Promise<{}>}
|
|
1241
1549
|
*/
|
|
1242
|
-
deleteMFAAuthenticator(params: { type: AuthenticatorType
|
|
1550
|
+
deleteMFAAuthenticator(params: { type: AuthenticatorType }): Promise<{}>;
|
|
1243
1551
|
/**
|
|
1244
1552
|
* Delete an authenticator for a user by ID.
|
|
1245
1553
|
*
|
|
@@ -1254,7 +1562,7 @@ export class Account {
|
|
|
1254
1562
|
): Promise<{}> {
|
|
1255
1563
|
let params: { type: AuthenticatorType };
|
|
1256
1564
|
|
|
1257
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
|
|
1565
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
|
|
1258
1566
|
params = (paramsOrFirst || {}) as { type: AuthenticatorType };
|
|
1259
1567
|
} else {
|
|
1260
1568
|
params = {
|
|
@@ -1292,7 +1600,7 @@ export class Account {
|
|
|
1292
1600
|
* @returns {Promise<Models.MfaChallenge>}
|
|
1293
1601
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Account.createMFAChallenge` instead.
|
|
1294
1602
|
*/
|
|
1295
|
-
createMfaChallenge(params: { factor: AuthenticationFactor
|
|
1603
|
+
createMfaChallenge(params: { factor: AuthenticationFactor }): Promise<Models.MfaChallenge>;
|
|
1296
1604
|
/**
|
|
1297
1605
|
* Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.
|
|
1298
1606
|
*
|
|
@@ -1307,7 +1615,7 @@ export class Account {
|
|
|
1307
1615
|
): Promise<Models.MfaChallenge> {
|
|
1308
1616
|
let params: { factor: AuthenticationFactor };
|
|
1309
1617
|
|
|
1310
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
|
|
1618
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
|
|
1311
1619
|
params = (paramsOrFirst || {}) as { factor: AuthenticationFactor };
|
|
1312
1620
|
} else {
|
|
1313
1621
|
params = {
|
|
@@ -1347,7 +1655,7 @@ export class Account {
|
|
|
1347
1655
|
* @throws {AppwriteException}
|
|
1348
1656
|
* @returns {Promise<Models.MfaChallenge>}
|
|
1349
1657
|
*/
|
|
1350
|
-
createMFAChallenge(params: { factor: AuthenticationFactor
|
|
1658
|
+
createMFAChallenge(params: { factor: AuthenticationFactor }): Promise<Models.MfaChallenge>;
|
|
1351
1659
|
/**
|
|
1352
1660
|
* Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.
|
|
1353
1661
|
*
|
|
@@ -1362,7 +1670,7 @@ export class Account {
|
|
|
1362
1670
|
): Promise<Models.MfaChallenge> {
|
|
1363
1671
|
let params: { factor: AuthenticationFactor };
|
|
1364
1672
|
|
|
1365
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
|
|
1673
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
|
|
1366
1674
|
params = (paramsOrFirst || {}) as { factor: AuthenticationFactor };
|
|
1367
1675
|
} else {
|
|
1368
1676
|
params = {
|
|
@@ -1404,7 +1712,7 @@ export class Account {
|
|
|
1404
1712
|
* @returns {Promise<Models.Session>}
|
|
1405
1713
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Account.updateMFAChallenge` instead.
|
|
1406
1714
|
*/
|
|
1407
|
-
updateMfaChallenge(params: { challengeId: string, otp: string
|
|
1715
|
+
updateMfaChallenge(params: { challengeId: string, otp: string }): Promise<Models.Session>;
|
|
1408
1716
|
/**
|
|
1409
1717
|
* Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
|
|
1410
1718
|
*
|
|
@@ -1470,7 +1778,7 @@ export class Account {
|
|
|
1470
1778
|
* @throws {AppwriteException}
|
|
1471
1779
|
* @returns {Promise<Models.Session>}
|
|
1472
1780
|
*/
|
|
1473
|
-
updateMFAChallenge(params: { challengeId: string, otp: string
|
|
1781
|
+
updateMFAChallenge(params: { challengeId: string, otp: string }): Promise<Models.Session>;
|
|
1474
1782
|
/**
|
|
1475
1783
|
* Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
|
|
1476
1784
|
*
|
|
@@ -1727,7 +2035,7 @@ export class Account {
|
|
|
1727
2035
|
* @throws {AppwriteException}
|
|
1728
2036
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1729
2037
|
*/
|
|
1730
|
-
updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { name: string
|
|
2038
|
+
updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { name: string }): Promise<Models.User<Preferences>>;
|
|
1731
2039
|
/**
|
|
1732
2040
|
* Update currently logged in user account name.
|
|
1733
2041
|
*
|
|
@@ -1783,7 +2091,7 @@ export class Account {
|
|
|
1783
2091
|
* @throws {AppwriteException}
|
|
1784
2092
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1785
2093
|
*/
|
|
1786
|
-
updatePassword<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { password: string, oldPassword?: string
|
|
2094
|
+
updatePassword<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { password: string, oldPassword?: string }): Promise<Models.User<Preferences>>;
|
|
1787
2095
|
/**
|
|
1788
2096
|
* Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.
|
|
1789
2097
|
*
|
|
@@ -1845,7 +2153,7 @@ export class Account {
|
|
|
1845
2153
|
* @throws {AppwriteException}
|
|
1846
2154
|
* @returns {Promise<Models.PaymentMethodList>}
|
|
1847
2155
|
*/
|
|
1848
|
-
listPaymentMethods(params?: { queries?: string[]
|
|
2156
|
+
listPaymentMethods(params?: { queries?: string[] }): Promise<Models.PaymentMethodList>;
|
|
1849
2157
|
/**
|
|
1850
2158
|
* List payment methods for this account.
|
|
1851
2159
|
*
|
|
@@ -1920,7 +2228,7 @@ export class Account {
|
|
|
1920
2228
|
* @throws {AppwriteException}
|
|
1921
2229
|
* @returns {Promise<Models.PaymentMethod>}
|
|
1922
2230
|
*/
|
|
1923
|
-
getPaymentMethod(params: { paymentMethodId: string
|
|
2231
|
+
getPaymentMethod(params: { paymentMethodId: string }): Promise<Models.PaymentMethod>;
|
|
1924
2232
|
/**
|
|
1925
2233
|
* Get a specific payment method for the user.
|
|
1926
2234
|
*
|
|
@@ -1974,7 +2282,7 @@ export class Account {
|
|
|
1974
2282
|
* @throws {AppwriteException}
|
|
1975
2283
|
* @returns {Promise<Models.PaymentMethod>}
|
|
1976
2284
|
*/
|
|
1977
|
-
updatePaymentMethod(params: { paymentMethodId: string, expiryMonth: number, expiryYear: number, state?: string
|
|
2285
|
+
updatePaymentMethod(params: { paymentMethodId: string, expiryMonth: number, expiryYear: number, state?: string }): Promise<Models.PaymentMethod>;
|
|
1978
2286
|
/**
|
|
1979
2287
|
* Update a new payment method for the current user account.
|
|
1980
2288
|
*
|
|
@@ -2051,7 +2359,7 @@ export class Account {
|
|
|
2051
2359
|
* @throws {AppwriteException}
|
|
2052
2360
|
* @returns {Promise<{}>}
|
|
2053
2361
|
*/
|
|
2054
|
-
deletePaymentMethod(params: { paymentMethodId: string
|
|
2362
|
+
deletePaymentMethod(params: { paymentMethodId: string }): Promise<{}>;
|
|
2055
2363
|
/**
|
|
2056
2364
|
* Delete a specific payment method from a user's account.
|
|
2057
2365
|
*
|
|
@@ -2106,7 +2414,7 @@ export class Account {
|
|
|
2106
2414
|
* @throws {AppwriteException}
|
|
2107
2415
|
* @returns {Promise<Models.PaymentMethod>}
|
|
2108
2416
|
*/
|
|
2109
|
-
updatePaymentMethodProvider(params: { paymentMethodId: string, providerMethodId: string, name: string, state?: string
|
|
2417
|
+
updatePaymentMethodProvider(params: { paymentMethodId: string, providerMethodId: string, name: string, state?: string }): Promise<Models.PaymentMethod>;
|
|
2110
2418
|
/**
|
|
2111
2419
|
* Update payment method provider.
|
|
2112
2420
|
*
|
|
@@ -2183,7 +2491,7 @@ export class Account {
|
|
|
2183
2491
|
* @throws {AppwriteException}
|
|
2184
2492
|
* @returns {Promise<Models.PaymentMethod>}
|
|
2185
2493
|
*/
|
|
2186
|
-
updatePaymentMethodMandateOptions(params: { paymentMethodId: string
|
|
2494
|
+
updatePaymentMethodMandateOptions(params: { paymentMethodId: string }): Promise<Models.PaymentMethod>;
|
|
2187
2495
|
/**
|
|
2188
2496
|
* Update payment method mandate options.
|
|
2189
2497
|
*
|
|
@@ -2236,7 +2544,7 @@ export class Account {
|
|
|
2236
2544
|
* @throws {AppwriteException}
|
|
2237
2545
|
* @returns {Promise<Models.User<Preferences>>}
|
|
2238
2546
|
*/
|
|
2239
|
-
updatePhone<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { phone: string, password: string
|
|
2547
|
+
updatePhone<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { phone: string, password: string }): Promise<Models.User<Preferences>>;
|
|
2240
2548
|
/**
|
|
2241
2549
|
* Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.
|
|
2242
2550
|
*
|
|
@@ -2324,7 +2632,7 @@ export class Account {
|
|
|
2324
2632
|
* @throws {AppwriteException}
|
|
2325
2633
|
* @returns {Promise<Models.User<Preferences>>}
|
|
2326
2634
|
*/
|
|
2327
|
-
updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { prefs: Partial<Preferences>
|
|
2635
|
+
updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { prefs: Partial<Preferences> }): Promise<Models.User<Preferences>>;
|
|
2328
2636
|
/**
|
|
2329
2637
|
* Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.
|
|
2330
2638
|
*
|
|
@@ -2339,7 +2647,7 @@ export class Account {
|
|
|
2339
2647
|
): Promise<Models.User<Preferences>> {
|
|
2340
2648
|
let params: { prefs: Partial<Preferences> };
|
|
2341
2649
|
|
|
2342
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'prefs' in paramsOrFirst)) {
|
|
2650
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('prefs' in paramsOrFirst))) {
|
|
2343
2651
|
params = (paramsOrFirst || {}) as { prefs: Partial<Preferences> };
|
|
2344
2652
|
} else {
|
|
2345
2653
|
params = {
|
|
@@ -2380,7 +2688,7 @@ export class Account {
|
|
|
2380
2688
|
* @throws {AppwriteException}
|
|
2381
2689
|
* @returns {Promise<Models.Token>}
|
|
2382
2690
|
*/
|
|
2383
|
-
createRecovery(params: { email: string, url: string
|
|
2691
|
+
createRecovery(params: { email: string, url: string }): Promise<Models.Token>;
|
|
2384
2692
|
/**
|
|
2385
2693
|
* Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.
|
|
2386
2694
|
*
|
|
@@ -2449,7 +2757,7 @@ export class Account {
|
|
|
2449
2757
|
* @throws {AppwriteException}
|
|
2450
2758
|
* @returns {Promise<Models.Token>}
|
|
2451
2759
|
*/
|
|
2452
|
-
updateRecovery(params: { userId: string, secret: string, password: string
|
|
2760
|
+
updateRecovery(params: { userId: string, secret: string, password: string }): Promise<Models.Token>;
|
|
2453
2761
|
/**
|
|
2454
2762
|
* Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint.
|
|
2455
2763
|
*
|
|
@@ -2599,7 +2907,7 @@ export class Account {
|
|
|
2599
2907
|
* @throws {AppwriteException}
|
|
2600
2908
|
* @returns {Promise<Models.Session>}
|
|
2601
2909
|
*/
|
|
2602
|
-
createEmailPasswordSession(params: { email: string, password: string
|
|
2910
|
+
createEmailPasswordSession(params: { email: string, password: string }): Promise<Models.Session>;
|
|
2603
2911
|
/**
|
|
2604
2912
|
* Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.
|
|
2605
2913
|
*
|
|
@@ -2668,7 +2976,7 @@ export class Account {
|
|
|
2668
2976
|
* @returns {Promise<Models.Session>}
|
|
2669
2977
|
* @deprecated This API has been deprecated since 1.6.0. Please use `Account.createSession` instead.
|
|
2670
2978
|
*/
|
|
2671
|
-
updateMagicURLSession(params: { userId: string, secret: string
|
|
2979
|
+
updateMagicURLSession(params: { userId: string, secret: string }): Promise<Models.Session>;
|
|
2672
2980
|
/**
|
|
2673
2981
|
* Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
|
|
2674
2982
|
*
|
|
@@ -2741,7 +3049,7 @@ export class Account {
|
|
|
2741
3049
|
* @throws {AppwriteException}
|
|
2742
3050
|
* @returns {void | string}
|
|
2743
3051
|
*/
|
|
2744
|
-
createOAuth2Session(params: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[]
|
|
3052
|
+
createOAuth2Session(params: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] }): void | string;
|
|
2745
3053
|
/**
|
|
2746
3054
|
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
|
|
2747
3055
|
*
|
|
@@ -2765,7 +3073,7 @@ export class Account {
|
|
|
2765
3073
|
): void | string {
|
|
2766
3074
|
let params: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] };
|
|
2767
3075
|
|
|
2768
|
-
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))) {
|
|
2769
3077
|
params = (paramsOrFirst || {}) as { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] };
|
|
2770
3078
|
} else {
|
|
2771
3079
|
params = {
|
|
@@ -2824,7 +3132,7 @@ export class Account {
|
|
|
2824
3132
|
* @returns {Promise<Models.Session>}
|
|
2825
3133
|
* @deprecated This API has been deprecated since 1.6.0. Please use `Account.createSession` instead.
|
|
2826
3134
|
*/
|
|
2827
|
-
updatePhoneSession(params: { userId: string, secret: string
|
|
3135
|
+
updatePhoneSession(params: { userId: string, secret: string }): Promise<Models.Session>;
|
|
2828
3136
|
/**
|
|
2829
3137
|
* Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
|
|
2830
3138
|
*
|
|
@@ -2890,7 +3198,7 @@ export class Account {
|
|
|
2890
3198
|
* @throws {AppwriteException}
|
|
2891
3199
|
* @returns {Promise<Models.Session>}
|
|
2892
3200
|
*/
|
|
2893
|
-
createSession(params: { userId: string, secret: string
|
|
3201
|
+
createSession(params: { userId: string, secret: string }): Promise<Models.Session>;
|
|
2894
3202
|
/**
|
|
2895
3203
|
* Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
|
|
2896
3204
|
*
|
|
@@ -2955,7 +3263,7 @@ export class Account {
|
|
|
2955
3263
|
* @throws {AppwriteException}
|
|
2956
3264
|
* @returns {Promise<Models.Session>}
|
|
2957
3265
|
*/
|
|
2958
|
-
getSession(params: { sessionId: string
|
|
3266
|
+
getSession(params: { sessionId: string }): Promise<Models.Session>;
|
|
2959
3267
|
/**
|
|
2960
3268
|
* Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.
|
|
2961
3269
|
*
|
|
@@ -3006,7 +3314,7 @@ export class Account {
|
|
|
3006
3314
|
* @throws {AppwriteException}
|
|
3007
3315
|
* @returns {Promise<Models.Session>}
|
|
3008
3316
|
*/
|
|
3009
|
-
updateSession(params: { sessionId: string
|
|
3317
|
+
updateSession(params: { sessionId: string }): Promise<Models.Session>;
|
|
3010
3318
|
/**
|
|
3011
3319
|
* Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.
|
|
3012
3320
|
*
|
|
@@ -3058,7 +3366,7 @@ export class Account {
|
|
|
3058
3366
|
* @throws {AppwriteException}
|
|
3059
3367
|
* @returns {Promise<{}>}
|
|
3060
3368
|
*/
|
|
3061
|
-
deleteSession(params: { sessionId: string
|
|
3369
|
+
deleteSession(params: { sessionId: string }): Promise<{}>;
|
|
3062
3370
|
/**
|
|
3063
3371
|
* Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.
|
|
3064
3372
|
*
|
|
@@ -3136,7 +3444,7 @@ export class Account {
|
|
|
3136
3444
|
* @throws {AppwriteException}
|
|
3137
3445
|
* @returns {Promise<Models.Target>}
|
|
3138
3446
|
*/
|
|
3139
|
-
createPushTarget(params: { targetId: string, identifier: string, providerId?: string
|
|
3447
|
+
createPushTarget(params: { targetId: string, identifier: string, providerId?: string }): Promise<Models.Target>;
|
|
3140
3448
|
/**
|
|
3141
3449
|
* Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.
|
|
3142
3450
|
*
|
|
@@ -3208,7 +3516,7 @@ export class Account {
|
|
|
3208
3516
|
* @throws {AppwriteException}
|
|
3209
3517
|
* @returns {Promise<Models.Target>}
|
|
3210
3518
|
*/
|
|
3211
|
-
updatePushTarget(params: { targetId: string, identifier: string
|
|
3519
|
+
updatePushTarget(params: { targetId: string, identifier: string }): Promise<Models.Target>;
|
|
3212
3520
|
/**
|
|
3213
3521
|
* Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.
|
|
3214
3522
|
*
|
|
@@ -3270,7 +3578,7 @@ export class Account {
|
|
|
3270
3578
|
* @throws {AppwriteException}
|
|
3271
3579
|
* @returns {Promise<{}>}
|
|
3272
3580
|
*/
|
|
3273
|
-
deletePushTarget(params: { targetId: string
|
|
3581
|
+
deletePushTarget(params: { targetId: string }): Promise<{}>;
|
|
3274
3582
|
/**
|
|
3275
3583
|
* Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.
|
|
3276
3584
|
*
|
|
@@ -3327,7 +3635,7 @@ export class Account {
|
|
|
3327
3635
|
* @throws {AppwriteException}
|
|
3328
3636
|
* @returns {Promise<Models.Token>}
|
|
3329
3637
|
*/
|
|
3330
|
-
createEmailToken(params: { userId: string, email: string, phrase?: boolean
|
|
3638
|
+
createEmailToken(params: { userId: string, email: string, phrase?: boolean }): Promise<Models.Token>;
|
|
3331
3639
|
/**
|
|
3332
3640
|
* Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.
|
|
3333
3641
|
*
|
|
@@ -3407,7 +3715,7 @@ export class Account {
|
|
|
3407
3715
|
* @throws {AppwriteException}
|
|
3408
3716
|
* @returns {Promise<Models.Token>}
|
|
3409
3717
|
*/
|
|
3410
|
-
createMagicURLToken(params: { userId: string, email: string, url?: string, phrase?: boolean
|
|
3718
|
+
createMagicURLToken(params: { userId: string, email: string, url?: string, phrase?: boolean }): Promise<Models.Token>;
|
|
3411
3719
|
/**
|
|
3412
3720
|
* Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.
|
|
3413
3721
|
*
|
|
@@ -3494,7 +3802,7 @@ export class Account {
|
|
|
3494
3802
|
* @throws {AppwriteException}
|
|
3495
3803
|
* @returns {void | string}
|
|
3496
3804
|
*/
|
|
3497
|
-
createOAuth2Token(params: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[]
|
|
3805
|
+
createOAuth2Token(params: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] }): void | string;
|
|
3498
3806
|
/**
|
|
3499
3807
|
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
|
|
3500
3808
|
*
|
|
@@ -3517,7 +3825,7 @@ export class Account {
|
|
|
3517
3825
|
): void | string {
|
|
3518
3826
|
let params: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] };
|
|
3519
3827
|
|
|
3520
|
-
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))) {
|
|
3521
3829
|
params = (paramsOrFirst || {}) as { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] };
|
|
3522
3830
|
} else {
|
|
3523
3831
|
params = {
|
|
@@ -3577,7 +3885,7 @@ export class Account {
|
|
|
3577
3885
|
* @throws {AppwriteException}
|
|
3578
3886
|
* @returns {Promise<Models.Token>}
|
|
3579
3887
|
*/
|
|
3580
|
-
createPhoneToken(params: { userId: string, phone: string
|
|
3888
|
+
createPhoneToken(params: { userId: string, phone: string }): Promise<Models.Token>;
|
|
3581
3889
|
/**
|
|
3582
3890
|
* Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.
|
|
3583
3891
|
*
|
|
@@ -3647,7 +3955,7 @@ export class Account {
|
|
|
3647
3955
|
* @throws {AppwriteException}
|
|
3648
3956
|
* @returns {Promise<Models.Token>}
|
|
3649
3957
|
*/
|
|
3650
|
-
createEmailVerification(params: { url: string
|
|
3958
|
+
createEmailVerification(params: { url: string }): Promise<Models.Token>;
|
|
3651
3959
|
/**
|
|
3652
3960
|
* Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.
|
|
3653
3961
|
*
|
|
@@ -3709,7 +4017,7 @@ export class Account {
|
|
|
3709
4017
|
* @returns {Promise<Models.Token>}
|
|
3710
4018
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Account.createEmailVerification` instead.
|
|
3711
4019
|
*/
|
|
3712
|
-
createVerification(params: { url: string
|
|
4020
|
+
createVerification(params: { url: string }): Promise<Models.Token>;
|
|
3713
4021
|
/**
|
|
3714
4022
|
* Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.
|
|
3715
4023
|
*
|
|
@@ -3768,7 +4076,7 @@ export class Account {
|
|
|
3768
4076
|
* @throws {AppwriteException}
|
|
3769
4077
|
* @returns {Promise<Models.Token>}
|
|
3770
4078
|
*/
|
|
3771
|
-
updateEmailVerification(params: { userId: string, secret: string
|
|
4079
|
+
updateEmailVerification(params: { userId: string, secret: string }): Promise<Models.Token>;
|
|
3772
4080
|
/**
|
|
3773
4081
|
* Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.
|
|
3774
4082
|
*
|
|
@@ -3835,7 +4143,7 @@ export class Account {
|
|
|
3835
4143
|
* @returns {Promise<Models.Token>}
|
|
3836
4144
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Account.updateEmailVerification` instead.
|
|
3837
4145
|
*/
|
|
3838
|
-
updateVerification(params: { userId: string, secret: string
|
|
4146
|
+
updateVerification(params: { userId: string, secret: string }): Promise<Models.Token>;
|
|
3839
4147
|
/**
|
|
3840
4148
|
* Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.
|
|
3841
4149
|
*
|
|
@@ -3925,7 +4233,7 @@ export class Account {
|
|
|
3925
4233
|
* @throws {AppwriteException}
|
|
3926
4234
|
* @returns {Promise<Models.Token>}
|
|
3927
4235
|
*/
|
|
3928
|
-
updatePhoneVerification(params: { userId: string, secret: string
|
|
4236
|
+
updatePhoneVerification(params: { userId: string, secret: string }): Promise<Models.Token>;
|
|
3929
4237
|
/**
|
|
3930
4238
|
* Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.
|
|
3931
4239
|
*
|