@appwrite.io/console 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/.github/workflows/publish.yml +1 -1
  2. package/CHANGELOG.md +45 -6
  3. package/README.md +82 -2
  4. package/dist/cjs/sdk.js +246 -193
  5. package/dist/cjs/sdk.js.map +1 -1
  6. package/dist/esm/sdk.js +246 -193
  7. package/dist/esm/sdk.js.map +1 -1
  8. package/dist/iife/sdk.js +246 -193
  9. package/docs/examples/databases/create-document.md +1 -3
  10. package/docs/examples/databases/create-documents.md +1 -1
  11. package/docs/examples/functions/create-execution.md +1 -1
  12. package/docs/examples/organizations/get-available-credits.md +13 -0
  13. package/docs/examples/organizations/update-projects.md +14 -0
  14. package/docs/examples/vcs/get-repository-contents.md +2 -1
  15. package/package.json +1 -1
  16. package/src/client.ts +1 -1
  17. package/src/models.ts +241 -9
  18. package/src/services/account.ts +97 -36
  19. package/src/services/avatars.ts +26 -20
  20. package/src/services/backups.ts +11 -0
  21. package/src/services/console.ts +8 -1
  22. package/src/services/databases.ts +97 -33
  23. package/src/services/domains.ts +111 -69
  24. package/src/services/functions.ts +37 -8
  25. package/src/services/graphql.ts +1 -0
  26. package/src/services/health.ts +26 -1
  27. package/src/services/locale.ts +9 -2
  28. package/src/services/messaging.ts +53 -8
  29. package/src/services/migrations.ts +12 -0
  30. package/src/services/organizations.ts +106 -16
  31. package/src/services/project.ts +5 -0
  32. package/src/services/projects.ts +50 -0
  33. package/src/services/proxy.ts +7 -0
  34. package/src/services/sites.ts +32 -4
  35. package/src/services/storage.ts +23 -9
  36. package/src/services/teams.ts +30 -17
  37. package/src/services/tokens.ts +4 -0
  38. package/src/services/users.ts +69 -27
  39. package/src/services/vcs.ts +16 -4
  40. package/types/models.d.ts +228 -192
  41. package/types/services/account.d.ts +36 -36
  42. package/types/services/avatars.d.ts +20 -20
  43. package/types/services/console.d.ts +1 -1
  44. package/types/services/databases.d.ts +43 -33
  45. package/types/services/domains.d.ts +69 -69
  46. package/types/services/functions.d.ts +8 -8
  47. package/types/services/health.d.ts +1 -1
  48. package/types/services/locale.d.ts +2 -2
  49. package/types/services/messaging.d.ts +8 -8
  50. package/types/services/organizations.d.ts +33 -16
  51. package/types/services/sites.d.ts +4 -4
  52. package/types/services/storage.d.ts +9 -9
  53. package/types/services/teams.d.ts +17 -17
  54. package/types/services/users.d.ts +27 -27
  55. package/types/services/vcs.d.ts +4 -4
package/dist/cjs/sdk.js CHANGED
@@ -280,7 +280,7 @@ class Client {
280
280
  'x-sdk-name': 'Console',
281
281
  'x-sdk-platform': 'console',
282
282
  'x-sdk-language': 'web',
283
- 'x-sdk-version': '1.9.0',
283
+ 'x-sdk-version': '1.10.0',
284
284
  'X-Appwrite-Response-Format': '1.7.0',
285
285
  };
286
286
  this.realtime = {
@@ -990,8 +990,8 @@ class Account {
990
990
  }
991
991
  /**
992
992
  * 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.
993
- This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
994
-
993
+ * This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
994
+ *
995
995
  *
996
996
  * @param {string} email
997
997
  * @param {string} password
@@ -1593,8 +1593,8 @@ This endpoint can also be used to convert an anonymous account to a normal one,
1593
1593
  }
1594
1594
  /**
1595
1595
  * 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.
1596
-
1597
- 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.
1596
+ *
1597
+ * 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.
1598
1598
  *
1599
1599
  * @param {string} userId
1600
1600
  * @param {string} secret
@@ -1674,8 +1674,8 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
1674
1674
  }
1675
1675
  /**
1676
1676
  * 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.
1677
-
1678
- 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).
1677
+ *
1678
+ * 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).
1679
1679
  *
1680
1680
  * @param {string} email
1681
1681
  * @param {string} password
@@ -1734,11 +1734,11 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1734
1734
  }
1735
1735
  /**
1736
1736
  * 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's back to your app when login is completed.
1737
-
1738
- If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.
1739
-
1740
- 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).
1741
-
1737
+ *
1738
+ * If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.
1739
+ *
1740
+ * 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).
1741
+ *
1742
1742
  *
1743
1743
  * @param {OAuthProvider} provider
1744
1744
  * @param {string} success
@@ -1983,8 +1983,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1983
1983
  }
1984
1984
  /**
1985
1985
  * 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's email is valid for 15 minutes.
1986
-
1987
- 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).
1986
+ *
1987
+ * 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).
1988
1988
  *
1989
1989
  * @param {string} userId
1990
1990
  * @param {string} email
@@ -2018,9 +2018,9 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
2018
2018
  }
2019
2019
  /**
2020
2020
  * 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's email address is valid for 1 hour.
2021
-
2022
- 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).
2023
-
2021
+ *
2022
+ * 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).
2023
+ *
2024
2024
  *
2025
2025
  * @param {string} userId
2026
2026
  * @param {string} email
@@ -2058,10 +2058,10 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
2058
2058
  }
2059
2059
  /**
2060
2060
  * 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's back to your app when login is completed.
2061
-
2062
- 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.
2063
-
2064
- 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).
2061
+ *
2062
+ * 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.
2063
+ *
2064
+ * 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).
2065
2065
  *
2066
2066
  * @param {OAuthProvider} provider
2067
2067
  * @param {string} success
@@ -2100,8 +2100,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
2100
2100
  }
2101
2101
  /**
2102
2102
  * 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's phone is valid for 15 minutes.
2103
-
2104
- 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).
2103
+ *
2104
+ * 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).
2105
2105
  *
2106
2106
  * @param {string} userId
2107
2107
  * @param {string} phone
@@ -2131,9 +2131,9 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
2131
2131
  }
2132
2132
  /**
2133
2133
  * 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's email address is valid for 7 days.
2134
-
2135
- 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.
2136
-
2134
+ *
2135
+ * 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.
2136
+ *
2137
2137
  *
2138
2138
  * @param {string} url
2139
2139
  * @throws {AppwriteException}
@@ -2235,8 +2235,8 @@ class Avatars {
2235
2235
  }
2236
2236
  /**
2237
2237
  * 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.
2238
-
2239
- 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.
2238
+ *
2239
+ * 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.
2240
2240
  *
2241
2241
  * @param {Browser} code
2242
2242
  * @param {number} width
@@ -2269,9 +2269,9 @@ When one dimension is specified and the other is 0, the image is scaled with pre
2269
2269
  }
2270
2270
  /**
2271
2271
  * 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.
2272
-
2273
- 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.
2274
-
2272
+ *
2273
+ * 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.
2274
+ *
2275
2275
  *
2276
2276
  * @param {CreditCard} code
2277
2277
  * @param {number} width
@@ -2304,8 +2304,8 @@ When one dimension is specified and the other is 0, the image is scaled with pre
2304
2304
  }
2305
2305
  /**
2306
2306
  * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
2307
-
2308
- This endpoint does not follow HTTP redirects.
2307
+ *
2308
+ * This endpoint does not follow HTTP redirects.
2309
2309
  *
2310
2310
  * @param {string} url
2311
2311
  * @throws {AppwriteException}
@@ -2329,9 +2329,9 @@ This endpoint does not follow HTTP redirects.
2329
2329
  }
2330
2330
  /**
2331
2331
  * 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.
2332
-
2333
- 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.
2334
-
2332
+ *
2333
+ * 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.
2334
+ *
2335
2335
  *
2336
2336
  * @param {Flag} code
2337
2337
  * @param {number} width
@@ -2364,10 +2364,10 @@ When one dimension is specified and the other is 0, the image is scaled with pre
2364
2364
  }
2365
2365
  /**
2366
2366
  * 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.
2367
-
2368
- 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.
2369
-
2370
- This endpoint does not follow HTTP redirects.
2367
+ *
2368
+ * 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.
2369
+ *
2370
+ * This endpoint does not follow HTTP redirects.
2371
2371
  *
2372
2372
  * @param {string} url
2373
2373
  * @param {number} width
@@ -2399,11 +2399,11 @@ This endpoint does not follow HTTP redirects.
2399
2399
  }
2400
2400
  /**
2401
2401
  * 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 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.
2402
-
2403
- 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's initials when reloading the same theme will always return for the same initials.
2404
-
2405
- 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.
2406
-
2402
+ *
2403
+ * 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's initials when reloading the same theme will always return for the same initials.
2404
+ *
2405
+ * 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.
2406
+ *
2407
2407
  *
2408
2408
  * @param {string} name
2409
2409
  * @param {number} width
@@ -2436,7 +2436,7 @@ When one dimension is specified and the other is 0, the image is scaled with pre
2436
2436
  }
2437
2437
  /**
2438
2438
  * 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.
2439
-
2439
+ *
2440
2440
  *
2441
2441
  * @param {string} text
2442
2442
  * @param {number} size
@@ -2986,7 +2986,7 @@ class Databases {
2986
2986
  }
2987
2987
  /**
2988
2988
  * Create a new Database.
2989
-
2989
+ *
2990
2990
  *
2991
2991
  * @param {string} databaseId
2992
2992
  * @param {string} name
@@ -3284,7 +3284,7 @@ class Databases {
3284
3284
  }
3285
3285
  /**
3286
3286
  * Create a boolean attribute.
3287
-
3287
+ *
3288
3288
  *
3289
3289
  * @param {string} databaseId
3290
3290
  * @param {string} collectionId
@@ -3465,7 +3465,7 @@ class Databases {
3465
3465
  }
3466
3466
  /**
3467
3467
  * Create an email attribute.
3468
-
3468
+ *
3469
3469
  *
3470
3470
  * @param {string} databaseId
3471
3471
  * @param {string} collectionId
@@ -3511,7 +3511,7 @@ class Databases {
3511
3511
  }
3512
3512
  /**
3513
3513
  * Update an email attribute. Changing the `default` value will not update already existing documents.
3514
-
3514
+ *
3515
3515
  *
3516
3516
  * @param {string} databaseId
3517
3517
  * @param {string} collectionId
@@ -3557,7 +3557,7 @@ class Databases {
3557
3557
  }
3558
3558
  /**
3559
3559
  * Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute.
3560
-
3560
+ *
3561
3561
  *
3562
3562
  * @param {string} databaseId
3563
3563
  * @param {string} collectionId
@@ -3610,7 +3610,7 @@ class Databases {
3610
3610
  }
3611
3611
  /**
3612
3612
  * Update an enum attribute. Changing the `default` value will not update already existing documents.
3613
-
3613
+ *
3614
3614
  *
3615
3615
  * @param {string} databaseId
3616
3616
  * @param {string} collectionId
@@ -3663,7 +3663,7 @@ class Databases {
3663
3663
  }
3664
3664
  /**
3665
3665
  * Create a float attribute. Optionally, minimum and maximum values can be provided.
3666
-
3666
+ *
3667
3667
  *
3668
3668
  * @param {string} databaseId
3669
3669
  * @param {string} collectionId
@@ -3717,7 +3717,7 @@ class Databases {
3717
3717
  }
3718
3718
  /**
3719
3719
  * Update a float attribute. Changing the `default` value will not update already existing documents.
3720
-
3720
+ *
3721
3721
  *
3722
3722
  * @param {string} databaseId
3723
3723
  * @param {string} collectionId
@@ -3771,7 +3771,7 @@ class Databases {
3771
3771
  }
3772
3772
  /**
3773
3773
  * Create an integer attribute. Optionally, minimum and maximum values can be provided.
3774
-
3774
+ *
3775
3775
  *
3776
3776
  * @param {string} databaseId
3777
3777
  * @param {string} collectionId
@@ -3825,7 +3825,7 @@ class Databases {
3825
3825
  }
3826
3826
  /**
3827
3827
  * Update an integer attribute. Changing the `default` value will not update already existing documents.
3828
-
3828
+ *
3829
3829
  *
3830
3830
  * @param {string} databaseId
3831
3831
  * @param {string} collectionId
@@ -3879,7 +3879,7 @@ class Databases {
3879
3879
  }
3880
3880
  /**
3881
3881
  * Create IP address attribute.
3882
-
3882
+ *
3883
3883
  *
3884
3884
  * @param {string} databaseId
3885
3885
  * @param {string} collectionId
@@ -3925,7 +3925,7 @@ class Databases {
3925
3925
  }
3926
3926
  /**
3927
3927
  * Update an ip attribute. Changing the `default` value will not update already existing documents.
3928
-
3928
+ *
3929
3929
  *
3930
3930
  * @param {string} databaseId
3931
3931
  * @param {string} collectionId
@@ -3971,7 +3971,7 @@ class Databases {
3971
3971
  }
3972
3972
  /**
3973
3973
  * Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
3974
-
3974
+ *
3975
3975
  *
3976
3976
  * @param {string} databaseId
3977
3977
  * @param {string} collectionId
@@ -4025,7 +4025,7 @@ class Databases {
4025
4025
  }
4026
4026
  /**
4027
4027
  * Create a string attribute.
4028
-
4028
+ *
4029
4029
  *
4030
4030
  * @param {string} databaseId
4031
4031
  * @param {string} collectionId
@@ -4082,7 +4082,7 @@ class Databases {
4082
4082
  }
4083
4083
  /**
4084
4084
  * Update a string attribute. Changing the `default` value will not update already existing documents.
4085
-
4085
+ *
4086
4086
  *
4087
4087
  * @param {string} databaseId
4088
4088
  * @param {string} collectionId
@@ -4132,7 +4132,7 @@ class Databases {
4132
4132
  }
4133
4133
  /**
4134
4134
  * Create a URL attribute.
4135
-
4135
+ *
4136
4136
  *
4137
4137
  * @param {string} databaseId
4138
4138
  * @param {string} collectionId
@@ -4178,7 +4178,7 @@ class Databases {
4178
4178
  }
4179
4179
  /**
4180
4180
  * Update an url attribute. Changing the `default` value will not update already existing documents.
4181
-
4181
+ *
4182
4182
  *
4183
4183
  * @param {string} databaseId
4184
4184
  * @param {string} collectionId
@@ -4276,7 +4276,7 @@ class Databases {
4276
4276
  }
4277
4277
  /**
4278
4278
  * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
4279
-
4279
+ *
4280
4280
  *
4281
4281
  * @param {string} databaseId
4282
4282
  * @param {string} collectionId
@@ -4341,7 +4341,7 @@ class Databases {
4341
4341
  * @param {string} databaseId
4342
4342
  * @param {string} collectionId
4343
4343
  * @param {string} documentId
4344
- * @param {Omit<Document, keyof Models.Document>} data
4344
+ * @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>} data
4345
4345
  * @param {string[]} permissions
4346
4346
  * @throws {AppwriteException}
4347
4347
  * @returns {Promise<Document>}
@@ -4377,6 +4377,8 @@ class Databases {
4377
4377
  return this.client.call('post', uri, apiHeaders, payload);
4378
4378
  }
4379
4379
  /**
4380
+ * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
4381
+ *
4380
4382
  * 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.
4381
4383
  *
4382
4384
  * @param {string} databaseId
@@ -4407,8 +4409,10 @@ class Databases {
4407
4409
  return this.client.call('post', uri, apiHeaders, payload);
4408
4410
  }
4409
4411
  /**
4412
+ * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
4413
+ *
4410
4414
  * 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.
4411
-
4415
+ *
4412
4416
  *
4413
4417
  * @param {string} databaseId
4414
4418
  * @param {string} collectionId
@@ -4438,6 +4442,8 @@ class Databases {
4438
4442
  return this.client.call('put', uri, apiHeaders, payload);
4439
4443
  }
4440
4444
  /**
4445
+ * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
4446
+ *
4441
4447
  * 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.
4442
4448
  *
4443
4449
  * @param {string} databaseId
@@ -4469,6 +4475,8 @@ class Databases {
4469
4475
  return this.client.call('patch', uri, apiHeaders, payload);
4470
4476
  }
4471
4477
  /**
4478
+ * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
4479
+ *
4472
4480
  * Bulk delete documents using queries, if no queries are passed then all documents are deleted.
4473
4481
  *
4474
4482
  * @param {string} databaseId
@@ -4525,6 +4533,8 @@ class Databases {
4525
4533
  return this.client.call('get', uri, apiHeaders, payload);
4526
4534
  }
4527
4535
  /**
4536
+ * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
4537
+ *
4528
4538
  * 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.
4529
4539
  *
4530
4540
  * @param {string} databaseId
@@ -4568,7 +4578,7 @@ class Databases {
4568
4578
  * @param {string} databaseId
4569
4579
  * @param {string} collectionId
4570
4580
  * @param {string} documentId
4571
- * @param {Partial<Omit<Document, keyof Models.Document>>} data
4581
+ * @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} data
4572
4582
  * @param {string[]} permissions
4573
4583
  * @throws {AppwriteException}
4574
4584
  * @returns {Promise<Document>}
@@ -4758,7 +4768,7 @@ class Databases {
4758
4768
  }
4759
4769
  /**
4760
4770
  * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
4761
- Attributes can be `key`, `fulltext`, and `unique`.
4771
+ * Attributes can be `key`, `fulltext`, and `unique`.
4762
4772
  *
4763
4773
  * @param {string} databaseId
4764
4774
  * @param {string} collectionId
@@ -5028,7 +5038,7 @@ class Domains {
5028
5038
  }
5029
5039
  /**
5030
5040
  * Delete a domain by its unique ID. This endpoint can be used to delete a domain from your project.
5031
- Once deleted, the domain will no longer be available for use and all associated resources will be removed.
5041
+ * Once deleted, the domain will no longer be available for use and all associated resources will be removed.
5032
5042
  *
5033
5043
  * @param {string} domainId
5034
5044
  * @throws {AppwriteException}
@@ -5048,8 +5058,8 @@ Once deleted, the domain will no longer be available for use and all associated
5048
5058
  }
5049
5059
  /**
5050
5060
  * Verify which NS records are used and update the domain accordingly. This will check the domain&#039;s
5051
- nameservers and update the domain&#039;s status based on whether the nameservers match the expected
5052
- Appwrite nameservers.
5061
+ * nameservers and update the domain&#039;s status based on whether the nameservers match the expected
5062
+ * Appwrite nameservers.
5053
5063
  *
5054
5064
  * @param {string} domainId
5055
5065
  * @throws {AppwriteException}
@@ -5086,7 +5096,7 @@ Once deleted, the domain will no longer be available for use and all associated
5086
5096
  }
5087
5097
  /**
5088
5098
  * Add Google Workspace DNS records to the domain. This will create the required MX records
5089
- for Google Workspace email hosting.
5099
+ * for Google Workspace email hosting.
5090
5100
  *
5091
5101
  * @param {string} domainId
5092
5102
  * @throws {AppwriteException}
@@ -5123,7 +5133,7 @@ Once deleted, the domain will no longer be available for use and all associated
5123
5133
  }
5124
5134
  /**
5125
5135
  * Add iCloud DNS records to the domain. This will create the required MX and SPF records
5126
- for using iCloud email services with your domain.
5136
+ * for using iCloud email services with your domain.
5127
5137
  *
5128
5138
  * @param {string} domainId
5129
5139
  * @throws {AppwriteException}
@@ -5160,7 +5170,7 @@ Once deleted, the domain will no longer be available for use and all associated
5160
5170
  }
5161
5171
  /**
5162
5172
  * Add Mailgun DNS records to the domain. This endpoint will create the required DNS records
5163
- for Mailgun in the specified domain.
5173
+ * for Mailgun in the specified domain.
5164
5174
  *
5165
5175
  * @param {string} domainId
5166
5176
  * @throws {AppwriteException}
@@ -5197,7 +5207,7 @@ Once deleted, the domain will no longer be available for use and all associated
5197
5207
  }
5198
5208
  /**
5199
5209
  * Add Outlook DNS records to the domain. This will create the required MX records
5200
- for setting up Outlook email hosting for your domain.
5210
+ * for setting up Outlook email hosting for your domain.
5201
5211
  *
5202
5212
  * @param {string} domainId
5203
5213
  * @throws {AppwriteException}
@@ -5234,7 +5244,7 @@ Once deleted, the domain will no longer be available for use and all associated
5234
5244
  }
5235
5245
  /**
5236
5246
  * Add ProtonMail DNS records to the domain. This will create the required MX records
5237
- for using ProtonMail with your custom domain.
5247
+ * for using ProtonMail with your custom domain.
5238
5248
  *
5239
5249
  * @param {string} domainId
5240
5250
  * @throws {AppwriteException}
@@ -5271,7 +5281,7 @@ Once deleted, the domain will no longer be available for use and all associated
5271
5281
  }
5272
5282
  /**
5273
5283
  * Add Zoho Mail DNS records to the domain. This will create the required MX records
5274
- for setting up Zoho Mail on your domain.
5284
+ * for setting up Zoho Mail on your domain.
5275
5285
  *
5276
5286
  * @param {string} domainId
5277
5287
  * @throws {AppwriteException}
@@ -5291,7 +5301,7 @@ Once deleted, the domain will no longer be available for use and all associated
5291
5301
  }
5292
5302
  /**
5293
5303
  * List DNS records for a given domain. You can use this endpoint to list all the DNS records
5294
- associated with your domain.
5304
+ * associated with your domain.
5295
5305
  *
5296
5306
  * @param {string} domainId
5297
5307
  * @param {string[]} queries
@@ -5313,7 +5323,7 @@ Once deleted, the domain will no longer be available for use and all associated
5313
5323
  }
5314
5324
  /**
5315
5325
  * Create a new A record for the given domain. A records are used to point a domain name
5316
- to an IPv4 address. The record value should be a valid IPv4 address.
5326
+ * to an IPv4 address. The record value should be a valid IPv4 address.
5317
5327
  *
5318
5328
  * @param {string} domainId
5319
5329
  * @param {string} name
@@ -5358,8 +5368,8 @@ to an IPv4 address. The record value should be a valid IPv4 address.
5358
5368
  }
5359
5369
  /**
5360
5370
  * Update an existing A record for the given domain. This endpoint allows you to modify
5361
- the properties of an A record including its name (subdomain), IPv4 address, TTL,
5362
- and optional comment.
5371
+ * the properties of an A record including its name (subdomain), IPv4 address, TTL,
5372
+ * and optional comment.
5363
5373
  *
5364
5374
  * @param {string} domainId
5365
5375
  * @param {string} recordId
@@ -5408,7 +5418,7 @@ to an IPv4 address. The record value should be a valid IPv4 address.
5408
5418
  }
5409
5419
  /**
5410
5420
  * Create a new AAAA record for the given domain. This endpoint allows you to add a new IPv6 DNS record
5411
- to your domain. The record will be used to point a hostname to an IPv6 address.
5421
+ * to your domain. The record will be used to point a hostname to an IPv6 address.
5412
5422
  *
5413
5423
  * @param {string} domainId
5414
5424
  * @param {string} name
@@ -5453,8 +5463,8 @@ to an IPv4 address. The record value should be a valid IPv4 address.
5453
5463
  }
5454
5464
  /**
5455
5465
  * Update an existing AAAA record for the given domain. This endpoint allows you to modify
5456
- the properties of an existing AAAA record, including its name (subdomain), IPv6 address,
5457
- TTL, and optional comment.
5466
+ * the properties of an existing AAAA record, including its name (subdomain), IPv6 address,
5467
+ * TTL, and optional comment.
5458
5468
  *
5459
5469
  * @param {string} domainId
5460
5470
  * @param {string} recordId
@@ -5503,8 +5513,8 @@ to an IPv4 address. The record value should be a valid IPv4 address.
5503
5513
  }
5504
5514
  /**
5505
5515
  * Create a new ALIAS record for the given domain. This record type can be used to point your domain
5506
- to another domain name that will serve as an alias. This is particularly useful when you want to
5507
- map your domain to a target domain that may change its IP address.
5516
+ * to another domain name that will serve as an alias. This is particularly useful when you want to
5517
+ * map your domain to a target domain that may change its IP address.
5508
5518
  *
5509
5519
  * @param {string} domainId
5510
5520
  * @param {string} name
@@ -5549,10 +5559,10 @@ to an IPv4 address. The record value should be a valid IPv4 address.
5549
5559
  }
5550
5560
  /**
5551
5561
  * Update an existing ALIAS record for the specified domain. This endpoint allows you to modify
5552
- the properties of an existing ALIAS record including its name, target domain, TTL, and comment.
5553
-
5554
- The ALIAS record type is similar to a CNAME record but can be used at the zone apex (root domain).
5555
- It provides a way to map one domain name to another.
5562
+ * the properties of an existing ALIAS record including its name, target domain, TTL, and comment.
5563
+ *
5564
+ * The ALIAS record type is similar to a CNAME record but can be used at the zone apex (root domain).
5565
+ * It provides a way to map one domain name to another.
5556
5566
  *
5557
5567
  * @param {string} domainId
5558
5568
  * @param {string} recordId
@@ -5601,7 +5611,7 @@ to an IPv4 address. The record value should be a valid IPv4 address.
5601
5611
  }
5602
5612
  /**
5603
5613
  * Create a new CAA record for the given domain. CAA records are used to specify which
5604
- Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your domain.
5614
+ * Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your domain.
5605
5615
  *
5606
5616
  * @param {string} domainId
5607
5617
  * @param {string} name
@@ -5646,8 +5656,8 @@ Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your
5646
5656
  }
5647
5657
  /**
5648
5658
  * Update an existing CAA record for the given domain. A CAA (Certification Authority Authorization)
5649
- record is used to specify which certificate authorities (CAs) are authorized to issue certificates
5650
- for a domain.
5659
+ * record is used to specify which certificate authorities (CAs) are authorized to issue certificates
5660
+ * for a domain.
5651
5661
  *
5652
5662
  * @param {string} domainId
5653
5663
  * @param {string} recordId
@@ -5696,10 +5706,10 @@ Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your
5696
5706
  }
5697
5707
  /**
5698
5708
  * Create a new CNAME record for the given domain.
5699
-
5700
- A CNAME record maps a subdomain to another domain name, allowing you to create aliases
5701
- for your domain. For example, you can create a CNAME record to point &#039;blog.example.com&#039;
5702
- to &#039;example.wordpress.com&#039;.
5709
+ *
5710
+ * A CNAME record maps a subdomain to another domain name, allowing you to create aliases
5711
+ * for your domain. For example, you can create a CNAME record to point &#039;blog.example.com&#039;
5712
+ * to &#039;example.wordpress.com&#039;.
5703
5713
  *
5704
5714
  * @param {string} domainId
5705
5715
  * @param {string} name
@@ -5792,7 +5802,7 @@ Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your
5792
5802
  }
5793
5803
  /**
5794
5804
  * Create a new HTTPS record for the given domain. This record is used to configure HTTPS
5795
- settings for your domain, enabling secure communication over SSL/TLS.
5805
+ * settings for your domain, enabling secure communication over SSL/TLS.
5796
5806
  *
5797
5807
  * @param {string} domainId
5798
5808
  * @param {string} name
@@ -5837,8 +5847,8 @@ Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your
5837
5847
  }
5838
5848
  /**
5839
5849
  * Update an existing HTTPS record for the given domain. This endpoint allows you to modify
5840
- the properties of an HTTPS record associated with your domain, including the name (subdomain),
5841
- target value, TTL, and optional comment.
5850
+ * the properties of an HTTPS record associated with your domain, including the name (subdomain),
5851
+ * target value, TTL, and optional comment.
5842
5852
  *
5843
5853
  * @param {string} domainId
5844
5854
  * @param {string} recordId
@@ -5887,9 +5897,9 @@ target value, TTL, and optional comment.
5887
5897
  }
5888
5898
  /**
5889
5899
  * Create a new MX record for the given domain. MX records are used to define the mail servers responsible
5890
- for accepting email messages for the domain. Multiple MX records can be created with different priorities.
5891
- The priority parameter determines the order in which mail servers are used, with lower values indicating
5892
- higher priority.
5900
+ * for accepting email messages for the domain. Multiple MX records can be created with different priorities.
5901
+ * The priority parameter determines the order in which mail servers are used, with lower values indicating
5902
+ * higher priority.
5893
5903
  *
5894
5904
  * @param {string} domainId
5895
5905
  * @param {string} name
@@ -5996,7 +6006,7 @@ target value, TTL, and optional comment.
5996
6006
  }
5997
6007
  /**
5998
6008
  * Create a new NS record for the given domain. NS records specify the nameservers that are used
5999
- to resolve the domain name to IP addresses. Each domain can have multiple NS records.
6009
+ * to resolve the domain name to IP addresses. Each domain can have multiple NS records.
6000
6010
  *
6001
6011
  * @param {string} domainId
6002
6012
  * @param {string} name
@@ -6041,9 +6051,9 @@ target value, TTL, and optional comment.
6041
6051
  }
6042
6052
  /**
6043
6053
  * Update an existing NS record for the given domain. This endpoint allows you to modify
6044
- the properties of an NS (nameserver) record associated with your domain. You can update
6045
- the record name (subdomain), target nameserver value, TTL, and add or modify comments
6046
- for better record management.
6054
+ * the properties of an NS (nameserver) record associated with your domain. You can update
6055
+ * the record name (subdomain), target nameserver value, TTL, and add or modify comments
6056
+ * for better record management.
6047
6057
  *
6048
6058
  * @param {string} domainId
6049
6059
  * @param {string} recordId
@@ -6092,8 +6102,8 @@ target value, TTL, and optional comment.
6092
6102
  }
6093
6103
  /**
6094
6104
  * Create a new SRV record for the given domain. SRV records are used to define the location
6095
- of servers for specific services. For example, they can be used to specify which server
6096
- handles a specific service like SIP or XMPP for the domain.
6105
+ * of servers for specific services. For example, they can be used to specify which server
6106
+ * handles a specific service like SIP or XMPP for the domain.
6097
6107
  *
6098
6108
  * @param {string} domainId
6099
6109
  * @param {string} name
@@ -6159,19 +6169,19 @@ target value, TTL, and optional comment.
6159
6169
  }
6160
6170
  /**
6161
6171
  * Update an existing SRV record for the given domain.
6162
-
6163
- Required parameters:
6164
- - domainId: Domain unique ID
6165
- - recordId: DNS record unique ID
6166
- - name: Record name (service name)
6167
- - value: Target hostname for this SRV record
6168
- - ttl: Time to live, in seconds
6169
- - priority: Record priority
6170
- - weight: Record weight
6171
- - port: Port number for the service
6172
-
6173
- Optional parameters:
6174
- - comment: A comment for this record
6172
+ *
6173
+ * Required parameters:
6174
+ * - domainId: Domain unique ID
6175
+ * - recordId: DNS record unique ID
6176
+ * - name: Record name (service name)
6177
+ * - value: Target hostname for this SRV record
6178
+ * - ttl: Time to live, in seconds
6179
+ * - priority: Record priority
6180
+ * - weight: Record weight
6181
+ * - port: Port number for the service
6182
+ *
6183
+ * Optional parameters:
6184
+ * - comment: A comment for this record
6175
6185
  *
6176
6186
  * @param {string} domainId
6177
6187
  * @param {string} recordId
@@ -6241,8 +6251,8 @@ target value, TTL, and optional comment.
6241
6251
  }
6242
6252
  /**
6243
6253
  * Create a new TXT record for the given domain. TXT records can be used
6244
- to provide additional information about your domain, such as domain
6245
- verification records, SPF records, or DKIM records.
6254
+ * to provide additional information about your domain, such as domain
6255
+ * verification records, SPF records, or DKIM records.
6246
6256
  *
6247
6257
  * @param {string} domainId
6248
6258
  * @param {string} name
@@ -6284,9 +6294,9 @@ target value, TTL, and optional comment.
6284
6294
  }
6285
6295
  /**
6286
6296
  * Update an existing TXT record for the given domain.
6287
-
6288
- Update the TXT record details for a specific domain by providing the domain ID,
6289
- record ID, and the new record configuration including name, value, TTL, and an optional comment.
6297
+ *
6298
+ * Update the TXT record details for a specific domain by providing the domain ID,
6299
+ * record ID, and the new record configuration including name, value, TTL, and an optional comment.
6290
6300
  *
6291
6301
  * @param {string} domainId
6292
6302
  * @param {string} recordId
@@ -6335,10 +6345,10 @@ target value, TTL, and optional comment.
6335
6345
  }
6336
6346
  /**
6337
6347
  * Get a single DNS record for a given domain by record ID.
6338
-
6339
- This endpoint allows you to retrieve a specific DNS record associated with a domain
6340
- using its unique identifier. The record contains information about the DNS configuration
6341
- such as type, value, and TTL settings.
6348
+ *
6349
+ * This endpoint allows you to retrieve a specific DNS record associated with a domain
6350
+ * using its unique identifier. The record contains information about the DNS configuration
6351
+ * such as type, value, and TTL settings.
6342
6352
  *
6343
6353
  * @param {string} domainId
6344
6354
  * @param {string} recordId
@@ -6360,7 +6370,7 @@ target value, TTL, and optional comment.
6360
6370
  }
6361
6371
  /**
6362
6372
  * Delete a DNS record for the given domain. This endpoint allows you to delete an existing DNS record
6363
- from a specific domain.
6373
+ * from a specific domain.
6364
6374
  *
6365
6375
  * @param {string} domainId
6366
6376
  * @param {string} recordId
@@ -6384,9 +6394,9 @@ target value, TTL, and optional comment.
6384
6394
  }
6385
6395
  /**
6386
6396
  * Update the team ID for a specific domain. This endpoint requires admin access.
6387
-
6388
- Updating the team ID will transfer ownership and access control of the domain
6389
- and all its DNS records to the new team.
6397
+ *
6398
+ * Updating the team ID will transfer ownership and access control of the domain
6399
+ * and all its DNS records to the new team.
6390
6400
  *
6391
6401
  * @param {string} domainId
6392
6402
  * @param {string} teamId
@@ -6413,7 +6423,7 @@ target value, TTL, and optional comment.
6413
6423
  }
6414
6424
  /**
6415
6425
  * Retrieve the DNS zone file for the given domain. This endpoint will return the DNS
6416
- zone file in a standardized format that can be used to configure DNS servers.
6426
+ * zone file in a standardized format that can be used to configure DNS servers.
6417
6427
  *
6418
6428
  * @param {string} domainId
6419
6429
  * @throws {AppwriteException}
@@ -6431,7 +6441,7 @@ target value, TTL, and optional comment.
6431
6441
  }
6432
6442
  /**
6433
6443
  * Update the DNS zone for the given domain using the provided zone file content.
6434
- All parsed records are imported and then the main domain document is returned.
6444
+ * All parsed records are imported and then the main domain document is returned.
6435
6445
  *
6436
6446
  * @param {string} domainId
6437
6447
  * @param {string} content
@@ -6847,10 +6857,10 @@ class Functions {
6847
6857
  }
6848
6858
  /**
6849
6859
  * 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.
6850
-
6851
- 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).
6852
-
6853
- Use the &quot;command&quot; param to set the entrypoint used to execute your code.
6860
+ *
6861
+ * 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).
6862
+ *
6863
+ * Use the &quot;command&quot; param to set the entrypoint used to execute your code.
6854
6864
  *
6855
6865
  * @param {string} functionId
6856
6866
  * @param {File} code
@@ -6922,8 +6932,8 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
6922
6932
  }
6923
6933
  /**
6924
6934
  * Create a deployment based on a template.
6925
-
6926
- Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details.
6935
+ *
6936
+ * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details.
6927
6937
  *
6928
6938
  * @param {string} functionId
6929
6939
  * @param {string} repository
@@ -6975,8 +6985,8 @@ Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/s
6975
6985
  }
6976
6986
  /**
6977
6987
  * Create a deployment when a function is connected to VCS.
6978
-
6979
- This endpoint lets you create deployment from a branch, commit, or a tag.
6988
+ *
6989
+ * This endpoint lets you create deployment from a branch, commit, or a tag.
6980
6990
  *
6981
6991
  * @param {string} functionId
6982
6992
  * @param {VCSDeploymentType} type
@@ -7637,7 +7647,7 @@ class Health {
7637
7647
  }
7638
7648
  /**
7639
7649
  * Returns the amount of failed jobs in a given queue.
7640
-
7650
+ *
7641
7651
  *
7642
7652
  * @param {Name} name
7643
7653
  * @param {number} threshold
@@ -7857,8 +7867,8 @@ class Locale {
7857
7867
  }
7858
7868
  /**
7859
7869
  * 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.
7860
-
7861
- ([IP Geolocation by DB-IP](https://db-ip.com))
7870
+ *
7871
+ * ([IP Geolocation by DB-IP](https://db-ip.com))
7862
7872
  *
7863
7873
  * @throws {AppwriteException}
7864
7874
  * @returns {Promise<Models.Locale>}
@@ -8062,7 +8072,7 @@ class Messaging {
8062
8072
  }
8063
8073
  /**
8064
8074
  * 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.
8065
-
8075
+ *
8066
8076
  *
8067
8077
  * @param {string} messageId
8068
8078
  * @param {string[]} topics
@@ -8220,7 +8230,7 @@ class Messaging {
8220
8230
  }
8221
8231
  /**
8222
8232
  * 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.
8223
-
8233
+ *
8224
8234
  *
8225
8235
  * @param {string} messageId
8226
8236
  * @param {string[]} topics
@@ -8361,7 +8371,7 @@ class Messaging {
8361
8371
  }
8362
8372
  /**
8363
8373
  * 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.
8364
-
8374
+ *
8365
8375
  *
8366
8376
  * @param {string} messageId
8367
8377
  * @param {string[]} topics
@@ -8405,7 +8415,7 @@ class Messaging {
8405
8415
  }
8406
8416
  /**
8407
8417
  * Get a message by its unique ID.
8408
-
8418
+ *
8409
8419
  *
8410
8420
  * @param {string} messageId
8411
8421
  * @throws {AppwriteException}
@@ -9460,7 +9470,7 @@ class Messaging {
9460
9470
  }
9461
9471
  /**
9462
9472
  * Get a provider by its unique ID.
9463
-
9473
+ *
9464
9474
  *
9465
9475
  * @param {string} providerId
9466
9476
  * @throws {AppwriteException}
@@ -9593,7 +9603,7 @@ class Messaging {
9593
9603
  }
9594
9604
  /**
9595
9605
  * Get a topic by its unique ID.
9596
-
9606
+ *
9597
9607
  *
9598
9608
  * @param {string} topicId
9599
9609
  * @throws {AppwriteException}
@@ -9611,7 +9621,7 @@ class Messaging {
9611
9621
  }
9612
9622
  /**
9613
9623
  * Update a topic by its unique ID.
9614
-
9624
+ *
9615
9625
  *
9616
9626
  * @param {string} topicId
9617
9627
  * @param {string} name
@@ -9737,7 +9747,7 @@ class Messaging {
9737
9747
  }
9738
9748
  /**
9739
9749
  * Get a subscriber by its unique ID.
9740
-
9750
+ *
9741
9751
  *
9742
9752
  * @param {string} topicId
9743
9753
  * @param {string} subscriberId
@@ -10321,7 +10331,7 @@ class Organizations {
10321
10331
  }
10322
10332
  /**
10323
10333
  * Create a new organization.
10324
-
10334
+ *
10325
10335
  *
10326
10336
  * @param {string} organizationId
10327
10337
  * @param {string} name
@@ -10599,7 +10609,7 @@ class Organizations {
10599
10609
  }
10600
10610
  /**
10601
10611
  * List all credits for an organization.
10602
-
10612
+ *
10603
10613
  *
10604
10614
  * @param {string} organizationId
10605
10615
  * @param {string[]} queries
@@ -10645,6 +10655,23 @@ class Organizations {
10645
10655
  };
10646
10656
  return this.client.call('post', uri, apiHeaders, payload);
10647
10657
  }
10658
+ /**
10659
+ * Get total available valid credits for an organization.
10660
+ *
10661
+ * @param {string} organizationId
10662
+ * @throws {AppwriteException}
10663
+ * @returns {Promise<Models.CreditAvailable>}
10664
+ */
10665
+ getAvailableCredits(organizationId) {
10666
+ if (typeof organizationId === 'undefined') {
10667
+ throw new AppwriteException('Missing required parameter: "organizationId"');
10668
+ }
10669
+ const apiPath = '/organizations/{organizationId}/credits/available'.replace('{organizationId}', organizationId);
10670
+ const payload = {};
10671
+ const uri = new URL(this.client.config.endpoint + apiPath);
10672
+ const apiHeaders = {};
10673
+ return this.client.call('get', uri, apiHeaders, payload);
10674
+ }
10648
10675
  /**
10649
10676
  * Get credit details.
10650
10677
  *
@@ -10903,7 +10930,7 @@ class Organizations {
10903
10930
  }
10904
10931
  /**
10905
10932
  * Set an organization&#039;s backup payment method.
10906
-
10933
+ *
10907
10934
  *
10908
10935
  * @param {string} organizationId
10909
10936
  * @param {string} paymentMethodId
@@ -11054,6 +11081,29 @@ class Organizations {
11054
11081
  };
11055
11082
  return this.client.call('patch', uri, apiHeaders, payload);
11056
11083
  }
11084
+ /**
11085
+ * Update selected projects to keep in the organization.
11086
+ *
11087
+ * @param {string} organizationId
11088
+ * @param {string[]} projects
11089
+ * @throws {AppwriteException}
11090
+ * @returns {Promise<Models.Organization<Preferences>>}
11091
+ */
11092
+ updateProjects(organizationId, projects) {
11093
+ if (typeof organizationId === 'undefined') {
11094
+ throw new AppwriteException('Missing required parameter: "organizationId"');
11095
+ }
11096
+ const apiPath = '/organizations/{organizationId}/projects'.replace('{organizationId}', organizationId);
11097
+ const payload = {};
11098
+ if (typeof projects !== 'undefined') {
11099
+ payload['projects'] = projects;
11100
+ }
11101
+ const uri = new URL(this.client.config.endpoint + apiPath);
11102
+ const apiHeaders = {
11103
+ 'content-type': 'application/json',
11104
+ };
11105
+ return this.client.call('patch', uri, apiHeaders, payload);
11106
+ }
11057
11107
  /**
11058
11108
  * Get Scopes
11059
11109
  *
@@ -13621,8 +13671,8 @@ class Sites {
13621
13671
  }
13622
13672
  /**
13623
13673
  * Create a deployment based on a template.
13624
-
13625
- Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details.
13674
+ *
13675
+ * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details.
13626
13676
  *
13627
13677
  * @param {string} siteId
13628
13678
  * @param {string} repository
@@ -13674,8 +13724,8 @@ Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/s
13674
13724
  }
13675
13725
  /**
13676
13726
  * Create a deployment when a site is connected to VCS.
13677
-
13678
- This endpoint lets you create deployment from a branch, commit, or a tag.
13727
+ *
13728
+ * This endpoint lets you create deployment from a branch, commit, or a tag.
13679
13729
  *
13680
13730
  * @param {string} siteId
13681
13731
  * @param {VCSDeploymentType} type
@@ -14237,13 +14287,13 @@ class Storage {
14237
14287
  }
14238
14288
  /**
14239
14289
  * 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.
14240
-
14241
- 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.
14242
-
14243
- 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.
14244
-
14245
- 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.
14246
-
14290
+ *
14291
+ * 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.
14292
+ *
14293
+ * 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.
14294
+ *
14295
+ * 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.
14296
+ *
14247
14297
  *
14248
14298
  * @param {string} bucketId
14249
14299
  * @param {string} fileId
@@ -14484,7 +14534,7 @@ If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunk
14484
14534
  }
14485
14535
  /**
14486
14536
  * Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
14487
-
14537
+ *
14488
14538
  *
14489
14539
  * @param {StorageUsageRange} range
14490
14540
  * @throws {AppwriteException}
@@ -14502,7 +14552,7 @@ If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunk
14502
14552
  }
14503
14553
  /**
14504
14554
  * Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
14505
-
14555
+ *
14506
14556
  *
14507
14557
  * @param {string} bucketId
14508
14558
  * @param {StorageUsageRange} range
@@ -14692,13 +14742,13 @@ class Teams {
14692
14742
  }
14693
14743
  /**
14694
14744
  * 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.
14695
-
14696
- 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.
14697
-
14698
- 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.
14699
-
14700
- 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.
14701
-
14745
+ *
14746
+ * 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.
14747
+ *
14748
+ * 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.
14749
+ *
14750
+ * 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.
14751
+ *
14702
14752
  *
14703
14753
  * @param {string} teamId
14704
14754
  * @param {string[]} roles
@@ -14766,7 +14816,7 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
14766
14816
  }
14767
14817
  /**
14768
14818
  * 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).
14769
-
14819
+ *
14770
14820
  *
14771
14821
  * @param {string} teamId
14772
14822
  * @param {string} membershipId
@@ -14820,9 +14870,9 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
14820
14870
  }
14821
14871
  /**
14822
14872
  * 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.
14823
-
14824
- If the request is successful, a session for the user is automatically created.
14825
-
14873
+ *
14874
+ * If the request is successful, a session for the user is automatically created.
14875
+ *
14826
14876
  *
14827
14877
  * @param {string} teamId
14828
14878
  * @param {string} membershipId
@@ -15465,7 +15515,7 @@ class Users {
15465
15515
  }
15466
15516
  /**
15467
15517
  * Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
15468
-
15518
+ *
15469
15519
  *
15470
15520
  * @param {UserUsageRange} range
15471
15521
  * @throws {AppwriteException}
@@ -15572,8 +15622,8 @@ class Users {
15572
15622
  }
15573
15623
  /**
15574
15624
  * Update the user labels by its unique ID.
15575
-
15576
- 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.
15625
+ *
15626
+ * 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.
15577
15627
  *
15578
15628
  * @param {string} userId
15579
15629
  * @param {string[]} labels
@@ -15905,8 +15955,8 @@ Labels can be used to grant access to resources. While teams are a way for user&
15905
15955
  }
15906
15956
  /**
15907
15957
  * Creates a session for a user. Returns an immediately usable session object.
15908
-
15909
- 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.
15958
+ *
15959
+ * 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.
15910
15960
  *
15911
15961
  * @param {string} userId
15912
15962
  * @throws {AppwriteException}
@@ -16142,7 +16192,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
16142
16192
  }
16143
16193
  /**
16144
16194
  * 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.
16145
-
16195
+ *
16146
16196
  *
16147
16197
  * @param {string} userId
16148
16198
  * @param {number} length
@@ -16347,7 +16397,7 @@ class Vcs {
16347
16397
  }
16348
16398
  /**
16349
16399
  * Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.
16350
-
16400
+ *
16351
16401
  *
16352
16402
  * @param {string} installationId
16353
16403
  * @param {string} providerRepositoryId
@@ -16369,15 +16419,15 @@ class Vcs {
16369
16419
  }
16370
16420
  /**
16371
16421
  * Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.
16372
-
16373
16422
  *
16374
16423
  * @param {string} installationId
16375
16424
  * @param {string} providerRepositoryId
16376
16425
  * @param {string} providerRootDirectory
16426
+ * @param {string} providerReference
16377
16427
  * @throws {AppwriteException}
16378
16428
  * @returns {Promise<Models.VcsContentList>}
16379
16429
  */
16380
- getRepositoryContents(installationId, providerRepositoryId, providerRootDirectory) {
16430
+ getRepositoryContents(installationId, providerRepositoryId, providerRootDirectory, providerReference) {
16381
16431
  if (typeof installationId === 'undefined') {
16382
16432
  throw new AppwriteException('Missing required parameter: "installationId"');
16383
16433
  }
@@ -16389,6 +16439,9 @@ class Vcs {
16389
16439
  if (typeof providerRootDirectory !== 'undefined') {
16390
16440
  payload['providerRootDirectory'] = providerRootDirectory;
16391
16441
  }
16442
+ if (typeof providerReference !== 'undefined') {
16443
+ payload['providerReference'] = providerReference;
16444
+ }
16392
16445
  const uri = new URL(this.client.config.endpoint + apiPath);
16393
16446
  const apiHeaders = {};
16394
16447
  return this.client.call('get', uri, apiHeaders, payload);
@@ -16425,7 +16478,7 @@ class Vcs {
16425
16478
  }
16426
16479
  /**
16427
16480
  * List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.
16428
-
16481
+ *
16429
16482
  *
16430
16483
  * @param {string[]} queries
16431
16484
  * @param {string} search