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,84 @@
|
|
|
1
|
+
import { Client } from '../client.mjs';
|
|
2
|
+
import { Models } from '../models.mjs';
|
|
3
|
+
import '../query.mjs';
|
|
4
|
+
|
|
5
|
+
declare class Locale {
|
|
6
|
+
client: Client;
|
|
7
|
+
constructor(client: Client);
|
|
8
|
+
/**
|
|
9
|
+
* Get user locale
|
|
10
|
+
*
|
|
11
|
+
* Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.
|
|
12
|
+
|
|
13
|
+
([IP Geolocation by DB-IP](https://db-ip.com))
|
|
14
|
+
*
|
|
15
|
+
* @throws {AppwriteException}
|
|
16
|
+
* @returns {Promise<Models.Locale>}
|
|
17
|
+
*/
|
|
18
|
+
get(): Promise<Models.Locale>;
|
|
19
|
+
/**
|
|
20
|
+
* List Locale Codes
|
|
21
|
+
*
|
|
22
|
+
* List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
|
|
23
|
+
*
|
|
24
|
+
* @throws {AppwriteException}
|
|
25
|
+
* @returns {Promise<Models.LocaleCodeList>}
|
|
26
|
+
*/
|
|
27
|
+
listCodes(): Promise<Models.LocaleCodeList>;
|
|
28
|
+
/**
|
|
29
|
+
* List continents
|
|
30
|
+
*
|
|
31
|
+
* List of all continents. You can use the locale header to get the data in a supported language.
|
|
32
|
+
*
|
|
33
|
+
* @throws {AppwriteException}
|
|
34
|
+
* @returns {Promise<Models.ContinentList>}
|
|
35
|
+
*/
|
|
36
|
+
listContinents(): Promise<Models.ContinentList>;
|
|
37
|
+
/**
|
|
38
|
+
* List countries
|
|
39
|
+
*
|
|
40
|
+
* List of all countries. You can use the locale header to get the data in a supported language.
|
|
41
|
+
*
|
|
42
|
+
* @throws {AppwriteException}
|
|
43
|
+
* @returns {Promise<Models.CountryList>}
|
|
44
|
+
*/
|
|
45
|
+
listCountries(): Promise<Models.CountryList>;
|
|
46
|
+
/**
|
|
47
|
+
* List EU countries
|
|
48
|
+
*
|
|
49
|
+
* List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.
|
|
50
|
+
*
|
|
51
|
+
* @throws {AppwriteException}
|
|
52
|
+
* @returns {Promise<Models.CountryList>}
|
|
53
|
+
*/
|
|
54
|
+
listCountriesEU(): Promise<Models.CountryList>;
|
|
55
|
+
/**
|
|
56
|
+
* List countries phone codes
|
|
57
|
+
*
|
|
58
|
+
* List of all countries phone codes. You can use the locale header to get the data in a supported language.
|
|
59
|
+
*
|
|
60
|
+
* @throws {AppwriteException}
|
|
61
|
+
* @returns {Promise<Models.PhoneList>}
|
|
62
|
+
*/
|
|
63
|
+
listCountriesPhones(): Promise<Models.PhoneList>;
|
|
64
|
+
/**
|
|
65
|
+
* List currencies
|
|
66
|
+
*
|
|
67
|
+
* List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.
|
|
68
|
+
*
|
|
69
|
+
* @throws {AppwriteException}
|
|
70
|
+
* @returns {Promise<Models.CurrencyList>}
|
|
71
|
+
*/
|
|
72
|
+
listCurrencies(): Promise<Models.CurrencyList>;
|
|
73
|
+
/**
|
|
74
|
+
* List languages
|
|
75
|
+
*
|
|
76
|
+
* List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
|
|
77
|
+
*
|
|
78
|
+
* @throws {AppwriteException}
|
|
79
|
+
* @returns {Promise<Models.LanguageList>}
|
|
80
|
+
*/
|
|
81
|
+
listLanguages(): Promise<Models.LanguageList>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export { Locale };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Client } from '../client.js';
|
|
2
|
+
import { Models } from '../models.js';
|
|
3
|
+
import '../query.js';
|
|
4
|
+
|
|
5
|
+
declare class Locale {
|
|
6
|
+
client: Client;
|
|
7
|
+
constructor(client: Client);
|
|
8
|
+
/**
|
|
9
|
+
* Get user locale
|
|
10
|
+
*
|
|
11
|
+
* Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.
|
|
12
|
+
|
|
13
|
+
([IP Geolocation by DB-IP](https://db-ip.com))
|
|
14
|
+
*
|
|
15
|
+
* @throws {AppwriteException}
|
|
16
|
+
* @returns {Promise<Models.Locale>}
|
|
17
|
+
*/
|
|
18
|
+
get(): Promise<Models.Locale>;
|
|
19
|
+
/**
|
|
20
|
+
* List Locale Codes
|
|
21
|
+
*
|
|
22
|
+
* List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
|
|
23
|
+
*
|
|
24
|
+
* @throws {AppwriteException}
|
|
25
|
+
* @returns {Promise<Models.LocaleCodeList>}
|
|
26
|
+
*/
|
|
27
|
+
listCodes(): Promise<Models.LocaleCodeList>;
|
|
28
|
+
/**
|
|
29
|
+
* List continents
|
|
30
|
+
*
|
|
31
|
+
* List of all continents. You can use the locale header to get the data in a supported language.
|
|
32
|
+
*
|
|
33
|
+
* @throws {AppwriteException}
|
|
34
|
+
* @returns {Promise<Models.ContinentList>}
|
|
35
|
+
*/
|
|
36
|
+
listContinents(): Promise<Models.ContinentList>;
|
|
37
|
+
/**
|
|
38
|
+
* List countries
|
|
39
|
+
*
|
|
40
|
+
* List of all countries. You can use the locale header to get the data in a supported language.
|
|
41
|
+
*
|
|
42
|
+
* @throws {AppwriteException}
|
|
43
|
+
* @returns {Promise<Models.CountryList>}
|
|
44
|
+
*/
|
|
45
|
+
listCountries(): Promise<Models.CountryList>;
|
|
46
|
+
/**
|
|
47
|
+
* List EU countries
|
|
48
|
+
*
|
|
49
|
+
* List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.
|
|
50
|
+
*
|
|
51
|
+
* @throws {AppwriteException}
|
|
52
|
+
* @returns {Promise<Models.CountryList>}
|
|
53
|
+
*/
|
|
54
|
+
listCountriesEU(): Promise<Models.CountryList>;
|
|
55
|
+
/**
|
|
56
|
+
* List countries phone codes
|
|
57
|
+
*
|
|
58
|
+
* List of all countries phone codes. You can use the locale header to get the data in a supported language.
|
|
59
|
+
*
|
|
60
|
+
* @throws {AppwriteException}
|
|
61
|
+
* @returns {Promise<Models.PhoneList>}
|
|
62
|
+
*/
|
|
63
|
+
listCountriesPhones(): Promise<Models.PhoneList>;
|
|
64
|
+
/**
|
|
65
|
+
* List currencies
|
|
66
|
+
*
|
|
67
|
+
* List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.
|
|
68
|
+
*
|
|
69
|
+
* @throws {AppwriteException}
|
|
70
|
+
* @returns {Promise<Models.CurrencyList>}
|
|
71
|
+
*/
|
|
72
|
+
listCurrencies(): Promise<Models.CurrencyList>;
|
|
73
|
+
/**
|
|
74
|
+
* List languages
|
|
75
|
+
*
|
|
76
|
+
* List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
|
|
77
|
+
*
|
|
78
|
+
* @throws {AppwriteException}
|
|
79
|
+
* @returns {Promise<Models.LanguageList>}
|
|
80
|
+
*/
|
|
81
|
+
listLanguages(): Promise<Models.LanguageList>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export { Locale };
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class Locale {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Get user locale
|
|
9
|
+
*
|
|
10
|
+
* Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.
|
|
11
|
+
|
|
12
|
+
([IP Geolocation by DB-IP](https://db-ip.com))
|
|
13
|
+
*
|
|
14
|
+
* @throws {AppwriteException}
|
|
15
|
+
* @returns {Promise<Models.Locale>}
|
|
16
|
+
*/
|
|
17
|
+
async get() {
|
|
18
|
+
const apiPath = "/locale";
|
|
19
|
+
const payload = {};
|
|
20
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21
|
+
const apiHeaders = {
|
|
22
|
+
"content-type": "application/json"
|
|
23
|
+
};
|
|
24
|
+
return await this.client.call(
|
|
25
|
+
"get",
|
|
26
|
+
uri,
|
|
27
|
+
apiHeaders,
|
|
28
|
+
payload
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* List Locale Codes
|
|
33
|
+
*
|
|
34
|
+
* List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
|
|
35
|
+
*
|
|
36
|
+
* @throws {AppwriteException}
|
|
37
|
+
* @returns {Promise<Models.LocaleCodeList>}
|
|
38
|
+
*/
|
|
39
|
+
async listCodes() {
|
|
40
|
+
const apiPath = "/locale/codes";
|
|
41
|
+
const payload = {};
|
|
42
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
43
|
+
const apiHeaders = {
|
|
44
|
+
"content-type": "application/json"
|
|
45
|
+
};
|
|
46
|
+
return await this.client.call(
|
|
47
|
+
"get",
|
|
48
|
+
uri,
|
|
49
|
+
apiHeaders,
|
|
50
|
+
payload
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* List continents
|
|
55
|
+
*
|
|
56
|
+
* List of all continents. You can use the locale header to get the data in a supported language.
|
|
57
|
+
*
|
|
58
|
+
* @throws {AppwriteException}
|
|
59
|
+
* @returns {Promise<Models.ContinentList>}
|
|
60
|
+
*/
|
|
61
|
+
async listContinents() {
|
|
62
|
+
const apiPath = "/locale/continents";
|
|
63
|
+
const payload = {};
|
|
64
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
65
|
+
const apiHeaders = {
|
|
66
|
+
"content-type": "application/json"
|
|
67
|
+
};
|
|
68
|
+
return await this.client.call(
|
|
69
|
+
"get",
|
|
70
|
+
uri,
|
|
71
|
+
apiHeaders,
|
|
72
|
+
payload
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* List countries
|
|
77
|
+
*
|
|
78
|
+
* List of all countries. You can use the locale header to get the data in a supported language.
|
|
79
|
+
*
|
|
80
|
+
* @throws {AppwriteException}
|
|
81
|
+
* @returns {Promise<Models.CountryList>}
|
|
82
|
+
*/
|
|
83
|
+
async listCountries() {
|
|
84
|
+
const apiPath = "/locale/countries";
|
|
85
|
+
const payload = {};
|
|
86
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
87
|
+
const apiHeaders = {
|
|
88
|
+
"content-type": "application/json"
|
|
89
|
+
};
|
|
90
|
+
return await this.client.call(
|
|
91
|
+
"get",
|
|
92
|
+
uri,
|
|
93
|
+
apiHeaders,
|
|
94
|
+
payload
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* List EU countries
|
|
99
|
+
*
|
|
100
|
+
* List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.
|
|
101
|
+
*
|
|
102
|
+
* @throws {AppwriteException}
|
|
103
|
+
* @returns {Promise<Models.CountryList>}
|
|
104
|
+
*/
|
|
105
|
+
async listCountriesEU() {
|
|
106
|
+
const apiPath = "/locale/countries/eu";
|
|
107
|
+
const payload = {};
|
|
108
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
109
|
+
const apiHeaders = {
|
|
110
|
+
"content-type": "application/json"
|
|
111
|
+
};
|
|
112
|
+
return await this.client.call(
|
|
113
|
+
"get",
|
|
114
|
+
uri,
|
|
115
|
+
apiHeaders,
|
|
116
|
+
payload
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* List countries phone codes
|
|
121
|
+
*
|
|
122
|
+
* List of all countries phone codes. You can use the locale header to get the data in a supported language.
|
|
123
|
+
*
|
|
124
|
+
* @throws {AppwriteException}
|
|
125
|
+
* @returns {Promise<Models.PhoneList>}
|
|
126
|
+
*/
|
|
127
|
+
async listCountriesPhones() {
|
|
128
|
+
const apiPath = "/locale/countries/phones";
|
|
129
|
+
const payload = {};
|
|
130
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
131
|
+
const apiHeaders = {
|
|
132
|
+
"content-type": "application/json"
|
|
133
|
+
};
|
|
134
|
+
return await this.client.call(
|
|
135
|
+
"get",
|
|
136
|
+
uri,
|
|
137
|
+
apiHeaders,
|
|
138
|
+
payload
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* List currencies
|
|
143
|
+
*
|
|
144
|
+
* List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.
|
|
145
|
+
*
|
|
146
|
+
* @throws {AppwriteException}
|
|
147
|
+
* @returns {Promise<Models.CurrencyList>}
|
|
148
|
+
*/
|
|
149
|
+
async listCurrencies() {
|
|
150
|
+
const apiPath = "/locale/currencies";
|
|
151
|
+
const payload = {};
|
|
152
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
153
|
+
const apiHeaders = {
|
|
154
|
+
"content-type": "application/json"
|
|
155
|
+
};
|
|
156
|
+
return await this.client.call(
|
|
157
|
+
"get",
|
|
158
|
+
uri,
|
|
159
|
+
apiHeaders,
|
|
160
|
+
payload
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* List languages
|
|
165
|
+
*
|
|
166
|
+
* List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
|
|
167
|
+
*
|
|
168
|
+
* @throws {AppwriteException}
|
|
169
|
+
* @returns {Promise<Models.LanguageList>}
|
|
170
|
+
*/
|
|
171
|
+
async listLanguages() {
|
|
172
|
+
const apiPath = "/locale/languages";
|
|
173
|
+
const payload = {};
|
|
174
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
175
|
+
const apiHeaders = {
|
|
176
|
+
"content-type": "application/json"
|
|
177
|
+
};
|
|
178
|
+
return await this.client.call(
|
|
179
|
+
"get",
|
|
180
|
+
uri,
|
|
181
|
+
apiHeaders,
|
|
182
|
+
payload
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
exports.Locale = Locale;
|
|
188
|
+
//# sourceMappingURL=out.js.map
|
|
189
|
+
//# sourceMappingURL=locale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/services/locale.ts"],"names":[],"mappings":"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","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nexport class Locale {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get user locale\n *\n * Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https://db-ip.com))\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.Locale>}\n */\n async get(): Promise<Models.Locale> {\n const apiPath = '/locale';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List Locale Codes\n *\n * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LocaleCodeList>}\n */\n async listCodes(): Promise<Models.LocaleCodeList> {\n const apiPath = '/locale/codes';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List continents\n *\n * List of all continents. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.ContinentList>}\n */\n async listContinents(): Promise<Models.ContinentList> {\n const apiPath = '/locale/continents';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List countries\n *\n * List of all countries. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n async listCountries(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List EU countries\n *\n * List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n async listCountriesEU(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries/eu';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List countries phone codes\n *\n * List of all countries phone codes. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.PhoneList>}\n */\n async listCountriesPhones(): Promise<Models.PhoneList> {\n const apiPath = '/locale/countries/phones';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List currencies\n *\n * List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CurrencyList>}\n */\n async listCurrencies(): Promise<Models.CurrencyList> {\n const apiPath = '/locale/currencies';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List languages\n *\n * List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LanguageList>}\n */\n async listLanguages(): Promise<Models.LanguageList> {\n const apiPath = '/locale/languages';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
// src/services/locale.ts
|
|
2
|
+
var Locale = class {
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Get user locale
|
|
8
|
+
*
|
|
9
|
+
* Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.
|
|
10
|
+
|
|
11
|
+
([IP Geolocation by DB-IP](https://db-ip.com))
|
|
12
|
+
*
|
|
13
|
+
* @throws {AppwriteException}
|
|
14
|
+
* @returns {Promise<Models.Locale>}
|
|
15
|
+
*/
|
|
16
|
+
async get() {
|
|
17
|
+
const apiPath = "/locale";
|
|
18
|
+
const payload = {};
|
|
19
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20
|
+
const apiHeaders = {
|
|
21
|
+
"content-type": "application/json"
|
|
22
|
+
};
|
|
23
|
+
return await this.client.call(
|
|
24
|
+
"get",
|
|
25
|
+
uri,
|
|
26
|
+
apiHeaders,
|
|
27
|
+
payload
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* List Locale Codes
|
|
32
|
+
*
|
|
33
|
+
* List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
|
|
34
|
+
*
|
|
35
|
+
* @throws {AppwriteException}
|
|
36
|
+
* @returns {Promise<Models.LocaleCodeList>}
|
|
37
|
+
*/
|
|
38
|
+
async listCodes() {
|
|
39
|
+
const apiPath = "/locale/codes";
|
|
40
|
+
const payload = {};
|
|
41
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
42
|
+
const apiHeaders = {
|
|
43
|
+
"content-type": "application/json"
|
|
44
|
+
};
|
|
45
|
+
return await this.client.call(
|
|
46
|
+
"get",
|
|
47
|
+
uri,
|
|
48
|
+
apiHeaders,
|
|
49
|
+
payload
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* List continents
|
|
54
|
+
*
|
|
55
|
+
* List of all continents. You can use the locale header to get the data in a supported language.
|
|
56
|
+
*
|
|
57
|
+
* @throws {AppwriteException}
|
|
58
|
+
* @returns {Promise<Models.ContinentList>}
|
|
59
|
+
*/
|
|
60
|
+
async listContinents() {
|
|
61
|
+
const apiPath = "/locale/continents";
|
|
62
|
+
const payload = {};
|
|
63
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
64
|
+
const apiHeaders = {
|
|
65
|
+
"content-type": "application/json"
|
|
66
|
+
};
|
|
67
|
+
return await this.client.call(
|
|
68
|
+
"get",
|
|
69
|
+
uri,
|
|
70
|
+
apiHeaders,
|
|
71
|
+
payload
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* List countries
|
|
76
|
+
*
|
|
77
|
+
* List of all countries. You can use the locale header to get the data in a supported language.
|
|
78
|
+
*
|
|
79
|
+
* @throws {AppwriteException}
|
|
80
|
+
* @returns {Promise<Models.CountryList>}
|
|
81
|
+
*/
|
|
82
|
+
async listCountries() {
|
|
83
|
+
const apiPath = "/locale/countries";
|
|
84
|
+
const payload = {};
|
|
85
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
86
|
+
const apiHeaders = {
|
|
87
|
+
"content-type": "application/json"
|
|
88
|
+
};
|
|
89
|
+
return await this.client.call(
|
|
90
|
+
"get",
|
|
91
|
+
uri,
|
|
92
|
+
apiHeaders,
|
|
93
|
+
payload
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* List EU countries
|
|
98
|
+
*
|
|
99
|
+
* List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.
|
|
100
|
+
*
|
|
101
|
+
* @throws {AppwriteException}
|
|
102
|
+
* @returns {Promise<Models.CountryList>}
|
|
103
|
+
*/
|
|
104
|
+
async listCountriesEU() {
|
|
105
|
+
const apiPath = "/locale/countries/eu";
|
|
106
|
+
const payload = {};
|
|
107
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
108
|
+
const apiHeaders = {
|
|
109
|
+
"content-type": "application/json"
|
|
110
|
+
};
|
|
111
|
+
return await this.client.call(
|
|
112
|
+
"get",
|
|
113
|
+
uri,
|
|
114
|
+
apiHeaders,
|
|
115
|
+
payload
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* List countries phone codes
|
|
120
|
+
*
|
|
121
|
+
* List of all countries phone codes. You can use the locale header to get the data in a supported language.
|
|
122
|
+
*
|
|
123
|
+
* @throws {AppwriteException}
|
|
124
|
+
* @returns {Promise<Models.PhoneList>}
|
|
125
|
+
*/
|
|
126
|
+
async listCountriesPhones() {
|
|
127
|
+
const apiPath = "/locale/countries/phones";
|
|
128
|
+
const payload = {};
|
|
129
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
130
|
+
const apiHeaders = {
|
|
131
|
+
"content-type": "application/json"
|
|
132
|
+
};
|
|
133
|
+
return await this.client.call(
|
|
134
|
+
"get",
|
|
135
|
+
uri,
|
|
136
|
+
apiHeaders,
|
|
137
|
+
payload
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* List currencies
|
|
142
|
+
*
|
|
143
|
+
* List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.
|
|
144
|
+
*
|
|
145
|
+
* @throws {AppwriteException}
|
|
146
|
+
* @returns {Promise<Models.CurrencyList>}
|
|
147
|
+
*/
|
|
148
|
+
async listCurrencies() {
|
|
149
|
+
const apiPath = "/locale/currencies";
|
|
150
|
+
const payload = {};
|
|
151
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
152
|
+
const apiHeaders = {
|
|
153
|
+
"content-type": "application/json"
|
|
154
|
+
};
|
|
155
|
+
return await this.client.call(
|
|
156
|
+
"get",
|
|
157
|
+
uri,
|
|
158
|
+
apiHeaders,
|
|
159
|
+
payload
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* List languages
|
|
164
|
+
*
|
|
165
|
+
* List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
|
|
166
|
+
*
|
|
167
|
+
* @throws {AppwriteException}
|
|
168
|
+
* @returns {Promise<Models.LanguageList>}
|
|
169
|
+
*/
|
|
170
|
+
async listLanguages() {
|
|
171
|
+
const apiPath = "/locale/languages";
|
|
172
|
+
const payload = {};
|
|
173
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
174
|
+
const apiHeaders = {
|
|
175
|
+
"content-type": "application/json"
|
|
176
|
+
};
|
|
177
|
+
return await this.client.call(
|
|
178
|
+
"get",
|
|
179
|
+
uri,
|
|
180
|
+
apiHeaders,
|
|
181
|
+
payload
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export { Locale };
|
|
187
|
+
//# sourceMappingURL=out.js.map
|
|
188
|
+
//# sourceMappingURL=locale.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/services/locale.ts"],"names":[],"mappings":"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","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nexport class Locale {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get user locale\n *\n * Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https://db-ip.com))\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.Locale>}\n */\n async get(): Promise<Models.Locale> {\n const apiPath = '/locale';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List Locale Codes\n *\n * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LocaleCodeList>}\n */\n async listCodes(): Promise<Models.LocaleCodeList> {\n const apiPath = '/locale/codes';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List continents\n *\n * List of all continents. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.ContinentList>}\n */\n async listContinents(): Promise<Models.ContinentList> {\n const apiPath = '/locale/continents';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List countries\n *\n * List of all countries. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n async listCountries(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List EU countries\n *\n * List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n async listCountriesEU(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries/eu';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List countries phone codes\n *\n * List of all countries phone codes. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.PhoneList>}\n */\n async listCountriesPhones(): Promise<Models.PhoneList> {\n const apiPath = '/locale/countries/phones';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List currencies\n *\n * List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CurrencyList>}\n */\n async listCurrencies(): Promise<Models.CurrencyList> {\n const apiPath = '/locale/currencies';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List languages\n *\n * List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LanguageList>}\n */\n async listLanguages(): Promise<Models.LanguageList> {\n const apiPath = '/locale/languages';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
|