node-appwrite
Version:
Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API
1 lines • 70.5 kB
Source Map (JSON)
{"version":3,"sources":["../../src/services/account.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+D;AAMjE,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAiF;AAC7E,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,OAA+C,QAAgB,OAAe,UAAkB,MAAkD;AAC9I,QAAI,OAAO,WAAW,aAAa;AAC/B,YAAM,IAAI,kBAAkB,sCAAsC;AAAA,IACtE;AACA,QAAI,OAAO,UAAU,aAAa;AAC9B,YAAM,IAAI,kBAAkB,qCAAqC;AAAA,IACrE;AACA,QAAI,OAAO,aAAa,aAAa;AACjC,YAAM,IAAI,kBAAkB,wCAAwC;AAAA,IACxE;AACA,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,WAAW,aAAa;AAC/B,cAAQ,QAAQ,IAAI;AAAA,IACxB;AACA,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,QAAI,OAAO,aAAa,aAAa;AACjC,cAAQ,UAAU,IAAI;AAAA,IAC1B;AACA,QAAI,OAAO,SAAS,aAAa;AAC7B,cAAQ,MAAM,IAAI;AAAA,IACtB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO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AW,aAAa;AAC/B,cAAQ,QAAQ,IAAI;AAAA,IACxB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\nimport { AuthenticatorType } from '../enums/authenticator-type';\nimport { AuthenticationFactor } from '../enums/authentication-factor';\nimport { OAuthProvider } from '../enums/o-auth-provider';\n\nexport class Account {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get the currently logged in user.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.User<Preferences>>}\n */\n get<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>> {\n const apiPath = '/account';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).\n *\n * @param {string} userId\n * @param {string} email\n * @param {string} password\n * @param {string} name\n * @throws {AppwriteException}\n * @returns {Promise<Models.User<Preferences>>}\n */\n create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof email === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"email\"');\n }\n if (typeof password === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"password\"');\n }\n const apiPath = '/account';\n const payload: Payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof email !== 'undefined') {\n payload['email'] = email;\n }\n if (typeof password !== 'undefined') {\n payload['password'] = password;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\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 this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n\n *\n * @param {string} email\n * @param {string} password\n * @throws {AppwriteException}\n * @returns {Promise<Models.User<Preferences>>}\n */\n updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.User<Preferences>> {\n if (typeof email === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"email\"');\n }\n if (typeof password === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"password\"');\n }\n const apiPath = '/account/email';\n const payload: Payload = {};\n if (typeof email !== 'undefined') {\n payload['email'] = email;\n }\n if (typeof password !== 'undefined') {\n payload['password'] = password;\n }\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 this.client.call(\n 'patch',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get the list of identities for the currently logged in user.\n *\n * @param {string[]} queries\n * @throws {AppwriteException}\n * @returns {Promise<Models.IdentityList>}\n */\n listIdentities(queries?: string[]): Promise<Models.IdentityList> {\n const apiPath = '/account/identities';\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Delete an identity by its unique ID.\n *\n * @param {string} identityId\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteIdentity(identityId: string): Promise<{}> {\n if (typeof identityId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"identityId\"');\n }\n const apiPath = '/account/identities/{identityId}'.replace('{identityId}', identityId);\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 this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.Jwt>}\n */\n createJWT(): Promise<Models.Jwt> {\n const apiPath = '/account/jwts';\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 this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.\n *\n * @param {string[]} queries\n * @throws {AppwriteException}\n * @returns {Promise<Models.LogList>}\n */\n listLogs(queries?: string[]): Promise<Models.LogList> {\n const apiPath = '/account/logs';\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Enable or disable MFA on an account.\n *\n * @param {boolean} mfa\n * @throws {AppwriteException}\n * @returns {Promise<Models.User<Preferences>>}\n */\n updateMFA<Preferences extends Models.Preferences>(mfa: boolean): Promise<Models.User<Preferences>> {\n if (typeof mfa === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"mfa\"');\n }\n const apiPath = '/account/mfa';\n const payload: Payload = {};\n if (typeof mfa !== 'undefined') {\n payload['mfa'] = mfa;\n }\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 this.client.call(\n 'patch',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.\n *\n * @param {AuthenticatorType} type\n * @throws {AppwriteException}\n * @returns {Promise<Models.MfaType>}\n */\n createMfaAuthenticator(type: AuthenticatorType): Promise<Models.MfaType> {\n if (typeof type === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"type\"');\n }\n const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);\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 this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.\n *\n * @param {AuthenticatorType} type\n * @param {string} otp\n * @throws {AppwriteException}\n * @returns {Promise<Models.User<Preferences>>}\n */\n updateMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>> {\n if (typeof type === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"type\"');\n }\n if (typeof otp === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"otp\"');\n }\n const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);\n const payload: Payload = {};\n if (typeof otp !== 'undefined') {\n payload['otp'] = otp;\n }\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 this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Delete an authenticator for a user by ID.\n *\n * @param {AuthenticatorType} type\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteMfaAuthenticator(type: AuthenticatorType): Promise<{}> {\n if (typeof type === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"type\"');\n }\n const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);\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 this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.\n *\n * @param {AuthenticationFactor} factor\n * @throws {AppwriteException}\n * @returns {Promise<Models.MfaChallenge>}\n */\n createMfaChallenge(factor: AuthenticationFactor): Promise<Models.MfaChallenge> {\n if (typeof factor === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"factor\"');\n }\n const apiPath = '/account/mfa/challenge';\n const payload: Payload = {};\n if (typeof factor !== 'undefined') {\n payload['factor'] = factor;\n }\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 this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.\n *\n * @param {string} challengeId\n * @param {string} otp\n * @throws {AppwriteException}\n * @returns {Promise<Models.Session>}\n */\n updateMfaChallenge(challengeId: string, otp: string): Promise<Models.Session> {\n if (typeof challengeId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"challengeId\"');\n }\n if (typeof otp === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"otp\"');\n }\n const apiPath = '/account/mfa/challenge';\n const payload: Payload = {};\n if (typeof challengeId !== 'undefined') {\n payload['challengeId'] = challengeId;\n }\n if (typeof otp !== 'undefined') {\n payload['otp'] = otp;\n }\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 this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List the factors available on the account to be used as a MFA challange.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.MfaFactors>}\n */\n listMfaFactors(): Promise<Models.MfaFactors> {\n const apiPath = '/account/mfa/factors';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.MfaRecoveryCodes>}\n */\n getMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes> {\n const apiPath = '/account/mfa/recovery-codes';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.MfaRecoveryCodes>}\n */\n createMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes> {\n const apiPath = '/account/mfa/recovery-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 this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.MfaRecoveryCodes>}\n */\n updateMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes> {\n const apiPath = '/account/mfa/recovery-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 this.client.call(\n 'patch',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Update currently logged in user account name.\n *\n * @param {string} name\n * @throws {AppwriteException}\n * @returns {Promise<Models.User<Preferences>>}\n */\n updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.User<Preferences>> {\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n const apiPath = '/account/name';\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\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 this.client.call(\n 'patch',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.\n *\n * @param {string} password\n * @param {string} oldPassword\n * @throws {AppwriteException}\n * @returns {Promise<Models.User<Preferences>>}\n */\n updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>> {\n if (typeof password === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"password\"');\n }\n const apiPath = '/account/password';\n const payload: Payload = {};\n if (typeof password !== 'undefined') {\n payload['password'] = password;\n }\n if (typeof oldPassword !== 'undefined') {\n payload['oldPassword'] = oldPassword;\n }\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 this.client.call(\n 'patch',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.\n *\n * @param {string} phone\n * @param {string} password\n * @throws {AppwriteException}\n * @returns {Promise<Models.User<Preferences>>}\n */\n updatePhone<Preferences extends Models.Preferences>(phone: string, password: string): Promise<Models.User<Preferences>> {\n if (typeof phone === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"phone\"');\n }\n if (typeof password === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"password\"');\n }\n const apiPath = '/account/phone';\n const payload: Payload = {};\n if (typeof phone !== 'undefined') {\n payload['phone'] = phone;\n }\n if (typeof password !== 'undefined') {\n payload['password'] = password;\n }\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 this.client.call(\n 'patch',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get the preferences as a key-value object for the currently logged in user.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Preferences>}\n */\n getPrefs<Preferences extends Models.Preferences>(): Promise<Preferences> {\n const apiPath = '/account/prefs';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.\n *\n * @param {Partial<Preferences>} prefs\n * @throws {AppwriteException}\n * @returns {Promise<Models.User<Preferences>>}\n */\n updatePrefs<Preferences extends Models.Preferences>(prefs: Partial<Preferences>): Promise<Models.User<Preferences>> {\n if (typeof prefs === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"prefs\"');\n }\n const apiPath = '/account/prefs';\n const payload: Payload = {};\n if (typeof prefs !== 'undefined') {\n payload['prefs'] = prefs;\n }\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 this.client.call(\n 'patch',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.\n *\n * @param {string} email\n * @param {string} url\n * @throws {AppwriteException}\n * @returns {Promise<Models.Token>}\n */\n createRecovery(email: string, url: string): Promise<Models.Token> {\n if (typeof email === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"email\"');\n }\n if (typeof url === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"url\"');\n }\n const apiPath = '/account/recovery';\n const payload: Payload = {};\n if (typeof email !== 'undefined') {\n payload['email'] = email;\n }\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\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 this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n *\n * @param {string} userId\n * @param {string} secret\n * @param {string} password\n * @throws {AppwriteException}\n * @returns {Promise<Models.Token>}\n */\n updateRecovery(userId: string, secret: string, password: string): Promise<Models.Token> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof secret === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"secret\"');\n }\n if (typeof password === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"password\"');\n }\n const apiPath = '/account/recovery';\n const payload: Payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof secret !== 'undefined') {\n payload['secret'] = secret;\n }\n if (typeof password !== 'undefined') {\n payload['password'] = password;\n }\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 this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get the list of active sessions across different devices for the currently logged in user.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.SessionList>}\n */\n listSessions(): Promise<Models.SessionList> {\n const apiPath = '/account/sessions';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Delete all sessions from the user account and remove any sessions cookies from the end client.\n *\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteSessions(): Promise<{}> {\n const apiPath = '/account/sessions';\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 this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail) or create an [OAuth2 session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.Session>}\n */\n createAnonymousSession(): Promise<Models.Session> {\n const apiPath = '/account/sessions/anonymous';\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 this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).\n *\n * @param {string} email\n * @param {string} password\n * @throws {AppwriteException}\n * @returns {Promise<Models.Session>}\n */\n createEmailPasswordSession(email: string, password: string): Promise<Models.Session> {\n if (typeof email === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"email\"');\n }\n if (typeof password === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"password\"');\n }\n const apiPath = '/account/sessions/email';\n const payload: Payload = {};\n if (typeof email !== 'undefined') {\n payload['email'] = email;\n }\n if (typeof password !== 'undefined') {\n payload['password'] = password;\n }\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 this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.\n *\n * @param {string} userId\n * @param {string} secret\n * @throws {AppwriteException}\n * @returns {Promise<Models.Session>}\n */\n updateMagicURLSession(userId: string, secret: string): Promise<Models.Session> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof secret === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"secret\"');\n }\n const apiPath = '/account/sessions/magic-url';\n const payload: Payload = {};\n if (typeof userId !== 'undefined') {\n paylo