@appwrite.io/console 2.0.0 → 2.1.1

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 (49) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/sdk.js +81 -15
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +77 -15
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +3838 -15
  8. package/docs/examples/account/update-payment-method.md +1 -1
  9. package/docs/examples/projects/update-labels.md +14 -0
  10. package/package.json +7 -1
  11. package/rollup.config.js +40 -24
  12. package/src/client.ts +49 -10
  13. package/src/models.ts +432 -424
  14. package/src/query.ts +14 -11
  15. package/src/services/account.ts +20 -20
  16. package/src/services/avatars.ts +117 -117
  17. package/src/services/backups.ts +18 -18
  18. package/src/services/console.ts +24 -24
  19. package/src/services/databases.ts +119 -119
  20. package/src/services/domains.ts +204 -204
  21. package/src/services/functions.ts +30 -30
  22. package/src/services/health.ts +146 -146
  23. package/src/services/messaging.ts +54 -54
  24. package/src/services/migrations.ts +36 -36
  25. package/src/services/organizations.ts +42 -42
  26. package/src/services/projects.ts +146 -83
  27. package/src/services/sites.ts +30 -30
  28. package/src/services/storage.ts +49 -49
  29. package/src/services/tables-db.ts +119 -119
  30. package/src/services/users.ts +39 -39
  31. package/types/client.d.ts +27 -1
  32. package/types/models.d.ts +432 -424
  33. package/types/query.d.ts +8 -8
  34. package/types/services/account.d.ts +11 -11
  35. package/types/services/avatars.d.ts +82 -82
  36. package/types/services/backups.d.ts +8 -8
  37. package/types/services/console.d.ts +14 -14
  38. package/types/services/databases.d.ts +70 -70
  39. package/types/services/domains.d.ts +104 -104
  40. package/types/services/functions.d.ts +15 -15
  41. package/types/services/health.d.ts +72 -72
  42. package/types/services/messaging.d.ts +24 -24
  43. package/types/services/migrations.d.ts +16 -16
  44. package/types/services/organizations.d.ts +22 -22
  45. package/types/services/projects.d.ts +60 -38
  46. package/types/services/sites.d.ts +15 -15
  47. package/types/services/storage.d.ts +34 -34
  48. package/types/services/tables-db.d.ts +70 -70
  49. package/types/services/users.d.ts +24 -24
@@ -211,30 +211,30 @@ export class Databases {
211
211
  /**
212
212
  * Create a new transaction.
213
213
  *
214
- * @param {number} params.ttl - Seconds before the transaction expires.
214
+ * @param {number | bigint} params.ttl - Seconds before the transaction expires.
215
215
  * @throws {AppwriteException}
216
216
  * @returns {Promise<Models.Transaction>}
217
217
  */
218
- createTransaction(params?: { ttl?: number }): Promise<Models.Transaction>;
218
+ createTransaction(params?: { ttl?: number | bigint }): Promise<Models.Transaction>;
219
219
  /**
220
220
  * Create a new transaction.
221
221
  *
222
- * @param {number} ttl - Seconds before the transaction expires.
222
+ * @param {number | bigint} ttl - Seconds before the transaction expires.
223
223
  * @throws {AppwriteException}
224
224
  * @returns {Promise<Models.Transaction>}
225
225
  * @deprecated Use the object parameter style method for a better developer experience.
226
226
  */
227
- createTransaction(ttl?: number): Promise<Models.Transaction>;
227
+ createTransaction(ttl?: number | bigint): Promise<Models.Transaction>;
228
228
  createTransaction(
229
- paramsOrFirst?: { ttl?: number } | number
229
+ paramsOrFirst?: { ttl?: number | bigint } | number | bigint
230
230
  ): Promise<Models.Transaction> {
231
- let params: { ttl?: number };
231
+ let params: { ttl?: number | bigint };
232
232
 
233
233
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
234
- params = (paramsOrFirst || {}) as { ttl?: number };
234
+ params = (paramsOrFirst || {}) as { ttl?: number | bigint };
235
235
  } else {
236
236
  params = {
237
- ttl: paramsOrFirst as number
237
+ ttl: paramsOrFirst as number | bigint
238
238
  };
239
239
  }
240
240
 
@@ -1986,15 +1986,15 @@ export class Databases {
1986
1986
  * @param {string} params.collectionId - Collection ID.
1987
1987
  * @param {string} params.key - Attribute Key.
1988
1988
  * @param {boolean} params.required - Is attribute required?
1989
- * @param {number} params.min - Minimum value.
1990
- * @param {number} params.max - Maximum value.
1991
- * @param {number} params.xdefault - Default value. Cannot be set when required.
1989
+ * @param {number | bigint} params.min - Minimum value.
1990
+ * @param {number | bigint} params.max - Maximum value.
1991
+ * @param {number | bigint} params.xdefault - Default value. Cannot be set when required.
1992
1992
  * @param {boolean} params.array - Is attribute an array?
1993
1993
  * @throws {AppwriteException}
1994
1994
  * @returns {Promise<Models.AttributeFloat>}
1995
1995
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createFloatColumn` instead.
1996
1996
  */
1997
- createFloatAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean }): Promise<Models.AttributeFloat>;
1997
+ createFloatAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean }): Promise<Models.AttributeFloat>;
1998
1998
  /**
1999
1999
  * Create a float attribute. Optionally, minimum and maximum values can be provided.
2000
2000
  *
@@ -2003,32 +2003,32 @@ export class Databases {
2003
2003
  * @param {string} collectionId - Collection ID.
2004
2004
  * @param {string} key - Attribute Key.
2005
2005
  * @param {boolean} required - Is attribute required?
2006
- * @param {number} min - Minimum value.
2007
- * @param {number} max - Maximum value.
2008
- * @param {number} xdefault - Default value. Cannot be set when required.
2006
+ * @param {number | bigint} min - Minimum value.
2007
+ * @param {number | bigint} max - Maximum value.
2008
+ * @param {number | bigint} xdefault - Default value. Cannot be set when required.
2009
2009
  * @param {boolean} array - Is attribute an array?
2010
2010
  * @throws {AppwriteException}
2011
2011
  * @returns {Promise<Models.AttributeFloat>}
2012
2012
  * @deprecated Use the object parameter style method for a better developer experience.
2013
2013
  */
2014
- createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat>;
2014
+ createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean): Promise<Models.AttributeFloat>;
2015
2015
  createFloatAttribute(
2016
- paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean } | string,
2017
- ...rest: [(string)?, (string)?, (boolean)?, (number)?, (number)?, (number)?, (boolean)?]
2016
+ paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean } | string,
2017
+ ...rest: [(string)?, (string)?, (boolean)?, (number | bigint)?, (number | bigint)?, (number | bigint)?, (boolean)?]
2018
2018
  ): Promise<Models.AttributeFloat> {
2019
- let params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean };
2019
+ let params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean };
2020
2020
 
2021
2021
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2022
- params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean };
2022
+ params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean };
2023
2023
  } else {
2024
2024
  params = {
2025
2025
  databaseId: paramsOrFirst as string,
2026
2026
  collectionId: rest[0] as string,
2027
2027
  key: rest[1] as string,
2028
2028
  required: rest[2] as boolean,
2029
- min: rest[3] as number,
2030
- max: rest[4] as number,
2031
- xdefault: rest[5] as number,
2029
+ min: rest[3] as number | bigint,
2030
+ max: rest[4] as number | bigint,
2031
+ xdefault: rest[5] as number | bigint,
2032
2032
  array: rest[6] as boolean
2033
2033
  };
2034
2034
  }
@@ -2097,15 +2097,15 @@ export class Databases {
2097
2097
  * @param {string} params.collectionId - Collection ID.
2098
2098
  * @param {string} params.key - Attribute Key.
2099
2099
  * @param {boolean} params.required - Is attribute required?
2100
- * @param {number} params.xdefault - Default value. Cannot be set when required.
2101
- * @param {number} params.min - Minimum value.
2102
- * @param {number} params.max - Maximum value.
2100
+ * @param {number | bigint} params.xdefault - Default value. Cannot be set when required.
2101
+ * @param {number | bigint} params.min - Minimum value.
2102
+ * @param {number | bigint} params.max - Maximum value.
2103
2103
  * @param {string} params.newKey - New Attribute Key.
2104
2104
  * @throws {AppwriteException}
2105
2105
  * @returns {Promise<Models.AttributeFloat>}
2106
2106
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateFloatColumn` instead.
2107
2107
  */
2108
- updateFloatAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string }): Promise<Models.AttributeFloat>;
2108
+ updateFloatAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string }): Promise<Models.AttributeFloat>;
2109
2109
  /**
2110
2110
  * Update a float attribute. Changing the `default` value will not update already existing documents.
2111
2111
  *
@@ -2114,32 +2114,32 @@ export class Databases {
2114
2114
  * @param {string} collectionId - Collection ID.
2115
2115
  * @param {string} key - Attribute Key.
2116
2116
  * @param {boolean} required - Is attribute required?
2117
- * @param {number} xdefault - Default value. Cannot be set when required.
2118
- * @param {number} min - Minimum value.
2119
- * @param {number} max - Maximum value.
2117
+ * @param {number | bigint} xdefault - Default value. Cannot be set when required.
2118
+ * @param {number | bigint} min - Minimum value.
2119
+ * @param {number | bigint} max - Maximum value.
2120
2120
  * @param {string} newKey - New Attribute Key.
2121
2121
  * @throws {AppwriteException}
2122
2122
  * @returns {Promise<Models.AttributeFloat>}
2123
2123
  * @deprecated Use the object parameter style method for a better developer experience.
2124
2124
  */
2125
- updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeFloat>;
2125
+ updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string): Promise<Models.AttributeFloat>;
2126
2126
  updateFloatAttribute(
2127
- paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string } | string,
2128
- ...rest: [(string)?, (string)?, (boolean)?, (number)?, (number)?, (number)?, (string)?]
2127
+ paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string } | string,
2128
+ ...rest: [(string)?, (string)?, (boolean)?, (number | bigint)?, (number | bigint)?, (number | bigint)?, (string)?]
2129
2129
  ): Promise<Models.AttributeFloat> {
2130
- let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string };
2130
+ let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string };
2131
2131
 
2132
2132
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2133
- params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string };
2133
+ params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string };
2134
2134
  } else {
2135
2135
  params = {
2136
2136
  databaseId: paramsOrFirst as string,
2137
2137
  collectionId: rest[0] as string,
2138
2138
  key: rest[1] as string,
2139
2139
  required: rest[2] as boolean,
2140
- xdefault: rest[3] as number,
2141
- min: rest[4] as number,
2142
- max: rest[5] as number,
2140
+ xdefault: rest[3] as number | bigint,
2141
+ min: rest[4] as number | bigint,
2142
+ max: rest[5] as number | bigint,
2143
2143
  newKey: rest[6] as string
2144
2144
  };
2145
2145
  }
@@ -2208,15 +2208,15 @@ export class Databases {
2208
2208
  * @param {string} params.collectionId - Collection ID.
2209
2209
  * @param {string} params.key - Attribute Key.
2210
2210
  * @param {boolean} params.required - Is attribute required?
2211
- * @param {number} params.min - Minimum value
2212
- * @param {number} params.max - Maximum value
2213
- * @param {number} params.xdefault - Default value. Cannot be set when attribute is required.
2211
+ * @param {number | bigint} params.min - Minimum value
2212
+ * @param {number | bigint} params.max - Maximum value
2213
+ * @param {number | bigint} params.xdefault - Default value. Cannot be set when attribute is required.
2214
2214
  * @param {boolean} params.array - Is attribute an array?
2215
2215
  * @throws {AppwriteException}
2216
2216
  * @returns {Promise<Models.AttributeInteger>}
2217
2217
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIntegerColumn` instead.
2218
2218
  */
2219
- createIntegerAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean }): Promise<Models.AttributeInteger>;
2219
+ createIntegerAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean }): Promise<Models.AttributeInteger>;
2220
2220
  /**
2221
2221
  * Create an integer attribute. Optionally, minimum and maximum values can be provided.
2222
2222
  *
@@ -2225,32 +2225,32 @@ export class Databases {
2225
2225
  * @param {string} collectionId - Collection ID.
2226
2226
  * @param {string} key - Attribute Key.
2227
2227
  * @param {boolean} required - Is attribute required?
2228
- * @param {number} min - Minimum value
2229
- * @param {number} max - Maximum value
2230
- * @param {number} xdefault - Default value. Cannot be set when attribute is required.
2228
+ * @param {number | bigint} min - Minimum value
2229
+ * @param {number | bigint} max - Maximum value
2230
+ * @param {number | bigint} xdefault - Default value. Cannot be set when attribute is required.
2231
2231
  * @param {boolean} array - Is attribute an array?
2232
2232
  * @throws {AppwriteException}
2233
2233
  * @returns {Promise<Models.AttributeInteger>}
2234
2234
  * @deprecated Use the object parameter style method for a better developer experience.
2235
2235
  */
2236
- createIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger>;
2236
+ createIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean): Promise<Models.AttributeInteger>;
2237
2237
  createIntegerAttribute(
2238
- paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean } | string,
2239
- ...rest: [(string)?, (string)?, (boolean)?, (number)?, (number)?, (number)?, (boolean)?]
2238
+ paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean } | string,
2239
+ ...rest: [(string)?, (string)?, (boolean)?, (number | bigint)?, (number | bigint)?, (number | bigint)?, (boolean)?]
2240
2240
  ): Promise<Models.AttributeInteger> {
2241
- let params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean };
2241
+ let params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean };
2242
2242
 
2243
2243
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2244
- params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean };
2244
+ params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean };
2245
2245
  } else {
2246
2246
  params = {
2247
2247
  databaseId: paramsOrFirst as string,
2248
2248
  collectionId: rest[0] as string,
2249
2249
  key: rest[1] as string,
2250
2250
  required: rest[2] as boolean,
2251
- min: rest[3] as number,
2252
- max: rest[4] as number,
2253
- xdefault: rest[5] as number,
2251
+ min: rest[3] as number | bigint,
2252
+ max: rest[4] as number | bigint,
2253
+ xdefault: rest[5] as number | bigint,
2254
2254
  array: rest[6] as boolean
2255
2255
  };
2256
2256
  }
@@ -2319,15 +2319,15 @@ export class Databases {
2319
2319
  * @param {string} params.collectionId - Collection ID.
2320
2320
  * @param {string} params.key - Attribute Key.
2321
2321
  * @param {boolean} params.required - Is attribute required?
2322
- * @param {number} params.xdefault - Default value. Cannot be set when attribute is required.
2323
- * @param {number} params.min - Minimum value
2324
- * @param {number} params.max - Maximum value
2322
+ * @param {number | bigint} params.xdefault - Default value. Cannot be set when attribute is required.
2323
+ * @param {number | bigint} params.min - Minimum value
2324
+ * @param {number | bigint} params.max - Maximum value
2325
2325
  * @param {string} params.newKey - New Attribute Key.
2326
2326
  * @throws {AppwriteException}
2327
2327
  * @returns {Promise<Models.AttributeInteger>}
2328
2328
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateIntegerColumn` instead.
2329
2329
  */
2330
- updateIntegerAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string }): Promise<Models.AttributeInteger>;
2330
+ updateIntegerAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string }): Promise<Models.AttributeInteger>;
2331
2331
  /**
2332
2332
  * Update an integer attribute. Changing the `default` value will not update already existing documents.
2333
2333
  *
@@ -2336,32 +2336,32 @@ export class Databases {
2336
2336
  * @param {string} collectionId - Collection ID.
2337
2337
  * @param {string} key - Attribute Key.
2338
2338
  * @param {boolean} required - Is attribute required?
2339
- * @param {number} xdefault - Default value. Cannot be set when attribute is required.
2340
- * @param {number} min - Minimum value
2341
- * @param {number} max - Maximum value
2339
+ * @param {number | bigint} xdefault - Default value. Cannot be set when attribute is required.
2340
+ * @param {number | bigint} min - Minimum value
2341
+ * @param {number | bigint} max - Maximum value
2342
2342
  * @param {string} newKey - New Attribute Key.
2343
2343
  * @throws {AppwriteException}
2344
2344
  * @returns {Promise<Models.AttributeInteger>}
2345
2345
  * @deprecated Use the object parameter style method for a better developer experience.
2346
2346
  */
2347
- updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeInteger>;
2347
+ updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string): Promise<Models.AttributeInteger>;
2348
2348
  updateIntegerAttribute(
2349
- paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string } | string,
2350
- ...rest: [(string)?, (string)?, (boolean)?, (number)?, (number)?, (number)?, (string)?]
2349
+ paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string } | string,
2350
+ ...rest: [(string)?, (string)?, (boolean)?, (number | bigint)?, (number | bigint)?, (number | bigint)?, (string)?]
2351
2351
  ): Promise<Models.AttributeInteger> {
2352
- let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string };
2352
+ let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string };
2353
2353
 
2354
2354
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2355
- params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string };
2355
+ params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string };
2356
2356
  } else {
2357
2357
  params = {
2358
2358
  databaseId: paramsOrFirst as string,
2359
2359
  collectionId: rest[0] as string,
2360
2360
  key: rest[1] as string,
2361
2361
  required: rest[2] as boolean,
2362
- xdefault: rest[3] as number,
2363
- min: rest[4] as number,
2364
- max: rest[5] as number,
2362
+ xdefault: rest[3] as number | bigint,
2363
+ min: rest[4] as number | bigint,
2364
+ max: rest[5] as number | bigint,
2365
2365
  newKey: rest[6] as string
2366
2366
  };
2367
2367
  }
@@ -3274,7 +3274,7 @@ export class Databases {
3274
3274
  * @param {string} params.databaseId - Database ID.
3275
3275
  * @param {string} params.collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
3276
3276
  * @param {string} params.key - Attribute Key.
3277
- * @param {number} params.size - Attribute size for text attributes, in number of characters.
3277
+ * @param {number | bigint} params.size - Attribute size for text attributes, in number of characters.
3278
3278
  * @param {boolean} params.required - Is attribute required?
3279
3279
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
3280
3280
  * @param {boolean} params.array - Is attribute an array?
@@ -3283,7 +3283,7 @@ export class Databases {
3283
3283
  * @returns {Promise<Models.AttributeString>}
3284
3284
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createStringColumn` instead.
3285
3285
  */
3286
- createStringAttribute(params: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.AttributeString>;
3286
+ createStringAttribute(params: { databaseId: string, collectionId: string, key: string, size: number | bigint, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.AttributeString>;
3287
3287
  /**
3288
3288
  * Create a string attribute.
3289
3289
  *
@@ -3291,7 +3291,7 @@ export class Databases {
3291
3291
  * @param {string} databaseId - Database ID.
3292
3292
  * @param {string} collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
3293
3293
  * @param {string} key - Attribute Key.
3294
- * @param {number} size - Attribute size for text attributes, in number of characters.
3294
+ * @param {number | bigint} size - Attribute size for text attributes, in number of characters.
3295
3295
  * @param {boolean} required - Is attribute required?
3296
3296
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
3297
3297
  * @param {boolean} array - Is attribute an array?
@@ -3300,21 +3300,21 @@ export class Databases {
3300
3300
  * @returns {Promise<Models.AttributeString>}
3301
3301
  * @deprecated Use the object parameter style method for a better developer experience.
3302
3302
  */
3303
- createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeString>;
3303
+ createStringAttribute(databaseId: string, collectionId: string, key: string, size: number | bigint, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeString>;
3304
3304
  createStringAttribute(
3305
- paramsOrFirst: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
3306
- ...rest: [(string)?, (string)?, (number)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
3305
+ paramsOrFirst: { databaseId: string, collectionId: string, key: string, size: number | bigint, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
3306
+ ...rest: [(string)?, (string)?, (number | bigint)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
3307
3307
  ): Promise<Models.AttributeString> {
3308
- let params: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
3308
+ let params: { databaseId: string, collectionId: string, key: string, size: number | bigint, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
3309
3309
 
3310
3310
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3311
- params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
3311
+ params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, size: number | bigint, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
3312
3312
  } else {
3313
3313
  params = {
3314
3314
  databaseId: paramsOrFirst as string,
3315
3315
  collectionId: rest[0] as string,
3316
3316
  key: rest[1] as string,
3317
- size: rest[2] as number,
3317
+ size: rest[2] as number | bigint,
3318
3318
  required: rest[3] as boolean,
3319
3319
  xdefault: rest[4] as string,
3320
3320
  array: rest[5] as boolean,
@@ -3390,13 +3390,13 @@ export class Databases {
3390
3390
  * @param {string} params.key - Attribute Key.
3391
3391
  * @param {boolean} params.required - Is attribute required?
3392
3392
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
3393
- * @param {number} params.size - Maximum size of the string attribute.
3393
+ * @param {number | bigint} params.size - Maximum size of the string attribute.
3394
3394
  * @param {string} params.newKey - New Attribute Key.
3395
3395
  * @throws {AppwriteException}
3396
3396
  * @returns {Promise<Models.AttributeString>}
3397
3397
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateStringColumn` instead.
3398
3398
  */
3399
- updateStringAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string }): Promise<Models.AttributeString>;
3399
+ updateStringAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number | bigint, newKey?: string }): Promise<Models.AttributeString>;
3400
3400
  /**
3401
3401
  * Update a string attribute. Changing the `default` value will not update already existing documents.
3402
3402
  *
@@ -3406,21 +3406,21 @@ export class Databases {
3406
3406
  * @param {string} key - Attribute Key.
3407
3407
  * @param {boolean} required - Is attribute required?
3408
3408
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
3409
- * @param {number} size - Maximum size of the string attribute.
3409
+ * @param {number | bigint} size - Maximum size of the string attribute.
3410
3410
  * @param {string} newKey - New Attribute Key.
3411
3411
  * @throws {AppwriteException}
3412
3412
  * @returns {Promise<Models.AttributeString>}
3413
3413
  * @deprecated Use the object parameter style method for a better developer experience.
3414
3414
  */
3415
- updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.AttributeString>;
3415
+ updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number | bigint, newKey?: string): Promise<Models.AttributeString>;
3416
3416
  updateStringAttribute(
3417
- paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string } | string,
3418
- ...rest: [(string)?, (string)?, (boolean)?, (string)?, (number)?, (string)?]
3417
+ paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number | bigint, newKey?: string } | string,
3418
+ ...rest: [(string)?, (string)?, (boolean)?, (string)?, (number | bigint)?, (string)?]
3419
3419
  ): Promise<Models.AttributeString> {
3420
- let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string };
3420
+ let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number | bigint, newKey?: string };
3421
3421
 
3422
3422
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3423
- params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string };
3423
+ params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number | bigint, newKey?: string };
3424
3424
  } else {
3425
3425
  params = {
3426
3426
  databaseId: paramsOrFirst as string,
@@ -3428,7 +3428,7 @@ export class Databases {
3428
3428
  key: rest[1] as string,
3429
3429
  required: rest[2] as boolean,
3430
3430
  xdefault: rest[3] as string,
3431
- size: rest[4] as number,
3431
+ size: rest[4] as number | bigint,
3432
3432
  newKey: rest[5] as string
3433
3433
  };
3434
3434
  }
@@ -4804,14 +4804,14 @@ export class Databases {
4804
4804
  * @param {string} params.collectionId - Collection ID.
4805
4805
  * @param {string} params.documentId - Document ID.
4806
4806
  * @param {string} params.attribute - Attribute key.
4807
- * @param {number} params.value - Value to increment the attribute by. The value must be a number.
4808
- * @param {number} params.min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
4807
+ * @param {number | bigint} params.value - Value to increment the attribute by. The value must be a number.
4808
+ * @param {number | bigint} params.min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
4809
4809
  * @param {string} params.transactionId - Transaction ID for staging the operation.
4810
4810
  * @throws {AppwriteException}
4811
4811
  * @returns {Promise<Document>}
4812
4812
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.decrementRowColumn` instead.
4813
4813
  */
4814
- decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string }): Promise<Document>;
4814
+ decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number | bigint, min?: number | bigint, transactionId?: string }): Promise<Document>;
4815
4815
  /**
4816
4816
  * Decrement a specific attribute of a document by a given value.
4817
4817
  *
@@ -4819,30 +4819,30 @@ export class Databases {
4819
4819
  * @param {string} collectionId - Collection ID.
4820
4820
  * @param {string} documentId - Document ID.
4821
4821
  * @param {string} attribute - Attribute key.
4822
- * @param {number} value - Value to increment the attribute by. The value must be a number.
4823
- * @param {number} min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
4822
+ * @param {number | bigint} value - Value to increment the attribute by. The value must be a number.
4823
+ * @param {number | bigint} min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
4824
4824
  * @param {string} transactionId - Transaction ID for staging the operation.
4825
4825
  * @throws {AppwriteException}
4826
4826
  * @returns {Promise<Document>}
4827
4827
  * @deprecated Use the object parameter style method for a better developer experience.
4828
4828
  */
4829
- decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string): Promise<Document>;
4829
+ decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number | bigint, min?: number | bigint, transactionId?: string): Promise<Document>;
4830
4830
  decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(
4831
- paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string } | string,
4832
- ...rest: [(string)?, (string)?, (string)?, (number)?, (number)?, (string)?]
4831
+ paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number | bigint, min?: number | bigint, transactionId?: string } | string,
4832
+ ...rest: [(string)?, (string)?, (string)?, (number | bigint)?, (number | bigint)?, (string)?]
4833
4833
  ): Promise<Document> {
4834
- let params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string };
4834
+ let params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number | bigint, min?: number | bigint, transactionId?: string };
4835
4835
 
4836
4836
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
4837
- params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string };
4837
+ params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number | bigint, min?: number | bigint, transactionId?: string };
4838
4838
  } else {
4839
4839
  params = {
4840
4840
  databaseId: paramsOrFirst as string,
4841
4841
  collectionId: rest[0] as string,
4842
4842
  documentId: rest[1] as string,
4843
4843
  attribute: rest[2] as string,
4844
- value: rest[3] as number,
4845
- min: rest[4] as number,
4844
+ value: rest[3] as number | bigint,
4845
+ min: rest[4] as number | bigint,
4846
4846
  transactionId: rest[5] as string
4847
4847
  };
4848
4848
  }
@@ -4900,14 +4900,14 @@ export class Databases {
4900
4900
  * @param {string} params.collectionId - Collection ID.
4901
4901
  * @param {string} params.documentId - Document ID.
4902
4902
  * @param {string} params.attribute - Attribute key.
4903
- * @param {number} params.value - Value to increment the attribute by. The value must be a number.
4904
- * @param {number} params.max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
4903
+ * @param {number | bigint} params.value - Value to increment the attribute by. The value must be a number.
4904
+ * @param {number | bigint} params.max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
4905
4905
  * @param {string} params.transactionId - Transaction ID for staging the operation.
4906
4906
  * @throws {AppwriteException}
4907
4907
  * @returns {Promise<Document>}
4908
4908
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.incrementRowColumn` instead.
4909
4909
  */
4910
- incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string }): Promise<Document>;
4910
+ incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number | bigint, max?: number | bigint, transactionId?: string }): Promise<Document>;
4911
4911
  /**
4912
4912
  * Increment a specific attribute of a document by a given value.
4913
4913
  *
@@ -4915,30 +4915,30 @@ export class Databases {
4915
4915
  * @param {string} collectionId - Collection ID.
4916
4916
  * @param {string} documentId - Document ID.
4917
4917
  * @param {string} attribute - Attribute key.
4918
- * @param {number} value - Value to increment the attribute by. The value must be a number.
4919
- * @param {number} max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
4918
+ * @param {number | bigint} value - Value to increment the attribute by. The value must be a number.
4919
+ * @param {number | bigint} max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
4920
4920
  * @param {string} transactionId - Transaction ID for staging the operation.
4921
4921
  * @throws {AppwriteException}
4922
4922
  * @returns {Promise<Document>}
4923
4923
  * @deprecated Use the object parameter style method for a better developer experience.
4924
4924
  */
4925
- incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string): Promise<Document>;
4925
+ incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number | bigint, max?: number | bigint, transactionId?: string): Promise<Document>;
4926
4926
  incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(
4927
- paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string } | string,
4928
- ...rest: [(string)?, (string)?, (string)?, (number)?, (number)?, (string)?]
4927
+ paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number | bigint, max?: number | bigint, transactionId?: string } | string,
4928
+ ...rest: [(string)?, (string)?, (string)?, (number | bigint)?, (number | bigint)?, (string)?]
4929
4929
  ): Promise<Document> {
4930
- let params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string };
4930
+ let params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number | bigint, max?: number | bigint, transactionId?: string };
4931
4931
 
4932
4932
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
4933
- params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string };
4933
+ params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number | bigint, max?: number | bigint, transactionId?: string };
4934
4934
  } else {
4935
4935
  params = {
4936
4936
  databaseId: paramsOrFirst as string,
4937
4937
  collectionId: rest[0] as string,
4938
4938
  documentId: rest[1] as string,
4939
4939
  attribute: rest[2] as string,
4940
- value: rest[3] as number,
4941
- max: rest[4] as number,
4940
+ value: rest[3] as number | bigint,
4941
+ max: rest[4] as number | bigint,
4942
4942
  transactionId: rest[5] as string
4943
4943
  };
4944
4944
  }
@@ -5073,12 +5073,12 @@ export class Databases {
5073
5073
  * @param {IndexType} params.type - Index type.
5074
5074
  * @param {string[]} params.attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
5075
5075
  * @param {string[]} params.orders - Array of index orders. Maximum of 100 orders are allowed.
5076
- * @param {number[]} params.lengths - Length of index. Maximum of 100
5076
+ * @param {number | bigint[]} params.lengths - Length of index. Maximum of 100
5077
5077
  * @throws {AppwriteException}
5078
5078
  * @returns {Promise<Models.Index>}
5079
5079
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIndex` instead.
5080
5080
  */
5081
- createIndex(params: { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[] }): Promise<Models.Index>;
5081
+ createIndex(params: { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number | bigint[] }): Promise<Models.Index>;
5082
5082
  /**
5083
5083
  * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
5084
5084
  * Attributes can be `key`, `fulltext`, and `unique`.
@@ -5089,20 +5089,20 @@ export class Databases {
5089
5089
  * @param {IndexType} type - Index type.
5090
5090
  * @param {string[]} attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
5091
5091
  * @param {string[]} orders - Array of index orders. Maximum of 100 orders are allowed.
5092
- * @param {number[]} lengths - Length of index. Maximum of 100
5092
+ * @param {number | bigint[]} lengths - Length of index. Maximum of 100
5093
5093
  * @throws {AppwriteException}
5094
5094
  * @returns {Promise<Models.Index>}
5095
5095
  * @deprecated Use the object parameter style method for a better developer experience.
5096
5096
  */
5097
- createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[]): Promise<Models.Index>;
5097
+ createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number | bigint[]): Promise<Models.Index>;
5098
5098
  createIndex(
5099
- paramsOrFirst: { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[] } | string,
5100
- ...rest: [(string)?, (string)?, (IndexType)?, (string[])?, (string[])?, (number[])?]
5099
+ paramsOrFirst: { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number | bigint[] } | string,
5100
+ ...rest: [(string)?, (string)?, (IndexType)?, (string[])?, (string[])?, (number | bigint[])?]
5101
5101
  ): Promise<Models.Index> {
5102
- let params: { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[] };
5102
+ let params: { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number | bigint[] };
5103
5103
 
5104
5104
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5105
- params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[] };
5105
+ params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number | bigint[] };
5106
5106
  } else {
5107
5107
  params = {
5108
5108
  databaseId: paramsOrFirst as string,
@@ -5111,7 +5111,7 @@ export class Databases {
5111
5111
  type: rest[2] as IndexType,
5112
5112
  attributes: rest[3] as string[],
5113
5113
  orders: rest[4] as string[],
5114
- lengths: rest[5] as number[]
5114
+ lengths: rest[5] as number | bigint[]
5115
5115
  };
5116
5116
  }
5117
5117