@appwrite.io/console 1.5.2 → 1.7.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 +9 -1
- package/README.md +3 -3
- package/dist/cjs/sdk.js +11874 -11100
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +11872 -11101
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +11874 -11100
- package/docs/examples/account/create-anonymous-session.md +1 -1
- package/docs/examples/account/create-billing-address.md +1 -1
- package/docs/examples/account/create-email-password-session.md +1 -1
- package/docs/examples/account/create-email-token.md +1 -1
- package/docs/examples/account/create-j-w-t.md +1 -1
- package/docs/examples/account/create-magic-u-r-l-token.md +1 -1
- package/docs/examples/account/create-mfa-authenticator.md +1 -1
- package/docs/examples/account/create-mfa-challenge.md +1 -1
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/create-o-auth2session.md +1 -1
- package/docs/examples/account/create-o-auth2token.md +1 -1
- package/docs/examples/account/create-payment-method.md +1 -1
- package/docs/examples/account/create-phone-token.md +1 -1
- package/docs/examples/account/create-phone-verification.md +1 -1
- package/docs/examples/account/create-push-target.md +1 -1
- package/docs/examples/account/create-recovery.md +1 -1
- package/docs/examples/account/create-session.md +1 -1
- package/docs/examples/account/create-verification.md +1 -1
- package/docs/examples/account/create.md +1 -1
- package/docs/examples/account/delete-billing-address.md +1 -1
- package/docs/examples/account/delete-identity.md +1 -1
- package/docs/examples/account/delete-mfa-authenticator.md +1 -1
- package/docs/examples/account/delete-payment-method.md +1 -1
- package/docs/examples/account/delete-push-target.md +1 -1
- package/docs/examples/account/delete-session.md +1 -1
- package/docs/examples/account/delete-sessions.md +1 -1
- package/docs/examples/account/delete.md +1 -1
- package/docs/examples/account/get-billing-address.md +1 -1
- package/docs/examples/account/get-coupon.md +1 -1
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/get-payment-method.md +1 -1
- package/docs/examples/account/get-prefs.md +1 -1
- package/docs/examples/account/get-session.md +1 -1
- package/docs/examples/account/get.md +1 -1
- package/docs/examples/account/list-billing-addresses.md +1 -1
- package/docs/examples/account/list-identities.md +1 -1
- package/docs/examples/account/list-invoices.md +1 -1
- package/docs/examples/account/list-logs.md +1 -1
- package/docs/examples/account/list-mfa-factors.md +1 -1
- package/docs/examples/account/list-payment-methods.md +1 -1
- package/docs/examples/account/list-sessions.md +1 -1
- package/docs/examples/account/update-billing-address.md +1 -1
- package/docs/examples/account/update-email.md +1 -1
- package/docs/examples/account/update-m-f-a.md +1 -1
- package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
- package/docs/examples/account/update-mfa-authenticator.md +1 -1
- package/docs/examples/account/update-mfa-challenge.md +1 -1
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/update-name.md +1 -1
- package/docs/examples/account/update-password.md +1 -1
- package/docs/examples/account/update-payment-method-mandate-options.md +1 -1
- package/docs/examples/account/update-payment-method-provider.md +1 -1
- package/docs/examples/account/update-payment-method.md +1 -1
- package/docs/examples/account/update-phone-session.md +1 -1
- package/docs/examples/account/update-phone-verification.md +1 -1
- package/docs/examples/account/update-phone.md +1 -1
- package/docs/examples/account/update-prefs.md +1 -1
- package/docs/examples/account/update-push-target.md +1 -1
- package/docs/examples/account/update-recovery.md +1 -1
- package/docs/examples/account/update-session.md +1 -1
- package/docs/examples/account/update-status.md +1 -1
- package/docs/examples/account/update-verification.md +1 -1
- package/docs/examples/assistant/chat.md +1 -1
- package/docs/examples/avatars/get-browser.md +2 -2
- package/docs/examples/avatars/get-credit-card.md +2 -2
- package/docs/examples/avatars/get-favicon.md +1 -1
- package/docs/examples/avatars/get-flag.md +2 -2
- package/docs/examples/avatars/get-image.md +1 -1
- package/docs/examples/avatars/get-initials.md +1 -1
- package/docs/examples/avatars/get-q-r.md +1 -1
- package/docs/examples/backups/create-archive.md +1 -1
- package/docs/examples/backups/create-policy.md +1 -1
- package/docs/examples/backups/create-restoration.md +1 -1
- package/docs/examples/backups/delete-archive.md +1 -1
- package/docs/examples/backups/delete-policy.md +1 -1
- package/docs/examples/backups/get-archive.md +1 -1
- package/docs/examples/backups/get-policy.md +1 -1
- package/docs/examples/backups/get-restoration.md +1 -1
- package/docs/examples/backups/list-archives.md +1 -1
- package/docs/examples/backups/list-policies.md +1 -1
- package/docs/examples/backups/list-restorations.md +1 -1
- package/docs/examples/backups/update-policy.md +1 -1
- package/docs/examples/console/create-program-membership.md +1 -1
- package/docs/examples/console/create-source.md +1 -1
- package/docs/examples/console/get-campaign.md +1 -1
- package/docs/examples/console/get-coupon.md +1 -1
- package/docs/examples/console/get-resource.md +14 -0
- package/docs/examples/console/plans.md +1 -1
- package/docs/examples/console/regions.md +1 -1
- package/docs/examples/console/variables.md +1 -1
- package/docs/examples/databases/create-boolean-attribute.md +1 -1
- package/docs/examples/databases/create-collection.md +1 -1
- package/docs/examples/databases/create-datetime-attribute.md +1 -1
- package/docs/examples/databases/create-document.md +4 -2
- package/docs/examples/databases/create-documents.md +15 -0
- package/docs/examples/databases/create-email-attribute.md +1 -1
- package/docs/examples/databases/create-enum-attribute.md +1 -1
- package/docs/examples/databases/create-float-attribute.md +1 -1
- package/docs/examples/databases/create-index.md +3 -2
- package/docs/examples/databases/create-integer-attribute.md +1 -1
- package/docs/examples/databases/create-ip-attribute.md +1 -1
- package/docs/examples/databases/create-relationship-attribute.md +1 -1
- package/docs/examples/databases/create-string-attribute.md +1 -1
- package/docs/examples/databases/create-url-attribute.md +1 -1
- package/docs/examples/databases/create.md +1 -1
- package/docs/examples/databases/delete-attribute.md +1 -1
- package/docs/examples/databases/delete-collection.md +1 -1
- package/docs/examples/databases/delete-document.md +1 -1
- package/docs/examples/databases/delete-documents.md +15 -0
- package/docs/examples/databases/delete-index.md +1 -1
- package/docs/examples/databases/delete.md +1 -1
- package/docs/examples/databases/get-attribute.md +1 -1
- package/docs/examples/databases/get-collection-usage.md +1 -1
- package/docs/examples/databases/get-collection.md +1 -1
- package/docs/examples/databases/get-database-usage.md +1 -1
- package/docs/examples/databases/get-document.md +1 -1
- package/docs/examples/databases/get-index.md +1 -1
- package/docs/examples/databases/get-usage.md +1 -1
- package/docs/examples/databases/get.md +1 -1
- package/docs/examples/databases/list-attributes.md +1 -1
- package/docs/examples/databases/list-collection-logs.md +1 -1
- package/docs/examples/databases/list-collections.md +1 -1
- package/docs/examples/databases/list-document-logs.md +1 -1
- package/docs/examples/databases/list-documents.md +1 -1
- package/docs/examples/databases/list-indexes.md +1 -1
- package/docs/examples/databases/list-logs.md +1 -1
- package/docs/examples/databases/list.md +1 -1
- package/docs/examples/databases/update-boolean-attribute.md +1 -1
- package/docs/examples/databases/update-collection.md +1 -1
- package/docs/examples/databases/update-datetime-attribute.md +1 -1
- package/docs/examples/databases/update-document.md +1 -1
- package/docs/examples/databases/update-documents.md +16 -0
- package/docs/examples/databases/update-email-attribute.md +1 -1
- package/docs/examples/databases/update-enum-attribute.md +1 -1
- package/docs/examples/databases/update-float-attribute.md +1 -1
- package/docs/examples/databases/update-integer-attribute.md +1 -1
- package/docs/examples/databases/update-ip-attribute.md +1 -1
- package/docs/examples/databases/update-relationship-attribute.md +1 -1
- package/docs/examples/databases/update-string-attribute.md +1 -1
- package/docs/examples/databases/update-url-attribute.md +1 -1
- package/docs/examples/databases/update.md +1 -1
- package/docs/examples/databases/upsert-documents.md +15 -0
- package/docs/examples/domains/create-preset-google-workspace.md +13 -0
- package/docs/examples/domains/create-preset-i-cloud.md +13 -0
- package/docs/examples/domains/create-preset-mailgun.md +13 -0
- package/docs/examples/domains/create-preset-outlook.md +13 -0
- package/docs/examples/domains/create-preset-proton-mail.md +13 -0
- package/docs/examples/domains/create-preset-zoho.md +13 -0
- package/docs/examples/domains/create-record-a-a-a-a.md +17 -0
- package/docs/examples/domains/create-record-a.md +17 -0
- package/docs/examples/domains/create-record-alias.md +17 -0
- package/docs/examples/domains/create-record-c-a-a.md +17 -0
- package/docs/examples/domains/create-record-c-n-a-m-e.md +17 -0
- package/docs/examples/domains/create-record-h-t-t-p-s.md +17 -0
- package/docs/examples/domains/create-record-m-x.md +18 -0
- package/docs/examples/domains/create-record-n-s.md +17 -0
- package/docs/examples/domains/create-record-s-r-v.md +20 -0
- package/docs/examples/domains/create-record-t-x-t.md +17 -0
- package/docs/examples/domains/create.md +14 -0
- package/docs/examples/domains/delete-record.md +14 -0
- package/docs/examples/domains/delete.md +13 -0
- package/docs/examples/domains/get-preset-google-workspace.md +13 -0
- package/docs/examples/domains/get-preset-i-cloud.md +13 -0
- package/docs/examples/domains/get-preset-mailgun.md +13 -0
- package/docs/examples/domains/get-preset-outlook.md +13 -0
- package/docs/examples/domains/get-preset-proton-mail.md +13 -0
- package/docs/examples/domains/get-preset-zoho.md +13 -0
- package/docs/examples/domains/get-record.md +14 -0
- package/docs/examples/domains/get-zone.md +13 -0
- package/docs/examples/domains/get.md +13 -0
- package/docs/examples/domains/list-records.md +14 -0
- package/docs/examples/domains/list.md +14 -0
- package/docs/examples/domains/update-nameservers.md +13 -0
- package/docs/examples/domains/update-record-a-a-a-a.md +18 -0
- package/docs/examples/domains/update-record-a.md +18 -0
- package/docs/examples/domains/update-record-alias.md +18 -0
- package/docs/examples/domains/update-record-c-a-a.md +18 -0
- package/docs/examples/domains/update-record-c-n-a-m-e.md +18 -0
- package/docs/examples/domains/update-record-h-t-t-p-s.md +18 -0
- package/docs/examples/domains/update-record-m-x.md +19 -0
- package/docs/examples/domains/update-record-n-s.md +18 -0
- package/docs/examples/domains/update-record-s-r-v.md +21 -0
- package/docs/examples/domains/update-record-t-x-t.md +18 -0
- package/docs/examples/domains/update-team.md +14 -0
- package/docs/examples/domains/update-zone.md +14 -0
- package/docs/examples/functions/create-deployment.md +1 -1
- package/docs/examples/functions/create-duplicate-deployment.md +15 -0
- package/docs/examples/functions/create-execution.md +1 -1
- package/docs/examples/functions/create-template-deployment.md +18 -0
- package/docs/examples/functions/create-variable.md +3 -2
- package/docs/examples/functions/create-vcs-deployment.md +16 -0
- package/docs/examples/functions/create.md +3 -3
- package/docs/examples/functions/delete-deployment.md +1 -1
- package/docs/examples/functions/delete-execution.md +1 -1
- package/docs/examples/functions/delete-variable.md +1 -1
- package/docs/examples/functions/delete.md +1 -1
- package/docs/examples/functions/get-deployment-download.md +4 -3
- package/docs/examples/functions/get-deployment.md +1 -1
- package/docs/examples/functions/get-execution.md +1 -1
- package/docs/examples/functions/get-template.md +1 -1
- package/docs/examples/functions/get-usage.md +2 -1
- package/docs/examples/functions/get-variable.md +1 -1
- package/docs/examples/functions/get.md +1 -1
- package/docs/examples/functions/list-deployments.md +1 -1
- package/docs/examples/functions/list-executions.md +2 -3
- package/docs/examples/functions/list-runtimes.md +1 -1
- package/docs/examples/functions/list-specifications.md +1 -1
- package/docs/examples/functions/list-templates.md +1 -1
- package/docs/examples/functions/list-usage.md +13 -0
- package/docs/examples/functions/list-variables.md +1 -1
- package/docs/examples/functions/list.md +1 -1
- package/docs/examples/functions/update-deployment-status.md +14 -0
- package/docs/examples/functions/update-function-deployment.md +14 -0
- package/docs/examples/functions/update-variable.md +3 -2
- package/docs/examples/functions/update.md +1 -1
- package/docs/examples/graphql/mutation.md +1 -1
- package/docs/examples/graphql/query.md +1 -1
- package/docs/examples/health/get-antivirus.md +1 -1
- package/docs/examples/health/get-cache.md +1 -1
- package/docs/examples/health/get-certificate.md +1 -1
- package/docs/examples/health/get-d-b.md +1 -1
- package/docs/examples/health/get-failed-jobs.md +1 -1
- package/docs/examples/health/get-pub-sub.md +1 -1
- package/docs/examples/health/get-queue-billing-aggregation.md +1 -1
- package/docs/examples/health/get-queue-builds.md +1 -1
- package/docs/examples/health/get-queue-certificates.md +1 -1
- package/docs/examples/health/get-queue-databases.md +1 -1
- package/docs/examples/health/get-queue-deletes.md +1 -1
- package/docs/examples/health/get-queue-functions.md +1 -1
- package/docs/examples/health/get-queue-logs.md +1 -1
- package/docs/examples/health/get-queue-mails.md +1 -1
- package/docs/examples/health/get-queue-messaging.md +1 -1
- package/docs/examples/health/get-queue-migrations.md +1 -1
- package/docs/examples/health/get-queue-priority-builds.md +1 -1
- package/docs/examples/health/get-queue-region-manager.md +13 -0
- package/docs/examples/health/get-queue-stats-resources.md +1 -1
- package/docs/examples/health/get-queue-usage.md +1 -1
- package/docs/examples/health/get-queue-webhooks.md +1 -1
- package/docs/examples/health/get-storage-local.md +1 -1
- package/docs/examples/health/get-storage.md +1 -1
- package/docs/examples/health/get-time.md +1 -1
- package/docs/examples/health/get.md +1 -1
- package/docs/examples/locale/get.md +1 -1
- package/docs/examples/locale/list-codes.md +1 -1
- package/docs/examples/locale/list-continents.md +1 -1
- package/docs/examples/locale/list-countries-e-u.md +1 -1
- package/docs/examples/locale/list-countries-phones.md +1 -1
- package/docs/examples/locale/list-countries.md +1 -1
- package/docs/examples/locale/list-currencies.md +1 -1
- package/docs/examples/locale/list-languages.md +1 -1
- package/docs/examples/messaging/create-apns-provider.md +1 -1
- package/docs/examples/messaging/create-email.md +1 -1
- package/docs/examples/messaging/create-fcm-provider.md +1 -1
- package/docs/examples/messaging/create-mailgun-provider.md +1 -1
- package/docs/examples/messaging/create-msg91provider.md +1 -1
- package/docs/examples/messaging/create-push.md +1 -1
- package/docs/examples/messaging/create-sendgrid-provider.md +1 -1
- package/docs/examples/messaging/create-sms.md +1 -1
- package/docs/examples/messaging/create-smtp-provider.md +1 -1
- package/docs/examples/messaging/create-subscriber.md +1 -1
- package/docs/examples/messaging/create-telesign-provider.md +1 -1
- package/docs/examples/messaging/create-textmagic-provider.md +1 -1
- package/docs/examples/messaging/create-topic.md +1 -1
- package/docs/examples/messaging/create-twilio-provider.md +1 -1
- package/docs/examples/messaging/create-vonage-provider.md +1 -1
- package/docs/examples/messaging/delete-provider.md +1 -1
- package/docs/examples/messaging/delete-subscriber.md +1 -1
- package/docs/examples/messaging/delete-topic.md +1 -1
- package/docs/examples/messaging/delete.md +1 -1
- package/docs/examples/messaging/get-message.md +1 -1
- package/docs/examples/messaging/get-provider.md +1 -1
- package/docs/examples/messaging/get-subscriber.md +1 -1
- package/docs/examples/messaging/get-topic.md +1 -1
- package/docs/examples/messaging/list-message-logs.md +1 -1
- package/docs/examples/messaging/list-messages.md +1 -1
- package/docs/examples/messaging/list-provider-logs.md +1 -1
- package/docs/examples/messaging/list-providers.md +1 -1
- package/docs/examples/messaging/list-subscriber-logs.md +1 -1
- package/docs/examples/messaging/list-subscribers.md +1 -1
- package/docs/examples/messaging/list-targets.md +1 -1
- package/docs/examples/messaging/list-topic-logs.md +1 -1
- package/docs/examples/messaging/list-topics.md +1 -1
- package/docs/examples/messaging/update-apns-provider.md +1 -1
- package/docs/examples/messaging/update-email.md +1 -1
- package/docs/examples/messaging/update-fcm-provider.md +1 -1
- package/docs/examples/messaging/update-mailgun-provider.md +1 -1
- package/docs/examples/messaging/update-msg91provider.md +1 -1
- package/docs/examples/messaging/update-push.md +1 -1
- package/docs/examples/messaging/update-sendgrid-provider.md +1 -1
- package/docs/examples/messaging/update-sms.md +1 -1
- package/docs/examples/messaging/update-smtp-provider.md +1 -1
- package/docs/examples/messaging/update-telesign-provider.md +1 -1
- package/docs/examples/messaging/update-textmagic-provider.md +1 -1
- package/docs/examples/messaging/update-topic.md +1 -1
- package/docs/examples/messaging/update-twilio-provider.md +1 -1
- package/docs/examples/messaging/update-vonage-provider.md +1 -1
- package/docs/examples/migrations/create-appwrite-migration.md +1 -1
- package/docs/examples/migrations/create-csv-migration.md +15 -0
- package/docs/examples/migrations/create-firebase-migration.md +1 -1
- package/docs/examples/migrations/create-n-host-migration.md +1 -1
- package/docs/examples/migrations/create-supabase-migration.md +1 -1
- package/docs/examples/migrations/delete.md +1 -1
- package/docs/examples/migrations/get-appwrite-report.md +1 -1
- package/docs/examples/migrations/get-firebase-report.md +1 -1
- package/docs/examples/migrations/get-n-host-report.md +1 -1
- package/docs/examples/migrations/get-supabase-report.md +1 -1
- package/docs/examples/migrations/get.md +1 -1
- package/docs/examples/migrations/list.md +1 -1
- package/docs/examples/migrations/retry.md +1 -1
- package/docs/examples/organizations/add-credit.md +1 -1
- package/docs/examples/organizations/create-invoice-payment.md +1 -1
- package/docs/examples/organizations/create.md +1 -1
- package/docs/examples/organizations/delete-backup-payment-method.md +1 -1
- package/docs/examples/organizations/delete-billing-address.md +1 -1
- package/docs/examples/organizations/delete-default-payment-method.md +1 -1
- package/docs/examples/organizations/delete.md +1 -1
- package/docs/examples/organizations/get-aggregation.md +1 -1
- package/docs/examples/organizations/get-billing-address.md +1 -1
- package/docs/examples/organizations/get-credit.md +1 -1
- package/docs/examples/organizations/get-invoice-download.md +1 -1
- package/docs/examples/organizations/get-invoice-view.md +1 -1
- package/docs/examples/organizations/get-invoice.md +1 -1
- package/docs/examples/organizations/get-payment-method.md +1 -1
- package/docs/examples/organizations/get-plan.md +1 -1
- package/docs/examples/organizations/get-scopes.md +1 -1
- package/docs/examples/organizations/list-aggregations.md +1 -1
- package/docs/examples/organizations/list-credits.md +1 -1
- package/docs/examples/organizations/list-invoices.md +1 -1
- package/docs/examples/organizations/list.md +1 -1
- package/docs/examples/organizations/set-backup-payment-method.md +1 -1
- package/docs/examples/organizations/set-billing-address.md +1 -1
- package/docs/examples/organizations/set-billing-email.md +1 -1
- package/docs/examples/organizations/set-billing-tax-id.md +1 -1
- package/docs/examples/organizations/set-default-payment-method.md +1 -1
- package/docs/examples/organizations/update-budget.md +1 -1
- package/docs/examples/organizations/update-plan.md +1 -1
- package/docs/examples/organizations/validate-invoice.md +14 -0
- package/docs/examples/project/create-variable.md +3 -2
- package/docs/examples/project/delete-variable.md +1 -1
- package/docs/examples/project/get-usage.md +1 -1
- package/docs/examples/project/get-variable.md +1 -1
- package/docs/examples/project/list-variables.md +1 -1
- package/docs/examples/project/update-variable.md +3 -2
- package/docs/examples/projects/create-dev-key.md +15 -0
- package/docs/examples/projects/create-j-w-t.md +1 -1
- package/docs/examples/projects/create-key.md +1 -1
- package/docs/examples/projects/create-platform.md +1 -1
- package/docs/examples/projects/create-smtp-test.md +1 -1
- package/docs/examples/projects/create-webhook.md +1 -1
- package/docs/examples/projects/create.md +2 -2
- package/docs/examples/projects/delete-dev-key.md +14 -0
- package/docs/examples/projects/delete-email-template.md +1 -1
- package/docs/examples/projects/delete-key.md +1 -1
- package/docs/examples/projects/delete-platform.md +1 -1
- package/docs/examples/projects/delete-sms-template.md +1 -1
- package/docs/examples/projects/delete-webhook.md +1 -1
- package/docs/examples/projects/delete.md +1 -1
- package/docs/examples/projects/get-dev-key.md +14 -0
- package/docs/examples/projects/get-email-template.md +1 -1
- package/docs/examples/projects/get-key.md +1 -1
- package/docs/examples/projects/get-platform.md +1 -1
- package/docs/examples/projects/get-sms-template.md +1 -1
- package/docs/examples/projects/get-webhook.md +1 -1
- package/docs/examples/projects/get.md +1 -1
- package/docs/examples/projects/list-dev-keys.md +14 -0
- package/docs/examples/projects/list-keys.md +1 -1
- package/docs/examples/projects/list-platforms.md +1 -1
- package/docs/examples/projects/list-webhooks.md +1 -1
- package/docs/examples/projects/list.md +1 -1
- package/docs/examples/projects/update-api-status-all.md +1 -1
- package/docs/examples/projects/update-api-status.md +1 -1
- package/docs/examples/projects/update-auth-duration.md +1 -1
- package/docs/examples/projects/update-auth-limit.md +1 -1
- package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
- package/docs/examples/projects/update-auth-password-history.md +1 -1
- package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
- package/docs/examples/projects/update-auth-status.md +1 -1
- package/docs/examples/projects/update-dev-key.md +16 -0
- package/docs/examples/projects/update-email-template.md +1 -1
- package/docs/examples/projects/update-key.md +1 -1
- package/docs/examples/projects/update-memberships-privacy.md +1 -1
- package/docs/examples/projects/update-mock-numbers.md +1 -1
- package/docs/examples/projects/update-o-auth2.md +1 -1
- package/docs/examples/projects/update-personal-data-check.md +1 -1
- package/docs/examples/projects/update-platform.md +1 -1
- package/docs/examples/projects/update-service-status-all.md +1 -1
- package/docs/examples/projects/update-service-status.md +1 -1
- package/docs/examples/projects/update-session-alerts.md +1 -1
- package/docs/examples/projects/update-sms-template.md +1 -1
- package/docs/examples/projects/update-smtp.md +1 -1
- package/docs/examples/projects/update-team.md +1 -1
- package/docs/examples/projects/update-webhook-signature.md +1 -1
- package/docs/examples/projects/update-webhook.md +1 -1
- package/docs/examples/projects/update.md +1 -1
- package/docs/examples/proxy/create-a-p-i-rule.md +13 -0
- package/docs/examples/proxy/create-function-rule.md +15 -0
- package/docs/examples/proxy/create-redirect-rule.md +15 -0
- package/docs/examples/proxy/create-site-rule.md +15 -0
- package/docs/examples/proxy/delete-rule.md +1 -1
- package/docs/examples/proxy/get-rule.md +1 -1
- package/docs/examples/proxy/list-rules.md +1 -1
- package/docs/examples/proxy/update-rule-verification.md +1 -1
- package/docs/examples/sites/create-deployment.md +18 -0
- package/docs/examples/sites/create-duplicate-deployment.md +14 -0
- package/docs/examples/sites/create-template-deployment.md +18 -0
- package/docs/examples/sites/create-variable.md +16 -0
- package/docs/examples/sites/create-vcs-deployment.md +16 -0
- package/docs/examples/sites/create.md +30 -0
- package/docs/examples/sites/delete-deployment.md +14 -0
- package/docs/examples/sites/delete-log.md +14 -0
- package/docs/examples/sites/delete-variable.md +14 -0
- package/docs/examples/sites/delete.md +13 -0
- package/docs/examples/sites/get-deployment-download.md +15 -0
- package/docs/examples/sites/get-deployment.md +14 -0
- package/docs/examples/sites/get-log.md +14 -0
- package/docs/examples/sites/get-template.md +13 -0
- package/docs/examples/sites/get-usage.md +14 -0
- package/docs/examples/sites/get-variable.md +14 -0
- package/docs/examples/sites/get.md +13 -0
- package/docs/examples/sites/list-deployments.md +15 -0
- package/docs/examples/sites/list-frameworks.md +11 -0
- package/docs/examples/sites/list-logs.md +14 -0
- package/docs/examples/sites/list-specifications.md +11 -0
- package/docs/examples/sites/list-templates.md +16 -0
- package/docs/examples/sites/list-usage.md +13 -0
- package/docs/examples/sites/list-variables.md +13 -0
- package/docs/examples/sites/list.md +14 -0
- package/docs/examples/sites/update-deployment-status.md +14 -0
- package/docs/examples/sites/update-site-deployment.md +14 -0
- package/docs/examples/sites/update-variable.md +17 -0
- package/docs/examples/sites/update.md +30 -0
- package/docs/examples/storage/create-bucket.md +1 -1
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/storage/delete-bucket.md +1 -1
- package/docs/examples/storage/delete-file.md +1 -1
- package/docs/examples/storage/get-bucket-usage.md +1 -1
- package/docs/examples/storage/get-bucket.md +1 -1
- package/docs/examples/storage/get-file-download.md +3 -2
- package/docs/examples/storage/get-file-preview.md +4 -3
- package/docs/examples/storage/get-file-view.md +3 -2
- package/docs/examples/storage/get-file.md +1 -1
- package/docs/examples/storage/get-usage.md +1 -1
- package/docs/examples/storage/list-buckets.md +1 -1
- package/docs/examples/storage/list-files.md +1 -1
- package/docs/examples/storage/update-bucket.md +1 -1
- package/docs/examples/storage/update-file.md +1 -1
- package/docs/examples/teams/create-membership.md +1 -1
- package/docs/examples/teams/create.md +1 -1
- package/docs/examples/teams/delete-membership.md +1 -1
- package/docs/examples/teams/delete.md +1 -1
- package/docs/examples/teams/get-membership.md +1 -1
- package/docs/examples/teams/get-prefs.md +1 -1
- package/docs/examples/teams/get.md +1 -1
- package/docs/examples/teams/list-logs.md +1 -1
- package/docs/examples/teams/list-memberships.md +1 -1
- package/docs/examples/teams/list.md +1 -1
- package/docs/examples/teams/update-membership-status.md +1 -1
- package/docs/examples/teams/update-membership.md +1 -1
- package/docs/examples/teams/update-name.md +1 -1
- package/docs/examples/teams/update-prefs.md +1 -1
- package/docs/examples/tokens/create-file-token.md +15 -0
- package/docs/examples/tokens/delete.md +13 -0
- package/docs/examples/tokens/get.md +13 -0
- package/docs/examples/tokens/list.md +15 -0
- package/docs/examples/tokens/update.md +14 -0
- package/docs/examples/users/create-argon2user.md +1 -1
- package/docs/examples/users/create-bcrypt-user.md +1 -1
- package/docs/examples/users/create-j-w-t.md +1 -1
- package/docs/examples/users/create-m-d5user.md +1 -1
- package/docs/examples/users/create-mfa-recovery-codes.md +1 -1
- package/docs/examples/users/create-p-h-pass-user.md +1 -1
- package/docs/examples/users/create-s-h-a-user.md +1 -1
- package/docs/examples/users/create-scrypt-modified-user.md +1 -1
- package/docs/examples/users/create-scrypt-user.md +1 -1
- package/docs/examples/users/create-session.md +1 -1
- package/docs/examples/users/create-target.md +1 -1
- package/docs/examples/users/create-token.md +1 -1
- package/docs/examples/users/create.md +1 -1
- package/docs/examples/users/delete-identity.md +1 -1
- package/docs/examples/users/delete-mfa-authenticator.md +1 -1
- package/docs/examples/users/delete-session.md +1 -1
- package/docs/examples/users/delete-sessions.md +1 -1
- package/docs/examples/users/delete-target.md +1 -1
- package/docs/examples/users/delete.md +1 -1
- package/docs/examples/users/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/users/get-prefs.md +1 -1
- package/docs/examples/users/get-target.md +1 -1
- package/docs/examples/users/get-usage.md +1 -1
- package/docs/examples/users/get.md +1 -1
- package/docs/examples/users/list-identities.md +1 -1
- package/docs/examples/users/list-logs.md +1 -1
- package/docs/examples/users/list-memberships.md +4 -2
- package/docs/examples/users/list-mfa-factors.md +1 -1
- package/docs/examples/users/list-sessions.md +1 -1
- package/docs/examples/users/list-targets.md +1 -1
- package/docs/examples/users/list.md +1 -1
- package/docs/examples/users/update-email-verification.md +1 -1
- package/docs/examples/users/update-email.md +1 -1
- package/docs/examples/users/update-labels.md +1 -1
- package/docs/examples/users/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/users/update-mfa.md +1 -1
- package/docs/examples/users/update-name.md +1 -1
- package/docs/examples/users/update-password.md +1 -1
- package/docs/examples/users/update-phone-verification.md +1 -1
- package/docs/examples/users/update-phone.md +1 -1
- package/docs/examples/users/update-prefs.md +1 -1
- package/docs/examples/users/update-status.md +1 -1
- package/docs/examples/users/update-target.md +1 -1
- package/docs/examples/vcs/create-repository-detection.md +3 -2
- package/docs/examples/vcs/create-repository.md +1 -1
- package/docs/examples/vcs/delete-installation.md +1 -1
- package/docs/examples/vcs/get-installation.md +1 -1
- package/docs/examples/vcs/get-repository-contents.md +1 -1
- package/docs/examples/vcs/get-repository.md +1 -1
- package/docs/examples/vcs/list-installations.md +1 -1
- package/docs/examples/vcs/list-repositories.md +3 -2
- package/docs/examples/vcs/list-repository-branches.md +1 -1
- package/docs/examples/vcs/update-external-deployments.md +1 -1
- package/package.json +1 -1
- package/src/client.ts +32 -5
- package/src/enums/adapter.ts +4 -0
- package/src/enums/api-service.ts +1 -0
- package/src/enums/build-runtime.ts +62 -0
- package/src/enums/console-resource-type.ts +3 -0
- package/src/enums/deployment-download-type.ts +4 -0
- package/src/enums/framework.ts +16 -0
- package/src/enums/image-format.ts +0 -1
- package/src/enums/name.ts +0 -1
- package/src/enums/o-auth-provider.ts +1 -0
- package/src/enums/region.ts +2 -1
- package/src/enums/runtime.ts +4 -3
- package/src/enums/site-usage-range.ts +5 -0
- package/src/enums/status-code.ts +6 -0
- package/src/enums/v-c-s-deployment-type.ts +5 -0
- package/src/enums/v-c-s-detection-type.ts +4 -0
- package/src/index.ts +13 -2
- package/src/models.ts +1171 -188
- package/src/services/account.ts +126 -446
- package/src/services/assistant.ts +2 -7
- package/src/services/avatars.ts +7 -28
- package/src/services/backups.ts +24 -90
- package/src/services/console.ts +48 -52
- package/src/services/databases.ts +241 -350
- package/src/services/domains.ts +1821 -0
- package/src/services/functions.ts +216 -248
- package/src/services/graphql.ts +4 -14
- package/src/services/health.ts +56 -206
- package/src/services/locale.ts +16 -64
- package/src/services/messaging.ts +92 -335
- package/src/services/migrations.ts +66 -89
- package/src/services/organizations.ts +84 -241
- package/src/services/project.ts +20 -45
- package/src/services/projects.ts +262 -330
- package/src/services/proxy.ts +129 -44
- package/src/services/sites.ts +1104 -0
- package/src/services/storage.ts +42 -105
- package/src/services/teams.ts +28 -104
- package/src/services/tokens.ts +160 -0
- package/src/services/users.ts +94 -313
- package/src/services/vcs.ts +70 -108
- package/types/enums/adapter.d.ts +4 -0
- package/types/enums/api-service.d.ts +1 -0
- package/types/enums/build-runtime.d.ts +62 -0
- package/types/enums/console-resource-type.d.ts +3 -0
- package/types/enums/deployment-download-type.d.ts +4 -0
- package/types/enums/framework.d.ts +16 -0
- package/types/enums/image-format.d.ts +0 -1
- package/types/enums/name.d.ts +0 -1
- package/types/enums/o-auth-provider.d.ts +1 -0
- package/types/enums/region.d.ts +3 -2
- package/types/enums/runtime.d.ts +5 -4
- package/types/enums/site-usage-range.d.ts +5 -0
- package/types/enums/status-code.d.ts +6 -0
- package/types/enums/v-c-s-deployment-type.d.ts +5 -0
- package/types/enums/v-c-s-detection-type.d.ts +4 -0
- package/types/index.d.ts +13 -2
- package/types/models.d.ts +1171 -188
- package/types/services/account.d.ts +4 -128
- package/types/services/assistant.d.ts +0 -2
- package/types/services/avatars.d.ts +0 -14
- package/types/services/backups.d.ts +0 -24
- package/types/services/console.d.ts +9 -13
- package/types/services/databases.d.ts +43 -97
- package/types/services/domains.d.ts +524 -0
- package/types/services/functions.d.ts +58 -84
- package/types/services/graphql.d.ts +0 -4
- package/types/services/health.d.ts +6 -56
- package/types/services/locale.d.ts +0 -16
- package/types/services/messaging.d.ts +0 -92
- package/types/services/migrations.d.ts +9 -23
- package/types/services/organizations.d.ts +11 -68
- package/types/services/project.d.ts +4 -14
- package/types/services/projects.d.ts +47 -91
- package/types/services/proxy.d.ts +31 -13
- package/types/services/sites.d.ts +319 -0
- package/types/services/storage.d.ts +6 -33
- package/types/services/teams.d.ts +0 -28
- package/types/services/tokens.d.ts +51 -0
- package/types/services/users.d.ts +3 -87
- package/types/services/vcs.d.ts +14 -31
package/src/services/users.ts
CHANGED
|
@@ -14,8 +14,6 @@ export class Users {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* List users
|
|
18
|
-
*
|
|
19
17
|
* Get a list of all the project's users. You can use the query params to filter your results.
|
|
20
18
|
*
|
|
21
19
|
* @param {string[]} queries
|
|
@@ -23,7 +21,7 @@ export class Users {
|
|
|
23
21
|
* @throws {AppwriteException}
|
|
24
22
|
* @returns {Promise<Models.UserList<Preferences>>}
|
|
25
23
|
*/
|
|
26
|
-
|
|
24
|
+
list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.UserList<Preferences>> {
|
|
27
25
|
const apiPath = '/users';
|
|
28
26
|
const payload: Payload = {};
|
|
29
27
|
if (typeof queries !== 'undefined') {
|
|
@@ -35,13 +33,9 @@ export class Users {
|
|
|
35
33
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
36
34
|
|
|
37
35
|
const apiHeaders: { [header: string]: string } = {
|
|
38
|
-
'content-type': 'application/json',
|
|
39
36
|
}
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return await this.client.call(
|
|
38
|
+
return this.client.call(
|
|
45
39
|
'get',
|
|
46
40
|
uri,
|
|
47
41
|
apiHeaders,
|
|
@@ -49,8 +43,6 @@ export class Users {
|
|
|
49
43
|
);
|
|
50
44
|
}
|
|
51
45
|
/**
|
|
52
|
-
* Create user
|
|
53
|
-
*
|
|
54
46
|
* Create a new user.
|
|
55
47
|
*
|
|
56
48
|
* @param {string} userId
|
|
@@ -61,7 +53,7 @@ export class Users {
|
|
|
61
53
|
* @throws {AppwriteException}
|
|
62
54
|
* @returns {Promise<Models.User<Preferences>>}
|
|
63
55
|
*/
|
|
64
|
-
|
|
56
|
+
create<Preferences extends Models.Preferences>(userId: string, email?: string, phone?: string, password?: string, name?: string): Promise<Models.User<Preferences>> {
|
|
65
57
|
if (typeof userId === 'undefined') {
|
|
66
58
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
67
59
|
}
|
|
@@ -88,10 +80,7 @@ export class Users {
|
|
|
88
80
|
'content-type': 'application/json',
|
|
89
81
|
}
|
|
90
82
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return await this.client.call(
|
|
83
|
+
return this.client.call(
|
|
95
84
|
'post',
|
|
96
85
|
uri,
|
|
97
86
|
apiHeaders,
|
|
@@ -99,8 +88,6 @@ export class Users {
|
|
|
99
88
|
);
|
|
100
89
|
}
|
|
101
90
|
/**
|
|
102
|
-
* Create user with Argon2 password
|
|
103
|
-
*
|
|
104
91
|
* Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
105
92
|
*
|
|
106
93
|
* @param {string} userId
|
|
@@ -110,7 +97,7 @@ export class Users {
|
|
|
110
97
|
* @throws {AppwriteException}
|
|
111
98
|
* @returns {Promise<Models.User<Preferences>>}
|
|
112
99
|
*/
|
|
113
|
-
|
|
100
|
+
createArgon2User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
|
|
114
101
|
if (typeof userId === 'undefined') {
|
|
115
102
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
116
103
|
}
|
|
@@ -140,10 +127,7 @@ export class Users {
|
|
|
140
127
|
'content-type': 'application/json',
|
|
141
128
|
}
|
|
142
129
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
return await this.client.call(
|
|
130
|
+
return this.client.call(
|
|
147
131
|
'post',
|
|
148
132
|
uri,
|
|
149
133
|
apiHeaders,
|
|
@@ -151,8 +135,6 @@ export class Users {
|
|
|
151
135
|
);
|
|
152
136
|
}
|
|
153
137
|
/**
|
|
154
|
-
* Create user with bcrypt password
|
|
155
|
-
*
|
|
156
138
|
* Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
157
139
|
*
|
|
158
140
|
* @param {string} userId
|
|
@@ -162,7 +144,7 @@ export class Users {
|
|
|
162
144
|
* @throws {AppwriteException}
|
|
163
145
|
* @returns {Promise<Models.User<Preferences>>}
|
|
164
146
|
*/
|
|
165
|
-
|
|
147
|
+
createBcryptUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
|
|
166
148
|
if (typeof userId === 'undefined') {
|
|
167
149
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
168
150
|
}
|
|
@@ -192,10 +174,7 @@ export class Users {
|
|
|
192
174
|
'content-type': 'application/json',
|
|
193
175
|
}
|
|
194
176
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
return await this.client.call(
|
|
177
|
+
return this.client.call(
|
|
199
178
|
'post',
|
|
200
179
|
uri,
|
|
201
180
|
apiHeaders,
|
|
@@ -203,8 +182,6 @@ export class Users {
|
|
|
203
182
|
);
|
|
204
183
|
}
|
|
205
184
|
/**
|
|
206
|
-
* List identities
|
|
207
|
-
*
|
|
208
185
|
* Get identities for all users.
|
|
209
186
|
*
|
|
210
187
|
* @param {string[]} queries
|
|
@@ -212,7 +189,7 @@ export class Users {
|
|
|
212
189
|
* @throws {AppwriteException}
|
|
213
190
|
* @returns {Promise<Models.IdentityList>}
|
|
214
191
|
*/
|
|
215
|
-
|
|
192
|
+
listIdentities(queries?: string[], search?: string): Promise<Models.IdentityList> {
|
|
216
193
|
const apiPath = '/users/identities';
|
|
217
194
|
const payload: Payload = {};
|
|
218
195
|
if (typeof queries !== 'undefined') {
|
|
@@ -224,13 +201,9 @@ export class Users {
|
|
|
224
201
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
225
202
|
|
|
226
203
|
const apiHeaders: { [header: string]: string } = {
|
|
227
|
-
'content-type': 'application/json',
|
|
228
204
|
}
|
|
229
205
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
return await this.client.call(
|
|
206
|
+
return this.client.call(
|
|
234
207
|
'get',
|
|
235
208
|
uri,
|
|
236
209
|
apiHeaders,
|
|
@@ -238,15 +211,13 @@ export class Users {
|
|
|
238
211
|
);
|
|
239
212
|
}
|
|
240
213
|
/**
|
|
241
|
-
* Delete identity
|
|
242
|
-
*
|
|
243
214
|
* Delete an identity by its unique ID.
|
|
244
215
|
*
|
|
245
216
|
* @param {string} identityId
|
|
246
217
|
* @throws {AppwriteException}
|
|
247
218
|
* @returns {Promise<{}>}
|
|
248
219
|
*/
|
|
249
|
-
|
|
220
|
+
deleteIdentity(identityId: string): Promise<{}> {
|
|
250
221
|
if (typeof identityId === 'undefined') {
|
|
251
222
|
throw new AppwriteException('Missing required parameter: "identityId"');
|
|
252
223
|
}
|
|
@@ -258,10 +229,7 @@ export class Users {
|
|
|
258
229
|
'content-type': 'application/json',
|
|
259
230
|
}
|
|
260
231
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
return await this.client.call(
|
|
232
|
+
return this.client.call(
|
|
265
233
|
'delete',
|
|
266
234
|
uri,
|
|
267
235
|
apiHeaders,
|
|
@@ -269,8 +237,6 @@ export class Users {
|
|
|
269
237
|
);
|
|
270
238
|
}
|
|
271
239
|
/**
|
|
272
|
-
* Create user with MD5 password
|
|
273
|
-
*
|
|
274
240
|
* Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
275
241
|
*
|
|
276
242
|
* @param {string} userId
|
|
@@ -280,7 +246,7 @@ export class Users {
|
|
|
280
246
|
* @throws {AppwriteException}
|
|
281
247
|
* @returns {Promise<Models.User<Preferences>>}
|
|
282
248
|
*/
|
|
283
|
-
|
|
249
|
+
createMD5User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
|
|
284
250
|
if (typeof userId === 'undefined') {
|
|
285
251
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
286
252
|
}
|
|
@@ -310,10 +276,7 @@ export class Users {
|
|
|
310
276
|
'content-type': 'application/json',
|
|
311
277
|
}
|
|
312
278
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
return await this.client.call(
|
|
279
|
+
return this.client.call(
|
|
317
280
|
'post',
|
|
318
281
|
uri,
|
|
319
282
|
apiHeaders,
|
|
@@ -321,8 +284,6 @@ export class Users {
|
|
|
321
284
|
);
|
|
322
285
|
}
|
|
323
286
|
/**
|
|
324
|
-
* Create user with PHPass password
|
|
325
|
-
*
|
|
326
287
|
* Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
327
288
|
*
|
|
328
289
|
* @param {string} userId
|
|
@@ -332,7 +293,7 @@ export class Users {
|
|
|
332
293
|
* @throws {AppwriteException}
|
|
333
294
|
* @returns {Promise<Models.User<Preferences>>}
|
|
334
295
|
*/
|
|
335
|
-
|
|
296
|
+
createPHPassUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
|
|
336
297
|
if (typeof userId === 'undefined') {
|
|
337
298
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
338
299
|
}
|
|
@@ -362,10 +323,7 @@ export class Users {
|
|
|
362
323
|
'content-type': 'application/json',
|
|
363
324
|
}
|
|
364
325
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
return await this.client.call(
|
|
326
|
+
return this.client.call(
|
|
369
327
|
'post',
|
|
370
328
|
uri,
|
|
371
329
|
apiHeaders,
|
|
@@ -373,8 +331,6 @@ export class Users {
|
|
|
373
331
|
);
|
|
374
332
|
}
|
|
375
333
|
/**
|
|
376
|
-
* Create user with Scrypt password
|
|
377
|
-
*
|
|
378
334
|
* Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
379
335
|
*
|
|
380
336
|
* @param {string} userId
|
|
@@ -389,7 +345,7 @@ export class Users {
|
|
|
389
345
|
* @throws {AppwriteException}
|
|
390
346
|
* @returns {Promise<Models.User<Preferences>>}
|
|
391
347
|
*/
|
|
392
|
-
|
|
348
|
+
createScryptUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordSalt: string, passwordCpu: number, passwordMemory: number, passwordParallel: number, passwordLength: number, name?: string): Promise<Models.User<Preferences>> {
|
|
393
349
|
if (typeof userId === 'undefined') {
|
|
394
350
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
395
351
|
}
|
|
@@ -449,10 +405,7 @@ export class Users {
|
|
|
449
405
|
'content-type': 'application/json',
|
|
450
406
|
}
|
|
451
407
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
return await this.client.call(
|
|
408
|
+
return this.client.call(
|
|
456
409
|
'post',
|
|
457
410
|
uri,
|
|
458
411
|
apiHeaders,
|
|
@@ -460,8 +413,6 @@ export class Users {
|
|
|
460
413
|
);
|
|
461
414
|
}
|
|
462
415
|
/**
|
|
463
|
-
* Create user with Scrypt modified password
|
|
464
|
-
*
|
|
465
416
|
* Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
466
417
|
*
|
|
467
418
|
* @param {string} userId
|
|
@@ -474,7 +425,7 @@ export class Users {
|
|
|
474
425
|
* @throws {AppwriteException}
|
|
475
426
|
* @returns {Promise<Models.User<Preferences>>}
|
|
476
427
|
*/
|
|
477
|
-
|
|
428
|
+
createScryptModifiedUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordSalt: string, passwordSaltSeparator: string, passwordSignerKey: string, name?: string): Promise<Models.User<Preferences>> {
|
|
478
429
|
if (typeof userId === 'undefined') {
|
|
479
430
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
480
431
|
}
|
|
@@ -522,10 +473,7 @@ export class Users {
|
|
|
522
473
|
'content-type': 'application/json',
|
|
523
474
|
}
|
|
524
475
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
return await this.client.call(
|
|
476
|
+
return this.client.call(
|
|
529
477
|
'post',
|
|
530
478
|
uri,
|
|
531
479
|
apiHeaders,
|
|
@@ -533,8 +481,6 @@ export class Users {
|
|
|
533
481
|
);
|
|
534
482
|
}
|
|
535
483
|
/**
|
|
536
|
-
* Create user with SHA password
|
|
537
|
-
*
|
|
538
484
|
* Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
539
485
|
*
|
|
540
486
|
* @param {string} userId
|
|
@@ -545,7 +491,7 @@ export class Users {
|
|
|
545
491
|
* @throws {AppwriteException}
|
|
546
492
|
* @returns {Promise<Models.User<Preferences>>}
|
|
547
493
|
*/
|
|
548
|
-
|
|
494
|
+
createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string): Promise<Models.User<Preferences>> {
|
|
549
495
|
if (typeof userId === 'undefined') {
|
|
550
496
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
551
497
|
}
|
|
@@ -578,10 +524,7 @@ export class Users {
|
|
|
578
524
|
'content-type': 'application/json',
|
|
579
525
|
}
|
|
580
526
|
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
return await this.client.call(
|
|
527
|
+
return this.client.call(
|
|
585
528
|
'post',
|
|
586
529
|
uri,
|
|
587
530
|
apiHeaders,
|
|
@@ -589,8 +532,6 @@ export class Users {
|
|
|
589
532
|
);
|
|
590
533
|
}
|
|
591
534
|
/**
|
|
592
|
-
* Get users usage stats
|
|
593
|
-
*
|
|
594
535
|
* Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
595
536
|
|
|
596
537
|
*
|
|
@@ -598,7 +539,7 @@ export class Users {
|
|
|
598
539
|
* @throws {AppwriteException}
|
|
599
540
|
* @returns {Promise<Models.UsageUsers>}
|
|
600
541
|
*/
|
|
601
|
-
|
|
542
|
+
getUsage(range?: UserUsageRange): Promise<Models.UsageUsers> {
|
|
602
543
|
const apiPath = '/users/usage';
|
|
603
544
|
const payload: Payload = {};
|
|
604
545
|
if (typeof range !== 'undefined') {
|
|
@@ -607,13 +548,9 @@ export class Users {
|
|
|
607
548
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
608
549
|
|
|
609
550
|
const apiHeaders: { [header: string]: string } = {
|
|
610
|
-
'content-type': 'application/json',
|
|
611
551
|
}
|
|
612
552
|
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
return await this.client.call(
|
|
553
|
+
return this.client.call(
|
|
617
554
|
'get',
|
|
618
555
|
uri,
|
|
619
556
|
apiHeaders,
|
|
@@ -621,15 +558,13 @@ export class Users {
|
|
|
621
558
|
);
|
|
622
559
|
}
|
|
623
560
|
/**
|
|
624
|
-
* Get user
|
|
625
|
-
*
|
|
626
561
|
* Get a user by its unique ID.
|
|
627
562
|
*
|
|
628
563
|
* @param {string} userId
|
|
629
564
|
* @throws {AppwriteException}
|
|
630
565
|
* @returns {Promise<Models.User<Preferences>>}
|
|
631
566
|
*/
|
|
632
|
-
|
|
567
|
+
get<Preferences extends Models.Preferences>(userId: string): Promise<Models.User<Preferences>> {
|
|
633
568
|
if (typeof userId === 'undefined') {
|
|
634
569
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
635
570
|
}
|
|
@@ -638,13 +573,9 @@ export class Users {
|
|
|
638
573
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
639
574
|
|
|
640
575
|
const apiHeaders: { [header: string]: string } = {
|
|
641
|
-
'content-type': 'application/json',
|
|
642
576
|
}
|
|
643
577
|
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
return await this.client.call(
|
|
578
|
+
return this.client.call(
|
|
648
579
|
'get',
|
|
649
580
|
uri,
|
|
650
581
|
apiHeaders,
|
|
@@ -652,15 +583,13 @@ export class Users {
|
|
|
652
583
|
);
|
|
653
584
|
}
|
|
654
585
|
/**
|
|
655
|
-
* Delete user
|
|
656
|
-
*
|
|
657
586
|
* Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead.
|
|
658
587
|
*
|
|
659
588
|
* @param {string} userId
|
|
660
589
|
* @throws {AppwriteException}
|
|
661
590
|
* @returns {Promise<{}>}
|
|
662
591
|
*/
|
|
663
|
-
|
|
592
|
+
delete(userId: string): Promise<{}> {
|
|
664
593
|
if (typeof userId === 'undefined') {
|
|
665
594
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
666
595
|
}
|
|
@@ -672,10 +601,7 @@ export class Users {
|
|
|
672
601
|
'content-type': 'application/json',
|
|
673
602
|
}
|
|
674
603
|
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
return await this.client.call(
|
|
604
|
+
return this.client.call(
|
|
679
605
|
'delete',
|
|
680
606
|
uri,
|
|
681
607
|
apiHeaders,
|
|
@@ -683,8 +609,6 @@ export class Users {
|
|
|
683
609
|
);
|
|
684
610
|
}
|
|
685
611
|
/**
|
|
686
|
-
* Update email
|
|
687
|
-
*
|
|
688
612
|
* Update the user email by its unique ID.
|
|
689
613
|
*
|
|
690
614
|
* @param {string} userId
|
|
@@ -692,7 +616,7 @@ export class Users {
|
|
|
692
616
|
* @throws {AppwriteException}
|
|
693
617
|
* @returns {Promise<Models.User<Preferences>>}
|
|
694
618
|
*/
|
|
695
|
-
|
|
619
|
+
updateEmail<Preferences extends Models.Preferences>(userId: string, email: string): Promise<Models.User<Preferences>> {
|
|
696
620
|
if (typeof userId === 'undefined') {
|
|
697
621
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
698
622
|
}
|
|
@@ -710,10 +634,7 @@ export class Users {
|
|
|
710
634
|
'content-type': 'application/json',
|
|
711
635
|
}
|
|
712
636
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
return await this.client.call(
|
|
637
|
+
return this.client.call(
|
|
717
638
|
'patch',
|
|
718
639
|
uri,
|
|
719
640
|
apiHeaders,
|
|
@@ -721,8 +642,6 @@ export class Users {
|
|
|
721
642
|
);
|
|
722
643
|
}
|
|
723
644
|
/**
|
|
724
|
-
* Create user JWT
|
|
725
|
-
*
|
|
726
645
|
* Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.
|
|
727
646
|
*
|
|
728
647
|
* @param {string} userId
|
|
@@ -731,7 +650,7 @@ export class Users {
|
|
|
731
650
|
* @throws {AppwriteException}
|
|
732
651
|
* @returns {Promise<Models.Jwt>}
|
|
733
652
|
*/
|
|
734
|
-
|
|
653
|
+
createJWT(userId: string, sessionId?: string, duration?: number): Promise<Models.Jwt> {
|
|
735
654
|
if (typeof userId === 'undefined') {
|
|
736
655
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
737
656
|
}
|
|
@@ -749,10 +668,7 @@ export class Users {
|
|
|
749
668
|
'content-type': 'application/json',
|
|
750
669
|
}
|
|
751
670
|
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
return await this.client.call(
|
|
671
|
+
return this.client.call(
|
|
756
672
|
'post',
|
|
757
673
|
uri,
|
|
758
674
|
apiHeaders,
|
|
@@ -760,8 +676,6 @@ export class Users {
|
|
|
760
676
|
);
|
|
761
677
|
}
|
|
762
678
|
/**
|
|
763
|
-
* Update user labels
|
|
764
|
-
*
|
|
765
679
|
* Update the user labels by its unique ID.
|
|
766
680
|
|
|
767
681
|
Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info.
|
|
@@ -771,7 +685,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
771
685
|
* @throws {AppwriteException}
|
|
772
686
|
* @returns {Promise<Models.User<Preferences>>}
|
|
773
687
|
*/
|
|
774
|
-
|
|
688
|
+
updateLabels<Preferences extends Models.Preferences>(userId: string, labels: string[]): Promise<Models.User<Preferences>> {
|
|
775
689
|
if (typeof userId === 'undefined') {
|
|
776
690
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
777
691
|
}
|
|
@@ -789,10 +703,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
789
703
|
'content-type': 'application/json',
|
|
790
704
|
}
|
|
791
705
|
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
return await this.client.call(
|
|
706
|
+
return this.client.call(
|
|
796
707
|
'put',
|
|
797
708
|
uri,
|
|
798
709
|
apiHeaders,
|
|
@@ -800,8 +711,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
800
711
|
);
|
|
801
712
|
}
|
|
802
713
|
/**
|
|
803
|
-
* List user logs
|
|
804
|
-
*
|
|
805
714
|
* Get the user activity logs list by its unique ID.
|
|
806
715
|
*
|
|
807
716
|
* @param {string} userId
|
|
@@ -809,7 +718,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
809
718
|
* @throws {AppwriteException}
|
|
810
719
|
* @returns {Promise<Models.LogList>}
|
|
811
720
|
*/
|
|
812
|
-
|
|
721
|
+
listLogs(userId: string, queries?: string[]): Promise<Models.LogList> {
|
|
813
722
|
if (typeof userId === 'undefined') {
|
|
814
723
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
815
724
|
}
|
|
@@ -821,13 +730,9 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
821
730
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
822
731
|
|
|
823
732
|
const apiHeaders: { [header: string]: string } = {
|
|
824
|
-
'content-type': 'application/json',
|
|
825
733
|
}
|
|
826
734
|
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
return await this.client.call(
|
|
735
|
+
return this.client.call(
|
|
831
736
|
'get',
|
|
832
737
|
uri,
|
|
833
738
|
apiHeaders,
|
|
@@ -835,30 +740,32 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
835
740
|
);
|
|
836
741
|
}
|
|
837
742
|
/**
|
|
838
|
-
* List user memberships
|
|
839
|
-
*
|
|
840
743
|
* Get the user membership list by its unique ID.
|
|
841
744
|
*
|
|
842
745
|
* @param {string} userId
|
|
746
|
+
* @param {string[]} queries
|
|
747
|
+
* @param {string} search
|
|
843
748
|
* @throws {AppwriteException}
|
|
844
749
|
* @returns {Promise<Models.MembershipList>}
|
|
845
750
|
*/
|
|
846
|
-
|
|
751
|
+
listMemberships(userId: string, queries?: string[], search?: string): Promise<Models.MembershipList> {
|
|
847
752
|
if (typeof userId === 'undefined') {
|
|
848
753
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
849
754
|
}
|
|
850
755
|
const apiPath = '/users/{userId}/memberships'.replace('{userId}', userId);
|
|
851
756
|
const payload: Payload = {};
|
|
757
|
+
if (typeof queries !== 'undefined') {
|
|
758
|
+
payload['queries'] = queries;
|
|
759
|
+
}
|
|
760
|
+
if (typeof search !== 'undefined') {
|
|
761
|
+
payload['search'] = search;
|
|
762
|
+
}
|
|
852
763
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
853
764
|
|
|
854
765
|
const apiHeaders: { [header: string]: string } = {
|
|
855
|
-
'content-type': 'application/json',
|
|
856
766
|
}
|
|
857
767
|
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
return await this.client.call(
|
|
768
|
+
return this.client.call(
|
|
862
769
|
'get',
|
|
863
770
|
uri,
|
|
864
771
|
apiHeaders,
|
|
@@ -866,8 +773,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
866
773
|
);
|
|
867
774
|
}
|
|
868
775
|
/**
|
|
869
|
-
* Update MFA
|
|
870
|
-
*
|
|
871
776
|
* Enable or disable MFA on a user account.
|
|
872
777
|
*
|
|
873
778
|
* @param {string} userId
|
|
@@ -875,7 +780,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
875
780
|
* @throws {AppwriteException}
|
|
876
781
|
* @returns {Promise<Models.User<Preferences>>}
|
|
877
782
|
*/
|
|
878
|
-
|
|
783
|
+
updateMfa<Preferences extends Models.Preferences>(userId: string, mfa: boolean): Promise<Models.User<Preferences>> {
|
|
879
784
|
if (typeof userId === 'undefined') {
|
|
880
785
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
881
786
|
}
|
|
@@ -893,10 +798,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
893
798
|
'content-type': 'application/json',
|
|
894
799
|
}
|
|
895
800
|
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
return await this.client.call(
|
|
801
|
+
return this.client.call(
|
|
900
802
|
'patch',
|
|
901
803
|
uri,
|
|
902
804
|
apiHeaders,
|
|
@@ -904,8 +806,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
904
806
|
);
|
|
905
807
|
}
|
|
906
808
|
/**
|
|
907
|
-
* Delete authenticator
|
|
908
|
-
*
|
|
909
809
|
* Delete an authenticator app.
|
|
910
810
|
*
|
|
911
811
|
* @param {string} userId
|
|
@@ -913,7 +813,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
913
813
|
* @throws {AppwriteException}
|
|
914
814
|
* @returns {Promise<{}>}
|
|
915
815
|
*/
|
|
916
|
-
|
|
816
|
+
deleteMfaAuthenticator(userId: string, type: AuthenticatorType): Promise<{}> {
|
|
917
817
|
if (typeof userId === 'undefined') {
|
|
918
818
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
919
819
|
}
|
|
@@ -928,10 +828,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
928
828
|
'content-type': 'application/json',
|
|
929
829
|
}
|
|
930
830
|
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
return await this.client.call(
|
|
831
|
+
return this.client.call(
|
|
935
832
|
'delete',
|
|
936
833
|
uri,
|
|
937
834
|
apiHeaders,
|
|
@@ -939,15 +836,13 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
939
836
|
);
|
|
940
837
|
}
|
|
941
838
|
/**
|
|
942
|
-
* List factors
|
|
943
|
-
*
|
|
944
839
|
* List the factors available on the account to be used as a MFA challange.
|
|
945
840
|
*
|
|
946
841
|
* @param {string} userId
|
|
947
842
|
* @throws {AppwriteException}
|
|
948
843
|
* @returns {Promise<Models.MfaFactors>}
|
|
949
844
|
*/
|
|
950
|
-
|
|
845
|
+
listMfaFactors(userId: string): Promise<Models.MfaFactors> {
|
|
951
846
|
if (typeof userId === 'undefined') {
|
|
952
847
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
953
848
|
}
|
|
@@ -956,13 +851,9 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
956
851
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
957
852
|
|
|
958
853
|
const apiHeaders: { [header: string]: string } = {
|
|
959
|
-
'content-type': 'application/json',
|
|
960
854
|
}
|
|
961
855
|
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
return await this.client.call(
|
|
856
|
+
return this.client.call(
|
|
966
857
|
'get',
|
|
967
858
|
uri,
|
|
968
859
|
apiHeaders,
|
|
@@ -970,15 +861,13 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
970
861
|
);
|
|
971
862
|
}
|
|
972
863
|
/**
|
|
973
|
-
* Get MFA recovery codes
|
|
974
|
-
*
|
|
975
864
|
* Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.
|
|
976
865
|
*
|
|
977
866
|
* @param {string} userId
|
|
978
867
|
* @throws {AppwriteException}
|
|
979
868
|
* @returns {Promise<Models.MfaRecoveryCodes>}
|
|
980
869
|
*/
|
|
981
|
-
|
|
870
|
+
getMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes> {
|
|
982
871
|
if (typeof userId === 'undefined') {
|
|
983
872
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
984
873
|
}
|
|
@@ -987,13 +876,9 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
987
876
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
988
877
|
|
|
989
878
|
const apiHeaders: { [header: string]: string } = {
|
|
990
|
-
'content-type': 'application/json',
|
|
991
879
|
}
|
|
992
880
|
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
return await this.client.call(
|
|
881
|
+
return this.client.call(
|
|
997
882
|
'get',
|
|
998
883
|
uri,
|
|
999
884
|
apiHeaders,
|
|
@@ -1001,15 +886,13 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1001
886
|
);
|
|
1002
887
|
}
|
|
1003
888
|
/**
|
|
1004
|
-
* Regenerate MFA recovery codes
|
|
1005
|
-
*
|
|
1006
889
|
* Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.
|
|
1007
890
|
*
|
|
1008
891
|
* @param {string} userId
|
|
1009
892
|
* @throws {AppwriteException}
|
|
1010
893
|
* @returns {Promise<Models.MfaRecoveryCodes>}
|
|
1011
894
|
*/
|
|
1012
|
-
|
|
895
|
+
updateMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes> {
|
|
1013
896
|
if (typeof userId === 'undefined') {
|
|
1014
897
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1015
898
|
}
|
|
@@ -1021,10 +904,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1021
904
|
'content-type': 'application/json',
|
|
1022
905
|
}
|
|
1023
906
|
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
return await this.client.call(
|
|
907
|
+
return this.client.call(
|
|
1028
908
|
'put',
|
|
1029
909
|
uri,
|
|
1030
910
|
apiHeaders,
|
|
@@ -1032,15 +912,13 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1032
912
|
);
|
|
1033
913
|
}
|
|
1034
914
|
/**
|
|
1035
|
-
* Create MFA recovery codes
|
|
1036
|
-
*
|
|
1037
915
|
* Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK.
|
|
1038
916
|
*
|
|
1039
917
|
* @param {string} userId
|
|
1040
918
|
* @throws {AppwriteException}
|
|
1041
919
|
* @returns {Promise<Models.MfaRecoveryCodes>}
|
|
1042
920
|
*/
|
|
1043
|
-
|
|
921
|
+
createMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes> {
|
|
1044
922
|
if (typeof userId === 'undefined') {
|
|
1045
923
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1046
924
|
}
|
|
@@ -1052,10 +930,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1052
930
|
'content-type': 'application/json',
|
|
1053
931
|
}
|
|
1054
932
|
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
return await this.client.call(
|
|
933
|
+
return this.client.call(
|
|
1059
934
|
'patch',
|
|
1060
935
|
uri,
|
|
1061
936
|
apiHeaders,
|
|
@@ -1063,8 +938,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1063
938
|
);
|
|
1064
939
|
}
|
|
1065
940
|
/**
|
|
1066
|
-
* Update name
|
|
1067
|
-
*
|
|
1068
941
|
* Update the user name by its unique ID.
|
|
1069
942
|
*
|
|
1070
943
|
* @param {string} userId
|
|
@@ -1072,7 +945,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1072
945
|
* @throws {AppwriteException}
|
|
1073
946
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1074
947
|
*/
|
|
1075
|
-
|
|
948
|
+
updateName<Preferences extends Models.Preferences>(userId: string, name: string): Promise<Models.User<Preferences>> {
|
|
1076
949
|
if (typeof userId === 'undefined') {
|
|
1077
950
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1078
951
|
}
|
|
@@ -1090,10 +963,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1090
963
|
'content-type': 'application/json',
|
|
1091
964
|
}
|
|
1092
965
|
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
return await this.client.call(
|
|
966
|
+
return this.client.call(
|
|
1097
967
|
'patch',
|
|
1098
968
|
uri,
|
|
1099
969
|
apiHeaders,
|
|
@@ -1101,8 +971,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1101
971
|
);
|
|
1102
972
|
}
|
|
1103
973
|
/**
|
|
1104
|
-
* Update password
|
|
1105
|
-
*
|
|
1106
974
|
* Update the user password by its unique ID.
|
|
1107
975
|
*
|
|
1108
976
|
* @param {string} userId
|
|
@@ -1110,7 +978,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1110
978
|
* @throws {AppwriteException}
|
|
1111
979
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1112
980
|
*/
|
|
1113
|
-
|
|
981
|
+
updatePassword<Preferences extends Models.Preferences>(userId: string, password: string): Promise<Models.User<Preferences>> {
|
|
1114
982
|
if (typeof userId === 'undefined') {
|
|
1115
983
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1116
984
|
}
|
|
@@ -1128,10 +996,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1128
996
|
'content-type': 'application/json',
|
|
1129
997
|
}
|
|
1130
998
|
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
return await this.client.call(
|
|
999
|
+
return this.client.call(
|
|
1135
1000
|
'patch',
|
|
1136
1001
|
uri,
|
|
1137
1002
|
apiHeaders,
|
|
@@ -1139,8 +1004,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1139
1004
|
);
|
|
1140
1005
|
}
|
|
1141
1006
|
/**
|
|
1142
|
-
* Update phone
|
|
1143
|
-
*
|
|
1144
1007
|
* Update the user phone by its unique ID.
|
|
1145
1008
|
*
|
|
1146
1009
|
* @param {string} userId
|
|
@@ -1148,7 +1011,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1148
1011
|
* @throws {AppwriteException}
|
|
1149
1012
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1150
1013
|
*/
|
|
1151
|
-
|
|
1014
|
+
updatePhone<Preferences extends Models.Preferences>(userId: string, number: string): Promise<Models.User<Preferences>> {
|
|
1152
1015
|
if (typeof userId === 'undefined') {
|
|
1153
1016
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1154
1017
|
}
|
|
@@ -1166,10 +1029,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1166
1029
|
'content-type': 'application/json',
|
|
1167
1030
|
}
|
|
1168
1031
|
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
return await this.client.call(
|
|
1032
|
+
return this.client.call(
|
|
1173
1033
|
'patch',
|
|
1174
1034
|
uri,
|
|
1175
1035
|
apiHeaders,
|
|
@@ -1177,15 +1037,13 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1177
1037
|
);
|
|
1178
1038
|
}
|
|
1179
1039
|
/**
|
|
1180
|
-
* Get user preferences
|
|
1181
|
-
*
|
|
1182
1040
|
* Get the user preferences by its unique ID.
|
|
1183
1041
|
*
|
|
1184
1042
|
* @param {string} userId
|
|
1185
1043
|
* @throws {AppwriteException}
|
|
1186
1044
|
* @returns {Promise<Preferences>}
|
|
1187
1045
|
*/
|
|
1188
|
-
|
|
1046
|
+
getPrefs<Preferences extends Models.Preferences>(userId: string): Promise<Preferences> {
|
|
1189
1047
|
if (typeof userId === 'undefined') {
|
|
1190
1048
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1191
1049
|
}
|
|
@@ -1194,13 +1052,9 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1194
1052
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1195
1053
|
|
|
1196
1054
|
const apiHeaders: { [header: string]: string } = {
|
|
1197
|
-
'content-type': 'application/json',
|
|
1198
1055
|
}
|
|
1199
1056
|
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
return await this.client.call(
|
|
1057
|
+
return this.client.call(
|
|
1204
1058
|
'get',
|
|
1205
1059
|
uri,
|
|
1206
1060
|
apiHeaders,
|
|
@@ -1208,8 +1062,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1208
1062
|
);
|
|
1209
1063
|
}
|
|
1210
1064
|
/**
|
|
1211
|
-
* Update user preferences
|
|
1212
|
-
*
|
|
1213
1065
|
* Update the user preferences by its unique ID. 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.
|
|
1214
1066
|
*
|
|
1215
1067
|
* @param {string} userId
|
|
@@ -1217,7 +1069,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1217
1069
|
* @throws {AppwriteException}
|
|
1218
1070
|
* @returns {Promise<Preferences>}
|
|
1219
1071
|
*/
|
|
1220
|
-
|
|
1072
|
+
updatePrefs<Preferences extends Models.Preferences>(userId: string, prefs: object): Promise<Preferences> {
|
|
1221
1073
|
if (typeof userId === 'undefined') {
|
|
1222
1074
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1223
1075
|
}
|
|
@@ -1235,10 +1087,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1235
1087
|
'content-type': 'application/json',
|
|
1236
1088
|
}
|
|
1237
1089
|
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
return await this.client.call(
|
|
1090
|
+
return this.client.call(
|
|
1242
1091
|
'patch',
|
|
1243
1092
|
uri,
|
|
1244
1093
|
apiHeaders,
|
|
@@ -1246,15 +1095,13 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1246
1095
|
);
|
|
1247
1096
|
}
|
|
1248
1097
|
/**
|
|
1249
|
-
* List user sessions
|
|
1250
|
-
*
|
|
1251
1098
|
* Get the user sessions list by its unique ID.
|
|
1252
1099
|
*
|
|
1253
1100
|
* @param {string} userId
|
|
1254
1101
|
* @throws {AppwriteException}
|
|
1255
1102
|
* @returns {Promise<Models.SessionList>}
|
|
1256
1103
|
*/
|
|
1257
|
-
|
|
1104
|
+
listSessions(userId: string): Promise<Models.SessionList> {
|
|
1258
1105
|
if (typeof userId === 'undefined') {
|
|
1259
1106
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1260
1107
|
}
|
|
@@ -1263,13 +1110,9 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1263
1110
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1264
1111
|
|
|
1265
1112
|
const apiHeaders: { [header: string]: string } = {
|
|
1266
|
-
'content-type': 'application/json',
|
|
1267
1113
|
}
|
|
1268
1114
|
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
return await this.client.call(
|
|
1115
|
+
return this.client.call(
|
|
1273
1116
|
'get',
|
|
1274
1117
|
uri,
|
|
1275
1118
|
apiHeaders,
|
|
@@ -1277,8 +1120,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1277
1120
|
);
|
|
1278
1121
|
}
|
|
1279
1122
|
/**
|
|
1280
|
-
* Create session
|
|
1281
|
-
*
|
|
1282
1123
|
* Creates a session for a user. Returns an immediately usable session object.
|
|
1283
1124
|
|
|
1284
1125
|
If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint.
|
|
@@ -1287,7 +1128,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1287
1128
|
* @throws {AppwriteException}
|
|
1288
1129
|
* @returns {Promise<Models.Session>}
|
|
1289
1130
|
*/
|
|
1290
|
-
|
|
1131
|
+
createSession(userId: string): Promise<Models.Session> {
|
|
1291
1132
|
if (typeof userId === 'undefined') {
|
|
1292
1133
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1293
1134
|
}
|
|
@@ -1299,10 +1140,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1299
1140
|
'content-type': 'application/json',
|
|
1300
1141
|
}
|
|
1301
1142
|
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
return await this.client.call(
|
|
1143
|
+
return this.client.call(
|
|
1306
1144
|
'post',
|
|
1307
1145
|
uri,
|
|
1308
1146
|
apiHeaders,
|
|
@@ -1310,15 +1148,13 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1310
1148
|
);
|
|
1311
1149
|
}
|
|
1312
1150
|
/**
|
|
1313
|
-
* Delete user sessions
|
|
1314
|
-
*
|
|
1315
1151
|
* Delete all user's sessions by using the user's unique ID.
|
|
1316
1152
|
*
|
|
1317
1153
|
* @param {string} userId
|
|
1318
1154
|
* @throws {AppwriteException}
|
|
1319
1155
|
* @returns {Promise<{}>}
|
|
1320
1156
|
*/
|
|
1321
|
-
|
|
1157
|
+
deleteSessions(userId: string): Promise<{}> {
|
|
1322
1158
|
if (typeof userId === 'undefined') {
|
|
1323
1159
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1324
1160
|
}
|
|
@@ -1330,10 +1166,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1330
1166
|
'content-type': 'application/json',
|
|
1331
1167
|
}
|
|
1332
1168
|
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
return await this.client.call(
|
|
1169
|
+
return this.client.call(
|
|
1337
1170
|
'delete',
|
|
1338
1171
|
uri,
|
|
1339
1172
|
apiHeaders,
|
|
@@ -1341,8 +1174,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1341
1174
|
);
|
|
1342
1175
|
}
|
|
1343
1176
|
/**
|
|
1344
|
-
* Delete user session
|
|
1345
|
-
*
|
|
1346
1177
|
* Delete a user sessions by its unique ID.
|
|
1347
1178
|
*
|
|
1348
1179
|
* @param {string} userId
|
|
@@ -1350,7 +1181,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1350
1181
|
* @throws {AppwriteException}
|
|
1351
1182
|
* @returns {Promise<{}>}
|
|
1352
1183
|
*/
|
|
1353
|
-
|
|
1184
|
+
deleteSession(userId: string, sessionId: string): Promise<{}> {
|
|
1354
1185
|
if (typeof userId === 'undefined') {
|
|
1355
1186
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1356
1187
|
}
|
|
@@ -1365,10 +1196,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1365
1196
|
'content-type': 'application/json',
|
|
1366
1197
|
}
|
|
1367
1198
|
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
return await this.client.call(
|
|
1199
|
+
return this.client.call(
|
|
1372
1200
|
'delete',
|
|
1373
1201
|
uri,
|
|
1374
1202
|
apiHeaders,
|
|
@@ -1376,8 +1204,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1376
1204
|
);
|
|
1377
1205
|
}
|
|
1378
1206
|
/**
|
|
1379
|
-
* Update user status
|
|
1380
|
-
*
|
|
1381
1207
|
* Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.
|
|
1382
1208
|
*
|
|
1383
1209
|
* @param {string} userId
|
|
@@ -1385,7 +1211,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1385
1211
|
* @throws {AppwriteException}
|
|
1386
1212
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1387
1213
|
*/
|
|
1388
|
-
|
|
1214
|
+
updateStatus<Preferences extends Models.Preferences>(userId: string, status: boolean): Promise<Models.User<Preferences>> {
|
|
1389
1215
|
if (typeof userId === 'undefined') {
|
|
1390
1216
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1391
1217
|
}
|
|
@@ -1403,10 +1229,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1403
1229
|
'content-type': 'application/json',
|
|
1404
1230
|
}
|
|
1405
1231
|
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
return await this.client.call(
|
|
1232
|
+
return this.client.call(
|
|
1410
1233
|
'patch',
|
|
1411
1234
|
uri,
|
|
1412
1235
|
apiHeaders,
|
|
@@ -1414,8 +1237,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1414
1237
|
);
|
|
1415
1238
|
}
|
|
1416
1239
|
/**
|
|
1417
|
-
* List user targets
|
|
1418
|
-
*
|
|
1419
1240
|
* List the messaging targets that are associated with a user.
|
|
1420
1241
|
*
|
|
1421
1242
|
* @param {string} userId
|
|
@@ -1423,7 +1244,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1423
1244
|
* @throws {AppwriteException}
|
|
1424
1245
|
* @returns {Promise<Models.TargetList>}
|
|
1425
1246
|
*/
|
|
1426
|
-
|
|
1247
|
+
listTargets(userId: string, queries?: string[]): Promise<Models.TargetList> {
|
|
1427
1248
|
if (typeof userId === 'undefined') {
|
|
1428
1249
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1429
1250
|
}
|
|
@@ -1435,13 +1256,9 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1435
1256
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1436
1257
|
|
|
1437
1258
|
const apiHeaders: { [header: string]: string } = {
|
|
1438
|
-
'content-type': 'application/json',
|
|
1439
1259
|
}
|
|
1440
1260
|
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
return await this.client.call(
|
|
1261
|
+
return this.client.call(
|
|
1445
1262
|
'get',
|
|
1446
1263
|
uri,
|
|
1447
1264
|
apiHeaders,
|
|
@@ -1449,8 +1266,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1449
1266
|
);
|
|
1450
1267
|
}
|
|
1451
1268
|
/**
|
|
1452
|
-
* Create user target
|
|
1453
|
-
*
|
|
1454
1269
|
* Create a messaging target.
|
|
1455
1270
|
*
|
|
1456
1271
|
* @param {string} userId
|
|
@@ -1462,7 +1277,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1462
1277
|
* @throws {AppwriteException}
|
|
1463
1278
|
* @returns {Promise<Models.Target>}
|
|
1464
1279
|
*/
|
|
1465
|
-
|
|
1280
|
+
createTarget(userId: string, targetId: string, providerType: MessagingProviderType, identifier: string, providerId?: string, name?: string): Promise<Models.Target> {
|
|
1466
1281
|
if (typeof userId === 'undefined') {
|
|
1467
1282
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1468
1283
|
}
|
|
@@ -1498,10 +1313,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1498
1313
|
'content-type': 'application/json',
|
|
1499
1314
|
}
|
|
1500
1315
|
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
return await this.client.call(
|
|
1316
|
+
return this.client.call(
|
|
1505
1317
|
'post',
|
|
1506
1318
|
uri,
|
|
1507
1319
|
apiHeaders,
|
|
@@ -1509,8 +1321,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1509
1321
|
);
|
|
1510
1322
|
}
|
|
1511
1323
|
/**
|
|
1512
|
-
* Get user target
|
|
1513
|
-
*
|
|
1514
1324
|
* Get a user's push notification target by ID.
|
|
1515
1325
|
*
|
|
1516
1326
|
* @param {string} userId
|
|
@@ -1518,7 +1328,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1518
1328
|
* @throws {AppwriteException}
|
|
1519
1329
|
* @returns {Promise<Models.Target>}
|
|
1520
1330
|
*/
|
|
1521
|
-
|
|
1331
|
+
getTarget(userId: string, targetId: string): Promise<Models.Target> {
|
|
1522
1332
|
if (typeof userId === 'undefined') {
|
|
1523
1333
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1524
1334
|
}
|
|
@@ -1530,13 +1340,9 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1530
1340
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1531
1341
|
|
|
1532
1342
|
const apiHeaders: { [header: string]: string } = {
|
|
1533
|
-
'content-type': 'application/json',
|
|
1534
1343
|
}
|
|
1535
1344
|
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
return await this.client.call(
|
|
1345
|
+
return this.client.call(
|
|
1540
1346
|
'get',
|
|
1541
1347
|
uri,
|
|
1542
1348
|
apiHeaders,
|
|
@@ -1544,8 +1350,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1544
1350
|
);
|
|
1545
1351
|
}
|
|
1546
1352
|
/**
|
|
1547
|
-
* Update user target
|
|
1548
|
-
*
|
|
1549
1353
|
* Update a messaging target.
|
|
1550
1354
|
*
|
|
1551
1355
|
* @param {string} userId
|
|
@@ -1556,7 +1360,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1556
1360
|
* @throws {AppwriteException}
|
|
1557
1361
|
* @returns {Promise<Models.Target>}
|
|
1558
1362
|
*/
|
|
1559
|
-
|
|
1363
|
+
updateTarget(userId: string, targetId: string, identifier?: string, providerId?: string, name?: string): Promise<Models.Target> {
|
|
1560
1364
|
if (typeof userId === 'undefined') {
|
|
1561
1365
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1562
1366
|
}
|
|
@@ -1580,10 +1384,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1580
1384
|
'content-type': 'application/json',
|
|
1581
1385
|
}
|
|
1582
1386
|
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
return await this.client.call(
|
|
1387
|
+
return this.client.call(
|
|
1587
1388
|
'patch',
|
|
1588
1389
|
uri,
|
|
1589
1390
|
apiHeaders,
|
|
@@ -1591,8 +1392,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1591
1392
|
);
|
|
1592
1393
|
}
|
|
1593
1394
|
/**
|
|
1594
|
-
* Delete user target
|
|
1595
|
-
*
|
|
1596
1395
|
* Delete a messaging target.
|
|
1597
1396
|
*
|
|
1598
1397
|
* @param {string} userId
|
|
@@ -1600,7 +1399,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1600
1399
|
* @throws {AppwriteException}
|
|
1601
1400
|
* @returns {Promise<{}>}
|
|
1602
1401
|
*/
|
|
1603
|
-
|
|
1402
|
+
deleteTarget(userId: string, targetId: string): Promise<{}> {
|
|
1604
1403
|
if (typeof userId === 'undefined') {
|
|
1605
1404
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1606
1405
|
}
|
|
@@ -1615,10 +1414,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1615
1414
|
'content-type': 'application/json',
|
|
1616
1415
|
}
|
|
1617
1416
|
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
return await this.client.call(
|
|
1417
|
+
return this.client.call(
|
|
1622
1418
|
'delete',
|
|
1623
1419
|
uri,
|
|
1624
1420
|
apiHeaders,
|
|
@@ -1626,8 +1422,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1626
1422
|
);
|
|
1627
1423
|
}
|
|
1628
1424
|
/**
|
|
1629
|
-
* Create token
|
|
1630
|
-
*
|
|
1631
1425
|
* Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process.
|
|
1632
1426
|
|
|
1633
1427
|
*
|
|
@@ -1637,7 +1431,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1637
1431
|
* @throws {AppwriteException}
|
|
1638
1432
|
* @returns {Promise<Models.Token>}
|
|
1639
1433
|
*/
|
|
1640
|
-
|
|
1434
|
+
createToken(userId: string, length?: number, expire?: number): Promise<Models.Token> {
|
|
1641
1435
|
if (typeof userId === 'undefined') {
|
|
1642
1436
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1643
1437
|
}
|
|
@@ -1655,10 +1449,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1655
1449
|
'content-type': 'application/json',
|
|
1656
1450
|
}
|
|
1657
1451
|
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
return await this.client.call(
|
|
1452
|
+
return this.client.call(
|
|
1662
1453
|
'post',
|
|
1663
1454
|
uri,
|
|
1664
1455
|
apiHeaders,
|
|
@@ -1666,8 +1457,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1666
1457
|
);
|
|
1667
1458
|
}
|
|
1668
1459
|
/**
|
|
1669
|
-
* Update email verification
|
|
1670
|
-
*
|
|
1671
1460
|
* Update the user email verification status by its unique ID.
|
|
1672
1461
|
*
|
|
1673
1462
|
* @param {string} userId
|
|
@@ -1675,7 +1464,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1675
1464
|
* @throws {AppwriteException}
|
|
1676
1465
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1677
1466
|
*/
|
|
1678
|
-
|
|
1467
|
+
updateEmailVerification<Preferences extends Models.Preferences>(userId: string, emailVerification: boolean): Promise<Models.User<Preferences>> {
|
|
1679
1468
|
if (typeof userId === 'undefined') {
|
|
1680
1469
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1681
1470
|
}
|
|
@@ -1693,10 +1482,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1693
1482
|
'content-type': 'application/json',
|
|
1694
1483
|
}
|
|
1695
1484
|
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
return await this.client.call(
|
|
1485
|
+
return this.client.call(
|
|
1700
1486
|
'patch',
|
|
1701
1487
|
uri,
|
|
1702
1488
|
apiHeaders,
|
|
@@ -1704,8 +1490,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1704
1490
|
);
|
|
1705
1491
|
}
|
|
1706
1492
|
/**
|
|
1707
|
-
* Update phone verification
|
|
1708
|
-
*
|
|
1709
1493
|
* Update the user phone verification status by its unique ID.
|
|
1710
1494
|
*
|
|
1711
1495
|
* @param {string} userId
|
|
@@ -1713,7 +1497,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1713
1497
|
* @throws {AppwriteException}
|
|
1714
1498
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1715
1499
|
*/
|
|
1716
|
-
|
|
1500
|
+
updatePhoneVerification<Preferences extends Models.Preferences>(userId: string, phoneVerification: boolean): Promise<Models.User<Preferences>> {
|
|
1717
1501
|
if (typeof userId === 'undefined') {
|
|
1718
1502
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
1719
1503
|
}
|
|
@@ -1731,10 +1515,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1731
1515
|
'content-type': 'application/json',
|
|
1732
1516
|
}
|
|
1733
1517
|
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
return await this.client.call(
|
|
1518
|
+
return this.client.call(
|
|
1738
1519
|
'patch',
|
|
1739
1520
|
uri,
|
|
1740
1521
|
apiHeaders,
|