node-appwrite 12.0.1 → 13.0.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/README.md +1 -1
- package/dist/client.d.mts +131 -0
- package/dist/client.d.ts +131 -0
- package/dist/client.js +302 -0
- package/dist/client.js.map +1 -0
- package/dist/client.mjs +296 -0
- package/dist/client.mjs.map +1 -0
- package/dist/enums/authentication-factor.d.mts +8 -0
- package/dist/enums/authentication-factor.d.ts +8 -0
- package/dist/enums/authentication-factor.js +13 -0
- package/dist/enums/authentication-factor.js.map +1 -0
- package/dist/enums/authentication-factor.mjs +12 -0
- package/dist/enums/authentication-factor.mjs.map +1 -0
- package/dist/enums/authenticator-type.d.mts +5 -0
- package/dist/enums/authenticator-type.d.ts +5 -0
- package/dist/enums/authenticator-type.js +10 -0
- package/dist/enums/authenticator-type.js.map +1 -0
- package/dist/enums/authenticator-type.mjs +9 -0
- package/dist/enums/authenticator-type.mjs.map +1 -0
- package/dist/enums/browser.d.mts +18 -0
- package/dist/enums/browser.d.ts +18 -0
- package/dist/enums/browser.js +23 -0
- package/dist/enums/browser.js.map +1 -0
- package/dist/enums/browser.mjs +22 -0
- package/dist/enums/browser.mjs.map +1 -0
- package/dist/enums/compression.d.mts +7 -0
- package/dist/enums/compression.d.ts +7 -0
- package/dist/enums/compression.js +12 -0
- package/dist/enums/compression.js.map +1 -0
- package/dist/enums/compression.mjs +11 -0
- package/dist/enums/compression.mjs.map +1 -0
- package/dist/enums/credit-card.d.mts +20 -0
- package/dist/enums/credit-card.d.ts +20 -0
- package/dist/enums/credit-card.js +25 -0
- package/dist/enums/credit-card.js.map +1 -0
- package/dist/enums/credit-card.mjs +24 -0
- package/dist/enums/credit-card.mjs.map +1 -0
- package/dist/enums/execution-method.d.mts +10 -0
- package/dist/enums/execution-method.d.ts +10 -0
- package/dist/enums/execution-method.js +15 -0
- package/dist/enums/execution-method.js.map +1 -0
- package/dist/enums/execution-method.mjs +14 -0
- package/dist/enums/execution-method.mjs.map +1 -0
- package/dist/enums/flag.d.mts +199 -0
- package/dist/enums/flag.d.ts +199 -0
- package/dist/enums/flag.js +204 -0
- package/dist/enums/flag.js.map +1 -0
- package/dist/enums/flag.mjs +203 -0
- package/dist/enums/flag.mjs.map +1 -0
- package/dist/enums/image-format.d.mts +9 -0
- package/dist/enums/image-format.d.ts +9 -0
- package/dist/enums/image-format.js +14 -0
- package/dist/enums/image-format.js.map +1 -0
- package/dist/enums/image-format.mjs +13 -0
- package/dist/enums/image-format.mjs.map +1 -0
- package/dist/enums/image-gravity.d.mts +13 -0
- package/dist/enums/image-gravity.d.ts +13 -0
- package/dist/enums/image-gravity.js +18 -0
- package/dist/enums/image-gravity.js.map +1 -0
- package/dist/enums/image-gravity.mjs +17 -0
- package/dist/enums/image-gravity.mjs.map +1 -0
- package/dist/enums/index-type.d.mts +7 -0
- package/dist/enums/index-type.d.ts +7 -0
- package/dist/enums/index-type.js +12 -0
- package/dist/enums/index-type.js.map +1 -0
- package/dist/enums/index-type.mjs +11 -0
- package/dist/enums/index-type.mjs.map +1 -0
- package/dist/enums/messaging-provider-type.d.mts +7 -0
- package/dist/enums/messaging-provider-type.d.ts +7 -0
- package/dist/enums/messaging-provider-type.js +12 -0
- package/dist/enums/messaging-provider-type.js.map +1 -0
- package/dist/enums/messaging-provider-type.mjs +11 -0
- package/dist/enums/messaging-provider-type.mjs.map +1 -0
- package/dist/enums/name.d.mts +16 -0
- package/dist/enums/name.d.ts +16 -0
- package/dist/enums/name.js +21 -0
- package/dist/enums/name.js.map +1 -0
- package/dist/enums/name.mjs +20 -0
- package/dist/enums/name.mjs.map +1 -0
- package/dist/enums/o-auth-provider.d.mts +43 -0
- package/dist/enums/o-auth-provider.d.ts +43 -0
- package/dist/enums/o-auth-provider.js +48 -0
- package/dist/enums/o-auth-provider.js.map +1 -0
- package/dist/enums/o-auth-provider.mjs +47 -0
- package/dist/enums/o-auth-provider.mjs.map +1 -0
- package/dist/enums/password-hash.d.mts +15 -0
- package/dist/enums/password-hash.d.ts +15 -0
- package/dist/enums/password-hash.js +20 -0
- package/dist/enums/password-hash.js.map +1 -0
- package/dist/enums/password-hash.mjs +19 -0
- package/dist/enums/password-hash.mjs.map +1 -0
- package/dist/enums/relation-mutate.d.mts +7 -0
- package/dist/enums/relation-mutate.d.ts +7 -0
- package/dist/enums/relation-mutate.js +12 -0
- package/dist/enums/relation-mutate.js.map +1 -0
- package/dist/enums/relation-mutate.mjs +11 -0
- package/dist/enums/relation-mutate.mjs.map +1 -0
- package/dist/enums/relationship-type.d.mts +8 -0
- package/dist/enums/relationship-type.d.ts +8 -0
- package/dist/enums/relationship-type.js +13 -0
- package/dist/enums/relationship-type.js.map +1 -0
- package/dist/enums/relationship-type.mjs +12 -0
- package/dist/enums/relationship-type.mjs.map +1 -0
- package/dist/enums/runtime.d.mts +49 -0
- package/dist/enums/runtime.d.ts +49 -0
- package/dist/enums/runtime.js +54 -0
- package/dist/enums/runtime.js.map +1 -0
- package/dist/enums/runtime.mjs +53 -0
- package/dist/enums/runtime.mjs.map +1 -0
- package/dist/enums/smtp-encryption.d.mts +7 -0
- package/dist/enums/smtp-encryption.d.ts +7 -0
- package/dist/enums/smtp-encryption.js +12 -0
- package/dist/enums/smtp-encryption.js.map +1 -0
- package/dist/enums/smtp-encryption.mjs +11 -0
- package/dist/enums/smtp-encryption.mjs.map +1 -0
- package/dist/id.d.mts +7 -0
- package/dist/id.d.ts +7 -0
- package/dist/id.js +29 -0
- package/dist/id.js.map +1 -0
- package/dist/id.mjs +28 -0
- package/dist/id.mjs.map +1 -0
- package/dist/index.d.mts +35 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +180 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +35 -0
- package/dist/index.mjs.map +1 -0
- package/dist/inputFile.d.mts +9 -0
- package/dist/inputFile.d.ts +9 -0
- package/dist/inputFile.js +23 -0
- package/dist/inputFile.js.map +1 -0
- package/dist/inputFile.mjs +22 -0
- package/dist/inputFile.mjs.map +1 -0
- package/dist/models.d.mts +2414 -0
- package/dist/models.d.ts +2414 -0
- package/dist/models.js +4 -0
- package/dist/models.js.map +1 -0
- package/dist/models.mjs +3 -0
- package/dist/models.mjs.map +1 -0
- package/dist/permission.d.mts +9 -0
- package/dist/permission.d.ts +9 -0
- package/dist/permission.js +23 -0
- package/dist/permission.js.map +1 -0
- package/dist/permission.mjs +22 -0
- package/dist/permission.mjs.map +1 -0
- package/dist/query.d.mts +35 -0
- package/dist/query.d.ts +35 -0
- package/dist/query.js +49 -0
- package/dist/query.js.map +1 -0
- package/dist/query.mjs +48 -0
- package/dist/query.mjs.map +1 -0
- package/{lib/role.js → dist/role.d.mts} +18 -48
- package/dist/role.d.ts +72 -0
- package/dist/role.js +96 -0
- package/dist/role.js.map +1 -0
- package/dist/role.mjs +95 -0
- package/dist/role.mjs.map +1 -0
- package/dist/services/account.d.mts +478 -0
- package/dist/services/account.d.ts +478 -0
- package/dist/services/account.js +1331 -0
- package/dist/services/account.js.map +1 -0
- package/dist/services/account.mjs +1330 -0
- package/dist/services/account.mjs.map +1 -0
- package/dist/services/avatars.d.mts +118 -0
- package/dist/services/avatars.d.ts +118 -0
- package/dist/services/avatars.js +297 -0
- package/dist/services/avatars.js.map +1 -0
- package/dist/services/avatars.mjs +296 -0
- package/dist/services/avatars.mjs.map +1 -0
- package/dist/services/databases.d.mts +606 -0
- package/dist/services/databases.d.ts +606 -0
- package/dist/services/databases.js +1908 -0
- package/dist/services/databases.js.map +1 -0
- package/dist/services/databases.mjs +1907 -0
- package/dist/services/databases.mjs.map +1 -0
- package/dist/services/functions.d.mts +287 -0
- package/dist/services/functions.d.ts +287 -0
- package/dist/services/functions.js +837 -0
- package/dist/services/functions.js.map +1 -0
- package/dist/services/functions.mjs +836 -0
- package/dist/services/functions.mjs.map +1 -0
- package/dist/services/graphql.d.mts +30 -0
- package/dist/services/graphql.d.ts +30 -0
- package/dist/services/graphql.js +73 -0
- package/dist/services/graphql.js.map +1 -0
- package/dist/services/graphql.mjs +72 -0
- package/dist/services/graphql.mjs.map +1 -0
- package/dist/services/health.d.mts +235 -0
- package/dist/services/health.d.ts +235 -0
- package/dist/services/health.js +584 -0
- package/dist/services/health.js.map +1 -0
- package/dist/services/health.mjs +583 -0
- package/dist/services/health.mjs.map +1 -0
- package/dist/services/locale.d.mts +84 -0
- package/dist/services/locale.d.ts +84 -0
- package/dist/services/locale.js +189 -0
- package/dist/services/locale.js.map +1 -0
- package/dist/services/locale.mjs +188 -0
- package/dist/services/locale.mjs.map +1 -0
- package/dist/services/messaging.d.mts +689 -0
- package/dist/services/messaging.d.ts +689 -0
- package/dist/services/messaging.js +2156 -0
- package/dist/services/messaging.js.map +1 -0
- package/dist/services/messaging.mjs +2155 -0
- package/dist/services/messaging.mjs.map +1 -0
- package/dist/services/storage.d.mts +193 -0
- package/dist/services/storage.d.ts +193 -0
- package/dist/services/storage.js +550 -0
- package/dist/services/storage.js.map +1 -0
- package/dist/services/storage.mjs +549 -0
- package/dist/services/storage.mjs.map +1 -0
- package/dist/services/teams.d.mts +171 -0
- package/dist/services/teams.d.ts +171 -0
- package/dist/services/teams.js +466 -0
- package/dist/services/teams.js.map +1 -0
- package/dist/services/teams.mjs +465 -0
- package/dist/services/teams.mjs.map +1 -0
- package/dist/services/users.d.mts +491 -0
- package/dist/services/users.d.ts +491 -0
- package/dist/services/users.js +1465 -0
- package/dist/services/users.js.map +1 -0
- package/dist/services/users.mjs +1464 -0
- package/dist/services/users.mjs.map +1 -0
- package/package.json +39 -5
- package/.github/ISSUE_TEMPLATE/bug.yaml +0 -82
- package/.github/ISSUE_TEMPLATE/documentation.yaml +0 -32
- package/.github/ISSUE_TEMPLATE/feature.yaml +0 -40
- package/.travis.yml +0 -25
- package/CHANGELOG.md +0 -1
- package/docs/examples/account/create-anonymous-session.md +0 -9
- package/docs/examples/account/create-email-password-session.md +0 -12
- package/docs/examples/account/create-email-token.md +0 -13
- package/docs/examples/account/create-j-w-t.md +0 -9
- package/docs/examples/account/create-magic-u-r-l-token.md +0 -14
- package/docs/examples/account/create-mfa-authenticator.md +0 -12
- package/docs/examples/account/create-mfa-challenge.md +0 -11
- package/docs/examples/account/create-mfa-recovery-codes.md +0 -10
- package/docs/examples/account/create-o-auth2token.md +0 -14
- package/docs/examples/account/create-phone-token.md +0 -12
- package/docs/examples/account/create-phone-verification.md +0 -10
- package/docs/examples/account/create-recovery.md +0 -13
- package/docs/examples/account/create-session.md +0 -12
- package/docs/examples/account/create-verification.md +0 -12
- package/docs/examples/account/create.md +0 -14
- package/docs/examples/account/delete-identity.md +0 -12
- package/docs/examples/account/delete-mfa-authenticator.md +0 -13
- package/docs/examples/account/delete-session.md +0 -12
- package/docs/examples/account/delete-sessions.md +0 -10
- package/docs/examples/account/get-mfa-recovery-codes.md +0 -10
- package/docs/examples/account/get-prefs.md +0 -10
- package/docs/examples/account/get-session.md +0 -12
- package/docs/examples/account/get.md +0 -10
- package/docs/examples/account/list-identities.md +0 -12
- package/docs/examples/account/list-logs.md +0 -12
- package/docs/examples/account/list-mfa-factors.md +0 -10
- package/docs/examples/account/list-sessions.md +0 -10
- package/docs/examples/account/update-email.md +0 -13
- package/docs/examples/account/update-m-f-a.md +0 -12
- package/docs/examples/account/update-magic-u-r-l-session.md +0 -12
- package/docs/examples/account/update-mfa-authenticator.md +0 -13
- package/docs/examples/account/update-mfa-challenge.md +0 -13
- package/docs/examples/account/update-mfa-recovery-codes.md +0 -10
- package/docs/examples/account/update-name.md +0 -12
- package/docs/examples/account/update-password.md +0 -13
- package/docs/examples/account/update-phone-session.md +0 -12
- package/docs/examples/account/update-phone-verification.md +0 -13
- package/docs/examples/account/update-phone.md +0 -13
- package/docs/examples/account/update-prefs.md +0 -12
- package/docs/examples/account/update-recovery.md +0 -14
- package/docs/examples/account/update-session.md +0 -12
- package/docs/examples/account/update-status.md +0 -10
- package/docs/examples/account/update-verification.md +0 -13
- package/docs/examples/avatars/get-browser.md +0 -15
- package/docs/examples/avatars/get-credit-card.md +0 -15
- package/docs/examples/avatars/get-favicon.md +0 -12
- package/docs/examples/avatars/get-flag.md +0 -15
- package/docs/examples/avatars/get-image.md +0 -14
- package/docs/examples/avatars/get-initials.md +0 -15
- package/docs/examples/avatars/get-q-r.md +0 -15
- package/docs/examples/databases/create-boolean-attribute.md +0 -17
- package/docs/examples/databases/create-collection.md +0 -17
- package/docs/examples/databases/create-datetime-attribute.md +0 -17
- package/docs/examples/databases/create-document.md +0 -16
- package/docs/examples/databases/create-email-attribute.md +0 -17
- package/docs/examples/databases/create-enum-attribute.md +0 -18
- package/docs/examples/databases/create-float-attribute.md +0 -19
- package/docs/examples/databases/create-index.md +0 -17
- package/docs/examples/databases/create-integer-attribute.md +0 -19
- package/docs/examples/databases/create-ip-attribute.md +0 -17
- package/docs/examples/databases/create-relationship-attribute.md +0 -19
- package/docs/examples/databases/create-string-attribute.md +0 -19
- package/docs/examples/databases/create-url-attribute.md +0 -17
- package/docs/examples/databases/create.md +0 -14
- package/docs/examples/databases/delete-attribute.md +0 -14
- package/docs/examples/databases/delete-collection.md +0 -13
- package/docs/examples/databases/delete-document.md +0 -14
- package/docs/examples/databases/delete-index.md +0 -14
- package/docs/examples/databases/delete.md +0 -12
- package/docs/examples/databases/get-attribute.md +0 -14
- package/docs/examples/databases/get-collection.md +0 -13
- package/docs/examples/databases/get-document.md +0 -15
- package/docs/examples/databases/get-index.md +0 -14
- package/docs/examples/databases/get.md +0 -12
- package/docs/examples/databases/list-attributes.md +0 -14
- package/docs/examples/databases/list-collections.md +0 -14
- package/docs/examples/databases/list-documents.md +0 -14
- package/docs/examples/databases/list-indexes.md +0 -14
- package/docs/examples/databases/list.md +0 -13
- package/docs/examples/databases/update-boolean-attribute.md +0 -16
- package/docs/examples/databases/update-collection.md +0 -17
- package/docs/examples/databases/update-datetime-attribute.md +0 -16
- package/docs/examples/databases/update-document.md +0 -16
- package/docs/examples/databases/update-email-attribute.md +0 -16
- package/docs/examples/databases/update-enum-attribute.md +0 -17
- package/docs/examples/databases/update-float-attribute.md +0 -18
- package/docs/examples/databases/update-integer-attribute.md +0 -18
- package/docs/examples/databases/update-ip-attribute.md +0 -16
- package/docs/examples/databases/update-relationship-attribute.md +0 -15
- package/docs/examples/databases/update-string-attribute.md +0 -16
- package/docs/examples/databases/update-url-attribute.md +0 -16
- package/docs/examples/databases/update.md +0 -14
- package/docs/examples/functions/create-build.md +0 -14
- package/docs/examples/functions/create-deployment.md +0 -17
- package/docs/examples/functions/create-execution.md +0 -17
- package/docs/examples/functions/create-variable.md +0 -14
- package/docs/examples/functions/create.md +0 -31
- package/docs/examples/functions/delete-deployment.md +0 -13
- package/docs/examples/functions/delete-variable.md +0 -13
- package/docs/examples/functions/delete.md +0 -12
- package/docs/examples/functions/download-deployment.md +0 -13
- package/docs/examples/functions/get-deployment.md +0 -13
- package/docs/examples/functions/get-execution.md +0 -13
- package/docs/examples/functions/get-variable.md +0 -13
- package/docs/examples/functions/get.md +0 -12
- package/docs/examples/functions/list-deployments.md +0 -14
- package/docs/examples/functions/list-executions.md +0 -14
- package/docs/examples/functions/list-runtimes.md +0 -10
- package/docs/examples/functions/list-variables.md +0 -12
- package/docs/examples/functions/list.md +0 -13
- package/docs/examples/functions/update-deployment.md +0 -13
- package/docs/examples/functions/update-variable.md +0 -15
- package/docs/examples/functions/update.md +0 -27
- package/docs/examples/graphql/mutation.md +0 -12
- package/docs/examples/graphql/query.md +0 -12
- package/docs/examples/health/get-antivirus.md +0 -10
- package/docs/examples/health/get-cache.md +0 -10
- package/docs/examples/health/get-certificate.md +0 -12
- package/docs/examples/health/get-d-b.md +0 -10
- package/docs/examples/health/get-failed-jobs.md +0 -13
- package/docs/examples/health/get-pub-sub.md +0 -10
- package/docs/examples/health/get-queue-builds.md +0 -12
- package/docs/examples/health/get-queue-certificates.md +0 -12
- package/docs/examples/health/get-queue-databases.md +0 -13
- package/docs/examples/health/get-queue-deletes.md +0 -12
- package/docs/examples/health/get-queue-functions.md +0 -12
- package/docs/examples/health/get-queue-logs.md +0 -12
- package/docs/examples/health/get-queue-mails.md +0 -12
- package/docs/examples/health/get-queue-messaging.md +0 -12
- package/docs/examples/health/get-queue-migrations.md +0 -12
- package/docs/examples/health/get-queue-usage-dump.md +0 -12
- package/docs/examples/health/get-queue-usage.md +0 -12
- package/docs/examples/health/get-queue-webhooks.md +0 -12
- package/docs/examples/health/get-queue.md +0 -10
- package/docs/examples/health/get-storage-local.md +0 -10
- package/docs/examples/health/get-storage.md +0 -10
- package/docs/examples/health/get-time.md +0 -10
- package/docs/examples/health/get.md +0 -10
- package/docs/examples/locale/get.md +0 -10
- package/docs/examples/locale/list-codes.md +0 -10
- package/docs/examples/locale/list-continents.md +0 -10
- package/docs/examples/locale/list-countries-e-u.md +0 -10
- package/docs/examples/locale/list-countries-phones.md +0 -10
- package/docs/examples/locale/list-countries.md +0 -10
- package/docs/examples/locale/list-currencies.md +0 -10
- package/docs/examples/locale/list-languages.md +0 -10
- package/docs/examples/messaging/create-apns-provider.md +0 -19
- package/docs/examples/messaging/create-email.md +0 -23
- package/docs/examples/messaging/create-fcm-provider.md +0 -15
- package/docs/examples/messaging/create-mailgun-provider.md +0 -21
- package/docs/examples/messaging/create-msg91provider.md +0 -17
- package/docs/examples/messaging/create-push.md +0 -27
- package/docs/examples/messaging/create-sendgrid-provider.md +0 -19
- package/docs/examples/messaging/create-sms.md +0 -18
- package/docs/examples/messaging/create-smtp-provider.md +0 -25
- package/docs/examples/messaging/create-subscriber.md +0 -14
- package/docs/examples/messaging/create-telesign-provider.md +0 -17
- package/docs/examples/messaging/create-textmagic-provider.md +0 -17
- package/docs/examples/messaging/create-topic.md +0 -14
- package/docs/examples/messaging/create-twilio-provider.md +0 -17
- package/docs/examples/messaging/create-vonage-provider.md +0 -17
- package/docs/examples/messaging/delete-provider.md +0 -12
- package/docs/examples/messaging/delete-subscriber.md +0 -13
- package/docs/examples/messaging/delete-topic.md +0 -12
- package/docs/examples/messaging/delete.md +0 -12
- package/docs/examples/messaging/get-message.md +0 -12
- package/docs/examples/messaging/get-provider.md +0 -12
- package/docs/examples/messaging/get-subscriber.md +0 -13
- package/docs/examples/messaging/get-topic.md +0 -12
- package/docs/examples/messaging/list-message-logs.md +0 -13
- package/docs/examples/messaging/list-messages.md +0 -13
- package/docs/examples/messaging/list-provider-logs.md +0 -13
- package/docs/examples/messaging/list-providers.md +0 -13
- package/docs/examples/messaging/list-subscriber-logs.md +0 -13
- package/docs/examples/messaging/list-subscribers.md +0 -14
- package/docs/examples/messaging/list-targets.md +0 -13
- package/docs/examples/messaging/list-topic-logs.md +0 -13
- package/docs/examples/messaging/list-topics.md +0 -13
- package/docs/examples/messaging/update-apns-provider.md +0 -19
- package/docs/examples/messaging/update-email.md +0 -22
- package/docs/examples/messaging/update-fcm-provider.md +0 -15
- package/docs/examples/messaging/update-mailgun-provider.md +0 -21
- package/docs/examples/messaging/update-msg91provider.md +0 -17
- package/docs/examples/messaging/update-push.md +0 -27
- package/docs/examples/messaging/update-sendgrid-provider.md +0 -19
- package/docs/examples/messaging/update-sms.md +0 -18
- package/docs/examples/messaging/update-smtp-provider.md +0 -25
- package/docs/examples/messaging/update-telesign-provider.md +0 -17
- package/docs/examples/messaging/update-textmagic-provider.md +0 -17
- package/docs/examples/messaging/update-topic.md +0 -14
- package/docs/examples/messaging/update-twilio-provider.md +0 -17
- package/docs/examples/messaging/update-vonage-provider.md +0 -17
- package/docs/examples/storage/create-bucket.md +0 -21
- package/docs/examples/storage/create-file.md +0 -16
- package/docs/examples/storage/delete-bucket.md +0 -12
- package/docs/examples/storage/delete-file.md +0 -13
- package/docs/examples/storage/get-bucket.md +0 -12
- package/docs/examples/storage/get-file-download.md +0 -13
- package/docs/examples/storage/get-file-preview.md +0 -24
- package/docs/examples/storage/get-file-view.md +0 -13
- package/docs/examples/storage/get-file.md +0 -13
- package/docs/examples/storage/list-buckets.md +0 -13
- package/docs/examples/storage/list-files.md +0 -14
- package/docs/examples/storage/update-bucket.md +0 -21
- package/docs/examples/storage/update-file.md +0 -15
- package/docs/examples/teams/create-membership.md +0 -18
- package/docs/examples/teams/create.md +0 -14
- package/docs/examples/teams/delete-membership.md +0 -13
- package/docs/examples/teams/delete.md +0 -12
- package/docs/examples/teams/get-membership.md +0 -13
- package/docs/examples/teams/get-prefs.md +0 -12
- package/docs/examples/teams/get.md +0 -12
- package/docs/examples/teams/list-memberships.md +0 -14
- package/docs/examples/teams/list.md +0 -13
- package/docs/examples/teams/update-membership-status.md +0 -15
- package/docs/examples/teams/update-membership.md +0 -14
- package/docs/examples/teams/update-name.md +0 -13
- package/docs/examples/teams/update-prefs.md +0 -13
- package/docs/examples/users/create-argon2user.md +0 -15
- package/docs/examples/users/create-bcrypt-user.md +0 -15
- package/docs/examples/users/create-m-d5user.md +0 -15
- package/docs/examples/users/create-mfa-recovery-codes.md +0 -12
- package/docs/examples/users/create-p-h-pass-user.md +0 -15
- package/docs/examples/users/create-s-h-a-user.md +0 -16
- package/docs/examples/users/create-scrypt-modified-user.md +0 -18
- package/docs/examples/users/create-scrypt-user.md +0 -20
- package/docs/examples/users/create-session.md +0 -12
- package/docs/examples/users/create-target.md +0 -17
- package/docs/examples/users/create-token.md +0 -14
- package/docs/examples/users/create.md +0 -16
- package/docs/examples/users/delete-identity.md +0 -12
- package/docs/examples/users/delete-mfa-authenticator.md +0 -13
- package/docs/examples/users/delete-session.md +0 -13
- package/docs/examples/users/delete-sessions.md +0 -12
- package/docs/examples/users/delete-target.md +0 -13
- package/docs/examples/users/delete.md +0 -12
- package/docs/examples/users/get-mfa-recovery-codes.md +0 -12
- package/docs/examples/users/get-prefs.md +0 -12
- package/docs/examples/users/get-target.md +0 -13
- package/docs/examples/users/get.md +0 -12
- package/docs/examples/users/list-identities.md +0 -13
- package/docs/examples/users/list-logs.md +0 -13
- package/docs/examples/users/list-memberships.md +0 -12
- package/docs/examples/users/list-mfa-factors.md +0 -12
- package/docs/examples/users/list-sessions.md +0 -12
- package/docs/examples/users/list-targets.md +0 -13
- package/docs/examples/users/list.md +0 -13
- package/docs/examples/users/update-email-verification.md +0 -13
- package/docs/examples/users/update-email.md +0 -13
- package/docs/examples/users/update-labels.md +0 -13
- package/docs/examples/users/update-mfa-recovery-codes.md +0 -12
- package/docs/examples/users/update-mfa.md +0 -13
- package/docs/examples/users/update-name.md +0 -13
- package/docs/examples/users/update-password.md +0 -13
- package/docs/examples/users/update-phone-verification.md +0 -13
- package/docs/examples/users/update-phone.md +0 -13
- package/docs/examples/users/update-prefs.md +0 -13
- package/docs/examples/users/update-status.md +0 -13
- package/docs/examples/users/update-target.md +0 -16
- package/index.d.ts +0 -6656
- package/index.js +0 -75
- package/lib/client.js +0 -245
- package/lib/enums/authentication-factor.js +0 -8
- package/lib/enums/authenticator-type.js +0 -5
- package/lib/enums/browser.js +0 -18
- package/lib/enums/compression.js +0 -7
- package/lib/enums/credit-card.js +0 -20
- package/lib/enums/execution-method.js +0 -10
- package/lib/enums/flag.js +0 -198
- package/lib/enums/image-format.js +0 -9
- package/lib/enums/image-gravity.js +0 -13
- package/lib/enums/index-type.js +0 -7
- package/lib/enums/messaging-provider-type.js +0 -7
- package/lib/enums/name.js +0 -17
- package/lib/enums/o-auth-provider.js +0 -43
- package/lib/enums/password-hash.js +0 -15
- package/lib/enums/relation-mutate.js +0 -7
- package/lib/enums/relationship-type.js +0 -8
- package/lib/enums/runtime.js +0 -48
- package/lib/enums/smtp-encryption.js +0 -7
- package/lib/exception.js +0 -10
- package/lib/id.js +0 -32
- package/lib/inputFile.js +0 -117
- package/lib/permission.js +0 -24
- package/lib/query.js +0 -90
- package/lib/service.js +0 -10
- package/lib/services/account.js +0 -1365
- package/lib/services/avatars.js +0 -325
- package/lib/services/databases.js +0 -1987
- package/lib/services/functions.js +0 -930
- package/lib/services/graphql.js +0 -74
- package/lib/services/health.js +0 -513
- package/lib/services/locale.js +0 -169
- package/lib/services/messaging.js +0 -2218
- package/lib/services/storage.js +0 -663
- package/lib/services/teams.js +0 -479
- package/lib/services/users.js +0 -1463
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
import { Client } from '../client.mjs';
|
|
2
|
+
import { Models } from '../models.mjs';
|
|
3
|
+
import { PasswordHash } from '../enums/password-hash.mjs';
|
|
4
|
+
import { AuthenticatorType } from '../enums/authenticator-type.mjs';
|
|
5
|
+
import { MessagingProviderType } from '../enums/messaging-provider-type.mjs';
|
|
6
|
+
import '../query.mjs';
|
|
7
|
+
|
|
8
|
+
declare class Users {
|
|
9
|
+
client: Client;
|
|
10
|
+
constructor(client: Client);
|
|
11
|
+
/**
|
|
12
|
+
* List users
|
|
13
|
+
*
|
|
14
|
+
* Get a list of all the project's users. You can use the query params to filter your results.
|
|
15
|
+
*
|
|
16
|
+
* @param {string[]} queries
|
|
17
|
+
* @param {string} search
|
|
18
|
+
* @throws {AppwriteException}
|
|
19
|
+
* @returns {Promise<Models.UserList<Preferences>>}
|
|
20
|
+
*/
|
|
21
|
+
list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.UserList<Preferences>>;
|
|
22
|
+
/**
|
|
23
|
+
* Create user
|
|
24
|
+
*
|
|
25
|
+
* Create a new user.
|
|
26
|
+
*
|
|
27
|
+
* @param {string} userId
|
|
28
|
+
* @param {string} email
|
|
29
|
+
* @param {string} phone
|
|
30
|
+
* @param {string} password
|
|
31
|
+
* @param {string} name
|
|
32
|
+
* @throws {AppwriteException}
|
|
33
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
34
|
+
*/
|
|
35
|
+
create<Preferences extends Models.Preferences>(userId: string, email?: string, phone?: string, password?: string, name?: string): Promise<Models.User<Preferences>>;
|
|
36
|
+
/**
|
|
37
|
+
* Create user with Argon2 password
|
|
38
|
+
*
|
|
39
|
+
* 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.
|
|
40
|
+
*
|
|
41
|
+
* @param {string} userId
|
|
42
|
+
* @param {string} email
|
|
43
|
+
* @param {string} password
|
|
44
|
+
* @param {string} name
|
|
45
|
+
* @throws {AppwriteException}
|
|
46
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
47
|
+
*/
|
|
48
|
+
createArgon2User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
|
|
49
|
+
/**
|
|
50
|
+
* Create user with bcrypt password
|
|
51
|
+
*
|
|
52
|
+
* 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.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} userId
|
|
55
|
+
* @param {string} email
|
|
56
|
+
* @param {string} password
|
|
57
|
+
* @param {string} name
|
|
58
|
+
* @throws {AppwriteException}
|
|
59
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
60
|
+
*/
|
|
61
|
+
createBcryptUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
|
|
62
|
+
/**
|
|
63
|
+
* List Identities
|
|
64
|
+
*
|
|
65
|
+
* Get identities for all users.
|
|
66
|
+
*
|
|
67
|
+
* @param {string[]} queries
|
|
68
|
+
* @param {string} search
|
|
69
|
+
* @throws {AppwriteException}
|
|
70
|
+
* @returns {Promise<Models.IdentityList>}
|
|
71
|
+
*/
|
|
72
|
+
listIdentities(queries?: string[], search?: string): Promise<Models.IdentityList>;
|
|
73
|
+
/**
|
|
74
|
+
* Delete identity
|
|
75
|
+
*
|
|
76
|
+
* Delete an identity by its unique ID.
|
|
77
|
+
*
|
|
78
|
+
* @param {string} identityId
|
|
79
|
+
* @throws {AppwriteException}
|
|
80
|
+
* @returns {Promise<{}>}
|
|
81
|
+
*/
|
|
82
|
+
deleteIdentity(identityId: string): Promise<{}>;
|
|
83
|
+
/**
|
|
84
|
+
* Create user with MD5 password
|
|
85
|
+
*
|
|
86
|
+
* 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.
|
|
87
|
+
*
|
|
88
|
+
* @param {string} userId
|
|
89
|
+
* @param {string} email
|
|
90
|
+
* @param {string} password
|
|
91
|
+
* @param {string} name
|
|
92
|
+
* @throws {AppwriteException}
|
|
93
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
94
|
+
*/
|
|
95
|
+
createMD5User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
|
|
96
|
+
/**
|
|
97
|
+
* Create user with PHPass password
|
|
98
|
+
*
|
|
99
|
+
* 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.
|
|
100
|
+
*
|
|
101
|
+
* @param {string} userId
|
|
102
|
+
* @param {string} email
|
|
103
|
+
* @param {string} password
|
|
104
|
+
* @param {string} name
|
|
105
|
+
* @throws {AppwriteException}
|
|
106
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
107
|
+
*/
|
|
108
|
+
createPHPassUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
|
|
109
|
+
/**
|
|
110
|
+
* Create user with Scrypt password
|
|
111
|
+
*
|
|
112
|
+
* 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.
|
|
113
|
+
*
|
|
114
|
+
* @param {string} userId
|
|
115
|
+
* @param {string} email
|
|
116
|
+
* @param {string} password
|
|
117
|
+
* @param {string} passwordSalt
|
|
118
|
+
* @param {number} passwordCpu
|
|
119
|
+
* @param {number} passwordMemory
|
|
120
|
+
* @param {number} passwordParallel
|
|
121
|
+
* @param {number} passwordLength
|
|
122
|
+
* @param {string} name
|
|
123
|
+
* @throws {AppwriteException}
|
|
124
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
125
|
+
*/
|
|
126
|
+
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>>;
|
|
127
|
+
/**
|
|
128
|
+
* Create user with Scrypt modified password
|
|
129
|
+
*
|
|
130
|
+
* 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.
|
|
131
|
+
*
|
|
132
|
+
* @param {string} userId
|
|
133
|
+
* @param {string} email
|
|
134
|
+
* @param {string} password
|
|
135
|
+
* @param {string} passwordSalt
|
|
136
|
+
* @param {string} passwordSaltSeparator
|
|
137
|
+
* @param {string} passwordSignerKey
|
|
138
|
+
* @param {string} name
|
|
139
|
+
* @throws {AppwriteException}
|
|
140
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
141
|
+
*/
|
|
142
|
+
createScryptModifiedUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordSalt: string, passwordSaltSeparator: string, passwordSignerKey: string, name?: string): Promise<Models.User<Preferences>>;
|
|
143
|
+
/**
|
|
144
|
+
* Create user with SHA password
|
|
145
|
+
*
|
|
146
|
+
* 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.
|
|
147
|
+
*
|
|
148
|
+
* @param {string} userId
|
|
149
|
+
* @param {string} email
|
|
150
|
+
* @param {string} password
|
|
151
|
+
* @param {PasswordHash} passwordVersion
|
|
152
|
+
* @param {string} name
|
|
153
|
+
* @throws {AppwriteException}
|
|
154
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
155
|
+
*/
|
|
156
|
+
createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string): Promise<Models.User<Preferences>>;
|
|
157
|
+
/**
|
|
158
|
+
* Get user
|
|
159
|
+
*
|
|
160
|
+
* Get a user by its unique ID.
|
|
161
|
+
*
|
|
162
|
+
* @param {string} userId
|
|
163
|
+
* @throws {AppwriteException}
|
|
164
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
165
|
+
*/
|
|
166
|
+
get<Preferences extends Models.Preferences>(userId: string): Promise<Models.User<Preferences>>;
|
|
167
|
+
/**
|
|
168
|
+
* Delete user
|
|
169
|
+
*
|
|
170
|
+
* 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.
|
|
171
|
+
*
|
|
172
|
+
* @param {string} userId
|
|
173
|
+
* @throws {AppwriteException}
|
|
174
|
+
* @returns {Promise<{}>}
|
|
175
|
+
*/
|
|
176
|
+
delete(userId: string): Promise<{}>;
|
|
177
|
+
/**
|
|
178
|
+
* Update email
|
|
179
|
+
*
|
|
180
|
+
* Update the user email by its unique ID.
|
|
181
|
+
*
|
|
182
|
+
* @param {string} userId
|
|
183
|
+
* @param {string} email
|
|
184
|
+
* @throws {AppwriteException}
|
|
185
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
186
|
+
*/
|
|
187
|
+
updateEmail<Preferences extends Models.Preferences>(userId: string, email: string): Promise<Models.User<Preferences>>;
|
|
188
|
+
/**
|
|
189
|
+
* Update user labels
|
|
190
|
+
*
|
|
191
|
+
* Update the user labels by its unique ID.
|
|
192
|
+
|
|
193
|
+
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.
|
|
194
|
+
*
|
|
195
|
+
* @param {string} userId
|
|
196
|
+
* @param {string[]} labels
|
|
197
|
+
* @throws {AppwriteException}
|
|
198
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
199
|
+
*/
|
|
200
|
+
updateLabels<Preferences extends Models.Preferences>(userId: string, labels: string[]): Promise<Models.User<Preferences>>;
|
|
201
|
+
/**
|
|
202
|
+
* List user logs
|
|
203
|
+
*
|
|
204
|
+
* Get the user activity logs list by its unique ID.
|
|
205
|
+
*
|
|
206
|
+
* @param {string} userId
|
|
207
|
+
* @param {string[]} queries
|
|
208
|
+
* @throws {AppwriteException}
|
|
209
|
+
* @returns {Promise<Models.LogList>}
|
|
210
|
+
*/
|
|
211
|
+
listLogs(userId: string, queries?: string[]): Promise<Models.LogList>;
|
|
212
|
+
/**
|
|
213
|
+
* List user memberships
|
|
214
|
+
*
|
|
215
|
+
* Get the user membership list by its unique ID.
|
|
216
|
+
*
|
|
217
|
+
* @param {string} userId
|
|
218
|
+
* @throws {AppwriteException}
|
|
219
|
+
* @returns {Promise<Models.MembershipList>}
|
|
220
|
+
*/
|
|
221
|
+
listMemberships(userId: string): Promise<Models.MembershipList>;
|
|
222
|
+
/**
|
|
223
|
+
* Update MFA
|
|
224
|
+
*
|
|
225
|
+
* Enable or disable MFA on a user account.
|
|
226
|
+
*
|
|
227
|
+
* @param {string} userId
|
|
228
|
+
* @param {boolean} mfa
|
|
229
|
+
* @throws {AppwriteException}
|
|
230
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
231
|
+
*/
|
|
232
|
+
updateMfa<Preferences extends Models.Preferences>(userId: string, mfa: boolean): Promise<Models.User<Preferences>>;
|
|
233
|
+
/**
|
|
234
|
+
* Delete Authenticator
|
|
235
|
+
*
|
|
236
|
+
* Delete an authenticator app.
|
|
237
|
+
*
|
|
238
|
+
* @param {string} userId
|
|
239
|
+
* @param {AuthenticatorType} type
|
|
240
|
+
* @throws {AppwriteException}
|
|
241
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
242
|
+
*/
|
|
243
|
+
deleteMfaAuthenticator<Preferences extends Models.Preferences>(userId: string, type: AuthenticatorType): Promise<Models.User<Preferences>>;
|
|
244
|
+
/**
|
|
245
|
+
* List Factors
|
|
246
|
+
*
|
|
247
|
+
* List the factors available on the account to be used as a MFA challange.
|
|
248
|
+
*
|
|
249
|
+
* @param {string} userId
|
|
250
|
+
* @throws {AppwriteException}
|
|
251
|
+
* @returns {Promise<Models.MfaFactors>}
|
|
252
|
+
*/
|
|
253
|
+
listMfaFactors(userId: string): Promise<Models.MfaFactors>;
|
|
254
|
+
/**
|
|
255
|
+
* Get MFA Recovery Codes
|
|
256
|
+
*
|
|
257
|
+
* 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.
|
|
258
|
+
*
|
|
259
|
+
* @param {string} userId
|
|
260
|
+
* @throws {AppwriteException}
|
|
261
|
+
* @returns {Promise<Models.MfaRecoveryCodes>}
|
|
262
|
+
*/
|
|
263
|
+
getMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes>;
|
|
264
|
+
/**
|
|
265
|
+
* Regenerate MFA Recovery Codes
|
|
266
|
+
*
|
|
267
|
+
* 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.
|
|
268
|
+
*
|
|
269
|
+
* @param {string} userId
|
|
270
|
+
* @throws {AppwriteException}
|
|
271
|
+
* @returns {Promise<Models.MfaRecoveryCodes>}
|
|
272
|
+
*/
|
|
273
|
+
updateMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes>;
|
|
274
|
+
/**
|
|
275
|
+
* Create MFA Recovery Codes
|
|
276
|
+
*
|
|
277
|
+
* 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.
|
|
278
|
+
*
|
|
279
|
+
* @param {string} userId
|
|
280
|
+
* @throws {AppwriteException}
|
|
281
|
+
* @returns {Promise<Models.MfaRecoveryCodes>}
|
|
282
|
+
*/
|
|
283
|
+
createMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes>;
|
|
284
|
+
/**
|
|
285
|
+
* Update name
|
|
286
|
+
*
|
|
287
|
+
* Update the user name by its unique ID.
|
|
288
|
+
*
|
|
289
|
+
* @param {string} userId
|
|
290
|
+
* @param {string} name
|
|
291
|
+
* @throws {AppwriteException}
|
|
292
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
293
|
+
*/
|
|
294
|
+
updateName<Preferences extends Models.Preferences>(userId: string, name: string): Promise<Models.User<Preferences>>;
|
|
295
|
+
/**
|
|
296
|
+
* Update password
|
|
297
|
+
*
|
|
298
|
+
* Update the user password by its unique ID.
|
|
299
|
+
*
|
|
300
|
+
* @param {string} userId
|
|
301
|
+
* @param {string} password
|
|
302
|
+
* @throws {AppwriteException}
|
|
303
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
304
|
+
*/
|
|
305
|
+
updatePassword<Preferences extends Models.Preferences>(userId: string, password: string): Promise<Models.User<Preferences>>;
|
|
306
|
+
/**
|
|
307
|
+
* Update phone
|
|
308
|
+
*
|
|
309
|
+
* Update the user phone by its unique ID.
|
|
310
|
+
*
|
|
311
|
+
* @param {string} userId
|
|
312
|
+
* @param {string} number
|
|
313
|
+
* @throws {AppwriteException}
|
|
314
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
315
|
+
*/
|
|
316
|
+
updatePhone<Preferences extends Models.Preferences>(userId: string, number: string): Promise<Models.User<Preferences>>;
|
|
317
|
+
/**
|
|
318
|
+
* Get user preferences
|
|
319
|
+
*
|
|
320
|
+
* Get the user preferences by its unique ID.
|
|
321
|
+
*
|
|
322
|
+
* @param {string} userId
|
|
323
|
+
* @throws {AppwriteException}
|
|
324
|
+
* @returns {Promise<Preferences>}
|
|
325
|
+
*/
|
|
326
|
+
getPrefs<Preferences extends Models.Preferences>(userId: string): Promise<Preferences>;
|
|
327
|
+
/**
|
|
328
|
+
* Update user preferences
|
|
329
|
+
*
|
|
330
|
+
* 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.
|
|
331
|
+
*
|
|
332
|
+
* @param {string} userId
|
|
333
|
+
* @param {object} prefs
|
|
334
|
+
* @throws {AppwriteException}
|
|
335
|
+
* @returns {Promise<Preferences>}
|
|
336
|
+
*/
|
|
337
|
+
updatePrefs<Preferences extends Models.Preferences>(userId: string, prefs: object): Promise<Preferences>;
|
|
338
|
+
/**
|
|
339
|
+
* List user sessions
|
|
340
|
+
*
|
|
341
|
+
* Get the user sessions list by its unique ID.
|
|
342
|
+
*
|
|
343
|
+
* @param {string} userId
|
|
344
|
+
* @throws {AppwriteException}
|
|
345
|
+
* @returns {Promise<Models.SessionList>}
|
|
346
|
+
*/
|
|
347
|
+
listSessions(userId: string): Promise<Models.SessionList>;
|
|
348
|
+
/**
|
|
349
|
+
* Create session
|
|
350
|
+
*
|
|
351
|
+
* Creates a session for a user. Returns an immediately usable session object.
|
|
352
|
+
|
|
353
|
+
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.
|
|
354
|
+
*
|
|
355
|
+
* @param {string} userId
|
|
356
|
+
* @throws {AppwriteException}
|
|
357
|
+
* @returns {Promise<Models.Session>}
|
|
358
|
+
*/
|
|
359
|
+
createSession(userId: string): Promise<Models.Session>;
|
|
360
|
+
/**
|
|
361
|
+
* Delete user sessions
|
|
362
|
+
*
|
|
363
|
+
* Delete all user's sessions by using the user's unique ID.
|
|
364
|
+
*
|
|
365
|
+
* @param {string} userId
|
|
366
|
+
* @throws {AppwriteException}
|
|
367
|
+
* @returns {Promise<{}>}
|
|
368
|
+
*/
|
|
369
|
+
deleteSessions(userId: string): Promise<{}>;
|
|
370
|
+
/**
|
|
371
|
+
* Delete user session
|
|
372
|
+
*
|
|
373
|
+
* Delete a user sessions by its unique ID.
|
|
374
|
+
*
|
|
375
|
+
* @param {string} userId
|
|
376
|
+
* @param {string} sessionId
|
|
377
|
+
* @throws {AppwriteException}
|
|
378
|
+
* @returns {Promise<{}>}
|
|
379
|
+
*/
|
|
380
|
+
deleteSession(userId: string, sessionId: string): Promise<{}>;
|
|
381
|
+
/**
|
|
382
|
+
* Update user status
|
|
383
|
+
*
|
|
384
|
+
* 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.
|
|
385
|
+
*
|
|
386
|
+
* @param {string} userId
|
|
387
|
+
* @param {boolean} status
|
|
388
|
+
* @throws {AppwriteException}
|
|
389
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
390
|
+
*/
|
|
391
|
+
updateStatus<Preferences extends Models.Preferences>(userId: string, status: boolean): Promise<Models.User<Preferences>>;
|
|
392
|
+
/**
|
|
393
|
+
* List User Targets
|
|
394
|
+
*
|
|
395
|
+
* List the messaging targets that are associated with a user.
|
|
396
|
+
*
|
|
397
|
+
* @param {string} userId
|
|
398
|
+
* @param {string[]} queries
|
|
399
|
+
* @throws {AppwriteException}
|
|
400
|
+
* @returns {Promise<Models.TargetList>}
|
|
401
|
+
*/
|
|
402
|
+
listTargets(userId: string, queries?: string[]): Promise<Models.TargetList>;
|
|
403
|
+
/**
|
|
404
|
+
* Create User Target
|
|
405
|
+
*
|
|
406
|
+
* Create a messaging target.
|
|
407
|
+
*
|
|
408
|
+
* @param {string} userId
|
|
409
|
+
* @param {string} targetId
|
|
410
|
+
* @param {MessagingProviderType} providerType
|
|
411
|
+
* @param {string} identifier
|
|
412
|
+
* @param {string} providerId
|
|
413
|
+
* @param {string} name
|
|
414
|
+
* @throws {AppwriteException}
|
|
415
|
+
* @returns {Promise<Models.Target>}
|
|
416
|
+
*/
|
|
417
|
+
createTarget(userId: string, targetId: string, providerType: MessagingProviderType, identifier: string, providerId?: string, name?: string): Promise<Models.Target>;
|
|
418
|
+
/**
|
|
419
|
+
* Get User Target
|
|
420
|
+
*
|
|
421
|
+
* Get a user's push notification target by ID.
|
|
422
|
+
*
|
|
423
|
+
* @param {string} userId
|
|
424
|
+
* @param {string} targetId
|
|
425
|
+
* @throws {AppwriteException}
|
|
426
|
+
* @returns {Promise<Models.Target>}
|
|
427
|
+
*/
|
|
428
|
+
getTarget(userId: string, targetId: string): Promise<Models.Target>;
|
|
429
|
+
/**
|
|
430
|
+
* Update User target
|
|
431
|
+
*
|
|
432
|
+
* Update a messaging target.
|
|
433
|
+
*
|
|
434
|
+
* @param {string} userId
|
|
435
|
+
* @param {string} targetId
|
|
436
|
+
* @param {string} identifier
|
|
437
|
+
* @param {string} providerId
|
|
438
|
+
* @param {string} name
|
|
439
|
+
* @throws {AppwriteException}
|
|
440
|
+
* @returns {Promise<Models.Target>}
|
|
441
|
+
*/
|
|
442
|
+
updateTarget(userId: string, targetId: string, identifier?: string, providerId?: string, name?: string): Promise<Models.Target>;
|
|
443
|
+
/**
|
|
444
|
+
* Delete user target
|
|
445
|
+
*
|
|
446
|
+
* Delete a messaging target.
|
|
447
|
+
*
|
|
448
|
+
* @param {string} userId
|
|
449
|
+
* @param {string} targetId
|
|
450
|
+
* @throws {AppwriteException}
|
|
451
|
+
* @returns {Promise<{}>}
|
|
452
|
+
*/
|
|
453
|
+
deleteTarget(userId: string, targetId: string): Promise<{}>;
|
|
454
|
+
/**
|
|
455
|
+
* Create token
|
|
456
|
+
*
|
|
457
|
+
* 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.
|
|
458
|
+
|
|
459
|
+
*
|
|
460
|
+
* @param {string} userId
|
|
461
|
+
* @param {number} length
|
|
462
|
+
* @param {number} expire
|
|
463
|
+
* @throws {AppwriteException}
|
|
464
|
+
* @returns {Promise<Models.Token>}
|
|
465
|
+
*/
|
|
466
|
+
createToken(userId: string, length?: number, expire?: number): Promise<Models.Token>;
|
|
467
|
+
/**
|
|
468
|
+
* Update email verification
|
|
469
|
+
*
|
|
470
|
+
* Update the user email verification status by its unique ID.
|
|
471
|
+
*
|
|
472
|
+
* @param {string} userId
|
|
473
|
+
* @param {boolean} emailVerification
|
|
474
|
+
* @throws {AppwriteException}
|
|
475
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
476
|
+
*/
|
|
477
|
+
updateEmailVerification<Preferences extends Models.Preferences>(userId: string, emailVerification: boolean): Promise<Models.User<Preferences>>;
|
|
478
|
+
/**
|
|
479
|
+
* Update phone verification
|
|
480
|
+
*
|
|
481
|
+
* Update the user phone verification status by its unique ID.
|
|
482
|
+
*
|
|
483
|
+
* @param {string} userId
|
|
484
|
+
* @param {boolean} phoneVerification
|
|
485
|
+
* @throws {AppwriteException}
|
|
486
|
+
* @returns {Promise<Models.User<Preferences>>}
|
|
487
|
+
*/
|
|
488
|
+
updatePhoneVerification<Preferences extends Models.Preferences>(userId: string, phoneVerification: boolean): Promise<Models.User<Preferences>>;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
export { Users };
|