You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

node-appwrite

Package Overview
Dependencies
Maintainers
3
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-appwrite - npm Package Compare versions

Comparing version

to
17.2.0

4

dist/client.js

@@ -18,3 +18,3 @@ 'use strict';

function getUserAgent() {
let ua = "AppwriteNodeJSSDK/17.1.0";
let ua = "AppwriteNodeJSSDK/17.2.0";
const platform = [];

@@ -55,3 +55,3 @@ if (typeof process !== "undefined") {

"x-sdk-language": "nodejs",
"x-sdk-version": "17.1.0",
"x-sdk-version": "17.2.0",
"user-agent": getUserAgent(),

@@ -58,0 +58,0 @@ "X-Appwrite-Response-Format": "1.7.0"

@@ -17,3 +17,3 @@ import { Client } from '../client.js';

*/
get<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
get<Preferences extends Models.Preferences = Models.DefaultPreferences>(): Promise<Models.User<Preferences>>;
/**

@@ -29,8 +29,8 @@ * 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).

*/
create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
/**
* 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.
This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
* This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
*
*
* @param {string} email

@@ -41,3 +41,3 @@ * @param {string} password

*/
updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.User<Preferences>>;
updateEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(email: string, password: string): Promise<Models.User<Preferences>>;
/**

@@ -81,3 +81,3 @@ * Get the list of identities for the currently logged in user.

*/
updateMFA<Preferences extends Models.Preferences>(mfa: boolean): Promise<Models.User<Preferences>>;
updateMFA<Preferences extends Models.Preferences = Models.DefaultPreferences>(mfa: boolean): Promise<Models.User<Preferences>>;
/**

@@ -99,3 +99,3 @@ * 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.

*/
updateMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>>;
updateMfaAuthenticator<Preferences extends Models.Preferences = Models.DefaultPreferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>>;
/**

@@ -161,3 +161,3 @@ * Delete an authenticator for a user by ID.

*/
updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.User<Preferences>>;
updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(name: string): Promise<Models.User<Preferences>>;
/**

@@ -171,3 +171,3 @@ * 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.

*/
updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>>;
updatePassword<Preferences extends Models.Preferences = Models.DefaultPreferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>>;
/**

@@ -181,3 +181,3 @@ * Update the currently logged in user&#039;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.

*/
updatePhone<Preferences extends Models.Preferences>(phone: string, password: string): Promise<Models.User<Preferences>>;
updatePhone<Preferences extends Models.Preferences = Models.DefaultPreferences>(phone: string, password: string): Promise<Models.User<Preferences>>;
/**

@@ -189,3 +189,3 @@ * Get the preferences as a key-value object for the currently logged in user.

*/
getPrefs<Preferences extends Models.Preferences>(): Promise<Preferences>;
getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(): Promise<Preferences>;
/**

@@ -198,3 +198,3 @@ * 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.

*/
updatePrefs<Preferences extends Models.Preferences>(prefs: Partial<Preferences>): Promise<Models.User<Preferences>>;
updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(prefs: Partial<Preferences>): Promise<Models.User<Preferences>>;
/**

@@ -211,5 +211,5 @@ * 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&#039;s email address is valid for 1 hour.

* 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.
Please 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.
*
* Please 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.
*
* @param {string} userId

@@ -245,5 +245,5 @@ * @param {string} secret

* 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.
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {string} email

@@ -312,8 +312,8 @@ * @param {string} password

*/
updateStatus<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
updateStatus<Preferences extends Models.Preferences = Models.DefaultPreferences>(): Promise<Models.User<Preferences>>;
/**
* Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user&#039;s email is valid for 15 minutes.
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {string} userId

@@ -328,6 +328,6 @@ * @param {string} email

* Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user&#039;s email address is valid for 1 hour.
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
*
* @param {string} userId

@@ -343,7 +343,7 @@ * @param {string} email

* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL&#039;s back to your app when login is completed.
If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {OAuthProvider} provider

@@ -359,5 +359,5 @@ * @param {string} success

* Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user&#039;s phone is valid for 15 minutes.
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {string} userId

@@ -371,6 +371,6 @@ * @param {string} phone

* Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user&#039;s email address is valid for 7 days.
Please 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.
*
* Please 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.
*
*
* @param {string} url

@@ -377,0 +377,0 @@ * @throws {AppwriteException}

@@ -73,11 +73,11 @@ 'use strict';

/**
* 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.
This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
*
* @param {string} email
* @param {string} password
* @throws {AppwriteException}
* @returns {Promise<Models.User<Preferences>>}
*/
* 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.
* This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
*
*
* @param {string} email
* @param {string} password
* @throws {AppwriteException}
* @returns {Promise<Models.User<Preferences>>}
*/
updateEmail(email, password) {

@@ -612,12 +612,12 @@ if (typeof email === "undefined") {

/**
* 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.
Please 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.
*
* @param {string} userId
* @param {string} secret
* @param {string} password
* @throws {AppwriteException}
* @returns {Promise<Models.Token>}
*/
* 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.
*
* Please 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.
*
* @param {string} userId
* @param {string} secret
* @param {string} password
* @throws {AppwriteException}
* @returns {Promise<Models.Token>}
*/
updateRecovery(userId, secret, password) {

@@ -714,11 +714,11 @@ if (typeof userId === "undefined") {

/**
* 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.
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {string} email
* @param {string} password
* @throws {AppwriteException}
* @returns {Promise<Models.Session>}
*/
* 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.
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {string} email
* @param {string} password
* @throws {AppwriteException}
* @returns {Promise<Models.Session>}
*/
createEmailPasswordSession(email, password) {

@@ -943,12 +943,12 @@ if (typeof email === "undefined") {

/**
* Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user&#039;s email is valid for 15 minutes.
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {string} userId
* @param {string} email
* @param {boolean} phrase
* @throws {AppwriteException}
* @returns {Promise<Models.Token>}
*/
* Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user&#039;s email is valid for 15 minutes.
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {string} userId
* @param {string} email
* @param {boolean} phrase
* @throws {AppwriteException}
* @returns {Promise<Models.Token>}
*/
createEmailToken(userId, email, phrase) {

@@ -984,14 +984,14 @@ if (typeof userId === "undefined") {

/**
* Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user&#039;s email address is valid for 1 hour.
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {string} userId
* @param {string} email
* @param {string} url
* @param {boolean} phrase
* @throws {AppwriteException}
* @returns {Promise<Models.Token>}
*/
* Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user&#039;s email address is valid for 1 hour.
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
*
* @param {string} userId
* @param {string} email
* @param {string} url
* @param {boolean} phrase
* @throws {AppwriteException}
* @returns {Promise<Models.Token>}
*/
createMagicURLToken(userId, email, url, phrase) {

@@ -1030,15 +1030,15 @@ if (typeof userId === "undefined") {

/**
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL&#039;s back to your app when login is completed.
If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {OAuthProvider} provider
* @param {string} success
* @param {string} failure
* @param {string[]} scopes
* @throws {AppwriteException}
* @returns {Promise<string>}
*/
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL&#039;s back to your app when login is completed.
*
* If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {OAuthProvider} provider
* @param {string} success
* @param {string} failure
* @param {string[]} scopes
* @throws {AppwriteException}
* @returns {Promise<string>}
*/
createOAuth2Token(provider, success, failure, scopes) {

@@ -1069,11 +1069,11 @@ if (typeof provider === "undefined") {

/**
* Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user&#039;s phone is valid for 15 minutes.
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {string} userId
* @param {string} phone
* @throws {AppwriteException}
* @returns {Promise<Models.Token>}
*/
* Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user&#039;s phone is valid for 15 minutes.
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {string} userId
* @param {string} phone
* @throws {AppwriteException}
* @returns {Promise<Models.Token>}
*/
createPhoneToken(userId, phone) {

@@ -1106,11 +1106,11 @@ if (typeof userId === "undefined") {

/**
* Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user&#039;s email address is valid for 7 days.
Please 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.
*
* @param {string} url
* @throws {AppwriteException}
* @returns {Promise<Models.Token>}
*/
* Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user&#039;s email address is valid for 7 days.
*
* Please 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.
*
*
* @param {string} url
* @throws {AppwriteException}
* @returns {Promise<Models.Token>}
*/
createVerification(url) {

@@ -1117,0 +1117,0 @@ if (typeof url === "undefined") {

@@ -13,5 +13,5 @@ import { Client } from '../client.js';

* You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
* @param {Browser} code

@@ -27,6 +27,6 @@ * @param {number} width

* The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
*
* @param {CreditCard} code

@@ -42,5 +42,5 @@ * @param {number} width

* Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
This endpoint does not follow HTTP redirects.
*
* This endpoint does not follow HTTP redirects.
*
* @param {string} url

@@ -53,6 +53,6 @@ * @throws {AppwriteException}

* You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
*
* @param {Flag} code

@@ -68,7 +68,7 @@ * @param {number} width

* Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.
This endpoint does not follow HTTP redirects.
*
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.
*
* This endpoint does not follow HTTP redirects.
*
* @param {string} url

@@ -83,8 +83,8 @@ * @param {number} width

* Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the &#039;name&#039; parameter. If no name is given and no user is logged, an empty avatar will be returned.
You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user&#039;s initials when reloading the same theme will always return for the same initials.
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
* You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user&#039;s initials when reloading the same theme will always return for the same initials.
*
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
*
* @param {string} name

@@ -100,4 +100,4 @@ * @param {number} width

* Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
*
*
* @param {string} text

@@ -104,0 +104,0 @@ * @param {number} size

@@ -10,13 +10,13 @@ 'use strict';

/**
* You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
* @param {Browser} code
* @param {number} width
* @param {number} height
* @param {number} quality
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
* You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.
*
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
* @param {Browser} code
* @param {number} width
* @param {number} height
* @param {number} quality
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
getBrowser(code, width, height, quality) {

@@ -48,14 +48,14 @@ if (typeof code === "undefined") {

/**
* The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
* @param {CreditCard} code
* @param {number} width
* @param {number} height
* @param {number} quality
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
* The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.
*
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
*
* @param {CreditCard} code
* @param {number} width
* @param {number} height
* @param {number} quality
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
getCreditCard(code, width, height, quality) {

@@ -87,10 +87,10 @@ if (typeof code === "undefined") {

/**
* Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
This endpoint does not follow HTTP redirects.
*
* @param {string} url
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
* Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
*
* This endpoint does not follow HTTP redirects.
*
* @param {string} url
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
getFavicon(url) {

@@ -116,14 +116,14 @@ if (typeof url === "undefined") {

/**
* You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
* @param {Flag} code
* @param {number} width
* @param {number} height
* @param {number} quality
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
* You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.
*
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
*
* @param {Flag} code
* @param {number} width
* @param {number} height
* @param {number} quality
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
getFlag(code, width, height, quality) {

@@ -155,14 +155,14 @@ if (typeof code === "undefined") {

/**
* Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.
This endpoint does not follow HTTP redirects.
*
* @param {string} url
* @param {number} width
* @param {number} height
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
* Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.
*
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.
*
* This endpoint does not follow HTTP redirects.
*
* @param {string} url
* @param {number} width
* @param {number} height
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
getImage(url, width, height) {

@@ -194,16 +194,16 @@ if (typeof url === "undefined") {

/**
* Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the &#039;name&#039; parameter. If no name is given and no user is logged, an empty avatar will be returned.
You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user&#039;s initials when reloading the same theme will always return for the same initials.
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
* @param {string} name
* @param {number} width
* @param {number} height
* @param {string} background
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
* Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the &#039;name&#039; parameter. If no name is given and no user is logged, an empty avatar will be returned.
*
* You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user&#039;s initials when reloading the same theme will always return for the same initials.
*
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
*
* @param {string} name
* @param {number} width
* @param {number} height
* @param {string} background
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
getInitials(name, width, height, background) {

@@ -235,12 +235,12 @@ const apiPath = "/avatars/initials";

/**
* Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
*
* @param {string} text
* @param {number} size
* @param {number} margin
* @param {boolean} download
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
* Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
*
*
* @param {string} text
* @param {number} size
* @param {number} margin
* @param {boolean} download
* @throws {AppwriteException}
* @returns {Promise<ArrayBuffer>}
*/
getQR(text, size, margin, download) {

@@ -247,0 +247,0 @@ if (typeof text === "undefined") {

@@ -22,4 +22,4 @@ import { Client } from '../client.js';

* Create a new Database.
*
*
* @param {string} databaseId

@@ -124,4 +124,4 @@ * @param {string} name

* Create a boolean attribute.
*
*
* @param {string} databaseId

@@ -178,4 +178,4 @@ * @param {string} collectionId

* Create an email attribute.
*
*
* @param {string} databaseId

@@ -193,4 +193,4 @@ * @param {string} collectionId

* Update an email attribute. Changing the `default` value will not update already existing documents.
*
*
* @param {string} databaseId

@@ -208,4 +208,4 @@ * @param {string} collectionId

* Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute.
*
*
* @param {string} databaseId

@@ -224,4 +224,4 @@ * @param {string} collectionId

* Update an enum attribute. Changing the `default` value will not update already existing documents.
*
*
* @param {string} databaseId

@@ -240,4 +240,4 @@ * @param {string} collectionId

* Create a float attribute. Optionally, minimum and maximum values can be provided.
*
*
* @param {string} databaseId

@@ -257,4 +257,4 @@ * @param {string} collectionId

* Update a float attribute. Changing the `default` value will not update already existing documents.
*
*
* @param {string} databaseId

@@ -274,4 +274,4 @@ * @param {string} collectionId

* Create an integer attribute. Optionally, minimum and maximum values can be provided.
*
*
* @param {string} databaseId

@@ -291,4 +291,4 @@ * @param {string} collectionId

* Update an integer attribute. Changing the `default` value will not update already existing documents.
*
*
* @param {string} databaseId

@@ -308,4 +308,4 @@ * @param {string} collectionId

* Create IP address attribute.
*
*
* @param {string} databaseId

@@ -323,4 +323,4 @@ * @param {string} collectionId

* Update an ip attribute. Changing the `default` value will not update already existing documents.
*
*
* @param {string} databaseId

@@ -338,4 +338,4 @@ * @param {string} collectionId

* Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
*
*
* @param {string} databaseId

@@ -355,4 +355,4 @@ * @param {string} collectionId

* Create a string attribute.
*
*
* @param {string} databaseId

@@ -372,4 +372,4 @@ * @param {string} collectionId

* Update a string attribute. Changing the `default` value will not update already existing documents.
*
*
* @param {string} databaseId

@@ -388,4 +388,4 @@ * @param {string} collectionId

* Create a URL attribute.
*
*
* @param {string} databaseId

@@ -403,4 +403,4 @@ * @param {string} collectionId

* Update an url attribute. Changing the `default` value will not update already existing documents.
*
*
* @param {string} databaseId

@@ -438,4 +438,4 @@ * @param {string} collectionId

* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
*
*
* @param {string} databaseId

@@ -459,3 +459,3 @@ * @param {string} collectionId

*/
listDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
/**

@@ -467,3 +467,3 @@ * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.

* @param {string} documentId
* @param {Omit<Document, keyof Models.Document>} data
* @param {Document extends Models.DefaultDocument ? Models.DataWithoutDocumentKeys : Omit<Document, keyof Models.Document>} data
* @param {string[]} permissions

@@ -473,8 +473,8 @@ * @throws {AppwriteException}

*/
createDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document>;
createDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Models.DataWithoutDocumentKeys : Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document>;
/**
* **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
*
* Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
*
* @param {string} databaseId

@@ -486,8 +486,9 @@ * @param {string} collectionId

*/
createDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>>;
createDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>>;
/**
* **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
*
* Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
*
*
* @param {string} databaseId

@@ -499,8 +500,8 @@ * @param {string} collectionId

*/
upsertDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>>;
upsertDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>>;
/**
* **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.
*
* Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.
*
* @param {string} databaseId

@@ -513,8 +514,8 @@ * @param {string} collectionId

*/
updateDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, data?: object, queries?: string[]): Promise<Models.DocumentList<Document>>;
updateDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, data?: object, queries?: string[]): Promise<Models.DocumentList<Document>>;
/**
* **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
Bulk delete documents using queries, if no queries are passed then all documents are deleted.
*
* Bulk delete documents using queries, if no queries are passed then all documents are deleted.
*
* @param {string} databaseId

@@ -526,3 +527,3 @@ * @param {string} collectionId

*/
deleteDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
deleteDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
/**

@@ -538,8 +539,8 @@ * Get a document by its unique ID. This endpoint response returns a JSON object with the document data.

*/
getDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Document>;
getDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Document>;
/**
* **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
*
* Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
*
* @param {string} databaseId

@@ -553,3 +554,3 @@ * @param {string} collectionId

*/
upsertDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: object, permissions?: string[]): Promise<Document>;
upsertDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data: object, permissions?: string[]): Promise<Document>;
/**

@@ -561,3 +562,3 @@ * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.

* @param {string} documentId
* @param {Partial<Omit<Document, keyof Models.Document>>} data
* @param {Partial<Document extends Models.DefaultDocument ? Models.DataWithoutDocumentKeys : Omit<Document, keyof Models.Document>>} data
* @param {string[]} permissions

@@ -567,3 +568,3 @@ * @throws {AppwriteException}

*/
updateDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data?: Partial<Omit<Document, keyof Models.Document>>, permissions?: string[]): Promise<Document>;
updateDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data?: Partial<Document extends Models.DefaultDocument ? Models.DataWithoutDocumentKeys : Omit<Document, keyof Models.Document>>, permissions?: string[]): Promise<Document>;
/**

@@ -580,2 +581,28 @@ * Delete a document by its unique ID.

/**
* Decrement a specific attribute of a document by a given value.
*
* @param {string} databaseId
* @param {string} collectionId
* @param {string} documentId
* @param {string} attribute
* @param {number} value
* @param {number} min
* @throws {AppwriteException}
* @returns {Promise<Document>}
*/
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number): Promise<Document>;
/**
* Increment a specific attribute of a document by a given value.
*
* @param {string} databaseId
* @param {string} collectionId
* @param {string} documentId
* @param {string} attribute
* @param {number} value
* @param {number} max
* @throws {AppwriteException}
* @returns {Promise<Document>}
*/
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number): Promise<Document>;
/**
* List indexes in the collection.

@@ -592,3 +619,3 @@ *

* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
Attributes can be `key`, `fulltext`, and `unique`.
* Attributes can be `key`, `fulltext`, and `unique`.
*

@@ -595,0 +622,0 @@ * @param {string} databaseId

@@ -122,7 +122,7 @@ import { Client, UploadProgress } from '../client.js';

* Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you&#039;ll need to update the function&#039;s deployment to use your new deployment UID.
This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).
Use the &quot;command&quot; param to set the entrypoint used to execute your code.
*
* This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).
*
* Use the &quot;command&quot; param to set the entrypoint used to execute your code.
*
* @param {string} functionId

@@ -149,5 +149,5 @@ * @param {File} code

* Create a deployment based on a template.
Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details.
*
* Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details.
*
* @param {string} functionId

@@ -165,5 +165,5 @@ * @param {string} repository

* Create a deployment when a function is connected to VCS.
This endpoint lets you create deployment from a branch, commit, or a tag.
*
* This endpoint lets you create deployment from a branch, commit, or a tag.
*
* @param {string} functionId

@@ -170,0 +170,0 @@ * @param {VCSDeploymentType} type

@@ -375,16 +375,16 @@ 'use strict';

/**
* Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you&#039;ll need to update the function&#039;s deployment to use your new deployment UID.
This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).
Use the &quot;command&quot; param to set the entrypoint used to execute your code.
*
* @param {string} functionId
* @param {File} code
* @param {boolean} activate
* @param {string} entrypoint
* @param {string} commands
* @throws {AppwriteException}
* @returns {Promise<Models.Deployment>}
*/
* Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you&#039;ll need to update the function&#039;s deployment to use your new deployment UID.
*
* This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).
*
* Use the &quot;command&quot; param to set the entrypoint used to execute your code.
*
* @param {string} functionId
* @param {File} code
* @param {boolean} activate
* @param {string} entrypoint
* @param {string} commands
* @throws {AppwriteException}
* @returns {Promise<Models.Deployment>}
*/
createDeployment(functionId, code, activate, entrypoint, commands, onProgress = (progress) => {

@@ -463,15 +463,15 @@ }) {

/**
* Create a deployment based on a template.
Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details.
*
* @param {string} functionId
* @param {string} repository
* @param {string} owner
* @param {string} rootDirectory
* @param {string} version
* @param {boolean} activate
* @throws {AppwriteException}
* @returns {Promise<Models.Deployment>}
*/
* Create a deployment based on a template.
*
* Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details.
*
* @param {string} functionId
* @param {string} repository
* @param {string} owner
* @param {string} rootDirectory
* @param {string} version
* @param {boolean} activate
* @throws {AppwriteException}
* @returns {Promise<Models.Deployment>}
*/
createTemplateDeployment(functionId, repository, owner, rootDirectory, version, activate) {

@@ -522,13 +522,13 @@ if (typeof functionId === "undefined") {

/**
* Create a deployment when a function is connected to VCS.
This endpoint lets you create deployment from a branch, commit, or a tag.
*
* @param {string} functionId
* @param {VCSDeploymentType} type
* @param {string} reference
* @param {boolean} activate
* @throws {AppwriteException}
* @returns {Promise<Models.Deployment>}
*/
* Create a deployment when a function is connected to VCS.
*
* This endpoint lets you create deployment from a branch, commit, or a tag.
*
* @param {string} functionId
* @param {VCSDeploymentType} type
* @param {string} reference
* @param {boolean} activate
* @throws {AppwriteException}
* @returns {Promise<Models.Deployment>}
*/
createVcsDeployment(functionId, type, reference, activate) {

@@ -535,0 +535,0 @@ if (typeof functionId === "undefined") {

@@ -87,4 +87,4 @@ import { Client } from '../client.js';

* Returns the amount of failed jobs in a given queue.
*
*
* @param {Name} name

@@ -91,0 +91,0 @@ * @param {number} threshold

@@ -214,10 +214,10 @@ 'use strict';

/**
* Returns the amount of failed jobs in a given queue.
*
* @param {Name} name
* @param {number} threshold
* @throws {AppwriteException}
* @returns {Promise<Models.HealthQueue>}
*/
* Returns the amount of failed jobs in a given queue.
*
*
* @param {Name} name
* @param {number} threshold
* @throws {AppwriteException}
* @returns {Promise<Models.HealthQueue>}
*/
getFailedJobs(name, threshold) {

@@ -224,0 +224,0 @@ if (typeof name === "undefined") {

@@ -10,5 +10,5 @@ import { Client } from '../client.js';

* 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.
([IP Geolocation by DB-IP](https://db-ip.com))
*
* ([IP Geolocation by DB-IP](https://db-ip.com))
*
* @throws {AppwriteException}

@@ -15,0 +15,0 @@ * @returns {Promise<Models.Locale>}

@@ -8,9 +8,9 @@ 'use strict';

/**
* 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.
([IP Geolocation by DB-IP](https://db-ip.com))
*
* @throws {AppwriteException}
* @returns {Promise<Models.Locale>}
*/
* 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.
*
* ([IP Geolocation by DB-IP](https://db-ip.com))
*
* @throws {AppwriteException}
* @returns {Promise<Models.Locale>}
*/
get() {

@@ -17,0 +17,0 @@ const apiPath = "/locale";

@@ -40,4 +40,4 @@ import { Client } from '../client.js';

* Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} messageId

@@ -87,4 +87,4 @@ * @param {string[]} topics

* Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} messageId

@@ -129,4 +129,4 @@ * @param {string[]} topics

* Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} messageId

@@ -145,4 +145,4 @@ * @param {string[]} topics

* Get a message by its unique ID.
*
*
* @param {string} messageId

@@ -478,4 +478,4 @@ * @throws {AppwriteException}

* Get a provider by its unique ID.
*
*
* @param {string} providerId

@@ -533,4 +533,4 @@ * @throws {AppwriteException}

* Get a topic by its unique ID.
*
*
* @param {string} topicId

@@ -543,4 +543,4 @@ * @throws {AppwriteException}

* Update a topic by its unique ID.
*
*
* @param {string} topicId

@@ -592,4 +592,4 @@ * @param {string} name

* Get a subscriber by its unique ID.
*
*
* @param {string} topicId

@@ -596,0 +596,0 @@ * @param {string} subscriberId

@@ -113,20 +113,20 @@ 'use strict';

/**
* Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
* @param {string} messageId
* @param {string[]} topics
* @param {string[]} users
* @param {string[]} targets
* @param {string} subject
* @param {string} content
* @param {boolean} draft
* @param {boolean} html
* @param {string[]} cc
* @param {string[]} bcc
* @param {string} scheduledAt
* @param {string[]} attachments
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
* Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} messageId
* @param {string[]} topics
* @param {string[]} users
* @param {string[]} targets
* @param {string} subject
* @param {string} content
* @param {boolean} draft
* @param {boolean} html
* @param {string[]} cc
* @param {string[]} bcc
* @param {string} scheduledAt
* @param {string[]} attachments
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
updateEmail(messageId, topics, users, targets, subject, content, draft, html, cc, bcc, scheduledAt, attachments) {

@@ -282,27 +282,27 @@ if (typeof messageId === "undefined") {

/**
* Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
* @param {string} messageId
* @param {string[]} topics
* @param {string[]} users
* @param {string[]} targets
* @param {string} title
* @param {string} body
* @param {object} data
* @param {string} action
* @param {string} image
* @param {string} icon
* @param {string} sound
* @param {string} color
* @param {string} tag
* @param {number} badge
* @param {boolean} draft
* @param {string} scheduledAt
* @param {boolean} contentAvailable
* @param {boolean} critical
* @param {MessagePriority} priority
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
* Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} messageId
* @param {string[]} topics
* @param {string[]} users
* @param {string[]} targets
* @param {string} title
* @param {string} body
* @param {object} data
* @param {string} action
* @param {string} image
* @param {string} icon
* @param {string} sound
* @param {string} color
* @param {string} tag
* @param {number} badge
* @param {boolean} draft
* @param {string} scheduledAt
* @param {boolean} contentAvailable
* @param {boolean} critical
* @param {MessagePriority} priority
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority) {

@@ -434,15 +434,15 @@ if (typeof messageId === "undefined") {

/**
* Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
* @param {string} messageId
* @param {string[]} topics
* @param {string[]} users
* @param {string[]} targets
* @param {string} content
* @param {boolean} draft
* @param {string} scheduledAt
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
* Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} messageId
* @param {string[]} topics
* @param {string[]} users
* @param {string[]} targets
* @param {string} content
* @param {boolean} draft
* @param {string} scheduledAt
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
updateSms(messageId, topics, users, targets, content, draft, scheduledAt) {

@@ -484,9 +484,9 @@ if (typeof messageId === "undefined") {

/**
* Get a message by its unique ID.
*
* @param {string} messageId
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
* Get a message by its unique ID.
*
*
* @param {string} messageId
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
getMessage(messageId) {

@@ -1665,9 +1665,9 @@ if (typeof messageId === "undefined") {

/**
* Get a provider by its unique ID.
*
* @param {string} providerId
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
*/
* Get a provider by its unique ID.
*
*
* @param {string} providerId
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
*/
getProvider(providerId) {

@@ -1829,9 +1829,9 @@ if (typeof providerId === "undefined") {

/**
* Get a topic by its unique ID.
*
* @param {string} topicId
* @throws {AppwriteException}
* @returns {Promise<Models.Topic>}
*/
* Get a topic by its unique ID.
*
*
* @param {string} topicId
* @throws {AppwriteException}
* @returns {Promise<Models.Topic>}
*/
getTopic(topicId) {

@@ -1853,11 +1853,11 @@ if (typeof topicId === "undefined") {

/**
* Update a topic by its unique ID.
*
* @param {string} topicId
* @param {string} name
* @param {string[]} subscribe
* @throws {AppwriteException}
* @returns {Promise<Models.Topic>}
*/
* Update a topic by its unique ID.
*
*
* @param {string} topicId
* @param {string} name
* @param {string[]} subscribe
* @throws {AppwriteException}
* @returns {Promise<Models.Topic>}
*/
updateTopic(topicId, name, subscribe) {

@@ -2005,10 +2005,10 @@ if (typeof topicId === "undefined") {

/**
* Get a subscriber by its unique ID.
*
* @param {string} topicId
* @param {string} subscriberId
* @throws {AppwriteException}
* @returns {Promise<Models.Subscriber>}
*/
* Get a subscriber by its unique ID.
*
*
* @param {string} topicId
* @param {string} subscriberId
* @throws {AppwriteException}
* @returns {Promise<Models.Subscriber>}
*/
getSubscriber(topicId, subscriberId) {

@@ -2015,0 +2015,0 @@ if (typeof topicId === "undefined") {

@@ -145,5 +145,5 @@ import { Client, UploadProgress } from '../client.js';

* Create a deployment based on a template.
Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details.
*
* Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details.
*
* @param {string} siteId

@@ -161,5 +161,5 @@ * @param {string} repository

* Create a deployment when a site is connected to VCS.
This endpoint lets you create deployment from a branch, commit, or a tag.
*
* This endpoint lets you create deployment from a branch, commit, or a tag.
*
* @param {string} siteId

@@ -166,0 +166,0 @@ * @param {VCSDeploymentType} type

@@ -464,15 +464,15 @@ 'use strict';

/**
* Create a deployment based on a template.
Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details.
*
* @param {string} siteId
* @param {string} repository
* @param {string} owner
* @param {string} rootDirectory
* @param {string} version
* @param {boolean} activate
* @throws {AppwriteException}
* @returns {Promise<Models.Deployment>}
*/
* Create a deployment based on a template.
*
* Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details.
*
* @param {string} siteId
* @param {string} repository
* @param {string} owner
* @param {string} rootDirectory
* @param {string} version
* @param {boolean} activate
* @throws {AppwriteException}
* @returns {Promise<Models.Deployment>}
*/
createTemplateDeployment(siteId, repository, owner, rootDirectory, version, activate) {

@@ -523,13 +523,13 @@ if (typeof siteId === "undefined") {

/**
* Create a deployment when a site is connected to VCS.
This endpoint lets you create deployment from a branch, commit, or a tag.
*
* @param {string} siteId
* @param {VCSDeploymentType} type
* @param {string} reference
* @param {boolean} activate
* @throws {AppwriteException}
* @returns {Promise<Models.Deployment>}
*/
* Create a deployment when a site is connected to VCS.
*
* This endpoint lets you create deployment from a branch, commit, or a tag.
*
* @param {string} siteId
* @param {VCSDeploymentType} type
* @param {string} reference
* @param {boolean} activate
* @throws {AppwriteException}
* @returns {Promise<Models.Deployment>}
*/
createVcsDeployment(siteId, type, reference, activate) {

@@ -536,0 +536,0 @@ if (typeof siteId === "undefined") {

@@ -82,10 +82,10 @@ import { Client, UploadProgress } from '../client.js';

* Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.
Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.
When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file&#039;s **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.
If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
*
* Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.
*
* When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file&#039;s **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.
*
* If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
*
*
* @param {string} bucketId

@@ -92,0 +92,0 @@ * @param {string} fileId

@@ -241,18 +241,18 @@ 'use strict';

/**
* Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.
Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.
When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file&#039;s **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.
If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
*
* @param {string} bucketId
* @param {string} fileId
* @param {File} file
* @param {string[]} permissions
* @throws {AppwriteException}
* @returns {Promise<Models.File>}
*/
* Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.
*
* Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.
*
* When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file&#039;s **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.
*
* If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
*
*
* @param {string} bucketId
* @param {string} fileId
* @param {File} file
* @param {string[]} permissions
* @throws {AppwriteException}
* @returns {Promise<Models.File>}
*/
createFile(bucketId, fileId, file, permissions, onProgress = (progress) => {

@@ -259,0 +259,0 @@ }) {

@@ -16,3 +16,3 @@ import { Client } from '../client.js';

*/
list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
/**

@@ -27,3 +27,3 @@ * Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.

*/
create<Preferences extends Models.Preferences>(teamId: string, name: string, roles?: string[]): Promise<Models.Team<Preferences>>;
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, name: string, roles?: string[]): Promise<Models.Team<Preferences>>;
/**

@@ -36,3 +36,3 @@ * Get a team by its ID. All team members have read access for this resource.

*/
get<Preferences extends Models.Preferences>(teamId: string): Promise<Models.Team<Preferences>>;
get<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string): Promise<Models.Team<Preferences>>;
/**

@@ -46,3 +46,3 @@ * Update the team&#039;s name by its unique ID.

*/
updateName<Preferences extends Models.Preferences>(teamId: string, name: string): Promise<Models.Team<Preferences>>;
updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, name: string): Promise<Models.Team<Preferences>>;
/**

@@ -68,10 +68,10 @@ * Delete a team using its ID. Only team members with the owner role can delete the team.

* Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn&#039;t exist. If initiated from a Server SDK, the new member will be added automatically to the team.
You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID &gt; email &gt; phone number if you provide more than one of these parameters.
Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.
Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.
*
* You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID &gt; email &gt; phone number if you provide more than one of these parameters.
*
* Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.
*
* Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.
*
*
* @param {string} teamId

@@ -99,4 +99,4 @@ * @param {string[]} roles

* Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions).
*
*
* @param {string} teamId

@@ -120,6 +120,6 @@ * @param {string} membershipId

* Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.
If the request is successful, a session for the user is automatically created.
*
* If the request is successful, a session for the user is automatically created.
*
*
* @param {string} teamId

@@ -140,3 +140,3 @@ * @param {string} membershipId

*/
getPrefs<Preferences extends Models.Preferences>(teamId: string): Promise<Preferences>;
getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string): Promise<Preferences>;
/**

@@ -150,5 +150,5 @@ * Update the team&#039;s 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 an error if exceeded.

*/
updatePrefs<Preferences extends Models.Preferences>(teamId: string, prefs: object): Promise<Preferences>;
updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, prefs: object): Promise<Preferences>;
}
export { Teams };

@@ -181,21 +181,21 @@ 'use strict';

/**
* Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn&#039;t exist. If initiated from a Server SDK, the new member will be added automatically to the team.
You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID &gt; email &gt; phone number if you provide more than one of these parameters.
Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.
Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.
*
* @param {string} teamId
* @param {string[]} roles
* @param {string} email
* @param {string} userId
* @param {string} phone
* @param {string} url
* @param {string} name
* @throws {AppwriteException}
* @returns {Promise<Models.Membership>}
*/
* Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn&#039;t exist. If initiated from a Server SDK, the new member will be added automatically to the team.
*
* You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID &gt; email &gt; phone number if you provide more than one of these parameters.
*
* Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.
*
* Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.
*
*
* @param {string} teamId
* @param {string[]} roles
* @param {string} email
* @param {string} userId
* @param {string} phone
* @param {string} url
* @param {string} name
* @throws {AppwriteException}
* @returns {Promise<Models.Membership>}
*/
createMembership(teamId, roles, email, userId, phone, url, name) {

@@ -266,11 +266,11 @@ if (typeof teamId === "undefined") {

/**
* Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions).
*
* @param {string} teamId
* @param {string} membershipId
* @param {string[]} roles
* @throws {AppwriteException}
* @returns {Promise<Models.Membership>}
*/
* Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions).
*
*
* @param {string} teamId
* @param {string} membershipId
* @param {string[]} roles
* @throws {AppwriteException}
* @returns {Promise<Models.Membership>}
*/
updateMembership(teamId, membershipId, roles) {

@@ -331,14 +331,14 @@ if (typeof teamId === "undefined") {

/**
* Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.
If the request is successful, a session for the user is automatically created.
*
* @param {string} teamId
* @param {string} membershipId
* @param {string} userId
* @param {string} secret
* @throws {AppwriteException}
* @returns {Promise<Models.Membership>}
*/
* Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.
*
* If the request is successful, a session for the user is automatically created.
*
*
* @param {string} teamId
* @param {string} membershipId
* @param {string} userId
* @param {string} secret
* @throws {AppwriteException}
* @returns {Promise<Models.Membership>}
*/
updateMembershipStatus(teamId, membershipId, userId, secret) {

@@ -345,0 +345,0 @@ if (typeof teamId === "undefined") {

@@ -19,3 +19,3 @@ import { Client } from '../client.js';

*/
list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.UserList<Preferences>>;
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.UserList<Preferences>>;
/**

@@ -32,3 +32,3 @@ * Create a new user.

*/
create<Preferences extends Models.Preferences>(userId: string, email?: string, phone?: string, password?: string, name?: string): Promise<Models.User<Preferences>>;
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email?: string, phone?: string, password?: string, name?: string): Promise<Models.User<Preferences>>;
/**

@@ -44,3 +44,3 @@ * 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.

*/
createArgon2User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
createArgon2User<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
/**

@@ -56,3 +56,3 @@ * 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.

*/
createBcryptUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
createBcryptUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
/**

@@ -85,3 +85,3 @@ * Get identities for all users.

*/
createMD5User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
createMD5User<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
/**

@@ -97,3 +97,3 @@ * 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.

*/
createPHPassUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
createPHPassUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
/**

@@ -114,3 +114,3 @@ * 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.

*/
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>>;
createScryptUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, passwordSalt: string, passwordCpu: number, passwordMemory: number, passwordParallel: number, passwordLength: number, name?: string): Promise<Models.User<Preferences>>;
/**

@@ -129,3 +129,3 @@ * 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.

*/
createScryptModifiedUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordSalt: string, passwordSaltSeparator: string, passwordSignerKey: string, name?: string): Promise<Models.User<Preferences>>;
createScryptModifiedUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, passwordSalt: string, passwordSaltSeparator: string, passwordSignerKey: string, name?: string): Promise<Models.User<Preferences>>;
/**

@@ -142,3 +142,3 @@ * 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.

*/
createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string): Promise<Models.User<Preferences>>;
createSHAUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string): Promise<Models.User<Preferences>>;
/**

@@ -151,3 +151,3 @@ * Get a user by its unique ID.

*/
get<Preferences extends Models.Preferences>(userId: string): Promise<Models.User<Preferences>>;
get<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string): Promise<Models.User<Preferences>>;
/**

@@ -169,3 +169,3 @@ * Delete a user by its unique ID, thereby releasing it&#039;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.

*/
updateEmail<Preferences extends Models.Preferences>(userId: string, email: string): Promise<Models.User<Preferences>>;
updateEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string): Promise<Models.User<Preferences>>;
/**

@@ -183,5 +183,5 @@ * Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.

* Update the user labels by its unique ID.
Labels can be used to grant access to resources. While teams are a way for user&#039;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.
*
* Labels can be used to grant access to resources. While teams are a way for user&#039;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.
*
* @param {string} userId

@@ -192,3 +192,3 @@ * @param {string[]} labels

*/
updateLabels<Preferences extends Models.Preferences>(userId: string, labels: string[]): Promise<Models.User<Preferences>>;
updateLabels<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, labels: string[]): Promise<Models.User<Preferences>>;
/**

@@ -221,3 +221,3 @@ * Get the user activity logs list by its unique ID.

*/
updateMfa<Preferences extends Models.Preferences>(userId: string, mfa: boolean): Promise<Models.User<Preferences>>;
updateMfa<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, mfa: boolean): Promise<Models.User<Preferences>>;
/**

@@ -272,3 +272,3 @@ * Delete an authenticator app.

*/
updateName<Preferences extends Models.Preferences>(userId: string, name: string): Promise<Models.User<Preferences>>;
updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, name: string): Promise<Models.User<Preferences>>;
/**

@@ -282,3 +282,3 @@ * Update the user password by its unique ID.

*/
updatePassword<Preferences extends Models.Preferences>(userId: string, password: string): Promise<Models.User<Preferences>>;
updatePassword<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, password: string): Promise<Models.User<Preferences>>;
/**

@@ -292,3 +292,3 @@ * Update the user phone by its unique ID.

*/
updatePhone<Preferences extends Models.Preferences>(userId: string, number: string): Promise<Models.User<Preferences>>;
updatePhone<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, number: string): Promise<Models.User<Preferences>>;
/**

@@ -301,3 +301,3 @@ * Get the user preferences by its unique ID.

*/
getPrefs<Preferences extends Models.Preferences>(userId: string): Promise<Preferences>;
getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string): Promise<Preferences>;
/**

@@ -311,3 +311,3 @@ * 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.

*/
updatePrefs<Preferences extends Models.Preferences>(userId: string, prefs: object): Promise<Preferences>;
updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, prefs: object): Promise<Preferences>;
/**

@@ -323,5 +323,5 @@ * Get the user sessions list by its unique ID.

* Creates a session for a user. Returns an immediately usable session object.
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.
*
* 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.
*
* @param {string} userId

@@ -357,3 +357,3 @@ * @throws {AppwriteException}

*/
updateStatus<Preferences extends Models.Preferences>(userId: string, status: boolean): Promise<Models.User<Preferences>>;
updateStatus<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, status: boolean): Promise<Models.User<Preferences>>;
/**

@@ -413,4 +413,4 @@ * List the messaging targets that are associated with a user.

* 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.
*
*
* @param {string} userId

@@ -431,3 +431,3 @@ * @param {number} length

*/
updateEmailVerification<Preferences extends Models.Preferences>(userId: string, emailVerification: boolean): Promise<Models.User<Preferences>>;
updateEmailVerification<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, emailVerification: boolean): Promise<Models.User<Preferences>>;
/**

@@ -441,5 +441,5 @@ * Update the user phone verification status by its unique ID.

*/
updatePhoneVerification<Preferences extends Models.Preferences>(userId: string, phoneVerification: boolean): Promise<Models.User<Preferences>>;
updatePhoneVerification<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, phoneVerification: boolean): Promise<Models.User<Preferences>>;
}
export { Users };

@@ -613,11 +613,11 @@ 'use strict';

/**
* Update the user labels by its unique ID.
Labels can be used to grant access to resources. While teams are a way for user&#039;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.
*
* @param {string} userId
* @param {string[]} labels
* @throws {AppwriteException}
* @returns {Promise<Models.User<Preferences>>}
*/
* Update the user labels by its unique ID.
*
* Labels can be used to grant access to resources. While teams are a way for user&#039;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.
*
* @param {string} userId
* @param {string[]} labels
* @throws {AppwriteException}
* @returns {Promise<Models.User<Preferences>>}
*/
updateLabels(userId, labels) {

@@ -1022,10 +1022,10 @@ if (typeof userId === "undefined") {

/**
* Creates a session for a user. Returns an immediately usable session object.
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.
*
* @param {string} userId
* @throws {AppwriteException}
* @returns {Promise<Models.Session>}
*/
* Creates a session for a user. Returns an immediately usable session object.
*
* 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.
*
* @param {string} userId
* @throws {AppwriteException}
* @returns {Promise<Models.Session>}
*/
createSession(userId) {

@@ -1305,11 +1305,11 @@ if (typeof userId === "undefined") {

/**
* 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.
*
* @param {string} userId
* @param {number} length
* @param {number} expire
* @throws {AppwriteException}
* @returns {Promise<Models.Token>}
*/
* 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.
*
*
* @param {string} userId
* @param {number} length
* @param {number} expire
* @throws {AppwriteException}
* @returns {Promise<Models.Token>}
*/
createToken(userId, length, expire) {

@@ -1316,0 +1316,0 @@ if (typeof userId === "undefined") {

@@ -5,3 +5,3 @@ {

"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
"version": "17.1.0",
"version": "17.2.0",
"license": "BSD-3-Clause",

@@ -8,0 +8,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.