@appwrite.io/console 1.8.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 (105) 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 +532 -200
  5. package/dist/cjs/sdk.js.map +1 -1
  6. package/dist/esm/sdk.js +533 -201
  7. package/dist/esm/sdk.js.map +1 -1
  8. package/dist/iife/sdk.js +532 -200
  9. package/docs/examples/databases/create-document.md +1 -3
  10. package/docs/examples/databases/create-documents.md +1 -1
  11. package/docs/examples/databases/decrement-document-attribute.md +18 -0
  12. package/docs/examples/databases/increment-document-attribute.md +18 -0
  13. package/docs/examples/databases/upsert-documents.md +1 -1
  14. package/docs/examples/domains/create-record-a-a-a-a.md +1 -1
  15. package/docs/examples/domains/create-record-a.md +1 -1
  16. package/docs/examples/domains/create-record-alias.md +1 -1
  17. package/docs/examples/domains/create-record-c-a-a.md +1 -1
  18. package/docs/examples/domains/create-record-c-n-a-m-e.md +1 -1
  19. package/docs/examples/domains/create-record-h-t-t-p-s.md +1 -1
  20. package/docs/examples/domains/create-record-m-x.md +1 -1
  21. package/docs/examples/domains/create-record-n-s.md +1 -1
  22. package/docs/examples/domains/create-record-s-r-v.md +1 -1
  23. package/docs/examples/domains/create-record-t-x-t.md +1 -1
  24. package/docs/examples/domains/update-record-a-a-a-a.md +1 -1
  25. package/docs/examples/domains/update-record-a.md +1 -1
  26. package/docs/examples/domains/update-record-alias.md +1 -1
  27. package/docs/examples/domains/update-record-c-a-a.md +1 -1
  28. package/docs/examples/domains/update-record-c-n-a-m-e.md +1 -1
  29. package/docs/examples/domains/update-record-h-t-t-p-s.md +1 -1
  30. package/docs/examples/domains/update-record-m-x.md +1 -1
  31. package/docs/examples/domains/update-record-n-s.md +1 -1
  32. package/docs/examples/domains/update-record-s-r-v.md +1 -1
  33. package/docs/examples/domains/update-record-t-x-t.md +1 -1
  34. package/docs/examples/functions/create-execution.md +1 -1
  35. package/docs/examples/health/{get-queue-stats-usage-dump.md → get-queue-billing-project-aggregation.md} +2 -2
  36. package/docs/examples/health/{get-queue-billing-aggregation.md → get-queue-billing-team-aggregation.md} +1 -1
  37. package/docs/examples/organizations/cancel-downgrade.md +13 -0
  38. package/docs/examples/organizations/estimation-create-organization.md +16 -0
  39. package/docs/examples/organizations/estimation-delete-organization.md +13 -0
  40. package/docs/examples/organizations/estimation-update-plan.md +16 -0
  41. package/docs/examples/organizations/get-available-credits.md +13 -0
  42. package/docs/examples/organizations/get-usage.md +1 -1
  43. package/docs/examples/organizations/update-projects.md +14 -0
  44. package/docs/examples/organizations/validate-payment.md +14 -0
  45. package/docs/examples/proxy/create-redirect-rule.md +4 -2
  46. package/docs/examples/vcs/get-repository-contents.md +2 -1
  47. package/package.json +1 -1
  48. package/src/client.ts +5 -4
  49. package/src/enums/build-runtime.ts +2 -0
  50. package/src/enums/image-format.ts +1 -0
  51. package/src/enums/proxy-resource-type.ts +4 -0
  52. package/src/enums/runtime.ts +2 -0
  53. package/src/index.ts +1 -0
  54. package/src/models.ts +513 -11
  55. package/src/services/account.ts +97 -36
  56. package/src/services/avatars.ts +26 -20
  57. package/src/services/backups.ts +11 -0
  58. package/src/services/console.ts +8 -1
  59. package/src/services/databases.ts +190 -31
  60. package/src/services/domains.ts +111 -69
  61. package/src/services/functions.ts +37 -8
  62. package/src/services/graphql.ts +1 -0
  63. package/src/services/health.ts +54 -4
  64. package/src/services/locale.ts +9 -2
  65. package/src/services/messaging.ts +53 -8
  66. package/src/services/migrations.ts +12 -0
  67. package/src/services/organizations.ts +301 -14
  68. package/src/services/project.ts +5 -0
  69. package/src/services/projects.ts +50 -0
  70. package/src/services/proxy.ts +23 -1
  71. package/src/services/sites.ts +32 -4
  72. package/src/services/storage.ts +23 -9
  73. package/src/services/teams.ts +30 -17
  74. package/src/services/tokens.ts +4 -0
  75. package/src/services/users.ts +69 -27
  76. package/src/services/vcs.ts +16 -4
  77. package/types/enums/build-runtime.d.ts +3 -1
  78. package/types/enums/image-format.d.ts +2 -1
  79. package/types/enums/proxy-resource-type.d.ts +4 -0
  80. package/types/enums/runtime.d.ts +3 -1
  81. package/types/index.d.ts +1 -0
  82. package/types/models.d.ts +494 -188
  83. package/types/services/account.d.ts +36 -36
  84. package/types/services/avatars.d.ts +20 -20
  85. package/types/services/console.d.ts +1 -1
  86. package/types/services/databases.d.ts +67 -31
  87. package/types/services/domains.d.ts +69 -69
  88. package/types/services/functions.d.ts +8 -8
  89. package/types/services/health.d.ts +11 -3
  90. package/types/services/locale.d.ts +2 -2
  91. package/types/services/messaging.d.ts +8 -8
  92. package/types/services/organizations.d.ts +88 -14
  93. package/types/services/proxy.d.ts +4 -1
  94. package/types/services/sites.d.ts +4 -4
  95. package/types/services/storage.d.ts +9 -9
  96. package/types/services/teams.d.ts +17 -17
  97. package/types/services/users.d.ts +27 -27
  98. package/types/services/vcs.d.ts +4 -4
  99. package/docs/examples/functions/create-build.md +0 -15
  100. package/docs/examples/functions/get-function-usage.md +0 -14
  101. package/docs/examples/functions/update-deployment-build.md +0 -14
  102. package/docs/examples/functions/update-deployment.md +0 -14
  103. package/docs/examples/proxy/create-rule.md +0 -15
  104. package/src/enums/resource-type.ts +0 -4
  105. package/types/enums/resource-type.d.ts +0 -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.8.0',
283
+ 'x-sdk-version': '1.10.0',
284
284
  'X-Appwrite-Response-Format': '1.7.0',
285
285
  };
286
286
  this.realtime = {
@@ -615,9 +615,10 @@ class Client {
615
615
  return { uri: url.toString(), options };
616
616
  }
617
617
  chunkedUpload(method, url, headers = {}, originalPayload = {}, onProgress) {
618
+ var _a;
618
619
  return __awaiter(this, void 0, void 0, function* () {
619
- const file = Object.values(originalPayload).find((value) => value instanceof File);
620
- if (!file) {
620
+ const [fileParam, file] = (_a = Object.entries(originalPayload).find(([_, value]) => value instanceof File)) !== null && _a !== void 0 ? _a : [];
621
+ if (!file || !fileParam) {
621
622
  throw new Error('File not found in payload');
622
623
  }
623
624
  if (file.size <= Client.CHUNK_SIZE) {
@@ -632,7 +633,8 @@ class Client {
632
633
  }
633
634
  headers['content-range'] = `bytes ${start}-${end - 1}/${file.size}`;
634
635
  const chunk = file.slice(start, end);
635
- let payload = Object.assign(Object.assign({}, originalPayload), { file: new File([chunk], file.name) });
636
+ let payload = Object.assign({}, originalPayload);
637
+ payload[fileParam] = new File([chunk], file.name);
636
638
  response = yield this.call(method, url, headers, payload);
637
639
  if (onProgress && typeof onProgress === 'function') {
638
640
  onProgress({
@@ -988,8 +990,8 @@ class Account {
988
990
  }
989
991
  /**
990
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.
991
- This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
992
-
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
995
  *
994
996
  * @param {string} email
995
997
  * @param {string} password
@@ -1591,8 +1593,8 @@ This endpoint can also be used to convert an anonymous account to a normal one,
1591
1593
  }
1592
1594
  /**
1593
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.
1594
-
1595
- 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.
1596
1598
  *
1597
1599
  * @param {string} userId
1598
1600
  * @param {string} secret
@@ -1672,8 +1674,8 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
1672
1674
  }
1673
1675
  /**
1674
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.
1675
-
1676
- 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).
1677
1679
  *
1678
1680
  * @param {string} email
1679
1681
  * @param {string} password
@@ -1732,11 +1734,11 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1732
1734
  }
1733
1735
  /**
1734
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&#039;s back to your app when login is completed.
1735
-
1736
- 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.
1737
-
1738
- 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).
1739
-
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
+ *
1740
1742
  *
1741
1743
  * @param {OAuthProvider} provider
1742
1744
  * @param {string} success
@@ -1981,8 +1983,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1981
1983
  }
1982
1984
  /**
1983
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&#039;s email is valid for 15 minutes.
1984
-
1985
- 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).
1986
1988
  *
1987
1989
  * @param {string} userId
1988
1990
  * @param {string} email
@@ -2016,9 +2018,9 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
2016
2018
  }
2017
2019
  /**
2018
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&#039;s email address is valid for 1 hour.
2019
-
2020
- 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).
2021
-
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
+ *
2022
2024
  *
2023
2025
  * @param {string} userId
2024
2026
  * @param {string} email
@@ -2056,10 +2058,10 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
2056
2058
  }
2057
2059
  /**
2058
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&#039;s back to your app when login is completed.
2059
-
2060
- 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.
2061
-
2062
- 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).
2063
2065
  *
2064
2066
  * @param {OAuthProvider} provider
2065
2067
  * @param {string} success
@@ -2098,8 +2100,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
2098
2100
  }
2099
2101
  /**
2100
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&#039;s phone is valid for 15 minutes.
2101
-
2102
- 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).
2103
2105
  *
2104
2106
  * @param {string} userId
2105
2107
  * @param {string} phone
@@ -2129,9 +2131,9 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
2129
2131
  }
2130
2132
  /**
2131
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&#039;s email address is valid for 7 days.
2132
-
2133
- 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.
2134
-
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
+ *
2135
2137
  *
2136
2138
  * @param {string} url
2137
2139
  * @throws {AppwriteException}
@@ -2233,8 +2235,8 @@ class Avatars {
2233
2235
  }
2234
2236
  /**
2235
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.
2236
-
2237
- 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.
2238
2240
  *
2239
2241
  * @param {Browser} code
2240
2242
  * @param {number} width
@@ -2267,9 +2269,9 @@ When one dimension is specified and the other is 0, the image is scaled with pre
2267
2269
  }
2268
2270
  /**
2269
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.
2270
-
2271
- 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.
2272
-
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
+ *
2273
2275
  *
2274
2276
  * @param {CreditCard} code
2275
2277
  * @param {number} width
@@ -2302,8 +2304,8 @@ When one dimension is specified and the other is 0, the image is scaled with pre
2302
2304
  }
2303
2305
  /**
2304
2306
  * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
2305
-
2306
- This endpoint does not follow HTTP redirects.
2307
+ *
2308
+ * This endpoint does not follow HTTP redirects.
2307
2309
  *
2308
2310
  * @param {string} url
2309
2311
  * @throws {AppwriteException}
@@ -2327,9 +2329,9 @@ This endpoint does not follow HTTP redirects.
2327
2329
  }
2328
2330
  /**
2329
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.
2330
-
2331
- 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.
2332
-
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
+ *
2333
2335
  *
2334
2336
  * @param {Flag} code
2335
2337
  * @param {number} width
@@ -2362,10 +2364,10 @@ When one dimension is specified and the other is 0, the image is scaled with pre
2362
2364
  }
2363
2365
  /**
2364
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.
2365
-
2366
- 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.
2367
-
2368
- 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.
2369
2371
  *
2370
2372
  * @param {string} url
2371
2373
  * @param {number} width
@@ -2397,11 +2399,11 @@ This endpoint does not follow HTTP redirects.
2397
2399
  }
2398
2400
  /**
2399
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 &#039;name&#039; parameter. If no name is given and no user is logged, an empty avatar will be returned.
2400
-
2401
- 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.
2402
-
2403
- 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.
2404
-
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&#039;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
+ *
2405
2407
  *
2406
2408
  * @param {string} name
2407
2409
  * @param {number} width
@@ -2434,7 +2436,7 @@ When one dimension is specified and the other is 0, the image is scaled with pre
2434
2436
  }
2435
2437
  /**
2436
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.
2437
-
2439
+ *
2438
2440
  *
2439
2441
  * @param {string} text
2440
2442
  * @param {number} size
@@ -2984,7 +2986,7 @@ class Databases {
2984
2986
  }
2985
2987
  /**
2986
2988
  * Create a new Database.
2987
-
2989
+ *
2988
2990
  *
2989
2991
  * @param {string} databaseId
2990
2992
  * @param {string} name
@@ -3282,7 +3284,7 @@ class Databases {
3282
3284
  }
3283
3285
  /**
3284
3286
  * Create a boolean attribute.
3285
-
3287
+ *
3286
3288
  *
3287
3289
  * @param {string} databaseId
3288
3290
  * @param {string} collectionId
@@ -3463,7 +3465,7 @@ class Databases {
3463
3465
  }
3464
3466
  /**
3465
3467
  * Create an email attribute.
3466
-
3468
+ *
3467
3469
  *
3468
3470
  * @param {string} databaseId
3469
3471
  * @param {string} collectionId
@@ -3509,7 +3511,7 @@ class Databases {
3509
3511
  }
3510
3512
  /**
3511
3513
  * Update an email attribute. Changing the `default` value will not update already existing documents.
3512
-
3514
+ *
3513
3515
  *
3514
3516
  * @param {string} databaseId
3515
3517
  * @param {string} collectionId
@@ -3555,7 +3557,7 @@ class Databases {
3555
3557
  }
3556
3558
  /**
3557
3559
  * Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute.
3558
-
3560
+ *
3559
3561
  *
3560
3562
  * @param {string} databaseId
3561
3563
  * @param {string} collectionId
@@ -3608,7 +3610,7 @@ class Databases {
3608
3610
  }
3609
3611
  /**
3610
3612
  * Update an enum attribute. Changing the `default` value will not update already existing documents.
3611
-
3613
+ *
3612
3614
  *
3613
3615
  * @param {string} databaseId
3614
3616
  * @param {string} collectionId
@@ -3661,7 +3663,7 @@ class Databases {
3661
3663
  }
3662
3664
  /**
3663
3665
  * Create a float attribute. Optionally, minimum and maximum values can be provided.
3664
-
3666
+ *
3665
3667
  *
3666
3668
  * @param {string} databaseId
3667
3669
  * @param {string} collectionId
@@ -3715,7 +3717,7 @@ class Databases {
3715
3717
  }
3716
3718
  /**
3717
3719
  * Update a float attribute. Changing the `default` value will not update already existing documents.
3718
-
3720
+ *
3719
3721
  *
3720
3722
  * @param {string} databaseId
3721
3723
  * @param {string} collectionId
@@ -3769,7 +3771,7 @@ class Databases {
3769
3771
  }
3770
3772
  /**
3771
3773
  * Create an integer attribute. Optionally, minimum and maximum values can be provided.
3772
-
3774
+ *
3773
3775
  *
3774
3776
  * @param {string} databaseId
3775
3777
  * @param {string} collectionId
@@ -3823,7 +3825,7 @@ class Databases {
3823
3825
  }
3824
3826
  /**
3825
3827
  * Update an integer attribute. Changing the `default` value will not update already existing documents.
3826
-
3828
+ *
3827
3829
  *
3828
3830
  * @param {string} databaseId
3829
3831
  * @param {string} collectionId
@@ -3877,7 +3879,7 @@ class Databases {
3877
3879
  }
3878
3880
  /**
3879
3881
  * Create IP address attribute.
3880
-
3882
+ *
3881
3883
  *
3882
3884
  * @param {string} databaseId
3883
3885
  * @param {string} collectionId
@@ -3923,7 +3925,7 @@ class Databases {
3923
3925
  }
3924
3926
  /**
3925
3927
  * Update an ip attribute. Changing the `default` value will not update already existing documents.
3926
-
3928
+ *
3927
3929
  *
3928
3930
  * @param {string} databaseId
3929
3931
  * @param {string} collectionId
@@ -3969,7 +3971,7 @@ class Databases {
3969
3971
  }
3970
3972
  /**
3971
3973
  * Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
3972
-
3974
+ *
3973
3975
  *
3974
3976
  * @param {string} databaseId
3975
3977
  * @param {string} collectionId
@@ -4023,7 +4025,7 @@ class Databases {
4023
4025
  }
4024
4026
  /**
4025
4027
  * Create a string attribute.
4026
-
4028
+ *
4027
4029
  *
4028
4030
  * @param {string} databaseId
4029
4031
  * @param {string} collectionId
@@ -4080,7 +4082,7 @@ class Databases {
4080
4082
  }
4081
4083
  /**
4082
4084
  * Update a string attribute. Changing the `default` value will not update already existing documents.
4083
-
4085
+ *
4084
4086
  *
4085
4087
  * @param {string} databaseId
4086
4088
  * @param {string} collectionId
@@ -4130,7 +4132,7 @@ class Databases {
4130
4132
  }
4131
4133
  /**
4132
4134
  * Create a URL attribute.
4133
-
4135
+ *
4134
4136
  *
4135
4137
  * @param {string} databaseId
4136
4138
  * @param {string} collectionId
@@ -4176,7 +4178,7 @@ class Databases {
4176
4178
  }
4177
4179
  /**
4178
4180
  * Update an url attribute. Changing the `default` value will not update already existing documents.
4179
-
4181
+ *
4180
4182
  *
4181
4183
  * @param {string} databaseId
4182
4184
  * @param {string} collectionId
@@ -4274,7 +4276,7 @@ class Databases {
4274
4276
  }
4275
4277
  /**
4276
4278
  * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
4277
-
4279
+ *
4278
4280
  *
4279
4281
  * @param {string} databaseId
4280
4282
  * @param {string} collectionId
@@ -4339,7 +4341,7 @@ class Databases {
4339
4341
  * @param {string} databaseId
4340
4342
  * @param {string} collectionId
4341
4343
  * @param {string} documentId
4342
- * @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
4343
4345
  * @param {string[]} permissions
4344
4346
  * @throws {AppwriteException}
4345
4347
  * @returns {Promise<Document>}
@@ -4375,6 +4377,8 @@ class Databases {
4375
4377
  return this.client.call('post', uri, apiHeaders, payload);
4376
4378
  }
4377
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
+ *
4378
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.
4379
4383
  *
4380
4384
  * @param {string} databaseId
@@ -4405,8 +4409,10 @@ class Databases {
4405
4409
  return this.client.call('post', uri, apiHeaders, payload);
4406
4410
  }
4407
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
+ *
4408
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.
4409
-
4415
+ *
4410
4416
  *
4411
4417
  * @param {string} databaseId
4412
4418
  * @param {string} collectionId
@@ -4421,6 +4427,9 @@ class Databases {
4421
4427
  if (typeof collectionId === 'undefined') {
4422
4428
  throw new AppwriteException('Missing required parameter: "collectionId"');
4423
4429
  }
4430
+ if (typeof documents === 'undefined') {
4431
+ throw new AppwriteException('Missing required parameter: "documents"');
4432
+ }
4424
4433
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
4425
4434
  const payload = {};
4426
4435
  if (typeof documents !== 'undefined') {
@@ -4433,6 +4442,8 @@ class Databases {
4433
4442
  return this.client.call('put', uri, apiHeaders, payload);
4434
4443
  }
4435
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
+ *
4436
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.
4437
4448
  *
4438
4449
  * @param {string} databaseId
@@ -4464,6 +4475,8 @@ class Databases {
4464
4475
  return this.client.call('patch', uri, apiHeaders, payload);
4465
4476
  }
4466
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
+ *
4467
4480
  * Bulk delete documents using queries, if no queries are passed then all documents are deleted.
4468
4481
  *
4469
4482
  * @param {string} databaseId
@@ -4520,6 +4533,8 @@ class Databases {
4520
4533
  return this.client.call('get', uri, apiHeaders, payload);
4521
4534
  }
4522
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
+ *
4523
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.
4524
4539
  *
4525
4540
  * @param {string} databaseId
@@ -4563,7 +4578,7 @@ class Databases {
4563
4578
  * @param {string} databaseId
4564
4579
  * @param {string} collectionId
4565
4580
  * @param {string} documentId
4566
- * @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
4567
4582
  * @param {string[]} permissions
4568
4583
  * @throws {AppwriteException}
4569
4584
  * @returns {Promise<Document>}
@@ -4648,6 +4663,84 @@ class Databases {
4648
4663
  const apiHeaders = {};
4649
4664
  return this.client.call('get', uri, apiHeaders, payload);
4650
4665
  }
4666
+ /**
4667
+ * Decrement a specific attribute of a document by a given value.
4668
+ *
4669
+ * @param {string} databaseId
4670
+ * @param {string} collectionId
4671
+ * @param {string} documentId
4672
+ * @param {string} attribute
4673
+ * @param {number} value
4674
+ * @param {number} min
4675
+ * @throws {AppwriteException}
4676
+ * @returns {Promise<Document>}
4677
+ */
4678
+ decrementDocumentAttribute(databaseId, collectionId, documentId, attribute, value, min) {
4679
+ if (typeof databaseId === 'undefined') {
4680
+ throw new AppwriteException('Missing required parameter: "databaseId"');
4681
+ }
4682
+ if (typeof collectionId === 'undefined') {
4683
+ throw new AppwriteException('Missing required parameter: "collectionId"');
4684
+ }
4685
+ if (typeof documentId === 'undefined') {
4686
+ throw new AppwriteException('Missing required parameter: "documentId"');
4687
+ }
4688
+ if (typeof attribute === 'undefined') {
4689
+ throw new AppwriteException('Missing required parameter: "attribute"');
4690
+ }
4691
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', attribute);
4692
+ const payload = {};
4693
+ if (typeof value !== 'undefined') {
4694
+ payload['value'] = value;
4695
+ }
4696
+ if (typeof min !== 'undefined') {
4697
+ payload['min'] = min;
4698
+ }
4699
+ const uri = new URL(this.client.config.endpoint + apiPath);
4700
+ const apiHeaders = {
4701
+ 'content-type': 'application/json',
4702
+ };
4703
+ return this.client.call('patch', uri, apiHeaders, payload);
4704
+ }
4705
+ /**
4706
+ * Increment a specific attribute of a document by a given value.
4707
+ *
4708
+ * @param {string} databaseId
4709
+ * @param {string} collectionId
4710
+ * @param {string} documentId
4711
+ * @param {string} attribute
4712
+ * @param {number} value
4713
+ * @param {number} max
4714
+ * @throws {AppwriteException}
4715
+ * @returns {Promise<Document>}
4716
+ */
4717
+ incrementDocumentAttribute(databaseId, collectionId, documentId, attribute, value, max) {
4718
+ if (typeof databaseId === 'undefined') {
4719
+ throw new AppwriteException('Missing required parameter: "databaseId"');
4720
+ }
4721
+ if (typeof collectionId === 'undefined') {
4722
+ throw new AppwriteException('Missing required parameter: "collectionId"');
4723
+ }
4724
+ if (typeof documentId === 'undefined') {
4725
+ throw new AppwriteException('Missing required parameter: "documentId"');
4726
+ }
4727
+ if (typeof attribute === 'undefined') {
4728
+ throw new AppwriteException('Missing required parameter: "attribute"');
4729
+ }
4730
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', attribute);
4731
+ const payload = {};
4732
+ if (typeof value !== 'undefined') {
4733
+ payload['value'] = value;
4734
+ }
4735
+ if (typeof max !== 'undefined') {
4736
+ payload['max'] = max;
4737
+ }
4738
+ const uri = new URL(this.client.config.endpoint + apiPath);
4739
+ const apiHeaders = {
4740
+ 'content-type': 'application/json',
4741
+ };
4742
+ return this.client.call('patch', uri, apiHeaders, payload);
4743
+ }
4651
4744
  /**
4652
4745
  * List indexes in the collection.
4653
4746
  *
@@ -4675,7 +4768,7 @@ class Databases {
4675
4768
  }
4676
4769
  /**
4677
4770
  * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
4678
- Attributes can be `key`, `fulltext`, and `unique`.
4771
+ * Attributes can be `key`, `fulltext`, and `unique`.
4679
4772
  *
4680
4773
  * @param {string} databaseId
4681
4774
  * @param {string} collectionId
@@ -4945,7 +5038,7 @@ class Domains {
4945
5038
  }
4946
5039
  /**
4947
5040
  * Delete a domain by its unique ID. This endpoint can be used to delete a domain from your project.
4948
- 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.
4949
5042
  *
4950
5043
  * @param {string} domainId
4951
5044
  * @throws {AppwriteException}
@@ -4965,8 +5058,8 @@ Once deleted, the domain will no longer be available for use and all associated
4965
5058
  }
4966
5059
  /**
4967
5060
  * Verify which NS records are used and update the domain accordingly. This will check the domain&#039;s
4968
- nameservers and update the domain&#039;s status based on whether the nameservers match the expected
4969
- Appwrite nameservers.
5061
+ * nameservers and update the domain&#039;s status based on whether the nameservers match the expected
5062
+ * Appwrite nameservers.
4970
5063
  *
4971
5064
  * @param {string} domainId
4972
5065
  * @throws {AppwriteException}
@@ -5003,7 +5096,7 @@ Once deleted, the domain will no longer be available for use and all associated
5003
5096
  }
5004
5097
  /**
5005
5098
  * Add Google Workspace DNS records to the domain. This will create the required MX records
5006
- for Google Workspace email hosting.
5099
+ * for Google Workspace email hosting.
5007
5100
  *
5008
5101
  * @param {string} domainId
5009
5102
  * @throws {AppwriteException}
@@ -5040,7 +5133,7 @@ Once deleted, the domain will no longer be available for use and all associated
5040
5133
  }
5041
5134
  /**
5042
5135
  * Add iCloud DNS records to the domain. This will create the required MX and SPF records
5043
- for using iCloud email services with your domain.
5136
+ * for using iCloud email services with your domain.
5044
5137
  *
5045
5138
  * @param {string} domainId
5046
5139
  * @throws {AppwriteException}
@@ -5077,7 +5170,7 @@ Once deleted, the domain will no longer be available for use and all associated
5077
5170
  }
5078
5171
  /**
5079
5172
  * Add Mailgun DNS records to the domain. This endpoint will create the required DNS records
5080
- for Mailgun in the specified domain.
5173
+ * for Mailgun in the specified domain.
5081
5174
  *
5082
5175
  * @param {string} domainId
5083
5176
  * @throws {AppwriteException}
@@ -5114,7 +5207,7 @@ Once deleted, the domain will no longer be available for use and all associated
5114
5207
  }
5115
5208
  /**
5116
5209
  * Add Outlook DNS records to the domain. This will create the required MX records
5117
- for setting up Outlook email hosting for your domain.
5210
+ * for setting up Outlook email hosting for your domain.
5118
5211
  *
5119
5212
  * @param {string} domainId
5120
5213
  * @throws {AppwriteException}
@@ -5151,7 +5244,7 @@ Once deleted, the domain will no longer be available for use and all associated
5151
5244
  }
5152
5245
  /**
5153
5246
  * Add ProtonMail DNS records to the domain. This will create the required MX records
5154
- for using ProtonMail with your custom domain.
5247
+ * for using ProtonMail with your custom domain.
5155
5248
  *
5156
5249
  * @param {string} domainId
5157
5250
  * @throws {AppwriteException}
@@ -5188,7 +5281,7 @@ Once deleted, the domain will no longer be available for use and all associated
5188
5281
  }
5189
5282
  /**
5190
5283
  * Add Zoho Mail DNS records to the domain. This will create the required MX records
5191
- for setting up Zoho Mail on your domain.
5284
+ * for setting up Zoho Mail on your domain.
5192
5285
  *
5193
5286
  * @param {string} domainId
5194
5287
  * @throws {AppwriteException}
@@ -5208,7 +5301,7 @@ Once deleted, the domain will no longer be available for use and all associated
5208
5301
  }
5209
5302
  /**
5210
5303
  * List DNS records for a given domain. You can use this endpoint to list all the DNS records
5211
- associated with your domain.
5304
+ * associated with your domain.
5212
5305
  *
5213
5306
  * @param {string} domainId
5214
5307
  * @param {string[]} queries
@@ -5230,7 +5323,7 @@ Once deleted, the domain will no longer be available for use and all associated
5230
5323
  }
5231
5324
  /**
5232
5325
  * Create a new A record for the given domain. A records are used to point a domain name
5233
- 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.
5234
5327
  *
5235
5328
  * @param {string} domainId
5236
5329
  * @param {string} name
@@ -5275,8 +5368,8 @@ to an IPv4 address. The record value should be a valid IPv4 address.
5275
5368
  }
5276
5369
  /**
5277
5370
  * Update an existing A record for the given domain. This endpoint allows you to modify
5278
- the properties of an A record including its name (subdomain), IPv4 address, TTL,
5279
- and optional comment.
5371
+ * the properties of an A record including its name (subdomain), IPv4 address, TTL,
5372
+ * and optional comment.
5280
5373
  *
5281
5374
  * @param {string} domainId
5282
5375
  * @param {string} recordId
@@ -5325,7 +5418,7 @@ to an IPv4 address. The record value should be a valid IPv4 address.
5325
5418
  }
5326
5419
  /**
5327
5420
  * Create a new AAAA record for the given domain. This endpoint allows you to add a new IPv6 DNS record
5328
- 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.
5329
5422
  *
5330
5423
  * @param {string} domainId
5331
5424
  * @param {string} name
@@ -5370,8 +5463,8 @@ to an IPv4 address. The record value should be a valid IPv4 address.
5370
5463
  }
5371
5464
  /**
5372
5465
  * Update an existing AAAA record for the given domain. This endpoint allows you to modify
5373
- the properties of an existing AAAA record, including its name (subdomain), IPv6 address,
5374
- TTL, and optional comment.
5466
+ * the properties of an existing AAAA record, including its name (subdomain), IPv6 address,
5467
+ * TTL, and optional comment.
5375
5468
  *
5376
5469
  * @param {string} domainId
5377
5470
  * @param {string} recordId
@@ -5420,8 +5513,8 @@ to an IPv4 address. The record value should be a valid IPv4 address.
5420
5513
  }
5421
5514
  /**
5422
5515
  * Create a new ALIAS record for the given domain. This record type can be used to point your domain
5423
- to another domain name that will serve as an alias. This is particularly useful when you want to
5424
- 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.
5425
5518
  *
5426
5519
  * @param {string} domainId
5427
5520
  * @param {string} name
@@ -5466,10 +5559,10 @@ to an IPv4 address. The record value should be a valid IPv4 address.
5466
5559
  }
5467
5560
  /**
5468
5561
  * Update an existing ALIAS record for the specified domain. This endpoint allows you to modify
5469
- the properties of an existing ALIAS record including its name, target domain, TTL, and comment.
5470
-
5471
- The ALIAS record type is similar to a CNAME record but can be used at the zone apex (root domain).
5472
- 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.
5473
5566
  *
5474
5567
  * @param {string} domainId
5475
5568
  * @param {string} recordId
@@ -5518,7 +5611,7 @@ to an IPv4 address. The record value should be a valid IPv4 address.
5518
5611
  }
5519
5612
  /**
5520
5613
  * Create a new CAA record for the given domain. CAA records are used to specify which
5521
- 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.
5522
5615
  *
5523
5616
  * @param {string} domainId
5524
5617
  * @param {string} name
@@ -5563,8 +5656,8 @@ Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your
5563
5656
  }
5564
5657
  /**
5565
5658
  * Update an existing CAA record for the given domain. A CAA (Certification Authority Authorization)
5566
- record is used to specify which certificate authorities (CAs) are authorized to issue certificates
5567
- for a domain.
5659
+ * record is used to specify which certificate authorities (CAs) are authorized to issue certificates
5660
+ * for a domain.
5568
5661
  *
5569
5662
  * @param {string} domainId
5570
5663
  * @param {string} recordId
@@ -5613,10 +5706,10 @@ Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your
5613
5706
  }
5614
5707
  /**
5615
5708
  * Create a new CNAME record for the given domain.
5616
-
5617
- A CNAME record maps a subdomain to another domain name, allowing you to create aliases
5618
- for your domain. For example, you can create a CNAME record to point &#039;blog.example.com&#039;
5619
- 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;.
5620
5713
  *
5621
5714
  * @param {string} domainId
5622
5715
  * @param {string} name
@@ -5709,7 +5802,7 @@ Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your
5709
5802
  }
5710
5803
  /**
5711
5804
  * Create a new HTTPS record for the given domain. This record is used to configure HTTPS
5712
- settings for your domain, enabling secure communication over SSL/TLS.
5805
+ * settings for your domain, enabling secure communication over SSL/TLS.
5713
5806
  *
5714
5807
  * @param {string} domainId
5715
5808
  * @param {string} name
@@ -5754,8 +5847,8 @@ Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your
5754
5847
  }
5755
5848
  /**
5756
5849
  * Update an existing HTTPS record for the given domain. This endpoint allows you to modify
5757
- the properties of an HTTPS record associated with your domain, including the name (subdomain),
5758
- 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.
5759
5852
  *
5760
5853
  * @param {string} domainId
5761
5854
  * @param {string} recordId
@@ -5804,9 +5897,9 @@ target value, TTL, and optional comment.
5804
5897
  }
5805
5898
  /**
5806
5899
  * Create a new MX record for the given domain. MX records are used to define the mail servers responsible
5807
- for accepting email messages for the domain. Multiple MX records can be created with different priorities.
5808
- The priority parameter determines the order in which mail servers are used, with lower values indicating
5809
- 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.
5810
5903
  *
5811
5904
  * @param {string} domainId
5812
5905
  * @param {string} name
@@ -5913,7 +6006,7 @@ target value, TTL, and optional comment.
5913
6006
  }
5914
6007
  /**
5915
6008
  * Create a new NS record for the given domain. NS records specify the nameservers that are used
5916
- 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.
5917
6010
  *
5918
6011
  * @param {string} domainId
5919
6012
  * @param {string} name
@@ -5958,9 +6051,9 @@ target value, TTL, and optional comment.
5958
6051
  }
5959
6052
  /**
5960
6053
  * Update an existing NS record for the given domain. This endpoint allows you to modify
5961
- the properties of an NS (nameserver) record associated with your domain. You can update
5962
- the record name (subdomain), target nameserver value, TTL, and add or modify comments
5963
- 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.
5964
6057
  *
5965
6058
  * @param {string} domainId
5966
6059
  * @param {string} recordId
@@ -6009,8 +6102,8 @@ target value, TTL, and optional comment.
6009
6102
  }
6010
6103
  /**
6011
6104
  * Create a new SRV record for the given domain. SRV records are used to define the location
6012
- of servers for specific services. For example, they can be used to specify which server
6013
- 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.
6014
6107
  *
6015
6108
  * @param {string} domainId
6016
6109
  * @param {string} name
@@ -6076,19 +6169,19 @@ target value, TTL, and optional comment.
6076
6169
  }
6077
6170
  /**
6078
6171
  * Update an existing SRV record for the given domain.
6079
-
6080
- Required parameters:
6081
- - domainId: Domain unique ID
6082
- - recordId: DNS record unique ID
6083
- - name: Record name (service name)
6084
- - value: Target hostname for this SRV record
6085
- - ttl: Time to live, in seconds
6086
- - priority: Record priority
6087
- - weight: Record weight
6088
- - port: Port number for the service
6089
-
6090
- Optional parameters:
6091
- - 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
6092
6185
  *
6093
6186
  * @param {string} domainId
6094
6187
  * @param {string} recordId
@@ -6158,8 +6251,8 @@ target value, TTL, and optional comment.
6158
6251
  }
6159
6252
  /**
6160
6253
  * Create a new TXT record for the given domain. TXT records can be used
6161
- to provide additional information about your domain, such as domain
6162
- 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.
6163
6256
  *
6164
6257
  * @param {string} domainId
6165
6258
  * @param {string} name
@@ -6201,9 +6294,9 @@ target value, TTL, and optional comment.
6201
6294
  }
6202
6295
  /**
6203
6296
  * Update an existing TXT record for the given domain.
6204
-
6205
- Update the TXT record details for a specific domain by providing the domain ID,
6206
- 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.
6207
6300
  *
6208
6301
  * @param {string} domainId
6209
6302
  * @param {string} recordId
@@ -6252,10 +6345,10 @@ target value, TTL, and optional comment.
6252
6345
  }
6253
6346
  /**
6254
6347
  * Get a single DNS record for a given domain by record ID.
6255
-
6256
- This endpoint allows you to retrieve a specific DNS record associated with a domain
6257
- using its unique identifier. The record contains information about the DNS configuration
6258
- 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.
6259
6352
  *
6260
6353
  * @param {string} domainId
6261
6354
  * @param {string} recordId
@@ -6277,7 +6370,7 @@ target value, TTL, and optional comment.
6277
6370
  }
6278
6371
  /**
6279
6372
  * Delete a DNS record for the given domain. This endpoint allows you to delete an existing DNS record
6280
- from a specific domain.
6373
+ * from a specific domain.
6281
6374
  *
6282
6375
  * @param {string} domainId
6283
6376
  * @param {string} recordId
@@ -6301,9 +6394,9 @@ target value, TTL, and optional comment.
6301
6394
  }
6302
6395
  /**
6303
6396
  * Update the team ID for a specific domain. This endpoint requires admin access.
6304
-
6305
- Updating the team ID will transfer ownership and access control of the domain
6306
- 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.
6307
6400
  *
6308
6401
  * @param {string} domainId
6309
6402
  * @param {string} teamId
@@ -6330,7 +6423,7 @@ target value, TTL, and optional comment.
6330
6423
  }
6331
6424
  /**
6332
6425
  * Retrieve the DNS zone file for the given domain. This endpoint will return the DNS
6333
- 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.
6334
6427
  *
6335
6428
  * @param {string} domainId
6336
6429
  * @throws {AppwriteException}
@@ -6348,7 +6441,7 @@ target value, TTL, and optional comment.
6348
6441
  }
6349
6442
  /**
6350
6443
  * Update the DNS zone for the given domain using the provided zone file content.
6351
- 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.
6352
6445
  *
6353
6446
  * @param {string} domainId
6354
6447
  * @param {string} content
@@ -6764,10 +6857,10 @@ class Functions {
6764
6857
  }
6765
6858
  /**
6766
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.
6767
-
6768
- 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).
6769
-
6770
- 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.
6771
6864
  *
6772
6865
  * @param {string} functionId
6773
6866
  * @param {File} code
@@ -6839,8 +6932,8 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
6839
6932
  }
6840
6933
  /**
6841
6934
  * Create a deployment based on a template.
6842
-
6843
- 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.
6844
6937
  *
6845
6938
  * @param {string} functionId
6846
6939
  * @param {string} repository
@@ -6892,8 +6985,8 @@ Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/s
6892
6985
  }
6893
6986
  /**
6894
6987
  * Create a deployment when a function is connected to VCS.
6895
-
6896
- 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.
6897
6990
  *
6898
6991
  * @param {string} functionId
6899
6992
  * @param {VCSDeploymentType} type
@@ -7430,14 +7523,31 @@ class Health {
7430
7523
  return this.client.call('get', uri, apiHeaders, payload);
7431
7524
  }
7432
7525
  /**
7433
- * Get billing aggregation queue
7526
+ * Get billing project aggregation queue
7527
+ *
7528
+ * @param {number} threshold
7529
+ * @throws {AppwriteException}
7530
+ * @returns {Promise<Models.HealthQueue>}
7531
+ */
7532
+ getQueueBillingProjectAggregation(threshold) {
7533
+ const apiPath = '/health/queue/billing-project-aggregation';
7534
+ const payload = {};
7535
+ if (typeof threshold !== 'undefined') {
7536
+ payload['threshold'] = threshold;
7537
+ }
7538
+ const uri = new URL(this.client.config.endpoint + apiPath);
7539
+ const apiHeaders = {};
7540
+ return this.client.call('get', uri, apiHeaders, payload);
7541
+ }
7542
+ /**
7543
+ * Get billing team aggregation queue
7434
7544
  *
7435
7545
  * @param {number} threshold
7436
7546
  * @throws {AppwriteException}
7437
7547
  * @returns {Promise<Models.HealthQueue>}
7438
7548
  */
7439
- getQueueBillingAggregation(threshold) {
7440
- const apiPath = '/health/queue/billing-aggregation';
7549
+ getQueueBillingTeamAggregation(threshold) {
7550
+ const apiPath = '/health/queue/billing-team-aggregation';
7441
7551
  const payload = {};
7442
7552
  if (typeof threshold !== 'undefined') {
7443
7553
  payload['threshold'] = threshold;
@@ -7537,7 +7647,7 @@ class Health {
7537
7647
  }
7538
7648
  /**
7539
7649
  * Returns the amount of failed jobs in a given queue.
7540
-
7650
+ *
7541
7651
  *
7542
7652
  * @param {Name} name
7543
7653
  * @param {number} threshold
@@ -7757,8 +7867,8 @@ class Locale {
7757
7867
  }
7758
7868
  /**
7759
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.
7760
-
7761
- ([IP Geolocation by DB-IP](https://db-ip.com))
7870
+ *
7871
+ * ([IP Geolocation by DB-IP](https://db-ip.com))
7762
7872
  *
7763
7873
  * @throws {AppwriteException}
7764
7874
  * @returns {Promise<Models.Locale>}
@@ -7962,7 +8072,7 @@ class Messaging {
7962
8072
  }
7963
8073
  /**
7964
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.
7965
-
8075
+ *
7966
8076
  *
7967
8077
  * @param {string} messageId
7968
8078
  * @param {string[]} topics
@@ -8120,7 +8230,7 @@ class Messaging {
8120
8230
  }
8121
8231
  /**
8122
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.
8123
-
8233
+ *
8124
8234
  *
8125
8235
  * @param {string} messageId
8126
8236
  * @param {string[]} topics
@@ -8261,7 +8371,7 @@ class Messaging {
8261
8371
  }
8262
8372
  /**
8263
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.
8264
-
8374
+ *
8265
8375
  *
8266
8376
  * @param {string} messageId
8267
8377
  * @param {string[]} topics
@@ -8305,7 +8415,7 @@ class Messaging {
8305
8415
  }
8306
8416
  /**
8307
8417
  * Get a message by its unique ID.
8308
-
8418
+ *
8309
8419
  *
8310
8420
  * @param {string} messageId
8311
8421
  * @throws {AppwriteException}
@@ -9360,7 +9470,7 @@ class Messaging {
9360
9470
  }
9361
9471
  /**
9362
9472
  * Get a provider by its unique ID.
9363
-
9473
+ *
9364
9474
  *
9365
9475
  * @param {string} providerId
9366
9476
  * @throws {AppwriteException}
@@ -9493,7 +9603,7 @@ class Messaging {
9493
9603
  }
9494
9604
  /**
9495
9605
  * Get a topic by its unique ID.
9496
-
9606
+ *
9497
9607
  *
9498
9608
  * @param {string} topicId
9499
9609
  * @throws {AppwriteException}
@@ -9511,7 +9621,7 @@ class Messaging {
9511
9621
  }
9512
9622
  /**
9513
9623
  * Update a topic by its unique ID.
9514
-
9624
+ *
9515
9625
  *
9516
9626
  * @param {string} topicId
9517
9627
  * @param {string} name
@@ -9637,7 +9747,7 @@ class Messaging {
9637
9747
  }
9638
9748
  /**
9639
9749
  * Get a subscriber by its unique ID.
9640
-
9750
+ *
9641
9751
  *
9642
9752
  * @param {string} topicId
9643
9753
  * @param {string} subscriberId
@@ -10221,7 +10331,7 @@ class Organizations {
10221
10331
  }
10222
10332
  /**
10223
10333
  * Create a new organization.
10224
-
10334
+ *
10225
10335
  *
10226
10336
  * @param {string} organizationId
10227
10337
  * @param {string} name
@@ -10280,6 +10390,40 @@ class Organizations {
10280
10390
  };
10281
10391
  return this.client.call('post', uri, apiHeaders, payload);
10282
10392
  }
10393
+ /**
10394
+ * Get estimation for creating an organization.
10395
+ *
10396
+ * @param {BillingPlan} billingPlan
10397
+ * @param {string} paymentMethodId
10398
+ * @param {string[]} invites
10399
+ * @param {string} couponId
10400
+ * @throws {AppwriteException}
10401
+ * @returns {Promise<Models.Estimation>}
10402
+ */
10403
+ estimationCreateOrganization(billingPlan, paymentMethodId, invites, couponId) {
10404
+ if (typeof billingPlan === 'undefined') {
10405
+ throw new AppwriteException('Missing required parameter: "billingPlan"');
10406
+ }
10407
+ const apiPath = '/organizations/estimations/create-organization';
10408
+ const payload = {};
10409
+ if (typeof billingPlan !== 'undefined') {
10410
+ payload['billingPlan'] = billingPlan;
10411
+ }
10412
+ if (typeof paymentMethodId !== 'undefined') {
10413
+ payload['paymentMethodId'] = paymentMethodId;
10414
+ }
10415
+ if (typeof invites !== 'undefined') {
10416
+ payload['invites'] = invites;
10417
+ }
10418
+ if (typeof couponId !== 'undefined') {
10419
+ payload['couponId'] = couponId;
10420
+ }
10421
+ const uri = new URL(this.client.config.endpoint + apiPath);
10422
+ const apiHeaders = {
10423
+ 'content-type': 'application/json',
10424
+ };
10425
+ return this.client.call('patch', uri, apiHeaders, payload);
10426
+ }
10283
10427
  /**
10284
10428
  * Delete an organization.
10285
10429
  *
@@ -10465,7 +10609,7 @@ class Organizations {
10465
10609
  }
10466
10610
  /**
10467
10611
  * List all credits for an organization.
10468
-
10612
+ *
10469
10613
  *
10470
10614
  * @param {string} organizationId
10471
10615
  * @param {string[]} queries
@@ -10511,6 +10655,23 @@ class Organizations {
10511
10655
  };
10512
10656
  return this.client.call('post', uri, apiHeaders, payload);
10513
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
+ }
10514
10675
  /**
10515
10676
  * Get credit details.
10516
10677
  *
@@ -10532,6 +10693,59 @@ class Organizations {
10532
10693
  const apiHeaders = {};
10533
10694
  return this.client.call('get', uri, apiHeaders, payload);
10534
10695
  }
10696
+ /**
10697
+ * Get estimation for deleting an organization.
10698
+ *
10699
+ * @param {string} organizationId
10700
+ * @throws {AppwriteException}
10701
+ * @returns {Promise<Models.EstimationDeleteOrganization>}
10702
+ */
10703
+ estimationDeleteOrganization(organizationId) {
10704
+ if (typeof organizationId === 'undefined') {
10705
+ throw new AppwriteException('Missing required parameter: "organizationId"');
10706
+ }
10707
+ const apiPath = '/organizations/{organizationId}/estimations/delete-organization'.replace('{organizationId}', organizationId);
10708
+ const payload = {};
10709
+ const uri = new URL(this.client.config.endpoint + apiPath);
10710
+ const apiHeaders = {
10711
+ 'content-type': 'application/json',
10712
+ };
10713
+ return this.client.call('patch', uri, apiHeaders, payload);
10714
+ }
10715
+ /**
10716
+ * Get estimation for updating the organization plan.
10717
+ *
10718
+ * @param {string} organizationId
10719
+ * @param {BillingPlan} billingPlan
10720
+ * @param {string[]} invites
10721
+ * @param {string} couponId
10722
+ * @throws {AppwriteException}
10723
+ * @returns {Promise<Models.EstimationUpdatePlan>}
10724
+ */
10725
+ estimationUpdatePlan(organizationId, billingPlan, invites, couponId) {
10726
+ if (typeof organizationId === 'undefined') {
10727
+ throw new AppwriteException('Missing required parameter: "organizationId"');
10728
+ }
10729
+ if (typeof billingPlan === 'undefined') {
10730
+ throw new AppwriteException('Missing required parameter: "billingPlan"');
10731
+ }
10732
+ const apiPath = '/organizations/{organizationId}/estimations/update-plan'.replace('{organizationId}', organizationId);
10733
+ const payload = {};
10734
+ if (typeof billingPlan !== 'undefined') {
10735
+ payload['billingPlan'] = billingPlan;
10736
+ }
10737
+ if (typeof invites !== 'undefined') {
10738
+ payload['invites'] = invites;
10739
+ }
10740
+ if (typeof couponId !== 'undefined') {
10741
+ payload['couponId'] = couponId;
10742
+ }
10743
+ const uri = new URL(this.client.config.endpoint + apiPath);
10744
+ const apiHeaders = {
10745
+ 'content-type': 'application/json',
10746
+ };
10747
+ return this.client.call('patch', uri, apiHeaders, payload);
10748
+ }
10535
10749
  /**
10536
10750
  * List all invoices for an organization.
10537
10751
  *
@@ -10716,7 +10930,7 @@ class Organizations {
10716
10930
  }
10717
10931
  /**
10718
10932
  * Set an organization&#039;s backup payment method.
10719
-
10933
+ *
10720
10934
  *
10721
10935
  * @param {string} organizationId
10722
10936
  * @param {string} paymentMethodId
@@ -10848,6 +11062,48 @@ class Organizations {
10848
11062
  };
10849
11063
  return this.client.call('patch', uri, apiHeaders, payload);
10850
11064
  }
11065
+ /**
11066
+ * Cancel the downgrade initiated for an organization.
11067
+ *
11068
+ * @param {string} organizationId
11069
+ * @throws {AppwriteException}
11070
+ * @returns {Promise<Models.Organization<Preferences>>}
11071
+ */
11072
+ cancelDowngrade(organizationId) {
11073
+ if (typeof organizationId === 'undefined') {
11074
+ throw new AppwriteException('Missing required parameter: "organizationId"');
11075
+ }
11076
+ const apiPath = '/organizations/{organizationId}/plan/cancel'.replace('{organizationId}', organizationId);
11077
+ const payload = {};
11078
+ const uri = new URL(this.client.config.endpoint + apiPath);
11079
+ const apiHeaders = {
11080
+ 'content-type': 'application/json',
11081
+ };
11082
+ return this.client.call('patch', uri, apiHeaders, payload);
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
+ }
10851
11107
  /**
10852
11108
  * Get Scopes
10853
11109
  *
@@ -10891,6 +11147,54 @@ class Organizations {
10891
11147
  };
10892
11148
  return this.client.call('patch', uri, apiHeaders, payload);
10893
11149
  }
11150
+ /**
11151
+ * Get the usage data for an organization.
11152
+ *
11153
+ * @param {string} organizationId
11154
+ * @param {string} startDate
11155
+ * @param {string} endDate
11156
+ * @throws {AppwriteException}
11157
+ * @returns {Promise<Models.UsageOrganization>}
11158
+ */
11159
+ getUsage(organizationId, startDate, endDate) {
11160
+ if (typeof organizationId === 'undefined') {
11161
+ throw new AppwriteException('Missing required parameter: "organizationId"');
11162
+ }
11163
+ const apiPath = '/organizations/{organizationId}/usage'.replace('{organizationId}', organizationId);
11164
+ const payload = {};
11165
+ if (typeof startDate !== 'undefined') {
11166
+ payload['startDate'] = startDate;
11167
+ }
11168
+ if (typeof endDate !== 'undefined') {
11169
+ payload['endDate'] = endDate;
11170
+ }
11171
+ const uri = new URL(this.client.config.endpoint + apiPath);
11172
+ const apiHeaders = {};
11173
+ return this.client.call('get', uri, apiHeaders, payload);
11174
+ }
11175
+ /**
11176
+ * Validate payment for team after creation or upgrade.
11177
+ *
11178
+ * @param {string} organizationId
11179
+ * @param {string[]} invites
11180
+ * @throws {AppwriteException}
11181
+ * @returns {Promise<Models.Organization<Preferences>>}
11182
+ */
11183
+ validatePayment(organizationId, invites) {
11184
+ if (typeof organizationId === 'undefined') {
11185
+ throw new AppwriteException('Missing required parameter: "organizationId"');
11186
+ }
11187
+ const apiPath = '/organizations/{organizationId}/validate'.replace('{organizationId}', organizationId);
11188
+ const payload = {};
11189
+ if (typeof invites !== 'undefined') {
11190
+ payload['invites'] = invites;
11191
+ }
11192
+ const uri = new URL(this.client.config.endpoint + apiPath);
11193
+ const apiHeaders = {
11194
+ 'content-type': 'application/json',
11195
+ };
11196
+ return this.client.call('patch', uri, apiHeaders, payload);
11197
+ }
10894
11198
  }
10895
11199
 
10896
11200
  class Project {
@@ -12767,10 +13071,12 @@ class Proxy {
12767
13071
  * @param {string} domain
12768
13072
  * @param {string} url
12769
13073
  * @param {StatusCode} statusCode
13074
+ * @param {string} resourceId
13075
+ * @param {ProxyResourceType} resourceType
12770
13076
  * @throws {AppwriteException}
12771
13077
  * @returns {Promise<Models.ProxyRule>}
12772
13078
  */
12773
- createRedirectRule(domain, url, statusCode) {
13079
+ createRedirectRule(domain, url, statusCode, resourceId, resourceType) {
12774
13080
  if (typeof domain === 'undefined') {
12775
13081
  throw new AppwriteException('Missing required parameter: "domain"');
12776
13082
  }
@@ -12780,6 +13086,12 @@ class Proxy {
12780
13086
  if (typeof statusCode === 'undefined') {
12781
13087
  throw new AppwriteException('Missing required parameter: "statusCode"');
12782
13088
  }
13089
+ if (typeof resourceId === 'undefined') {
13090
+ throw new AppwriteException('Missing required parameter: "resourceId"');
13091
+ }
13092
+ if (typeof resourceType === 'undefined') {
13093
+ throw new AppwriteException('Missing required parameter: "resourceType"');
13094
+ }
12783
13095
  const apiPath = '/proxy/rules/redirect';
12784
13096
  const payload = {};
12785
13097
  if (typeof domain !== 'undefined') {
@@ -12791,6 +13103,12 @@ class Proxy {
12791
13103
  if (typeof statusCode !== 'undefined') {
12792
13104
  payload['statusCode'] = statusCode;
12793
13105
  }
13106
+ if (typeof resourceId !== 'undefined') {
13107
+ payload['resourceId'] = resourceId;
13108
+ }
13109
+ if (typeof resourceType !== 'undefined') {
13110
+ payload['resourceType'] = resourceType;
13111
+ }
12794
13112
  const uri = new URL(this.client.config.endpoint + apiPath);
12795
13113
  const apiHeaders = {
12796
13114
  'content-type': 'application/json',
@@ -13353,8 +13671,8 @@ class Sites {
13353
13671
  }
13354
13672
  /**
13355
13673
  * Create a deployment based on a template.
13356
-
13357
- 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.
13358
13676
  *
13359
13677
  * @param {string} siteId
13360
13678
  * @param {string} repository
@@ -13406,8 +13724,8 @@ Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/s
13406
13724
  }
13407
13725
  /**
13408
13726
  * Create a deployment when a site is connected to VCS.
13409
-
13410
- 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.
13411
13729
  *
13412
13730
  * @param {string} siteId
13413
13731
  * @param {VCSDeploymentType} type
@@ -13969,13 +14287,13 @@ class Storage {
13969
14287
  }
13970
14288
  /**
13971
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.
13972
-
13973
- 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.
13974
-
13975
- 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.
13976
-
13977
- 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.
13978
-
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
+ *
13979
14297
  *
13980
14298
  * @param {string} bucketId
13981
14299
  * @param {string} fileId
@@ -14216,7 +14534,7 @@ If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunk
14216
14534
  }
14217
14535
  /**
14218
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.
14219
-
14537
+ *
14220
14538
  *
14221
14539
  * @param {StorageUsageRange} range
14222
14540
  * @throws {AppwriteException}
@@ -14234,7 +14552,7 @@ If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunk
14234
14552
  }
14235
14553
  /**
14236
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.
14237
-
14555
+ *
14238
14556
  *
14239
14557
  * @param {string} bucketId
14240
14558
  * @param {StorageUsageRange} range
@@ -14424,13 +14742,13 @@ class Teams {
14424
14742
  }
14425
14743
  /**
14426
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.
14427
-
14428
- 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.
14429
-
14430
- 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.
14431
-
14432
- 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.
14433
-
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
+ *
14434
14752
  *
14435
14753
  * @param {string} teamId
14436
14754
  * @param {string[]} roles
@@ -14498,7 +14816,7 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
14498
14816
  }
14499
14817
  /**
14500
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).
14501
-
14819
+ *
14502
14820
  *
14503
14821
  * @param {string} teamId
14504
14822
  * @param {string} membershipId
@@ -14552,9 +14870,9 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
14552
14870
  }
14553
14871
  /**
14554
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.
14555
-
14556
- If the request is successful, a session for the user is automatically created.
14557
-
14873
+ *
14874
+ * If the request is successful, a session for the user is automatically created.
14875
+ *
14558
14876
  *
14559
14877
  * @param {string} teamId
14560
14878
  * @param {string} membershipId
@@ -15197,7 +15515,7 @@ class Users {
15197
15515
  }
15198
15516
  /**
15199
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.
15200
-
15518
+ *
15201
15519
  *
15202
15520
  * @param {UserUsageRange} range
15203
15521
  * @throws {AppwriteException}
@@ -15304,8 +15622,8 @@ class Users {
15304
15622
  }
15305
15623
  /**
15306
15624
  * Update the user labels by its unique ID.
15307
-
15308
- 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.
15309
15627
  *
15310
15628
  * @param {string} userId
15311
15629
  * @param {string[]} labels
@@ -15637,8 +15955,8 @@ Labels can be used to grant access to resources. While teams are a way for user&
15637
15955
  }
15638
15956
  /**
15639
15957
  * Creates a session for a user. Returns an immediately usable session object.
15640
-
15641
- 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.
15642
15960
  *
15643
15961
  * @param {string} userId
15644
15962
  * @throws {AppwriteException}
@@ -15874,7 +16192,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
15874
16192
  }
15875
16193
  /**
15876
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.
15877
-
16195
+ *
15878
16196
  *
15879
16197
  * @param {string} userId
15880
16198
  * @param {number} length
@@ -16079,7 +16397,7 @@ class Vcs {
16079
16397
  }
16080
16398
  /**
16081
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.
16082
-
16400
+ *
16083
16401
  *
16084
16402
  * @param {string} installationId
16085
16403
  * @param {string} providerRepositoryId
@@ -16101,15 +16419,15 @@ class Vcs {
16101
16419
  }
16102
16420
  /**
16103
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.
16104
-
16105
16422
  *
16106
16423
  * @param {string} installationId
16107
16424
  * @param {string} providerRepositoryId
16108
16425
  * @param {string} providerRootDirectory
16426
+ * @param {string} providerReference
16109
16427
  * @throws {AppwriteException}
16110
16428
  * @returns {Promise<Models.VcsContentList>}
16111
16429
  */
16112
- getRepositoryContents(installationId, providerRepositoryId, providerRootDirectory) {
16430
+ getRepositoryContents(installationId, providerRepositoryId, providerRootDirectory, providerReference) {
16113
16431
  if (typeof installationId === 'undefined') {
16114
16432
  throw new AppwriteException('Missing required parameter: "installationId"');
16115
16433
  }
@@ -16121,6 +16439,9 @@ class Vcs {
16121
16439
  if (typeof providerRootDirectory !== 'undefined') {
16122
16440
  payload['providerRootDirectory'] = providerRootDirectory;
16123
16441
  }
16442
+ if (typeof providerReference !== 'undefined') {
16443
+ payload['providerReference'] = providerReference;
16444
+ }
16124
16445
  const uri = new URL(this.client.config.endpoint + apiPath);
16125
16446
  const apiHeaders = {};
16126
16447
  return this.client.call('get', uri, apiHeaders, payload);
@@ -16157,7 +16478,7 @@ class Vcs {
16157
16478
  }
16158
16479
  /**
16159
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.
16160
-
16481
+ *
16161
16482
  *
16162
16483
  * @param {string[]} queries
16163
16484
  * @param {string} search
@@ -16768,6 +17089,7 @@ exports.Runtime = void 0;
16768
17089
  Runtime["Dart31"] = "dart-3.1";
16769
17090
  Runtime["Dart33"] = "dart-3.3";
16770
17091
  Runtime["Dart35"] = "dart-3.5";
17092
+ Runtime["Dart38"] = "dart-3.8";
16771
17093
  Runtime["Dotnet60"] = "dotnet-6.0";
16772
17094
  Runtime["Dotnet70"] = "dotnet-7.0";
16773
17095
  Runtime["Dotnet80"] = "dotnet-8.0";
@@ -16794,6 +17116,7 @@ exports.Runtime = void 0;
16794
17116
  Runtime["Flutter324"] = "flutter-3.24";
16795
17117
  Runtime["Flutter327"] = "flutter-3.27";
16796
17118
  Runtime["Flutter329"] = "flutter-3.29";
17119
+ Runtime["Flutter332"] = "flutter-3.32";
16797
17120
  })(exports.Runtime || (exports.Runtime = {}));
16798
17121
 
16799
17122
  exports.FunctionUsageRange = void 0;
@@ -17231,6 +17554,12 @@ exports.StatusCode = void 0;
17231
17554
  StatusCode["PermanentRedirect308"] = "308";
17232
17555
  })(exports.StatusCode || (exports.StatusCode = {}));
17233
17556
 
17557
+ exports.ProxyResourceType = void 0;
17558
+ (function (ProxyResourceType) {
17559
+ ProxyResourceType["Site"] = "site";
17560
+ ProxyResourceType["Function"] = "function";
17561
+ })(exports.ProxyResourceType || (exports.ProxyResourceType = {}));
17562
+
17234
17563
  exports.Framework = void 0;
17235
17564
  (function (Framework) {
17236
17565
  Framework["Analog"] = "analog";
@@ -17285,6 +17614,7 @@ exports.BuildRuntime = void 0;
17285
17614
  BuildRuntime["Dart31"] = "dart-3.1";
17286
17615
  BuildRuntime["Dart33"] = "dart-3.3";
17287
17616
  BuildRuntime["Dart35"] = "dart-3.5";
17617
+ BuildRuntime["Dart38"] = "dart-3.8";
17288
17618
  BuildRuntime["Dotnet60"] = "dotnet-6.0";
17289
17619
  BuildRuntime["Dotnet70"] = "dotnet-7.0";
17290
17620
  BuildRuntime["Dotnet80"] = "dotnet-8.0";
@@ -17311,6 +17641,7 @@ exports.BuildRuntime = void 0;
17311
17641
  BuildRuntime["Flutter324"] = "flutter-3.24";
17312
17642
  BuildRuntime["Flutter327"] = "flutter-3.27";
17313
17643
  BuildRuntime["Flutter329"] = "flutter-3.29";
17644
+ BuildRuntime["Flutter332"] = "flutter-3.32";
17314
17645
  })(exports.BuildRuntime || (exports.BuildRuntime = {}));
17315
17646
 
17316
17647
  exports.Adapter = void 0;
@@ -17354,6 +17685,7 @@ exports.ImageFormat = void 0;
17354
17685
  ImageFormat["Webp"] = "webp";
17355
17686
  ImageFormat["Heic"] = "heic";
17356
17687
  ImageFormat["Avif"] = "avif";
17688
+ ImageFormat["Gif"] = "gif";
17357
17689
  })(exports.ImageFormat || (exports.ImageFormat = {}));
17358
17690
 
17359
17691
  exports.StorageUsageRange = void 0;